Config: Rename `configPath' to `config_path'

We use underscore_case notation for all configuration keys.

refs #4952
This commit is contained in:
Eric Lippmann 2014-06-02 12:09:16 +02:00
parent 3a25f019c5
commit 50e01d1284
3 changed files with 5 additions and 5 deletions

View File

@ -330,7 +330,7 @@ class GeneralForm extends Form
'label' => 'User Preference Filepath',
'required' => $backend === 'ini',
'condition' => $backend === 'ini',
'value' => $cfg->get('configPath')
'value' => $cfg->get('config_path')
)
);
@ -432,7 +432,7 @@ class GeneralForm extends Form
$cfg->preferences->type = $values['preferences_type'];
if ($cfg->preferences->type === 'ini') {
$cfg->preferences->configPath = $values['preferences_ini_path'];
$cfg->preferences->config_path = $values['preferences_ini_path'];
} elseif ($cfg->preferences->type === 'db') {
$cfg->preferences->resource = $values['preferences_db_resource'];
}

View File

@ -44,7 +44,7 @@ level = 1
[preferences]
; Use INI file storage to save preferences to a local disk
type = "ini"
configPath = "@icingaweb_config_path@/preferences"
config_path = "@icingaweb_config_path@/preferences"
; Use database storage to save preferences in either a MySQL or PostgreSQL database
;type = db

View File

@ -27,7 +27,7 @@ use Icinga\Application\Config as IcingaConfig;
* $store = PreferencesStore::create(
* new Zend_Config(
* 'type' => 'ini',
* 'configPath' => '/path/to/preferences'
* 'config_path' => '/path/to/preferences'
* ),
* $user // Instance of \Icinga\User
* );
@ -132,7 +132,7 @@ abstract class PreferencesStore
}
if ($type === 'Ini') {
$config->location = IcingaConfig::resolvePath($config->configPath);
$config->location = IcingaConfig::resolvePath($config->config_path);
} elseif ($type === 'Db') {
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
}