Beispiel #1
0
 /**
  * Stores the general settings of a user.
  */
 public function store_action()
 {
     $this->check_ticket();
     $language = Request::get('forced_language');
     if (array_key_exists($language, $GLOBALS['INSTALLED_LANGUAGES'])) {
         $this->user->preferred_language = $_SESSION['_language'] = $language;
         $this->user->store();
     }
     $this->config->store('PERSONAL_STARTPAGE', Request::int('personal_startpage'));
     $this->config->store('ACCESSKEY_ENABLE', Request::int('accesskey_enable'));
     $this->config->store('SHOWSEM_ENABLE', Request::int('showsem_enable'));
     $this->config->store('SKIPLINKS_ENABLE', Request::int('skiplinks_enable'));
     $this->config->store('TOUR_AUTOSTART_DISABLE', Request::int('tour_autostart_disable'));
     if (Request::int('personal_notifications_activated')) {
         PersonalNotifications::activate();
     } else {
         PersonalNotifications::deactivate();
     }
     if (Request::int('personal_notifications_audio_activated')) {
         PersonalNotifications::activateAudioFeedback();
     } else {
         PersonalNotifications::deactivateAudioFeedback();
     }
     $this->reportSuccess(_('Die Einstellungen wurden gespeichert.'));
     $this->redirect('settings/general');
 }