/** * delete wiki page and al related data * * @access public */ function delete() { global $ilDB; // delete internal links information to this page include_once "./Services/COPage/classes/class.ilInternalLink.php"; ilInternalLink::_deleteAllLinksToTarget("user", $this->getId()); // delete record of table usr_ext_profile_page $query = "DELETE FROM usr_ext_profile_page" . " WHERE id = " . $ilDB->quote($this->getId(), "integer"); $ilDB->manipulate($query); // delete co page parent::delete(); return true; }
/** * delete portfolio page and all related data */ function delete() { global $ilDB; $id = $this->getId(); if ($id) { // delete internal links information to this page include_once "./Services/Link/classes/class.ilInternalLink.php"; ilInternalLink::_deleteAllLinksToTarget("user", $this->getId()); // delete record of table usr_portfolio_page $query = "DELETE FROM usr_portfolio_page" . " WHERE id = " . $ilDB->quote($this->getId(), "integer"); $ilDB->manipulate($query); // delete co page parent::delete(); } }
/** * delete wiki page and al related data * * @access public */ function delete() { global $ilDB; // get other pages that link to this page $linking_pages = ilWikiPage::getLinksToPage($this->getWikiId(), $this->getId()); // delete internal links information to this page include_once "./Services/COPage/classes/class.ilInternalLink.php"; ilInternalLink::_deleteAllLinksToTarget("wpg", $this->getId()); include_once "./Services/Notification/classes/class.ilNotification.php"; ilWikiUtil::sendNotification("delete", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $this->getId()); // remove all notifications include_once "./Services/Notification/classes/class.ilNotification.php"; ilNotification::removeForObject(ilNotification::TYPE_WIKI_PAGE, $this->getId()); // delete record of table il_wiki_data $query = "DELETE FROM il_wiki_page" . " WHERE id = " . $ilDB->quote($this->getId(), "integer"); $ilDB->manipulate($query); // delete co page parent::delete(); // make links of other pages to this page a missing link foreach ($linking_pages as $lp) { $ilDB->manipulateF("DELETE FROM il_wiki_missing_page " . " WHERE wiki_id = %s AND source_id = %s AND target_name = %s ", array("integer", "integer", "text"), array($this->getWikiId(), $lp["id"], $this->getTitle())); $ilDB->manipulateF("INSERT INTO il_wiki_missing_page " . "(wiki_id, source_id, target_name) VALUES " . "(%s,%s,%s)", array("integer", "integer", "text"), array($this->getWikiId(), $lp["id"], $this->getTitle())); } return true; }