delete from news - please check svn

from zenpage news class

42 function remove() {
43 if ($success = parent::remove()) {
44 $success = query("DELETE FROM " . prefix('obj_to_tag') . "WHERE `type`='news' AND `objectid`=" . $this->getID());
45 $success = $success && query("DELETE FROM ".prefix('news2cat')." WHERE news_id = ".$this->getID()); // delete the category association
46 }
47 return $success;
48 }

but where is delete from news?
$success = $success && query("DELETE FROM ".prefix('news')." WHERE id = ".$this->getID()); // remove the article

Comments

  • ok i found (classes)
    sorry
  • The wonders of the object model! The decendent classes have only to implement their class specific actions and allow the parent class to do the more general stuff.
Sign In or Register to comment.