mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 19:12:42 +00:00
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
This commit is contained in:
parent
6e6c5dc187
commit
5bb922323c
2 changed files with 4 additions and 0 deletions
|
@ -481,6 +481,7 @@ class Dispatcher extends Object {
|
|||
$controller = $pluginName;
|
||||
}
|
||||
if (!empty($params['controller'])) {
|
||||
$this->params['controller'] = $params['controller'];
|
||||
$controller = Inflector::camelize($params['controller']);
|
||||
}
|
||||
if ($pluginPath . $controller) {
|
||||
|
|
|
@ -1273,6 +1273,9 @@ class DispatcherTest extends CakeTestCase {
|
|||
$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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue