Skip to content

Commit

Permalink
fixes #6106, dispatcher plugin controller params
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8037 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
gwoo committed Feb 16, 2009
1 parent 6e6c5dc commit 5bb9223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cake/dispatcher.php
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions cake/tests/cases/dispatcher.test.php
Expand Up @@ -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);

Expand Down

0 comments on commit 5bb9223

Please sign in to comment.