From 736e92efbc75908a2bf26fe333a03990e3bb8100 Mon Sep 17 00:00:00 2001 From: carlgmathisen <> Date: Sun, 7 Dec 2008 13:05:05 +0000 Subject: work on php style configuration --- framework/Web/Services/TPageService.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'framework/Web/Services/TPageService.php') diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 10c7da6e..4d08ed4c 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -69,6 +69,7 @@ Prado::using('System.Web.UI.TThemeManager'); * accessing to any resources. * * @author Qiang Xue + * @author Carl G. Mathisen * @version $Id$ * @package System.Web.Services * @since 3.0 @@ -274,7 +275,12 @@ class TPageService extends TService { $pageConfig=new TPageConfiguration($pagePath); if($config!==null) - $pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath(),''); + { + if($application->getConfigurationType()==TApplication::CONFIG_TYPE_PHP) + $pageConfig->loadPageConfigurationFromPhp($config,$application->getBasePath(),''); + else + $pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath(),''); + } $pageConfig->loadFromFiles($this->getBasePath()); $cache->set(self::CONFIG_CACHE_PREFIX.$this->getID().$pagePath,array($pageConfig,$currentTimestamp)); } @@ -721,6 +727,7 @@ class TPageConfiguration extends TComponent $rules[]=new TAuthorizationRule($action,$users,$roles,$verb,$ips); } } + $this->_rules=array_merge($rules,$this->_rules); } // pages if(isset($config['pages']) && is_array($config['pages'])) @@ -747,7 +754,6 @@ class TPageConfiguration extends TComponent if($matching) $this->_properties=array_merge($this->_properties,$properties); } - $this->_rules=array_merge($rules,$this->_rules); } // external configurations -- cgit v1.2.3