diff options
author | knut <> | 2007-06-19 05:52:54 +0000 |
---|---|---|
committer | knut <> | 2007-06-19 05:52:54 +0000 |
commit | eb147ad0c3da382d991ae542720a36910f988d60 (patch) | |
tree | 7427496663795ead9f1517d0af8fbc8f22aa32ad /framework/Web | |
parent | 840d142703025927bd2fc5ffd70fcf62b0dccb76 (diff) |
fixed #655
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/TAssetManager.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php index c71ea449..3b535efe 100644 --- a/framework/Web/TAssetManager.php +++ b/framework/Web/TAssetManager.php @@ -286,13 +286,14 @@ class TAssetManager extends TModule * as published asset assumes that the tar file has already been extracted.
* @param string tar filename
* @param string MD5 checksum for the corresponding tar file.
+ * @param boolean Wether or not to check the time stamp of the file for publishing. Defaults to false.
* @return string URL path to the directory where the tar file was extracted.
*/
public function publishTarFile($tarfile, $md5sum, $checkTimestamp=false)
- {
+ {
if(isset($this->_published[$md5sum]))
return $this->_published[$md5sum];
- else if(($fullpath=realpath($md5sum))===false)
+ else if(($fullpath=realpath($md5sum))===false || !is_file($fullpath))
throw new TInvalidDataValueException('assetmanager_tarchecksum_invalid',$md5sum);
else
{
@@ -320,7 +321,7 @@ class TAssetManager extends TModule */
protected function deployTarFile($path,$destination)
{
- if(($fullpath=realpath($path))===false)
+ if(($fullpath=realpath($path))===false || !is_file($fullpath))
throw new TIOException('assetmanager_tarfile_invalid',$path);
else
{
|