From 577e690f1ce437150443fe89635b6a6ef7aab0f1 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 17 Sep 2013 23:35:02 +0200 Subject: Don't instanciate patterns twice in TUrlMapping; Fixes #479 --- framework/Web/TUrlMapping.php | 8 +++----- 1 file 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)) -- cgit v1.2.3