diff options
author | xue <> | 2005-11-16 04:43:16 +0000 |
---|---|---|
committer | xue <> | 2005-11-16 04:43:16 +0000 |
commit | 4eaae0d4b80a8586b5408726a8859d7647f7d954 (patch) | |
tree | 64139751ae0f14e3d9cf2016b0dcc3453d9928e5 /framework/Web/TAssetManager.php | |
parent | 0574d94e46047b5a669610bc6ebf784be0c7a7bc (diff) |
Diffstat (limited to 'framework/Web/TAssetManager.php')
-rw-r--r-- | framework/Web/TAssetManager.php | 12 |
1 files changed, 6 insertions, 6 deletions
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)<filemtime($path)))
{
@mkdir($this->_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)<filemtime($src.'/'.$file))
- copy($src.'/'.$file,$dst.'/'.$file);
+ if(@filemtime($dst.'/'.$file)<@filemtime($src.'/'.$file))
+ @copy($src.'/'.$file,$dst.'/'.$file);
}
else
$this->copyDirectory($src.'/'.$file,$dst.'/'.$file);
|