From: Greg Sabino Mullane Date: Mon, 19 Mar 2007 13:43:42 +0000 (+0000) Subject: Have timeanddate() change timestamp-looking timestampts to YYYYMMDDHH24MISS integer... X-Git-Tag: 1.31.0-rc.0~53672 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=cdee3531764b945fbe008bcee23fe57f1a311643;p=lhc%2Fweb%2Fwiklou.git Have timeanddate() change timestamp-looking timestampts to YYYYMMDDHH24MISS integer style. Fixes bug 8558 (Special:Imagelist) as well as other pages (i.e. Special:Unusedimages) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2dc72e50bd..586a549957 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -276,6 +276,7 @@ lighter making things easier to read. image * (bug 8582) Allow thumbnailing when imagesize has a space. * (bug 8716) Change math_inputhash and math_outputhash to byte for Postgres +* (bug 8558) Correct display of timestamps on some pages when using Postgres Support protocols other than HTTP in LinkFilter diff --git a/languages/Language.php b/languages/Language.php index a23c3045ab..db2476728d 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -753,6 +753,12 @@ class Language { */ function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false) { $this->load(); + + ## Account for non-integer timestamps + if (substr($ts,4,1) === '-') { + $ts = preg_replace('/\D/', '', $ts); + } + if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }