summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TThemeManager.php
diff options
context:
space:
mode:
authorxue <>2006-06-30 18:41:56 +0000
committerxue <>2006-06-30 18:41:56 +0000
commit618293517861b69334cd470068199394120cd20a (patch)
tree609f97cc4c8f617e29a9e4fed6b8c642ff48ce39 /framework/Web/UI/TThemeManager.php
parent9afa1445890254e867dd172a36f42484aec8916b (diff)
Merge from 3.0 branch till 1218.
Diffstat (limited to 'framework/Web/UI/TThemeManager.php')
-rw-r--r--framework/Web/UI/TThemeManager.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 66bfa8be..245f8049 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -10,6 +10,8 @@
* @package System.Web.UI
*/
+Prado::using('System.Web.Services.TPageService');
+
/**
* TThemeManager class
*
@@ -63,7 +65,11 @@ class TThemeManager extends TModule
public function init($config)
{
$this->_initialized=true;
- $this->getService()->setThemeManager($this);
+ $service=$this->getService();
+ if($service instanceof TPageService)
+ $service->setThemeManager($this);
+ else
+ throw new TConfigurationException('thememanager_service_unavailable');
}
/**
@@ -105,7 +111,7 @@ class TThemeManager extends TModule
{
$this->_basePath=dirname($this->getRequest()->getApplicationFilePath()).'/'.self::DEFAULT_BASEPATH;
if(($basePath=realpath($this->_basePath))===false || !is_dir($basePath))
- throw new TConfigurationException('thememanager_basepath_invalid',$this->_basePath);
+ throw new TConfigurationException('thememanager_basepath_invalid2',$this->_basePath);
$this->_basePath=$basePath;
}
return $this->_basePath;