mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-20 04:14:24 +02:00
Remove isExistingBackend/-Instance
It is more efficient to access configuration files only once instead of accessing them multiple times in different locations. refs #5525
This commit is contained in:
parent
d7ed6bd249
commit
5a738112ea
@ -242,30 +242,4 @@ class Monitoring_ConfigController extends ModuleActionController
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return whether the given backend exists in the current configuration
|
|
||||||
*
|
|
||||||
* @param string $backend The name of the backend to check
|
|
||||||
*
|
|
||||||
* @return bool Whether the backend exists or not
|
|
||||||
*/
|
|
||||||
protected function isExistingBackend($backend)
|
|
||||||
{
|
|
||||||
$backendCfg = $this->Config('backends');
|
|
||||||
return $backend && $backendCfg->get($backend);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return whether the given instance exists in the current configuration
|
|
||||||
*
|
|
||||||
* @param string $instance The name of the instance to check
|
|
||||||
*
|
|
||||||
* @return bool Whether the instance exists or not
|
|
||||||
*/
|
|
||||||
protected function isExistingInstance($instance)
|
|
||||||
{
|
|
||||||
$instanceCfg = $this->Config('instances');
|
|
||||||
return $instanceCfg && $instanceCfg->get($instance);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user