summaryrefslogtreecommitdiff
path: root/framework/Web/Services/TPageService.php
diff options
context:
space:
mode:
authorxue <>2005-11-14 13:07:54 +0000
committerxue <>2005-11-14 13:07:54 +0000
commite673d00e69d9cf4a12b68f2b5efc131eb1e3d9e2 (patch)
tree287d624581d7e48b7ba6471af82caff018123bd3 /framework/Web/Services/TPageService.php
parent32dd060128dcbb4edfc14b8463f07d3cba23e931 (diff)
property initialization via <pages> tag can now be inherited in child directories.
Diffstat (limited to 'framework/Web/Services/TPageService.php')
-rw-r--r--framework/Web/Services/TPageService.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 39dddd59..f32e8ee7 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -629,20 +629,23 @@ class TPageConfiguration extends TComponent
}
// pages
- if($page!==null && ($pagesNode=$dom->getElementByTagName('pages'))!==null)
+ if(($pagesNode=$dom->getElementByTagName('pages'))!==null)
{
- $baseProperties=$pagesNode->getAttributes();
- foreach($pagesNode->getElementsByTagName('page') as $node)
+ $this->_properties=array_merge($this->_properties,$pagesNode->getAttributes()->toArray());
+ if($page!==null) // at the page folder
{
- $properties=$node->getAttributes();
- $type=$properties->remove('type');
- $id=$properties->itemAt('id');
- if($id===null || $type===null)
- throw new TConfigurationException('pageservice_page_element_invalid',$fname);
- if($id===$page)
+ foreach($pagesNode->getElementsByTagName('page') as $node)
{
- $this->_properties=array_merge($baseProperties->toArray(),$properties->toArray());
- $this->_pageType=$type;
+ $properties=$node->getAttributes();
+ $type=$properties->remove('type');
+ $id=$properties->itemAt('id');
+ if($id===null || $type===null)
+ throw new TConfigurationException('pageservice_page_element_invalid',$fname);
+ if($id===$page)
+ {
+ $this->_properties=array_merge($this->_properties,$properties->toArray());
+ $this->_pageType=$type;
+ }
}
}
}