function activatePage($a_to_list = false)
 {
     // send notifications
     include_once "Modules/Blog/classes/class.ilObjBlog.php";
     ilObjBlog::sendNotification("new", $this->isInWorkspace(), $this->node_id, $this->getBlogPosting()->getId());
     $this->getBlogPosting()->setActive(true);
     $this->getBlogPosting()->update(true, false, false);
     if (!$a_to_list) {
         $this->ctrl->redirect($this, "edit");
     } else {
         $this->ctrl->redirectByClass("ilobjbloggui", "");
     }
 }
Example #2
0
 /**
  * Update blog posting
  *
  * @param bool $a_validate
  * @param bool $a_no_history
  * @param bool $a_notify
  * @param string $a_notify_action
  * @return boolean
  */
 function update($a_validate = true, $a_no_history = false, $a_notify = true, $a_notify_action = "update")
 {
     global $ilDB;
     // blog_id, author and created cannot be changed
     $query = "UPDATE il_blog_posting SET" . " title = " . $ilDB->quote($this->getTitle(), "text") . ",created = " . $ilDB->quote($this->getCreated()->get(IL_CAL_DATETIME), "text") . ",approved =" . $ilDB->quote($this->isApproved(), "integer") . " WHERE id = " . $ilDB->quote($this->getId(), "integer");
     $ilDB->manipulate($query);
     parent::update($a_validate, $a_no_history);
     if ($a_notify && $this->getActive()) {
         include_once "Modules/Blog/classes/class.ilObjBlog.php";
         ilObjBlog::sendNotification($a_notify_action, $this->blog_node_is_wsp, $this->blog_node_id, $this->getId());
     }
     return true;
 }
 function activatePage()
 {
     // send notifications
     include_once "Modules/Blog/classes/class.ilObjBlog.php";
     ilObjBlog::sendNotification("new", $this->isInWorkspace(), $this->node_id, $this->getBlogPosting()->getId());
     $this->getBlogPosting()->setActive(true);
     $this->getBlogPosting()->update(true, false, false);
     $this->ctrl->redirect($this, "edit");
 }