Do not save config references in the `ActionController'

This is redundant because our `Config' class already caches loaded configs.
This commit is contained in:
Eric Lippmann 2014-09-19 14:44:21 +02:00
parent 119e23e79e
commit 264d818133

View File

@ -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()