alecpl
2009-07-07 b6b593416bb1bef12c30b0cea8c92221d4b7a5c2
- Support strftime's format modifiers in date_* options (#1484806)


3 files modified
10 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
config/main.inc.php.dist 6 ●●●● patch | view | raw | blame | history
program/include/main.inc 3 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
- Support strftime's format modifiers in date_* options (#1484806)
- Support %h variable in 'smtp_server' option (#1485766)
- Show SMTP errors in browser (#1485927)
- Allow WBR tag in HTML message (#1485960)
config/main.inc.php.dist
@@ -155,13 +155,13 @@
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$rcmail_config['language'] = null;
// use this format for short date display
// use this format for short date display (date or strftime format)
$rcmail_config['date_short'] = 'D H:i';
// use this format for detailed date/time formatting
// use this format for detailed date/time formatting (date or strftime format)
$rcmail_config['date_long'] = 'd.m.Y H:i';
// use this format for today's date display
// use this format for today's date display (date or strftime format)
$rcmail_config['date_today'] = 'H:i';
// add this user-agent to message headers when sending
program/include/main.inc
@@ -893,6 +893,9 @@
  else if (!$format)
    $format = $CONFIG['date_long'] ? $CONFIG['date_long'] : 'd.m.Y H:i';
  // strftime() format
  if (preg_match('/%[a-z]+/i', $format))
    return strftime($format, $timestamp);
  // parse format string manually in order to provide localized weekday and month names
  // an alternative would be to convert the date() format string to fit with strftime()