summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TAssetManager.php
diff options
context:
space:
mode:
authorxue <>2006-02-07 02:31:27 +0000
committerxue <>2006-02-07 02:31:27 +0000
commita2bb6b40fa09b9d25a610ea71854bfd06ee538cf (patch)
tree638e8697c94945a436d51d681b15f40802f0dd16 /framework/Web/UI/TAssetManager.php
parent0d56725dd699041530e92026868193e87b81b837 (diff)
Fixed a bug in generating URLs with double slashes.
Diffstat (limited to 'framework/Web/UI/TAssetManager.php')
-rw-r--r--framework/Web/UI/TAssetManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Web/UI/TAssetManager.php b/framework/Web/UI/TAssetManager.php
index cd25a74c..c0a85b2b 100644
--- a/framework/Web/UI/TAssetManager.php
+++ b/framework/Web/UI/TAssetManager.php
@@ -81,7 +81,7 @@ class TAssetManager extends TModule
if(!is_writable($this->_basePath) || !is_dir($this->_basePath))
throw new TConfigurationException('assetmanager_basepath_invalid',$this->_basePath);
if($this->_baseUrl===null)
- $this->_baseUrl=dirname($application->getRequest()->getApplicationPath()).'/'.self::DEFAULT_BASEPATH;
+ $this->_baseUrl=rtrim(dirname($application->getRequest()->getApplicationPath()),'/').'/'.self::DEFAULT_BASEPATH;
$application->getService()->setAssetManager($this);
}
@@ -128,7 +128,7 @@ class TAssetManager extends TModule
if($this->_initialized)
throw new TInvalidOperationException('assetmanager_baseurl_unchangeable');
else
- $this->_baseUrl=$value;
+ $this->_baseUrl=rtrim($value,'/');
}
public function getPublishedUrl($path)