From 4a131bdcbfd0bc04c6ec863debfdb9b54121f2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Thu, 9 Jul 2015 15:54:03 +0200 Subject: [PATCH 1/2] Capitalize Windows, the OS --- lib/Cake/Console/Command/ServerShell.php | 2 +- lib/Cake/Console/ConsoleOutput.php | 2 +- lib/Cake/Test/Case/Console/ShellTest.php | 2 +- lib/Cake/Test/Case/Utility/CakeTimeTest.php | 4 ++-- lib/Cake/Test/Case/Utility/FolderTest.php | 2 +- lib/Cake/Utility/CakeTime.php | 6 +++--- lib/Cake/Utility/Folder.php | 4 ++-- lib/Cake/Utility/Validation.php | 2 +- lib/Cake/View/Helper/TimeHelper.php | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Cake/Console/Command/ServerShell.php b/lib/Cake/Console/Command/ServerShell.php index 9ee1cecbb5f..f29863f5d64 100644 --- a/lib/Cake/Console/Command/ServerShell.php +++ b/lib/Cake/Console/Command/ServerShell.php @@ -91,7 +91,7 @@ public function startup() { $this->_documentRoot = $this->params['document_root']; } - // for windows + // for Windows if (substr($this->_documentRoot, -1, 1) === DIRECTORY_SEPARATOR) { $this->_documentRoot = substr($this->_documentRoot, 0, strlen($this->_documentRoot) - 1); } diff --git a/lib/Cake/Console/ConsoleOutput.php b/lib/Cake/Console/ConsoleOutput.php index 4f56fb5c4f8..d1fb2b9bd7b 100644 --- a/lib/Cake/Console/ConsoleOutput.php +++ b/lib/Cake/Console/ConsoleOutput.php @@ -154,7 +154,7 @@ class ConsoleOutput { * Construct the output object. * * Checks for a pretty console environment. Ansicon allows pretty consoles - * on windows, and is supported. + * on Windows, and is supported. * * @param string $stream The identifier of the stream to write output to. */ diff --git a/lib/Cake/Test/Case/Console/ShellTest.php b/lib/Cake/Test/Case/Console/ShellTest.php index bfd8c9e4e9e..3256acff687 100644 --- a/lib/Cake/Test/Case/Console/ShellTest.php +++ b/lib/Cake/Test/Case/Console/ShellTest.php @@ -668,7 +668,7 @@ public function testCreateFileInteractive() { * @return void */ public function testCreateFileNoPermissions() { - $this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on windows.'); + $this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on Windows.'); $path = TMP . 'shell_test'; $file = $path . DS . 'no_perms'; diff --git a/lib/Cake/Test/Case/Utility/CakeTimeTest.php b/lib/Cake/Test/Case/Utility/CakeTimeTest.php index 54fcc789bd1..447af6dca09 100644 --- a/lib/Cake/Test/Case/Utility/CakeTimeTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTimeTest.php @@ -1075,12 +1075,12 @@ public function testConvertSpecifiers() { } /** - * test convert %e on windows. + * test convert %e on Windows. * * @return void */ public function testConvertPercentE() { - $this->skipIf(DIRECTORY_SEPARATOR !== '\\', 'Cannot run windows tests on non-windows OS.'); + $this->skipIf(DIRECTORY_SEPARATOR !== '\\', 'Cannot run Windows tests on non-Windows OS.'); $time = strtotime('Thu Jan 14 11:43:39 2010'); $result = $this->Time->convertSpecifiers('%e', $time); diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index 007d363797c..7169d27d063 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -192,7 +192,7 @@ public function testCreateRelative() { * @return void */ public function testRecursiveCreateFailure() { - $this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on windows.'); + $this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Cant perform operations using permissions on Windows.'); $path = TMP . 'tests' . DS . 'one'; mkdir($path); diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index b22082320b7..d3b8f8d67bc 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -123,12 +123,12 @@ public function __get($name) { /** * Converts a string representing the format for the function strftime and returns a - * windows safe and i18n aware format. + * Windows safe and i18n aware format. * * @param string $format Format with specifiers for strftime function. * Accepts the special specifier %S which mimics the modifier S for date() * @param string $time UNIX timestamp - * @return string windows safe and date() function compatible format for strftime + * @return string Windows safe and date() function compatible format for strftime * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#TimeHelper::convertSpecifiers */ public static function convertSpecifiers($format, $time = null) { @@ -141,7 +141,7 @@ public static function convertSpecifiers($format, $time = null) { /** * Auxiliary function to translate a matched specifier element from a regular expression into - * a windows safe and i18n aware specifier + * a Windows safe and i18n aware specifier * * @param array $specifier match from regular expression * @return string converted element diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index 088723cb2e8..fe4b943d2d5 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -64,7 +64,7 @@ class Folder { public $sort = false; /** - * Mode to be used on create. Does nothing on windows platforms. + * Mode to be used on create. Does nothing on Windows platforms. * * @var int * http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::$mode @@ -263,7 +263,7 @@ protected function _findRecursive($pattern, $sort = false) { * Returns true if given $path is a Windows path. * * @param string $path Path to check - * @return bool true if windows path, false otherwise + * @return bool true if Windows path, false otherwise * @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::isWindowsPath */ public static function isWindowsPath($path) { diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index d5e0e459469..f6dad2bb0f3 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -455,7 +455,7 @@ public static function decimal($check, $places = null, $regex = null) { * Validates for an email address. * * Only uses getmxrr() checking for deep validation if PHP 5.3.0+ is used, or - * any PHP version on a non-windows distribution + * any PHP version on a non-Windows distribution * * @param string $check Value to check * @param bool $deep Perform a deeper validation (if true), by also checking availability of host diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php index 5e91705bd93..2a191a4a4a8 100644 --- a/lib/Cake/View/Helper/TimeHelper.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -126,12 +126,12 @@ public function __call($method, $params) { /** * Converts a string representing the format for the function strftime and returns a - * windows safe and i18n aware format. + * Windows safe and i18n aware format. * * @param string $format Format with specifiers for strftime function. * Accepts the special specifier %S which mimics the modifier S for date() * @param string $time UNIX timestamp - * @return string windows safe and date() function compatible format for strftime + * @return string Windows safe and date() function compatible format for strftime * @see CakeTime::convertSpecifiers() * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting */ From 65c1745349bd9136522af41482f266aa12827a58 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 10 Jul 2015 12:56:49 -0400 Subject: [PATCH 2/2] Add missing parameter to rawQuery() Previously bound parameters were put in the incorrect position. Refs #6992 --- lib/Cake/Model/Datasource/DboSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 2e8e6574c74..bc41c525e76 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -402,7 +402,7 @@ public function expression($expression) { */ public function rawQuery($sql, $params = array()) { $this->took = $this->numRows = false; - return $this->execute($sql, $params); + return $this->execute($sql, array(), $params); } /**