ZenphotoCMS Forum
delete from news - please check svn - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: delete from news - please check svn (/thread-7738.html)



delete from news - please check svn - midas - 2010-10-21

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




delete from news - please check svn - midas - 2010-10-21

ok i found (classes)
sorry




delete from news - please check svn - sbillard - 2010-10-21

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.