Changeset 2214
- Timestamp:
- 09/11/2007 08:01:29 AM (15 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
demos/quickstart/protected/pages/Configurations/PageConfig.page (modified) (1 diff)
-
framework/Web/Services/TPageService.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/quickstart/protected/pages/Configurations/PageConfig.page
r2213 r2214 42 42 <com:SinceVersion Version="3.1.1" /> 43 43 <p class="block-content"> 44 Since version 3.1.1, the <tt>id</tt> attribute in the <page> element can be a relative page path pointing to a page in the subdirectory of the directory containing the page configuration. For example, <tt>id="admin.Home"</tt> refers to the <tt>Home</tt> page under the <tt>admin</tt> directory. Th is enhancement allows developers to centralize their page configurations (e.g. put all page initializations in the aplication configuration or the root page configuration.)44 Since version 3.1.1, the <tt>id</tt> attribute in the <page> element can be a relative page path pointing to a page in the subdirectory of the directory containing the page configuration. For example, <tt>id="admin.Home"</tt> refers to the <tt>Home</tt> page under the <tt>admin</tt> directory. The <tt>id</tt> attribute can also contain wildcard '*' to match all pages under the specified directory. For example, <tt>id="admin.*"</tt> refers to all pages under the <tt>admin</tt> directory and its subdirectories. This enhancement allows developers to centralize their page configurations (e.g. put all page initializations in the aplication configuration or the root page configuration.) 45 45 </p> 46 46 -
trunk/framework/Web/Services/TPageService.php
r2213 r2214 696 696 { 697 697 $properties=$node->getAttributes(); 698 if(($id=$properties->remove('id'))===null) 698 $id=$properties->remove('id'); 699 if(empty($id)) 699 700 throw new TConfigurationException('pageserviceconf_page_invalid',$configPath); 700 if(($configPagePath==='' && strcasecmp($id,$this->_pagePath)===0) || ($configPath!=='' && strcasecmp($configPagePath.'.'.$id,$this->_pagePath)===0)) 701 $matching=false; 702 $id=($configPagePath==='')?$id:$configPagePath.'.'.$id; 703 if(strcasecmp($id,$this->_pagePath)===0) 704 $matching=true; 705 else if($id[strlen($id)-1]==='*') // try wildcard matching 706 { 707 $id=strtolower(substr($id,0,strlen($id)-1)); 708 $matching=(strpos(strtolower($this->_pagePath),$pattern)===0); 709 } 710 if($matching) 701 711 $this->_properties=array_merge($this->_properties,$properties->toArray()); 702 712 }
