]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/FeedUtils.php
MediaWiki 1.17.0
[autoinstallsdev/mediawiki.git] / includes / FeedUtils.php
index 7e841f321364b9e88c9c0c470eb3b1e5b831aeb0..9daffc12f7f60add299b5b880b10d13a273a8d75 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,12 +119,12 @@ 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 ) ) {
+                               if ( $wgFeedDiffCutoff <= 0 || ( strlen( $diffText ) > $wgFeedDiffCutoff ) ) {
                                        // Omit large diffs
                                        $diffLink = $title->escapeFullUrl(
                                                'diff=' . $newid .