Simplified way to add new prefixes to the router

This commit is contained in:
Juan Basso 2014-10-19 21:55:33 -04:00
parent 5263edde8b
commit 9b4379b17d

View file

@ -355,9 +355,8 @@ class Router {
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'])) {