From d833d2766f28f927cb4e1e8e660771361abdfdf9 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 17 Nov 2005 19:21:21 +0000 Subject: added application mode support. --- framework/Web/UI/TThemeManager.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index 5f347e8f..9b407b90 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -64,17 +64,20 @@ class TThemeManager extends TComponent implements IModule { list($theme,$timestamp)=$array; $cacheValid=true; - if(($dir=opendir($themePath))===false) - throw new TIOException('thememanager_themepath_invalid',$themePath); - while(($file=readdir($dir))!==false) + if($this->_application->getMode()!=='Performance') { - if(basename($file,'.skin')!==$file && filemtime($themePath.'/'.$file)>$timestamp) + if(($dir=opendir($themePath))===false) + throw new TIOException('thememanager_themepath_invalid',$themePath); + while(($file=readdir($dir))!==false) { - $cacheValid=false; - break; + if(basename($file,'.skin')!==$file && filemtime($themePath.'/'.$file)>$timestamp) + { + $cacheValid=false; + break; + } } + closedir($dir); } - closedir($dir); if($cacheValid) return $theme; } -- cgit v1.2.3