* (bug 19393) Feeds now format dates in user language rather than content language
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Apr 2010 15:46:41 +0000 (15:46 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Apr 2010 15:46:41 +0000 (15:46 +0000)
There's no more need to do this with content language since the language code was added to the cache key in r58978.

RELEASE-NOTES
includes/FeedUtils.php

index f550621..31962ec 100644 (file)
@@ -73,6 +73,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22935) image/x-ms-bmp mime type added for BMP files
 * (bug 23024) Special:ListFiles now escapes file names correctly
 * (bug 22867) "View source" tab is now only displayed if there's source text
+* (bug 19393) Feeds now format dates in user language rather than content
+  language
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent
index 7e841f3..c634014 100644 (file)
@@ -86,7 +86,7 @@ class FeedUtils {
         * @return String
         */
        public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext='' ) {
-               global $wgFeedDiffCutoff, $wgContLang, $wgUser;
+               global $wgFeedDiffCutoff, $wgLang, $wgUser;
                wfProfileIn( __METHOD__ );
 
                $skin = $wgUser->getSkin();
@@ -108,9 +108,9 @@ class FeedUtils {
                                wfProfileIn( __METHOD__."-dodiff" );
 
                                #$diffText = $de->getDiff( wfMsg( 'revisionasof',
-                               #       $wgContLang->timeanddate( $timestamp ),
-                               #       $wgContLang->date( $timestamp ),
-                               #       $wgContLang->time( $timestamp ) ),
+                               #       $wgLang->timeanddate( $timestamp ),
+                               #       $wgLang->date( $timestamp ),
+                               #       $wgLang->time( $timestamp ) ),
                                #       wfMsg( 'currentrev' ) );
                                
                                // Don't bother generating the diff if we won't be able to show it
@@ -119,9 +119,9 @@ class FeedUtils {
                                        $diffText = $de->getDiff(
                                                wfMsg( 'previousrevision' ), // hack
                                                wfMsg( 'revisionasof',
-                                                       $wgContLang->timeanddate( $timestamp ),
-                                                       $wgContLang->date( $timestamp ),
-                                                       $wgContLang->time( $timestamp ) ) );
+                                                       $wgLang->timeanddate( $timestamp ),
+                                                       $wgLang->date( $timestamp ),
+                                                       $wgLang->time( $timestamp ) ) );
                                }
 
                                if ( ( strlen( $diffText ) > $wgFeedDiffCutoff ) || ( $wgFeedDiffCutoff <= 0 ) ) {