diff options
-rw-r--r-- | framework/PradoBase.php | 4 | ||||
-rw-r--r-- | framework/Web/TAssetManager.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/framework/PradoBase.php b/framework/PradoBase.php index 0baa9234..9793f90e 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -266,7 +266,7 @@ class PradoBase $className=substr($namespace,$pos+1);
if($className==='*') // a directory
{
- if(is_dir($path))
+ if((self::$_application && self::$_application->getMode()===TApplication::STATE_PERFORMANCE) || is_dir($path))
{
self::$_usings[$namespace]=$path;
set_include_path(get_include_path().PATH_SEPARATOR.$path);
@@ -276,7 +276,7 @@ class PradoBase }
else // a file
{
- if(is_file($path))
+ if((self::$_application && self::$_application->getMode()===TApplication::STATE_PERFORMANCE) || is_file($path))
{
self::$_usings[$namespace]=$path;
if(!class_exists($className,false))
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php index bfc5ef8b..5600c4ab 100644 --- a/framework/Web/TAssetManager.php +++ b/framework/Web/TAssetManager.php @@ -161,14 +161,14 @@ class TAssetManager extends TModule $dir=$this->hash(dirname($fullpath));
$fileName=basename($fullpath);
$dst=$this->_basePath.'/'.$dir;
- if(!is_file($dst.'/'.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE)
+ if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_file($dst.'/'.$fileName))
$this->copyFile($fullpath,$dst);
return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName;
}
else
{
$dir=$this->hash($fullpath);
- if(!is_dir($this->_basePath.'/'.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE)
+ if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_dir($this->_basePath.'/'.$dir))
{
Prado::trace("Publishing directory $fullpath",'System.Web.UI.TAssetManager');
$this->copyDirectory($fullpath,$this->_basePath.'/'.$dir);
@@ -255,7 +255,7 @@ class TAssetManager extends TModule $dir=$this->hash(dirname($fullpath));
$fileName=basename($fullpath);
$dst=$this->_basePath.'/'.$dir;
- if(!is_file($dst.'/'.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE)
+ if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_file($dst.'/'.$fileName))
{
if(@filemtime($dst.'/'.$fileName)<@filemtime($fullpath))
{
|