mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Simplified way to add new prefixes to the router
This commit is contained in:
parent
5263edde8b
commit
9b4379b17d
1 changed files with 1 additions and 2 deletions
|
@ -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'])) {
|
||||||
|
|
Loading…
Reference in a new issue