mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
"Fixes #3766, RequestAction fails on plugin to app and plugin to plugin"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6262 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
394ee0c8fc
commit
63bb042c9e
3 changed files with 4 additions and 5 deletions
|
@ -501,7 +501,10 @@ class Dispatcher extends Object {
|
|||
|
||||
if (class_exists($ctrlClass)) {
|
||||
if (low(get_parent_class($ctrlClass)) === low($name . 'AppController')) {
|
||||
$params = $this->_restructureParams($params);
|
||||
$count = count(explode('/', $params['url']['url']));
|
||||
if ((isset($params['admin']) && $params['action'] === 'index') || (!empty($params['pass']) || $count > 2) || ($params['action'] !== 'index')) {
|
||||
$params = $this->_restructureParams($params);
|
||||
}
|
||||
$params = $this->_restructureParams($params, true);
|
||||
}
|
||||
$this->params = $params;
|
||||
|
|
|
@ -90,9 +90,6 @@ class Object {
|
|||
require CAKE . 'dispatcher.php';
|
||||
}
|
||||
$dispatcher =& new Dispatcher();
|
||||
if (isset($this->plugin)) {
|
||||
$extra['plugin'] = $this->plugin;
|
||||
}
|
||||
if (in_array('return', $extra, true)) {
|
||||
$extra['return'] = 0;
|
||||
$extra['bare'] = 1;
|
||||
|
|
|
@ -668,7 +668,6 @@ class DispatcherTest extends UnitTestCase {
|
|||
$expected = array(0 => 5, 'param'=>'value', 'param2'=>'value2');
|
||||
$this->assertEqual($controller->passedArgs, $expected);
|
||||
|
||||
|
||||
Router::reload();
|
||||
Router::connect('/admin/:controller/:action/*', array('controller' => 'pages', 'action' => 'index', 'admin' => true, 'prefix' => 'admin'));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue