Merge "Include additional analytics in Special:Search"
[lhc/web/wiklou.git] / includes / FeedUtils.php
index 7936b37..57ba4b3 100644 (file)
@@ -127,13 +127,12 @@ class FeedUtils {
                }
 
                if ( $oldid ) {
-                       wfProfileIn( __METHOD__ . "-dodiff" );
 
-                       #$diffText = $de->getDiff( wfMessage( 'revisionasof',
-                       #       $wgLang->timeanddate( $timestamp ),
-                       #       $wgLang->date( $timestamp ),
-                       #       $wgLang->time( $timestamp ) )->text(),
-                       #       wfMessage( 'currentrev' )->text() );
+                       # $diffText = $de->getDiff( wfMessage( 'revisionasof',
+                       #       $wgLang->timeanddate( $timestamp ),
+                       #       $wgLang->date( $timestamp ),
+                       #       $wgLang->time( $timestamp ) )->text(),
+                       #       wfMessage( 'currentrev' )->text() );
 
                        $diffText = '';
                        // Don't bother generating the diff if we won't be able to show it
@@ -165,10 +164,9 @@ class FeedUtils {
                                $diffText = "<p>Can't load revision $newid</p>";
                        } else {
                                // Diff output fine, clean up any illegal UTF-8
-                               $diffText = UtfNormal::cleanUp( $diffText );
+                               $diffText = UtfNormal\Validator::cleanUp( $diffText );
                                $diffText = self::applyDiffStyle( $diffText );
                        }
-                       wfProfileOut( __METHOD__ . "-dodiff" );
                } else {
                        $rev = Revision::newFromId( $newid );
                        if ( $wgFeedDiffCutoff <= 0 || is_null( $rev ) ) {
@@ -187,10 +185,10 @@ class FeedUtils {
                                        $html = nl2br( htmlspecialchars( $text ) );
                                }
                        } else {
-                               //XXX: we could get an HTML representation of the content via getParserOutput, but that may
+                               // XXX: we could get an HTML representation of the content via getParserOutput, but that may
                                //     contain JS magic and generally may not be suitable for inclusion in a feed.
                                //     Perhaps Content should have a getDescriptiveHtml method and/or a getSourceText method.
-                               //Compare also ApiFeedContributions::feedItemDesc
+                               // Compare also ApiFeedContributions::feedItemDesc
                                $html = null;
                        }