function observeNoteAction($a_wiki_id, $a_page_id, $a_type, $a_action, $a_note_id) { // #10040 - get note text include_once "Services/Notes/classes/class.ilNote.php"; $note = new ilNote($a_note_id); $note = $note->getText(); include_once "./Services/Notification/classes/class.ilNotification.php"; ilWikiUtil::sendNotification("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $note); }
/** * 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; }