r34394 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34393‎ | r34394 | r34395 >
Date:19:30, 7 May 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 14013) Added rcshow=patrolled to list=recentchanges
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -94,10 +94,16 @@
9595 if ((isset ($show['minor']) && isset ($show['!minor']))
9696 || (isset ($show['bot']) && isset ($show['!bot']))
9797 || (isset ($show['anon']) && isset ($show['!anon']))
98 - || (isset ($show['redirect']) && isset ($show['!redirect']))) {
 98+ || (isset ($show['redirect']) && isset ($show['!redirect']))
 99+ || (isset ($show['patrolled']) && isset ($show['!patrolled']))) {
99100
100101 $this->dieUsage("Incorrect parameter - mutually exclusive values may not be supplied", 'show');
101102 }
 103+
 104+ // Check permissions
 105+ global $wgUser;
 106+ if((isset($show['patrolled']) || isset($show['!patrolled'])) && !$wgUser->isAllowed('patrol'))
 107+ $this->dieUsage("You need the patrol right to request the patrolled flag", 'permissiondenied');
102108
103109 /* Add additional conditions to query depending upon parameters. */
104110 $this->addWhereIf('rc_minor = 0', isset ($show['!minor']));
@@ -106,6 +112,8 @@
107113 $this->addWhereIf('rc_bot != 0', isset ($show['bot']));
108114 $this->addWhereIf('rc_user = 0', isset ($show['anon']));
109115 $this->addWhereIf('rc_user != 0', isset ($show['!anon']));
 116+ $this->addWhereIf('rc_patrolled = 0', isset($show['!patrolled']));
 117+ $this->addWhereIf('rc_patrolled != 0', isset($show['patrolled']));
110118 $this->addWhereIf('page_is_redirect = 1', isset ($show['redirect']));
111119 // Don't throw log entries out the window here
112120 $this->addWhereIf('page_is_redirect = 0 OR page_is_redirect IS NULL', isset ($show['!redirect']));
@@ -352,7 +360,9 @@
353361 'anon',
354362 '!anon',
355363 'redirect',
356 - '!redirect'
 364+ '!redirect',
 365+ 'patrolled',
 366+ '!patrolled'
357367 )
358368 ),
359369 'limit' => array (
Index: trunk/phase3/RELEASE-NOTES
@@ -315,6 +315,7 @@
316316 * (bug 13965) Hardcoded 51 limit on titles is too limiting
317317 * (bug 13993) apfrom doesn't work with apdir=descending
318318 * (bug 14018) Introduced alcontinue to list=alllinks to improve paging
 319+* (bug 14013) Added rcshow=patrolled to list=recentchanges
319320
320321 === Languages updated in 1.13 ===
321322

Status & tagging log