From 5bb922323cca69e6f3c0302b24c132a421d230fe Mon Sep 17 00:00:00 2001 From: gwoo Date: Mon, 16 Feb 2009 18:39:09 +0000 Subject: [PATCH] fixes #6106, dispatcher plugin controller params git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8037 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/dispatcher.php | 1 + cake/tests/cases/dispatcher.test.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 1ff30675a2a..cbdbc6a6cec 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -481,6 +481,7 @@ function __loadController($params) { $controller = $pluginName; } if (!empty($params['controller'])) { + $this->params['controller'] = $params['controller']; $controller = Inflector::camelize($params['controller']); } if ($pluginPath . $controller) { diff --git a/cake/tests/cases/dispatcher.test.php b/cake/tests/cases/dispatcher.test.php index c725d58a343..de02fab6708 100644 --- a/cake/tests/cases/dispatcher.test.php +++ b/cake/tests/cases/dispatcher.test.php @@ -1273,6 +1273,9 @@ function testPluginDispatch() { $expected = 'SomePages'; $this->assertIdentical($expected, $controller->name); + $expected = 'some_pages'; + $this->assertIdentical($expected, $controller->params['controller']); + $expected = array('0' => 'home', 'param'=>'value', 'param2'=>'value2'); $this->assertIdentical($expected, $controller->passedArgs);