From 4eaae0d4b80a8586b5408726a8859d7647f7d954 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 16 Nov 2005 04:43:16 +0000 Subject: --- framework/Web/TAssetManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'framework/Web/TAssetManager.php') diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php index b12bc4df..f1dfa15b 100644 --- a/framework/Web/TAssetManager.php +++ b/framework/Web/TAssetManager.php @@ -161,7 +161,7 @@ class TAssetManager extends TComponent implements IModule public function publishFilePath($path,$checkTimestamp=false) { if(($fullpath=realpath($path))===false) - throw new TInvalidDataValueException('assetmanager_filepath_invalid',$path); + return ''; else if(is_file($fullpath)) { $dir=md5(dirname($fullpath)); @@ -170,7 +170,7 @@ class TAssetManager extends TComponent implements IModule if(!is_file($file) || (($checkTimestamp || $this->_checkTimestamp) && filemtime($file)_basePath.'/'.$dir); - copy($fullpath,$file); + @copy($fullpath,$file); } return $this->_baseUrl.'/'.$dir.'/'.basename($fullpath); } @@ -193,15 +193,15 @@ class TAssetManager extends TComponent implements IModule protected function copyDirectory($src,$dst) { @mkdir($dst); - $folder=opendir($src); - while($file=readdir($folder)) + $folder=@opendir($src); + while($file=@readdir($folder)) { if($file==='.' || $file==='..') continue; else if(is_file($src.'/'.$file)) { - if(@filemtime($dst.'/'.$file)copyDirectory($src.'/'.$file,$dst.'/'.$file); -- cgit v1.2.3