From 1f560ccd8a9e21871dbedd548fc97f231131c771 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 30 Aug 2006 12:33:43 +0000 Subject: merge from 3.0 branch till 1363. --- framework/Web/UI/TClientScriptManager.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI/TClientScriptManager.php') diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 504cfb40..3d0ced60 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -133,7 +133,7 @@ class TClientScriptManager extends TApplicationComponent $this->_registeredPradoScripts[$name]=true; else throw new TInvalidOperationException('csmanager_pradoscript_invalid',$name); - $basePath=Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + $basePath=$this->getPradoBaseScriptPath(); foreach(self::$_pradoScripts[$name] as $script) { if(!isset($this->_publishedPradoFiles[$script])) @@ -145,6 +145,15 @@ class TClientScriptManager extends TApplicationComponent } } + protected function getPradoBaseScriptPath() + { + $basePath = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + if($this->getApplication()->getMode()===TApplication::STATE_DEBUG) + return $basePath.'/debug'; + else + return $basePath.'/compressed'; + } + /** * Renders the