From d860219f366a8fbe63b03d26c69525d4e6bd4f3a Mon Sep 17 00:00:00 2001 From: "Christophe.Boulain" <> Date: Mon, 15 Feb 2010 09:20:35 +0000 Subject: Merge from r2765 (and some others) 3.1 Added TActiveTableRow QST page Corrected an uninitialized array in TScaffoldBase --- framework/Web/UI/TPage.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/TPage.php') 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; } -- cgit v1.2.3