mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding fix for failing routes for plugins
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5475 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
504dec6d76
commit
64325bd60d
2 changed files with 9 additions and 1 deletions
|
@ -765,6 +765,14 @@ class Router extends Object {
|
|||
} elseif (!isset($params['pass'])) {
|
||||
$params['pass'] = '';
|
||||
}
|
||||
|
||||
if (isset($params['plugin'])) {
|
||||
if(strpos($route[0], 'plugin') === false && !empty($route[2])) {
|
||||
$route[2] = array_merge($route[2], array('plugin'));
|
||||
$route[0] = '/:plugin' . $route[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (strpos($route[0], '*')) {
|
||||
$out = str_replace('*', $params['pass'], $route[0]);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue