diff --git a/lib/Cake/Console/Templates/skel/Config/bootstrap.php b/lib/Cake/Console/Templates/skel/Config/bootstrap.php index 99375397e..2faedb8cb 100644 --- a/lib/Cake/Console/Templates/skel/Config/bootstrap.php +++ b/lib/Cake/Console/Templates/skel/Config/bootstrap.php @@ -89,12 +89,12 @@ Configure::write('Dispatcher.filters', array( */ App::uses('CakeLog', 'Log'); CakeLog::config('debug', array( - 'engine' => 'File', + 'engine' => 'FileLog', 'types' => array('notice', 'info', 'debug'), 'file' => 'debug', )); CakeLog::config('error', array( - 'engine' => 'File', + 'engine' => 'FileLog', 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), 'file' => 'error', )); diff --git a/lib/Cake/Test/Case/Utility/InflectorTest.php b/lib/Cake/Test/Case/Utility/InflectorTest.php index 337830deb..c1dabe50b 100644 --- a/lib/Cake/Test/Case/Utility/InflectorTest.php +++ b/lib/Cake/Test/Case/Utility/InflectorTest.php @@ -118,7 +118,8 @@ class InflectorTest extends CakeTestCase { $this->assertEquals(Inflector::singularize('geese'), 'goose'); $this->assertEquals(Inflector::singularize('feet'), 'foot'); $this->assertEquals(Inflector::singularize('objectives'), 'objective'); - + $this->assertEquals(Inflector::singularize('archives'), 'archive'); + $this->assertEquals(Inflector::singularize('briefs'), 'brief'); $this->assertEquals(Inflector::singularize(''), ''); } @@ -179,6 +180,7 @@ class InflectorTest extends CakeTestCase { $this->assertEquals(Inflector::pluralize('goose'), 'geese'); $this->assertEquals(Inflector::pluralize('foot'), 'feet'); $this->assertEquals(Inflector::pluralize('objective'), 'objectives'); + $this->assertEquals(Inflector::pluralize('brief'), 'briefs'); $this->assertEquals(Inflector::pluralize(''), ''); } diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/webroot/css/test_plugin_asset.css b/lib/Cake/Test/test_app/Plugin/TestPlugin/webroot/css/test_plugin_asset.css index f3b6b5335..6e3d5502e 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/webroot/css/test_plugin_asset.css +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/webroot/css/test_plugin_asset.css @@ -1 +1 @@ -this is the test plugin asset css file +/* this is the test plugin asset css file */ diff --git a/lib/Cake/Test/test_app/View/Themed/TestTheme/webroot/css/theme_webroot.css b/lib/Cake/Test/test_app/View/Themed/TestTheme/webroot/css/theme_webroot.css index 12e29a565..7ee37ae6b 100644 --- a/lib/Cake/Test/test_app/View/Themed/TestTheme/webroot/css/theme_webroot.css +++ b/lib/Cake/Test/test_app/View/Themed/TestTheme/webroot/css/theme_webroot.css @@ -1 +1 @@ -theme webroot css file \ No newline at end of file +/* theme webroot css file */ diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index 8cca2cd17..610e62368 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -793,6 +793,14 @@ class CakeTime { } $diff = $futureTime - $pastTime; + if (!$diff) { + return __d('cake', 'just now', 'just now'); + } + + if ($diff > abs($now - self::fromString($end))) { + return sprintf($absoluteString, date($format, $inSeconds)); + } + // If more than a week, then take into account the length of months if ($diff >= 604800) { list($future['H'], $future['i'], $future['s'], $future['d'], $future['m'], $future['Y']) = explode('/', date('H/i/s/d/m/Y', $futureTime)); @@ -855,15 +863,6 @@ class CakeTime { $diff = $diff - ($minutes * 60); $seconds = $diff; } - $diff = $futureTime - $pastTime; - - if (!$diff) { - return __d('cake', 'just now', 'just now'); - } - - if ($diff > abs($now - self::fromString($end))) { - return sprintf($absoluteString, date($format, $inSeconds)); - } $fWord = $accuracy['second']; if ($years > 0) { @@ -905,34 +904,34 @@ class CakeTime { $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d second', '%d seconds', $seconds, $seconds); } - $aboutAgo = array( - 'second' => __d('cake', 'about a second ago'), - 'minute' => __d('cake', 'about a minute ago'), - 'hour' => __d('cake', 'about an hour ago'), - 'day' => __d('cake', 'about a day ago'), - 'week' => __d('cake', 'about a week ago'), - 'year' => __d('cake', 'about a year ago') - ); - - $aboutIn = array( - 'second' => __d('cake', 'in about a second'), - 'minute' => __d('cake', 'in about a minute'), - 'hour' => __d('cake', 'in about an hour'), - 'day' => __d('cake', 'in about a day'), - 'week' => __d('cake', 'in about a week'), - 'year' => __d('cake', 'in about a year') - ); - // When time has passed if (!$backwards && $relativeDate) { return sprintf($relativeString, $relativeDate); } if (!$backwards) { + $aboutAgo = array( + 'second' => __d('cake', 'about a second ago'), + 'minute' => __d('cake', 'about a minute ago'), + 'hour' => __d('cake', 'about an hour ago'), + 'day' => __d('cake', 'about a day ago'), + 'week' => __d('cake', 'about a week ago'), + 'year' => __d('cake', 'about a year ago') + ); + return $aboutAgo[$fWord]; } // When time is to come if (!$relativeDate) { + $aboutIn = array( + 'second' => __d('cake', 'in about a second'), + 'minute' => __d('cake', 'in about a minute'), + 'hour' => __d('cake', 'in about an hour'), + 'day' => __d('cake', 'in about a day'), + 'week' => __d('cake', 'in about a week'), + 'year' => __d('cake', 'in about a year') + ); + return $aboutIn[$fWord]; } diff --git a/lib/Cake/Utility/Inflector.php b/lib/Cake/Utility/Inflector.php index 069eb2da9..11bafbf9c 100644 --- a/lib/Cake/Utility/Inflector.php +++ b/lib/Cake/Utility/Inflector.php @@ -61,6 +61,7 @@ class Inflector { 'irregular' => array( 'atlas' => 'atlases', 'beef' => 'beefs', + 'brief' => 'briefs', 'brother' => 'brothers', 'cafe' => 'cafes', 'child' => 'children', @@ -126,10 +127,10 @@ class Inflector { '/(s)eries$/i' => '\1\2eries', '/([^aeiouy]|qu)ies$/i' => '\1y', '/(tive)s$/i' => '\1', - '/([lre])ves$/i' => '\1f', - '/([^fo])ves$/i' => '\1fe', '/(hive)s$/i' => '\1', '/(drive)s$/i' => '\1', + '/([lre])ves$/i' => '\1f', + '/([^fo])ves$/i' => '\1fe', '/(^analy)ses$/i' => '\1sis', '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', '/([ti])a$/i' => '\1um', diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 4ae249671..d6583ac63 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1520,8 +1520,9 @@ class FormHelper extends AppHelper { ); if ($label) { - $optTitle = $this->Html->useTag('label', $tagName, '', $optTitle); + $optTitle = $this->label($tagName, $optTitle, is_array($label) ? $label : null); } + if (is_array($between)) { $optTitle .= array_shift($between); }