diff options
author | Christophe.Boulain <> | 2010-02-15 09:20:35 +0000 |
---|---|---|
committer | Christophe.Boulain <> | 2010-02-15 09:20:35 +0000 |
commit | d860219f366a8fbe63b03d26c69525d4e6bd4f3a (patch) | |
tree | 6520a9a0a70a941d122de10d8f5ae9e3883a0ac6 /framework/Web/UI/TPage.php | |
parent | 94e94e0a8566f23d16658a04c55b0bbfdd6689aa (diff) |
Merge from r2765 (and some others) 3.1
Added TActiveTableRow QST page
Corrected an uninitialized array in TScaffoldBase
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r-- | framework/Web/UI/TPage.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 4681f876..4a2ea474 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -586,8 +586,17 @@ class TPage extends TTemplateControl */
public function getClientScript()
{
- if(!$this->_clientScript)
- $this->_clientScript=new TClientScriptManager($this);
+ if(!$this->_clientScript) {
+ $className = $classPath = $this->getService()->getClientScriptManagerClass();
+ Prado::using($className);
+ if(($pos=strrpos($className,'.'))!==false)
+ $className=substr($className,$pos+1);
+
+ if(!class_exists($className,false) || ($className!=='TClientScriptManager' && !is_subclass_of($className,'TClientScriptManager')))
+ throw new THttpException(404,'page_csmanagerclass_invalid',$classPath);
+
+ $this->_clientScript=new $className($this);
+ }
return $this->_clientScript;
}
|