Settings: remove all legacy getSettings calls

This commit is contained in:
Thomas Gelf 2016-08-30 07:52:48 +00:00
parent 336257680c
commit a64e36b111
3 changed files with 4 additions and 6 deletions

View File

@ -79,6 +79,6 @@ class JobsCommand extends Command
protected function hasBeenDisabled()
{
return $this->db()->getSetting('disable_all_jobs') === 'y';
return $this->db()->settings()->disable_all_jobs === 'y';
}
}

View File

@ -46,7 +46,7 @@ class IcingaConfig
$this->connection = $connection;
$this->db = $connection->getDbAdapter();
$this->configFormat = $this->connection->getSetting('config_format', 'v2');
$this->configFormat = $this->connection->settings()->config_format;
}
public function getSize()
@ -497,10 +497,7 @@ apply Service for (title => params in host.vars["%s"]) {
protected function getMagicApplyVarName()
{
return $this->connection->getSetting(
'magic_apply_for',
'_director_apply_for'
);
return $this->connection->settings()->magic_apply_for;
}
protected function usesMagicApplyFor()

View File

@ -16,6 +16,7 @@ class Settings
'config_format' => 'v2',
'override_services_varname' => '_override_servicevars',
'override_services_templatename' => 'host var overrides (Director)',
// 'disable_all_jobs' => null, // 'y'
// 'experimental_features' => null, // 'allow'
// 'master_zone' => null,
);