mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
This commit is contained in:
commit
926ac32549
3 changed files with 4 additions and 2 deletions
|
@ -606,7 +606,7 @@ class ExtractTask extends Shell {
|
||||||
if (!empty($this->_exclude)) {
|
if (!empty($this->_exclude)) {
|
||||||
$exclude = array();
|
$exclude = array();
|
||||||
foreach ($this->_exclude as $e) {
|
foreach ($this->_exclude as $e) {
|
||||||
if ($e[0] !== DS) {
|
if (DS !== '\\' && $e[0] !== DS) {
|
||||||
$e = DS . $e;
|
$e = DS . $e;
|
||||||
}
|
}
|
||||||
$exclude[] = preg_quote($e, '/');
|
$exclude[] = preg_quote($e, '/');
|
||||||
|
|
|
@ -805,6 +805,7 @@ class Controller extends Object {
|
||||||
*/
|
*/
|
||||||
public function setAction($action) {
|
public function setAction($action) {
|
||||||
$this->request->action = $action;
|
$this->request->action = $action;
|
||||||
|
$this->view = $action;
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
unset($args[0]);
|
unset($args[0]);
|
||||||
return call_user_func_array(array(&$this, $action), $args);
|
return call_user_func_array(array(&$this, $action), $args);
|
||||||
|
|
|
@ -967,7 +967,8 @@ class ControllerTest extends CakeTestCase {
|
||||||
$TestController = new TestController($request);
|
$TestController = new TestController($request);
|
||||||
$TestController->setAction('index', 1, 2);
|
$TestController->setAction('index', 1, 2);
|
||||||
$expected = array('testId' => 1, 'test2Id' => 2);
|
$expected = array('testId' => 1, 'test2Id' => 2);
|
||||||
$this->assertidentical($TestController->data, $expected);
|
$this->assertSame($expected, $TestController->request->data);
|
||||||
|
$this->assertSame('index', $TestController->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue