[evolvis-commits] r18311: I found a genuine bug in MediaWiki (both 1.15.5 and trunk) ☺↵ Here’s a fix, sponsored by tarent GmbH (sorry, have to say this)

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Apr 11 11:16:29 CEST 2012


Author: mirabilos
Date: 2012-04-11 11:16:29 +0200 (Wed, 11 Apr 2012)
New Revision: 18311

Added:
   trunk/mediawiki/debian/patches/fix_datetime.patch
Modified:
   trunk/mediawiki/debian/changelog
   trunk/mediawiki/debian/patches/series
Log:
I found a genuine bug in MediaWiki (both 1.15.5 and trunk) ☺
Here’s a fix, sponsored by tarent GmbH (sorry, have to say this)

Modified: trunk/mediawiki/debian/changelog
===================================================================
--- trunk/mediawiki/debian/changelog	2012-04-11 09:16:28 UTC (rev 18310)
+++ trunk/mediawiki/debian/changelog	2012-04-11 09:16:29 UTC (rev 18311)
@@ -1,3 +1,11 @@
+mediawiki (1:1.15.5-2) UNRELEASED; urgency=high
+
+  * debian/patches/fix_datetime.patch: new, convert argument into
+    the format expected by other methods, fixes date/time output
+    in e.g. the News/RSS extensions
+
+ -- Thorsten Glaser <tg at mirbsd.de>  Tue, 07 Sep 2010 11:04:26 +0200
+
 mediawiki (1:1.15.5-1) unstable; urgency=high
 
   [ Thorsten Glaser ]

Added: trunk/mediawiki/debian/patches/fix_datetime.patch
===================================================================
--- trunk/mediawiki/debian/patches/fix_datetime.patch	                        (rev 0)
+++ trunk/mediawiki/debian/patches/fix_datetime.patch	2012-04-11 09:16:29 UTC (rev 18311)
@@ -0,0 +1,30 @@
+$Id$
+
+	Fix obvious bug in the two methods date() and time() to
+	make them match both their documentation and the other
+	method timeanddate() and convert the input timestamp
+	into the format expected by the sprintfDate() method.
+		-- Thorsten Glaser <tg at debian.org>
+
+--- mediawiki-1.15.5/languages/Language.php~	2010-09-07 10:59:22.000000000 +0200
++++ mediawiki-1.15.5/languages/Language.php	2010-09-07 10:59:24.000000000 +0200
+@@ -1268,6 +1268,9 @@ class Language {
+ 	 */
+ 	function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
+ 		$this->load();
++
++		$ts = wfTimestamp( TS_MW, $ts );
++
+ 		if ( $adj ) { 
+ 			$ts = $this->userAdjust( $ts, $timecorrection ); 
+ 		}
+@@ -1291,6 +1294,9 @@ class Language {
+ 	 */
+ 	function time( $ts, $adj = false, $format = true, $timecorrection = false ) {
+ 		$this->load();
++
++		$ts = wfTimestamp( TS_MW, $ts );
++
+ 		if ( $adj ) { 
+ 			$ts = $this->userAdjust( $ts, $timecorrection ); 
+ 		}

Modified: trunk/mediawiki/debian/patches/series
===================================================================
--- trunk/mediawiki/debian/patches/series	2012-04-11 09:16:28 UTC (rev 18310)
+++ trunk/mediawiki/debian/patches/series	2012-04-11 09:16:29 UTC (rev 18311)
@@ -5,3 +5,4 @@
 add_rss_guid.patch
 backup_documentation.patch
 suppress_warnings.patch
+fix_datetime.patch



More information about the evolvis-commits mailing list