Beispiel #1
0
 protected function updateCustom(ilPropertyFormGUI $a_form)
 {
     /**
      * @var $ilSetting ilSetting
      */
     global $ilSetting;
     $view = (int) $_POST['default_view'];
     if ($view == ilForumProperties::VIEW_DATE) {
         $view = ilForumProperties::VIEW_DATE_ASC;
         if ((int) $_POST['default_view_sort_dir'] == ilForumProperties::VIEW_DATE_DESC) {
             $view = ilForumProperties::VIEW_DATE_DESC;
         }
     }
     $this->objProperties->setDefaultView($view);
     // BUGFIX FOR 11271
     if (isset($_SESSION['viewmode'])) {
         $_SESSION['viewmode'] = $view;
     }
     if ($ilSetting->get('enable_anonymous_fora') || $this->objProperties->isAnonymized()) {
         $this->objProperties->setAnonymisation((int) $a_form->getInput('anonymized'));
     }
     if ($ilSetting->get('enable_fora_statistics', false)) {
         $this->objProperties->setStatisticsStatus((int) $a_form->getInput('statistics_enabled'));
     }
     $this->objProperties->setPostActivation((int) $a_form->getInput('post_activation'));
     $this->objProperties->setSubjectSetting($a_form->getInput('subject_setting'));
     $this->objProperties->setMarkModeratorPosts((int) $a_form->getInput('mark_mod_posts'));
     $this->objProperties->setThreadSorting((int) $a_form->getInput('thread_sorting'));
     $this->objProperties->setIsThreadRatingEnabled((bool) $a_form->getInput('thread_rating'));
     $this->objProperties->update();
 }