Skip to content

Commit

Permalink
Remove isExistingBackend/-Instance
Browse files Browse the repository at this point in the history
It is more efficient to access configuration files only once instead of
accessing them multiple times in different locations.

refs #5525
  • Loading branch information
Johannes Meyer committed Jul 25, 2014
1 parent d7ed6bd commit 5a73811
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions modules/monitoring/application/controllers/ConfigController.php
Expand Up @@ -242,30 +242,4 @@ protected function writeConfiguration($config, $file)

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);
}
}

0 comments on commit 5a73811

Please sign in to comment.