/** * 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/Link/classes/class.ilInternalLink.php"; ilInternalLink::_deleteAllLinksToTarget("wpg", $this->getId()); include_once "./Modules/Wiki/classes/class.ilWikiStat.php"; ilWikiStat::handleEvent(ilWikiStat::EVENT_PAGE_DELETED, $this); 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; }
public function updateStatsRating($a_wiki_id, $a_wiki_type, $a_page_id, $a_page_type) { include_once "./Modules/Wiki/classes/class.ilWikiStat.php"; ilWikiStat::handleEvent(ilWikiStat::EVENT_PAGE_RATING, $this->getPageObject()); }