mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Do not save config references in the `ActionController'
This is redundant because our `Config' class already caches loaded configs.
This commit is contained in:
parent
119e23e79e
commit
264d818133
@ -39,10 +39,6 @@ class ActionController extends Zend_Controller_Action
|
|||||||
*/
|
*/
|
||||||
protected $requiresAuthentication = true;
|
protected $requiresAuthentication = true;
|
||||||
|
|
||||||
private $config;
|
|
||||||
|
|
||||||
private $configs = array();
|
|
||||||
|
|
||||||
private $autorefreshInterval;
|
private $autorefreshInterval;
|
||||||
|
|
||||||
private $reloadCss = false;
|
private $reloadCss = false;
|
||||||
@ -110,17 +106,10 @@ class ActionController extends Zend_Controller_Action
|
|||||||
public function Config($file = null)
|
public function Config($file = null)
|
||||||
{
|
{
|
||||||
if ($file === null) {
|
if ($file === null) {
|
||||||
if ($this->config === null) {
|
return Config::app();
|
||||||
$this->config = Config::app();
|
|
||||||
}
|
|
||||||
return $this->config;
|
|
||||||
} else {
|
} else {
|
||||||
if (! array_key_exists($file, $this->configs)) {
|
return Config::app($file);
|
||||||
$this->configs[$file] = Config::module($module, $file);
|
|
||||||
}
|
|
||||||
return $this->configs[$file];
|
|
||||||
}
|
}
|
||||||
return $this->config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Auth()
|
public function Auth()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user