X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FFeedUtils.php;h=59efc98b1c73e5f0edda610093bbc0759d18a809;hp=6108ca1d46b4326a0df2d69a8f812b204873c4bd;hb=e5ef0fd0c6607dd34f6dee69d716b159662a0a34;hpb=2b6f3f0adc475da7eab1ef04dfe917e5536e6e10 diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 6108ca1d46..59efc98b1c 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -28,25 +28,6 @@ */ 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 * @@ -89,7 +70,7 @@ class FeedUtils { $timestamp, $row->rc_deleted & Revision::DELETED_COMMENT ? wfMessage( 'rev-deleted-comment' )->escaped() - : CommentStore::newKey( 'rc_comment' )->getComment( $row )->text, + : CommentStore::getStore()->getComment( 'rc_comment', $row )->text, $actiontext ); } @@ -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;