Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert 96ea528

  • Loading branch information...
commit da5562a4bd87ad8ea827298dbe60e850225cfe34 1 parent e8b8963
Andrey Andreev narfbg authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 system/core/Router.php
12 system/core/Router.php
@@ -341,13 +341,8 @@ protected function _parse_routes()
341 341 // Does the RegEx match?
342 342 if (preg_match('#^'.$key.'$#', $uri, $matches))
343 343 {
344   - // Are we using the default routing method for back-references?
345   - if (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)
346   - {
347   - $val = preg_replace('#^'.$key.'$#', $val, $uri);
348   - }
349 344 // Are we using callbacks to process back-references?
350   - elseif ( ! is_string($val) && is_callable($val))
  345 + if ( ! is_string($val) && is_callable($val))
351 346 {
352 347 // Remove the original string from the matches array.
353 348 array_shift($matches);
@@ -384,6 +379,11 @@ protected function _parse_routes()
384 379 // Execute the callback using the values in matches as its parameters.
385 380 $val = call_user_func_array($val, $matches);
386 381 }
  382 + // Are we using the default routing method for back-references?
  383 + elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)
  384 + {
  385 + $val = preg_replace('#^'.$key.'$#', $val, $uri);
  386 + }
387 387
388 388 return $this->_set_request(explode('/', $val));
389 389 }

0 comments on commit da5562a

Please sign in to comment.
Something went wrong with that request. Please try again.