diff options
author | thomascube <thomas@roundcube.net> | 2011-05-31 16:17:23 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-05-31 16:17:23 +0000 |
commit | 09c59abf8576f52b40e1787ef3c0204f795ab9f5 (patch) | |
tree | 287570fdec5ef8a6ff9614d2025576a8137bcc44 /program/include/main.inc | |
parent | 340546c975bca94526a3e16039895a6d0600828b (diff) |
Case-insensitive matching in autocompletion (#1487933); replace old string offset syntax
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 98b8bcb46..1ded90270 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1090,28 +1090,28 @@ function format_date($date, $format=NULL) // an alternative would be to convert the date() format string to fit with strftime() $out = ''; for($i=0; $i<strlen($format); $i++) { - if ($format{$i}=='\\') // skip escape chars + if ($format[$i]=='\\') // skip escape chars continue; // write char "as-is" - if ($format{$i}==' ' || $format{$i-1}=='\\') - $out .= $format{$i}; + if ($format[$i]==' ' || $format{$i-1}=='\\') + $out .= $format[$i]; // weekday (short) - else if ($format{$i}=='D') + else if ($format[$i]=='D') $out .= rcube_label(strtolower(date('D', $timestamp))); // weekday long - else if ($format{$i}=='l') + else if ($format[$i]=='l') $out .= rcube_label(strtolower(date('l', $timestamp))); // month name (short) - else if ($format{$i}=='M') + else if ($format[$i]=='M') $out .= rcube_label(strtolower(date('M', $timestamp))); // month name (long) - else if ($format{$i}=='F') + else if ($format[$i]=='F') $out .= rcube_label('long'.strtolower(date('M', $timestamp))); - else if ($format{$i}=='x') + else if ($format[$i]=='x') $out .= strftime('%x %X', $timestamp); else - $out .= date($format{$i}, $timestamp); + $out .= date($format[$i], $timestamp); } if ($today) { |