protected function doDelete()
 {
     global $ilDB;
     $this->deleteImage();
     include_once "Modules/Blog/classes/class.ilBlogPosting.php";
     ilBlogPosting::deleteAllBlogPostings($this->id);
     // remove all notifications
     include_once "./Services/Notification/classes/class.ilNotification.php";
     ilNotification::removeForObject(ilNotification::TYPE_BLOG, $this->id);
     $ilDB->manipulate("DELETE FROM il_blog" . " WHERE id = " . $ilDB->quote($this->id, "integer"));
 }
Пример #2
0
 /**
  * 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;
 }
 /**
  * delete course and all related data
  *
  * @access	public
  * @return	boolean	true if all object data were removed; false if only a references were removed
  */
 function delete()
 {
     global $ilDB;
     // always call parent delete function first!!
     if (!parent::delete()) {
         return false;
     }
     // put here course specific stuff
     $ilDB->manipulate("DELETE FROM exc_data " . "WHERE obj_id = " . $ilDB->quote($this->getId(), "integer"));
     //$this->ilias->db->query($query);
     //$this->file_obj->delete();
     //$this->members_obj->delete();
     // remove all notifications
     include_once "./Services/Notification/classes/class.ilNotification.php";
     ilNotification::removeForObject(ilNotification::TYPE_EXERCISE_SUBMISSION, $this->getId());
     return true;
 }
Пример #4
0
 /**
  * delete object and all related data	
  *
  * @access	public
  * @return	boolean	true if all object data were removed; false if only a references were removed
  */
 function delete()
 {
     global $ilDB;
     // always call parent delete function first!!
     if (!parent::delete()) {
         return false;
     }
     // delete record of table il_wiki_data
     $query = "DELETE FROM il_wiki_data" . " WHERE id = " . $ilDB->quote($this->getId(), "integer");
     $ilDB->manipulate($query);
     // remove all notifications
     include_once "./Services/Notification/classes/class.ilNotification.php";
     ilNotification::removeForObject(ilNotification::TYPE_WIKI, $this->getId());
     include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
     ilWikiPage::deleteAllPagesOfWiki($this->getId());
     return true;
 }