From a2bb6b40fa09b9d25a610ea71854bfd06ee538cf Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 7 Feb 2006 02:31:27 +0000 Subject: Fixed a bug in generating URLs with double slashes. --- .../quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php | 2 ++ framework/Web/UI/TAssetManager.php | 4 ++-- framework/Web/UI/TThemeManager.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php index 6d6d967c..30b78765 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php @@ -45,6 +45,8 @@ class Sample5 extends Sample1 public function useNumericPager($sender,$param) { $this->DataGrid->PagerStyle->Mode='Numeric'; + $this->DataGrid->PagerStyle->NextPageText=$this->NextPageText->Text; + $this->DataGrid->PagerStyle->PrevPageText=$this->PrevPageText->Text; $this->DataGrid->PagerStyle->PageButtonCount=$this->PageButtonCount->Text; $this->DataGrid->DataSource=$this->Data; $this->DataGrid->dataBind(); 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) diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index f29a8def..51796046 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -123,7 +123,7 @@ class TThemeManager extends TModule $basePath=$this->getBasePath(); if(strpos($basePath,$appPath)===false) throw new TConfigurationException('thememanager_baseurl_required'); - $appUrl=dirname($this->getRequest()->getApplicationPath()); + $appUrl=rtrim(dirname($this->getRequest()->getApplicationPath()),'/'); $this->_baseUrl=$appUrl.strtr(substr($basePath,strlen($appPath)),'\\','/'); } return $this->_baseUrl; -- cgit v1.2.3