diff options
author | ctrlaltca <> | 2012-05-29 09:52:51 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-05-29 09:52:51 +0000 |
commit | 21aa1d7bbcc46d3f76d3d60dd84b5def6905f783 (patch) | |
tree | 8175404484beec8420ba48af5d296da9bdbb6595 /framework | |
parent | 80d7b66eef5495c13f8b67ffefc8d5f172f25a15 (diff) |
fix #406; additionally removed some safe_mode related code since it's deprecated
Diffstat (limited to 'framework')
-rw-r--r-- | framework/TApplication.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php index 65bb19da..c147fbd6 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -349,10 +349,9 @@ class TApplication extends TComponent // determine configuration path and file if(empty($basePath) || ($basePath=realpath($basePath))===false) throw new TConfigurationException('application_basepath_invalid',$basePath); - // is_file prints a warning if the file doesn't exists and open_basedir is in effect - if(@is_file($basePath.DIRECTORY_SEPARATOR.$this->getConfigurationFileName())) + if(is_file($basePath.DIRECTORY_SEPARATOR.$this->getConfigurationFileName())) $configFile=$basePath.DIRECTORY_SEPARATOR.$this->getConfigurationFileName(); - else if(@is_file($basePath)) + else if(is_file($basePath)) { $configFile=$basePath; $basePath=dirname($configFile); @@ -934,6 +933,11 @@ class TApplication extends TComponent return $this->_authRules; } + protected function getApplicationConfigurationClass() + { + return 'TApplicationConfiguration'; + } + /** * Applies an application configuration. * @param TApplicationConfiguration the configuration @@ -1007,7 +1011,8 @@ class TApplication extends TComponent { if(($path=Prado::getPathOfNamespace($filePath,$this->getConfigurationFileExt()))===null || !is_file($path)) throw new TConfigurationException('application_includefile_invalid',$filePath); - $c=new TApplicationConfiguration; + $cn=$this->getApplicationConfigurationClass(); + $c=new $cn; $c->loadFromFile($path); $this->applyConfiguration($c,$withinService); } |