mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #4931 from jrbasso/2.6-router-optimization
Simplified way to add new prefixes to the router
This commit is contained in:
commit
431578d956
1 changed files with 1 additions and 2 deletions
|
@ -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'])) {
|
||||
|
|
Loading…
Reference in a new issue