/** * Delete the tree cache after delete. * * @return void */ public function delete() { parent::delete(); Phprojekt_Tree_Node_Database::deleteCache(); }
/** * Extension of delete() for don't save the search strings. * Only allow delete if the contact is public or the ownerId is the current user. * * @return void */ public function delete() { if (!$this->private || $this->private && $this->ownerId == Phprojekt_Auth::getUserId()) { $this->deleteUploadFiles(); $this->_history->saveFields($this, 'delete'); parent::delete(); } }
/** * Deletes all events in this series beginning with this one. * * @return void. */ public function delete() { $db = $this->getAdapter(); if ($this->_isFirst) { $db->delete('calendar2_user_relation', $db->quoteInto('calendar2_id = ?', $this->id)); $db->delete('calendar2_excluded_dates', $db->quoteInto('calendar2_id = ?', $this->id)); $tag = new Phprojekt_Tags(); $tag->deleteTagsByItem(Phprojekt_Module::getId('Calendar2'), $this->id); parent::delete(); } else { $first = clone $this; $first->find($this->id); $start = new Datetime('@' . Phprojekt_Converter_Time::userToUtc($this->start)); // Adjust the rrule. $helper = $first->getRruleHelper(); $split = $helper->splitRrule($start); $first->rrule = $split['old']; $first->save(); // Delete all excludes after this event. $where = $db->quoteInto('calendar2_id = ?', $this->id); $where .= $db->quoteInto('AND date >= ?', $start->format('Y-m-d H:i:s')); $db->delete('calendar2_excluded_dates', $where); } }
/** * Delete the tree cache after delete. * * @return void */ public function delete() { parent::delete(); }