From: Timo Tijhof Date: Fri, 24 May 2019 13:09:51 +0000 (+0100) Subject: changes: Remove unused FeedUtils::checkPurge method X-Git-Tag: 1.34.0-rc.0~1595^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=14d93c5f1b9f5947aa77bc4263b41d1274eb993b;p=lhc%2Fweb%2Fwiklou.git changes: Remove unused FeedUtils::checkPurge method This introduced for use by ChangesFeed::execute(), which in turn has also been unused for many years – and removed in 6f4d15e385807. Change-Id: I5ba7ea2b6ff86e4d210b77bf05971c183352424c --- diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 0a88b2345f..59efc98b1c 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -20,7 +20,6 @@ * @file * @ingroup Feed */ -use MediaWiki\MediaWikiServices; /** * Helper functions for feeds @@ -29,25 +28,6 @@ use MediaWiki\MediaWikiServices; */ 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 = MediaWikiServices::getInstance()->getMainWANObjectCache(); - $cache->delete( $timekey, 1 ); - $cache->delete( $key, 1 ); - } - } - /** * Check whether feeds can be used and that $type is a valid feed type *