summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-09-17 23:35:02 +0200
committerFabio Bas <ctrlaltca@gmail.com>2013-09-17 23:35:02 +0200
commit577e690f1ce437150443fe89635b6a6ef7aab0f1 (patch)
treeb40fe69b6953110f2bd256a436f6bc1d208dae71 /framework
parentc26f4bced87e3208105666e9fcd847d5b29dc6e2 (diff)
Don't instanciate patterns twice in TUrlMapping; Fixes #479
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/TUrlMapping.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/Web/TUrlMapping.php b/framework/Web/TUrlMapping.php
index abfa02fd..929a873e 100644
--- a/framework/Web/TUrlMapping.php
+++ b/framework/Web/TUrlMapping.php
@@ -246,9 +246,8 @@ class TUrlMapping extends TUrlManager
$class=null;
if(!isset($url['class']))
$class=$defaultClass;
- $pattern=Prado::createComponent($class,$this);
$properties = isset($url['properties'])?$url['properties']:array();
- $this->buildUrlMapping($class,$pattern,$properties,$url);
+ $this->buildUrlMapping($class,$properties,$url);
}
}
}
@@ -259,13 +258,12 @@ class TUrlMapping extends TUrlManager
$properties=$url->getAttributes();
if(($class=$properties->remove('class'))===null)
$class=$defaultClass;
- $pattern=Prado::createComponent($class,$this);
- $this->buildUrlMapping($class,$pattern,$properties,$url);
+ $this->buildUrlMapping($class,$properties,$url);
}
}
}
- private function buildUrlMapping($class, $pattern, $properties, $url)
+ private function buildUrlMapping($class, $properties, $url)
{
$pattern=Prado::createComponent($class,$this);
if(!($pattern instanceof TUrlMappingPattern))