public function delete_tool() { if ($this->loaded) { ORM::factory('calendar_item')->where(array('fk_site' => $this->fk_site, 'calendar_id' => $this->id))->delete_all(); return parent::delete($this->id); } }
public function delete_tool() { if ($this->loaded) { ORM::factory('blog_post')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all(); ORM::factory('blog_post_tag')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all(); ORM::factory('blog_post_comment')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all(); return parent::delete($this->id); } }
public function delete($id) { if ($id) { $rs = new Tool($id); $rs->delete(); set_notify('success', lang('delete_data_complete')); } redirect('tools/admin/tools'); }
public function delete_tool() { if ($this->loaded) { $db = Database::instance(); $db->query("\n DELETE cats.*, items.*\n FROM showroom_cats as cats, showroom_cat_items as items\n WHERE cats.fk_site = '{$this->fk_site}'\n AND cats.showroom_id = '{$this->id}'\n AND cats.id = items.showroom_cat_id\n "); # hack to remove the root node which has no items on it. ORM::factory('showroom_cat')->where(array('fk_site' => $this->fk_site, 'showroom_id' => $this->id))->delete_all(); return parent::delete($this->id); } }
public function delete_tool() { if ($this->loaded) { return parent::delete($this->id); } }