mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
Revert "Fix that when chosing to not to store preferences an invalid config is created"
This reverts commit 6284da451e2a3f1fecf8935f04701d889445203c.
This commit is contained in:
parent
6284da451e
commit
14a4aaeb77
@ -48,13 +48,13 @@ class ApplicationConfigForm extends Form
|
|||||||
'select',
|
'select',
|
||||||
'preferences_type',
|
'preferences_type',
|
||||||
array(
|
array(
|
||||||
'allowEmpty' => true,
|
'required' => true,
|
||||||
'autosubmit' => true,
|
'autosubmit' => true,
|
||||||
'label' => $this->translate('User Preference Storage Type'),
|
'label' => $this->translate('User Preference Storage Type'),
|
||||||
'multiOptions' => array(
|
'multiOptions' => array(
|
||||||
'ini' => $this->translate('File System (INI Files)'),
|
'ini' => $this->translate('File System (INI Files)'),
|
||||||
'db' => $this->translate('Database'),
|
'db' => $this->translate('Database'),
|
||||||
'' => $this->translate('Don\'t Store Preferences')
|
'null' => $this->translate('Don\'t Store Preferences')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -63,10 +63,11 @@ class Manager
|
|||||||
);
|
);
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
}
|
}
|
||||||
if ($config->get('preferences', 'type')) {
|
if ($config->hasSection('preferences')) {
|
||||||
|
$preferencesConfig = $config->getSection('preferences');
|
||||||
try {
|
try {
|
||||||
$preferencesStore = PreferencesStore::create(
|
$preferencesStore = PreferencesStore::create(
|
||||||
$config->getSection('preferences'),
|
$preferencesConfig,
|
||||||
$user
|
$user
|
||||||
);
|
);
|
||||||
$preferences = new Preferences($preferencesStore->load());
|
$preferences = new Preferences($preferencesStore->load());
|
||||||
|
@ -66,13 +66,13 @@ class PreferencesPage extends Form
|
|||||||
if (Platform::hasMysqlSupport() || Platform::hasPostgresqlSupport()) {
|
if (Platform::hasMysqlSupport() || Platform::hasPostgresqlSupport()) {
|
||||||
$storageTypes['db'] = $this->translate('Database');
|
$storageTypes['db'] = $this->translate('Database');
|
||||||
}
|
}
|
||||||
$storageTypes[''] = $this->translate('Don\'t Store Preferences');
|
$storageTypes['null'] = $this->translate('Don\'t Store Preferences');
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'select',
|
'select',
|
||||||
'type',
|
'type',
|
||||||
array(
|
array(
|
||||||
'allowEmpty' => true,
|
'required' => true,
|
||||||
'label' => $this->translate('User Preference Storage Type'),
|
'label' => $this->translate('User Preference Storage Type'),
|
||||||
'multiOptions' => $storageTypes
|
'multiOptions' => $storageTypes
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user