public static function format_header($aConfig, $sNewId)
 {
     $aReturn = array();
     BsConfig::set("MW::Flexiskin::Logo", $aConfig->logo);
     BsConfig::saveSettings();
     wfRunHooks("BSFlexiskinFormatterHeader", array(&$aConfig, &$aReturn));
     return implode(" \n", $aReturn);
 }
 /**
  * Activates the Flexiskin defined by id via request parameter
  * @return String encoded result JSON string
  */
 public function activateFlexiskin()
 {
     $sId = $this->getMain()->getVal('id', '');
     BsConfig::set("MW::Flexiskin::Active", $sId);
     BsConfig::saveSettings();
     return FormatJson::encode(array('success' => true));
 }
 /**
  * saves the settings to the database
  * @param array $aData an associative array of fieldnames and values
  */
 public function savePreferences($aData)
 {
     if (wfReadOnly()) {
         $url = SpecialPage::getTitleFor('WikiAdmin')->getFullURL(array('mode' => 'Preferences', 'success' => 0));
         $this->getOutput()->redirect($url);
         return false;
     }
     $vars = BsConfig::getRegisteredVars();
     foreach ($vars as $var) {
         $options = $var->getOptions();
         if (!($options & (BsConfig::LEVEL_PUBLIC | BsConfig::LEVEL_USER))) {
             continue;
         }
         if ($options & BsConfig::NO_DEFAULT) {
             continue;
         }
         $name = $this->generateFieldId($var);
         $value = isset($aData[$name]) ? $aData[$name] : NULL;
         if ($var->getOptions() & BsConfig::TYPE_BOOL && $value == NULL) {
             BsConfig::set($var->getKey(), 0, true);
         }
         $bReturn = true;
         wfRunHooks('BSWikiAdminPreferencesBeforeSetVariable', array($this, &$var, &$value, &$bReturn));
         if ($value !== null && $bReturn !== false) {
             BsConfig::set($var->getKey(), $value, true);
         }
     }
     BsConfig::saveSettings();
     $url = SpecialPage::getTitleFor('WikiAdmin')->getFullURL(array('mode' => 'Preferences', 'success' => 1));
     $this->getOutput()->redirect($url);
     return false;
 }
 public static function disableFeedback()
 {
     $oResult = (object) array('success' => false, 'message' => '');
     if (BsCore::checkAccessAdmission('edit') === false) {
         //PW TODO: add error message
         return FormatJson::encode($oResult);
     }
     BsConfig::set('MW::BlueSpiceProjectFeedbackHelper::Active', false);
     BsConfig::saveSettings();
     $oResult->success = true;
     return FormatJson::encode($oResult);
 }