From 8ebd3ed4101d28cc042914154c5b1d66ca4ccd81 Mon Sep 17 00:00:00 2001 From: mark_story <mark@mark-story.com> Date: Thu, 8 Oct 2009 00:35:06 -0400 Subject: [PATCH] Removing params that are not part of $url. --- cake/libs/router.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cake/libs/router.php b/cake/libs/router.php index 01f097240..49a3358bd 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -818,12 +818,14 @@ class Router { } } $plugin = false; - if (array_key_exists('plugin', $url)) { $plugin = $url['plugin']; } - $url = array_merge(array('controller' => $params['controller'], 'plugin' => $params['plugin']), Set::filter($url, true)); + $url = array_merge( + array('controller' => $params['controller'], 'plugin' => $params['plugin']), + Set::filter($url, true) + ); if ($plugin !== false) { $url['plugin'] = $plugin; @@ -834,7 +836,7 @@ class Router { unset($url['ext']); } $match = false; - + for ($i = 0, $len = count($_this->routes); $i < $len; $i++) { $route =& $_this->routes[$i]; $route->compile(); @@ -854,7 +856,7 @@ class Router { $named = $args = array(); $skip = array_merge( - array('bare', 'action', 'controller', 'plugin', 'ext', '?', '#', 'prefix'), + array('bare', 'action', 'controller', 'plugin', 'prefix'), $_this->__prefixes );