summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-04-11 12:02:57 +0000
committerxue <>2006-04-11 12:02:57 +0000
commitce695a47526931de5e8f531fa4461281d66b6a32 (patch)
treedf83785fde6da38d375aa1e714b55dddabd22ceb /framework
parent0d8044202bbd031e2a5e32166e568fe626263152 (diff)
Eliminated a few is_file() calls.
Diffstat (limited to 'framework')
-rw-r--r--framework/PradoBase.php4
-rw-r--r--framework/Web/TAssetManager.php6
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))
{