diff options
author | xue <> | 2007-09-12 01:15:15 +0000 |
---|---|---|
committer | xue <> | 2007-09-12 01:15:15 +0000 |
commit | 899503300d19dcbb381674c61b952f928a12978d (patch) | |
tree | 9f067bcdde743dd8a7387405d735cf4df0ac92c4 | |
parent | 748777b29bed60312d933609993ec4b454e20f75 (diff) |
a little optimization.
-rw-r--r-- | framework/Web/Services/TPageService.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index fcbb961f..ced01641 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -671,8 +671,7 @@ class TPageConfiguration extends TComponent }
if($pattern[strlen($pattern)-1]==='*') // try wildcard matching
{
- $pattern=strtolower(substr($pattern,0,strlen($pattern)-1));
- if(strpos(strtolower($this->_pagePath),$pattern)===0)
+ if(strncasecmp($this->_pagePath,$pattern,strlen($pattern)-1)===0)
{
$ruleApplies=true;
break;
@@ -703,10 +702,7 @@ class TPageConfiguration extends TComponent if(strcasecmp($id,$this->_pagePath)===0)
$matching=true;
else if($id[strlen($id)-1]==='*') // try wildcard matching
- {
- $id=strtolower(substr($id,0,strlen($id)-1));
- $matching=(strpos(strtolower($this->_pagePath),$pattern)===0);
- }
+ $matching=strncasecmp($this->_pagePath,$id,strlen($id)-1)===0;
if($matching)
$this->_properties=array_merge($this->_properties,$properties->toArray());
}
|