Permalink
Browse files

Revert 96ea528

  • Loading branch information...
1 parent e8b8963 commit da5562a4bd87ad8ea827298dbe60e850225cfe34 @narfbg narfbg committed Nov 8, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 system/core/Router.php
View
12 system/core/Router.php
@@ -341,13 +341,8 @@ protected function _parse_routes()
// Does the RegEx match?
if (preg_match('#^'.$key.'$#', $uri, $matches))
{
- // Are we using the default routing method for back-references?
- if (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)
- {
- $val = preg_replace('#^'.$key.'$#', $val, $uri);
- }
// Are we using callbacks to process back-references?
- elseif ( ! is_string($val) && is_callable($val))
+ if ( ! is_string($val) && is_callable($val))
{
// Remove the original string from the matches array.
array_shift($matches);
@@ -384,6 +379,11 @@ protected function _parse_routes()
// Execute the callback using the values in matches as its parameters.
$val = call_user_func_array($val, $matches);
}
+ // Are we using the default routing method for back-references?
+ elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)
+ {
+ $val = preg_replace('#^'.$key.'$#', $val, $uri);
+ }
return $this->_set_request(explode('/', $val));
}

0 comments on commit da5562a

Please sign in to comment.