public function updateThreadObject() { /** * @var $ilTabs ilTabsGUI */ global $ilTabs; $ilTabs->setTabActive('forums_threads'); if (isset($_POST['title']) && strlen($_POST['title'])) { $this->objCurrentTopic->setSubject($_POST['title']); $this->objCurrentTopic->updateThreadTitle(); } $this->showThreadsObject(); }
/** * */ public function updateThreadObject() { if (!$this->is_moderator) { $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE); } if (!$this->objCurrentTopic->getId()) { $this->showThreadsObject(); return; } $forum_id = ilObjForum::lookupForumIdByObjId($this->object->getId()); if ($this->objCurrentTopic->getForumId() != $forum_id) { $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE); } $form = $this->getThreadEditingForm($this->objCurrentTopic->getId()); if (!$form->checkInput()) { $form->setValuesByPost(); $this->editThreadObject($this->objCurrentTopic->getId(), $form); return; } $this->objCurrentTopic->setSubject($form->getInput('title')); $this->objCurrentTopic->updateThreadTitle(); ilUtil::sendSuccess($this->lng->txt('saved_successfully')); $this->showThreadsObject(); }