From ce695a47526931de5e8f531fa4461281d66b6a32 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 11 Apr 2006 12:02:57 +0000 Subject: Eliminated a few is_file() calls. --- framework/Web/TAssetManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'framework/Web') 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)) { -- cgit v1.2.3