diff --git a/application/forms/Config/General/ApplicationConfigForm.php b/application/forms/Config/General/ApplicationConfigForm.php index 8f718ccdf..6d00a5b47 100644 --- a/application/forms/Config/General/ApplicationConfigForm.php +++ b/application/forms/Config/General/ApplicationConfigForm.php @@ -48,13 +48,13 @@ class ApplicationConfigForm extends Form 'select', 'preferences_type', array( - 'required' => true, + 'allowEmpty' => true, 'autosubmit' => true, 'label' => $this->translate('User Preference Storage Type'), 'multiOptions' => array( 'ini' => $this->translate('File System (INI Files)'), 'db' => $this->translate('Database'), - 'null' => $this->translate('Don\'t Store Preferences') + '' => $this->translate('Don\'t Store Preferences') ) ) ); diff --git a/library/Icinga/Authentication/Manager.php b/library/Icinga/Authentication/Manager.php index 12269d98e..887c9674d 100644 --- a/library/Icinga/Authentication/Manager.php +++ b/library/Icinga/Authentication/Manager.php @@ -63,11 +63,10 @@ class Manager ); $config = new Config(); } - if ($config->hasSection('preferences')) { - $preferencesConfig = $config->getSection('preferences'); + if ($config->get('preferences', 'type')) { try { $preferencesStore = PreferencesStore::create( - $preferencesConfig, + $config->getSection('preferences'), $user ); $preferences = new Preferences($preferencesStore->load()); diff --git a/modules/setup/application/forms/PreferencesPage.php b/modules/setup/application/forms/PreferencesPage.php index 07e011ee1..1309f59f9 100644 --- a/modules/setup/application/forms/PreferencesPage.php +++ b/modules/setup/application/forms/PreferencesPage.php @@ -66,13 +66,13 @@ class PreferencesPage extends Form if (Platform::hasMysqlSupport() || Platform::hasPostgresqlSupport()) { $storageTypes['db'] = $this->translate('Database'); } - $storageTypes['null'] = $this->translate('Don\'t Store Preferences'); + $storageTypes[''] = $this->translate('Don\'t Store Preferences'); $this->addElement( 'select', 'type', array( - 'required' => true, + 'allowEmpty' => true, 'label' => $this->translate('User Preference Storage Type'), 'multiOptions' => $storageTypes )