Skip to content

Commit

Permalink
Simplified way to add new prefixes to the router
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Oct 20, 2014
1 parent 5263edd commit 9b4379b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Cake/Routing/Router.php
Expand Up @@ -355,9 +355,8 @@ public static function connect($route, $defaults = array(), $options = array())
break;
}
}
if (isset($defaults['prefix'])) {
if (isset($defaults['prefix']) && !in_array($defaults['prefix'], self::$_prefixes)) {
self::$_prefixes[] = $defaults['prefix'];
self::$_prefixes = array_keys(array_flip(self::$_prefixes));
}
$defaults += array('plugin' => null);
if (empty($options['action'])) {
Expand Down

0 comments on commit 9b4379b

Please sign in to comment.