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', 'label' => 'User Preference Filepath',
'required' => $backend === 'ini', 'required' => $backend === 'ini',
'condition' => $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']; $cfg->preferences->type = $values['preferences_type'];
if ($cfg->preferences->type === 'ini') { 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') { } elseif ($cfg->preferences->type === 'db') {
$cfg->preferences->resource = $values['preferences_db_resource']; $cfg->preferences->resource = $values['preferences_db_resource'];
} }

View File

@ -44,7 +44,7 @@ level = 1
[preferences] [preferences]
; Use INI file storage to save preferences to a local disk ; Use INI file storage to save preferences to a local disk
type = "ini" 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 ; Use database storage to save preferences in either a MySQL or PostgreSQL database
;type = db ;type = db

View File

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