Remove pointless code.

After the changes in #2709 this code just heats the earth.
This commit is contained in:
mark_story 2014-01-25 22:13:42 -05:00
parent 82aa048acc
commit cf16ae055f

View file

@ -233,12 +233,6 @@ class CakeRoute {
$route[$key] = $value; $route[$key] = $value;
} }
foreach ($this->keys as $key) {
if (isset($route[$key])) {
$route[$key] = $route[$key];
}
}
if (isset($route['_args_'])) { if (isset($route['_args_'])) {
list($pass, $named) = $this->_parseArgs($route['_args_'], $route); list($pass, $named) = $this->_parseArgs($route['_args_'], $route);
$route['pass'] = array_merge($route['pass'], $pass); $route['pass'] = array_merge($route['pass'], $pass);
@ -297,8 +291,6 @@ class CakeRoute {
$separatorIsPresent = strpos($param, $namedConfig['separator']) !== false; $separatorIsPresent = strpos($param, $namedConfig['separator']) !== false;
if ((!isset($this->options['named']) || !empty($this->options['named'])) && $separatorIsPresent) { if ((!isset($this->options['named']) || !empty($this->options['named'])) && $separatorIsPresent) {
list($key, $val) = explode($namedConfig['separator'], $param, 2); list($key, $val) = explode($namedConfig['separator'], $param, 2);
$key = $key;
$val = $val;
$hasRule = isset($rules[$key]); $hasRule = isset($rules[$key]);
$passIt = (!$hasRule && !$greedy) || ($hasRule && !$this->_matchNamed($val, $rules[$key], $context)); $passIt = (!$hasRule && !$greedy) || ($hasRule && !$this->_matchNamed($val, $rules[$key], $context));
if ($passIt) { if ($passIt) {