Development

Changeset 16912

You must first sign up to be able to contribute.

Changeset 16912

Show
Ignore:
Timestamp:
04/02/09 20:21:09 (4 years ago)
Author:
fabien
Message:

[1.2, 1.3] fixed bug in the pattern routing optimization

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/routing/sfPatternRouting.class.php

    r16911 r16912  
    397397      } 
    398398 
     399      $route = $this->routes[$name]; 
     400 
    399401      if (false === $route) 
    400402      { 
    401403        $route = $this->loadRoute($name); 
    402404      } 
    403  
    404       $route = $this->routes[$name]; 
    405405    } 
    406406    else 
  • branches/1.2/test/unit/routing/sfPatternRoutingTest.php

    r16911 r16912  
    1111require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 
    1212 
    13 $t = new lime_test(130, new lime_output_color()); 
     13$t = new lime_test(131, new lime_output_color()); 
    1414 
    1515class sfPatternRoutingTest extends sfPatternRouting 
     
    513513$t->is($rCached->isRouteLoaded('second'), true, 'The last route is loaded after a full routes scan'); 
    514514$rCached = new sfPatternRoutingTest($dispatcher, $cache, $options); 
     515$t->is($rCached->generate('second'), '/', '->generate() works on a lazy route'); 
     516$rCached = new sfPatternRoutingTest($dispatcher, $cache, $options); 
    515517$routes = $rCached->getRoutes(); 
    516518try 
  • branches/1.3/lib/routing/sfPatternRouting.class.php

    r16911 r16912  
    397397      } 
    398398 
     399      $route = $this->routes[$name]; 
     400 
    399401      if (false === $route) 
    400402      { 
    401403        $route = $this->loadRoute($name); 
    402404      } 
    403  
    404       $route = $this->routes[$name]; 
    405405    } 
    406406    else 
  • branches/1.3/test/unit/routing/sfPatternRoutingTest.php

    r16911 r16912  
    1111require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 
    1212 
    13 $t = new lime_test(130, new lime_output_color()); 
     13$t = new lime_test(131, new lime_output_color()); 
    1414 
    1515class sfPatternRoutingTest extends sfPatternRouting 
     
    513513$t->is($rCached->isRouteLoaded('second'), true, 'The last route is loaded after a full routes scan'); 
    514514$rCached = new sfPatternRoutingTest($dispatcher, $cache, $options); 
     515$t->is($rCached->generate('second'), '/', '->generate() works on a lazy route'); 
     516$rCached = new sfPatternRoutingTest($dispatcher, $cache, $options); 
    515517$routes = $rCached->getRoutes(); 
    516518try