Пример #1
0
 /**
  * Save Settings
  */
 function saveSettingsObject()
 {
     global $ilCtrl, $lng, $ilUser, $ilSetting;
     $this->checkPermission("write");
     $this->initSettingsForm();
     if ($this->form_gui->checkInput()) {
         if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) && $this->form_gui->getInput("shorttitle") != $this->object->getShortTitle()) {
             $short_item = $this->form_gui->getItemByPostVar("shorttitle");
             $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
         } else {
             $this->object->setTitle($this->form_gui->getInput("title"));
             $this->object->setDescription($this->form_gui->getInput("description"));
             $this->object->setOnline($this->form_gui->getInput("online"));
             $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
             $this->object->setShortTitle($this->form_gui->getInput("shorttitle"));
             $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
             $this->object->setRating($this->form_gui->getInput("rating"));
             // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
             $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
             $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
             if (!$ilSetting->get("disable_comments")) {
                 $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
             }
             $this->object->setIntroduction($this->form_gui->getInput("intro"));
             //				$this->object->setImportantPages($this->form_gui->getInput("imp_pages"));
             $this->object->setPageToc($this->form_gui->getInput("page_toc"));
             $this->object->update();
             // update metadata record selection
             include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
             $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_REC_SELECTION, 'wiki', $this->object->getId(), "wpg");
             $record_gui->saveSelection();
             // Update ecs export settings
             include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
             $ecs = new ilECSWikiSettings($this->object);
             if ($ecs->handleSettingsUpdate()) {
                 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
                 $ilCtrl->redirect($this, "editSettings");
             }
         }
     }
     $this->form_gui->setValuesByPost();
     $this->tpl->setContent($this->form_gui->getHTML());
 }