Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -94,10 +94,16 @@ |
95 | 95 | if ((isset ($show['minor']) && isset ($show['!minor'])) |
96 | 96 | || (isset ($show['bot']) && isset ($show['!bot'])) |
97 | 97 | || (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']))) { |
99 | 100 | |
100 | 101 | $this->dieUsage("Incorrect parameter - mutually exclusive values may not be supplied", 'show'); |
101 | 102 | } |
| 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'); |
102 | 108 | |
103 | 109 | /* Add additional conditions to query depending upon parameters. */ |
104 | 110 | $this->addWhereIf('rc_minor = 0', isset ($show['!minor'])); |
— | — | @@ -106,6 +112,8 @@ |
107 | 113 | $this->addWhereIf('rc_bot != 0', isset ($show['bot'])); |
108 | 114 | $this->addWhereIf('rc_user = 0', isset ($show['anon'])); |
109 | 115 | $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'])); |
110 | 118 | $this->addWhereIf('page_is_redirect = 1', isset ($show['redirect'])); |
111 | 119 | // Don't throw log entries out the window here |
112 | 120 | $this->addWhereIf('page_is_redirect = 0 OR page_is_redirect IS NULL', isset ($show['!redirect'])); |
— | — | @@ -352,7 +360,9 @@ |
353 | 361 | 'anon', |
354 | 362 | '!anon', |
355 | 363 | 'redirect', |
356 | | - '!redirect' |
| 364 | + '!redirect', |
| 365 | + 'patrolled', |
| 366 | + '!patrolled' |
357 | 367 | ) |
358 | 368 | ), |
359 | 369 | 'limit' => array ( |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -315,6 +315,7 @@ |
316 | 316 | * (bug 13965) Hardcoded 51 limit on titles is too limiting |
317 | 317 | * (bug 13993) apfrom doesn't work with apdir=descending |
318 | 318 | * (bug 14018) Introduced alcontinue to list=alllinks to improve paging |
| 319 | +* (bug 14013) Added rcshow=patrolled to list=recentchanges |
319 | 320 | |
320 | 321 | === Languages updated in 1.13 === |
321 | 322 | |