r81544 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81543‎ | r81544 | r81545 >
Date:21:38, 4 February 2011
Author:bawolff
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -210,10 +210,10 @@
211211 * @return String or false
212212 */
213213 public function checkLastModified( $feedFormat ) {
214 - global $wgUseRCPatrol, $wgOut;
 214+ global $wgOut, $wgUser;
215215 $dbr = wfGetDB( DB_SLAVE );
216216 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__ );
217 - if( $feedFormat || !$wgUseRCPatrol ) {
 217+ if( $feedFormat || !$wgUser->useRCPatrol() ) {
218218 if( $lastmod && $wgOut->checkLastModified( $lastmod ) ) {
219219 # Client cache fresh and headers sent, nothing more to do.
220220 return false;
Index: trunk/phase3/RELEASE-NOTES
@@ -113,6 +113,8 @@
114114 is blacklisted now gives the proper extension in the error message.
115115 * (bug 26961) Hide anon edits in watchlist preference now actually works.
116116 * (bug 19751) Filesystem is now checked during image undeletion
 117+* Send last modified headers for Special:Recentchanges when RC patrol is
 118+ enabled, but user cannot see rc patrol links.
117119
118120 === API changes in 1.18 ===
119121 * (bug 26339) Throw warning when truncating an overlarge API result

Status & tagging log