Merge branch 'master' into 2.5

This commit is contained in:
mark_story 2013-09-05 10:21:41 -04:00
commit f22c4cf90b
7 changed files with 38 additions and 35 deletions

View file

@ -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',
));

View file

@ -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(''), '');
}

View file

@ -1 +1 @@
this is the test plugin asset css file
/* this is the test plugin asset css file */

View file

@ -1 +1 @@
theme webroot css file
/* theme webroot css file */

View file

@ -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];
}

View file

@ -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',

View file

@ -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);
}