summaryrefslogtreecommitdiff
path: root/framework/Web/Services/TPageService.php
diff options
context:
space:
mode:
authorcarlgmathisen <>2008-12-07 13:05:05 +0000
committercarlgmathisen <>2008-12-07 13:05:05 +0000
commit736e92efbc75908a2bf26fe333a03990e3bb8100 (patch)
tree21dfe413b2f3f52704ca28e17f22269f9cfdb5ea /framework/Web/Services/TPageService.php
parent6228873cf9d6471463d2413e7dfd7447f759baf2 (diff)
work on php style configuration
Diffstat (limited to 'framework/Web/Services/TPageService.php')
-rw-r--r--framework/Web/Services/TPageService.php10
1 files changed, 8 insertions, 2 deletions
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 <qiang.xue@gmail.com>
+ * @author Carl G. Mathisen <carlgmathisen@gmail.com>
* @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