Merge "Add checkDependencies.php"
[lhc/web/wiklou.git] / includes / FeedUtils.php
index 4dde52d..59efc98 100644 (file)
  */
 class FeedUtils {
 
-       /**
-        * Check whether feed's cache should be cleared; for changes feeds
-        * If the feed should be purged; $timekey and $key will be removed from cache
-        *
-        * @param string $timekey Cache key of the timestamp of the last item
-        * @param string $key Cache key of feed's content
-        */
-       public static function checkPurge( $timekey, $key ) {
-               global $wgRequest, $wgUser;
-
-               $purge = $wgRequest->getVal( 'action' ) === 'purge';
-               // Allow users with 'purge' right to clear feed caches
-               if ( $purge && $wgUser->isAllowed( 'purge' ) ) {
-                       $cache = ObjectCache::getMainWANInstance();
-                       $cache->delete( $timekey, 1 );
-                       $cache->delete( $key, 1 );
-               }
-       }
-
        /**
         * Check whether feeds can be used and that $type is a valid feed type
         *
@@ -173,7 +154,7 @@ class FeedUtils {
 
                        if ( $newContent instanceof TextContent ) {
                                // only textual content has a "source view".
-                               $text = $newContent->getNativeData();
+                               $text = $newContent->getText();
 
                                if ( $wgFeedDiffCutoff <= 0 || strlen( $text ) > $wgFeedDiffCutoff ) {
                                        $html = null;