From 7cba38c9d77227d67340b50be46b725bbd71d79a Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 4 Feb 2011 21:38:54 +0000 Subject: [PATCH] Currently, we do not send last-modified headers for the RC if patrolling is in use, since that messes with the way we determine if the RC has changed. Change it to not send those headers only if using RC patrol, and the current user can see patrol marks. As an aside, Special:Recentchanges does not show new page patrol marks if $wgUseNPPatrol = true, but $wgUseRCPatrol=false (it only shows them if both are true), where Special:newpages shows patrol stuff whenever $wgUseNPPatrol is true, regardless of $wgUseRCPatrol. Which is a tad weird, but whatever. --- RELEASE-NOTES | 2 ++ includes/specials/SpecialRecentchanges.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 07b19da36d..884242063f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -113,6 +113,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN is blacklisted now gives the proper extension in the error message. * (bug 26961) Hide anon edits in watchlist preference now actually works. * (bug 19751) Filesystem is now checked during image undeletion +* Send last modified headers for Special:Recentchanges when RC patrol is + enabled, but user cannot see rc patrol links. === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 2f13fe590a..3ec4ae4b32 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -210,10 +210,10 @@ class SpecialRecentChanges extends IncludableSpecialPage { * @return String or false */ public function checkLastModified( $feedFormat ) { - global $wgUseRCPatrol, $wgOut; + global $wgOut, $wgUser; $dbr = wfGetDB( DB_SLAVE ); $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__ ); - if( $feedFormat || !$wgUseRCPatrol ) { + if( $feedFormat || !$wgUser->useRCPatrol() ) { if( $lastmod && $wgOut->checkLastModified( $lastmod ) ) { # Client cache fresh and headers sent, nothing more to do. return false; -- 2.20.1