From 51ccbad170074678870f6808cc744730a1a88ee6 Mon Sep 17 00:00:00 2001 From: Majna Date: Thu, 3 Nov 2011 21:34:32 +0100 Subject: [PATCH 1/2] Fixing ignored '--exclude-plugins' option on Windows for Extract task. --- lib/Cake/Console/Command/Task/ExtractTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index 08f00ad65..50c8c94b5 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -606,7 +606,7 @@ class ExtractTask extends Shell { if (!empty($this->_exclude)) { $exclude = array(); foreach ($this->_exclude as $e) { - if ($e[0] !== DS) { + if (DS !== '\\' && $e[0] !== DS) { $e = DS . $e; } $exclude[] = preg_quote($e, '/'); From a92995103861801f304341ad4ed1094b0512cc22 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 3 Nov 2011 20:13:22 -0400 Subject: [PATCH 2/2] Fix issue with Controller::setAction() Calling setAction did not modify which view file was rendered. This was a regression with 1.3 Fixes #2212 --- lib/Cake/Controller/Controller.php | 1 + lib/Cake/Test/Case/Controller/ControllerTest.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 1303b7cc6..ef3472c54 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -805,6 +805,7 @@ class Controller extends Object { */ public function setAction($action) { $this->request->action = $action; + $this->view = $action; $args = func_get_args(); unset($args[0]); return call_user_func_array(array(&$this, $action), $args); diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 36f72110e..c93079b62 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -967,7 +967,8 @@ class ControllerTest extends CakeTestCase { $TestController = new TestController($request); $TestController->setAction('index', 1, 2); $expected = array('testId' => 1, 'test2Id' => 2); - $this->assertidentical($TestController->data, $expected); + $this->assertSame($expected, $TestController->request->data); + $this->assertSame('index', $TestController->view); } /**