summaryrefslogtreecommitdiff
path: root/framework/Web/TAssetManager.php
diff options
context:
space:
mode:
authorxue <>2006-09-04 19:15:47 +0000
committerxue <>2006-09-04 19:15:47 +0000
commit56fee292c37e162c03fab9eeadd6a8b9ab85c251 (patch)
tree923510b93c707868098ae4e5f404eb3766a59553 /framework/Web/TAssetManager.php
parentb107cad91733d4a2a80f42cdbaab41a4f7b41c9d (diff)
merge from 3.0 branch till 1387
Diffstat (limited to 'framework/Web/TAssetManager.php')
-rw-r--r--framework/Web/TAssetManager.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php
index add4b930..733a2051 100644
--- a/framework/Web/TAssetManager.php
+++ b/framework/Web/TAssetManager.php
@@ -162,14 +162,14 @@ class TAssetManager extends TModule
$dir=$this->hash(dirname($fullpath));
$fileName=basename($fullpath);
$dst=$this->_basePath.'/'.$dir;
- if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_file($dst.'/'.$fileName))
+ if(!is_file($dst.'/'.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
$this->copyFile($fullpath,$dst);
return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName;
}
else
{
$dir=$this->hash($fullpath);
- if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_dir($this->_basePath.'/'.$dir))
+ if(!is_dir($this->_basePath.'/'.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
{
Prado::trace("Publishing directory $fullpath",'System.Web.UI.TAssetManager');
$this->copyDirectory($fullpath,$this->_basePath.'/'.$dir);
@@ -202,7 +202,7 @@ class TAssetManager extends TModule
{
@mkdir($dst);
@chmod($dst, 0777);
- }
+ }
$dstFile=$dst.'/'.basename($src);
if(@filemtime($dstFile)<@filemtime($src))
{
@@ -263,7 +263,7 @@ class TAssetManager extends TModule
$dir=$this->hash(dirname($fullpath));
$fileName=basename($fullpath);
$dst=$this->_basePath.'/'.$dir;
- if($this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE || $checkTimestamp || !is_file($dst.'/'.$fileName))
+ if(!is_file($dst.'/'.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance)
{
if(@filemtime($dst.'/'.$fileName)<@filemtime($fullpath))
{
@@ -296,4 +296,4 @@ class TAssetManager extends TModule
}
-?> \ No newline at end of file
+?>