Merge pull request #4931 from jrbasso/2.6-router-optimization

Simplified way to add new prefixes to the router
This commit is contained in:
José Lorenzo Rodríguez 2014-10-26 22:09:17 +01:00
commit 431578d956

View file

@ -355,9 +355,8 @@ class Router {
break; break;
} }
} }
if (isset($defaults['prefix'])) { if (isset($defaults['prefix']) && !in_array($defaults['prefix'], self::$_prefixes)) {
self::$_prefixes[] = $defaults['prefix']; self::$_prefixes[] = $defaults['prefix'];
self::$_prefixes = array_keys(array_flip(self::$_prefixes));
} }
$defaults += array('plugin' => null); $defaults += array('plugin' => null);
if (empty($options['action'])) { if (empty($options['action'])) {