Index: trunk/phase3/includes/api/ApiQueryAllpages.php |
— | — | @@ -99,6 +99,10 @@ |
100 | 100 | $prlevel = array_diff($params['prlevel'], array('', '*')); |
101 | 101 | if (!empty($prlevel)) |
102 | 102 | $this->addWhereFld('pr_level', $prlevel); |
| 103 | + if ($params['prfiltercascade'] == 'cascading') |
| 104 | + $this->addWhereFld('pr_cascade', 1); |
| 105 | + if ($params['prfiltercascade'] == 'noncascading') |
| 106 | + $this->addWhereFld('pr_cascade', 0); |
103 | 107 | |
104 | 108 | $this->addOption('DISTINCT'); |
105 | 109 | |
— | — | @@ -192,6 +196,14 @@ |
193 | 197 | ApiBase :: PARAM_TYPE => $wgRestrictionLevels, |
194 | 198 | ApiBase :: PARAM_ISMULTI => true |
195 | 199 | ), |
| 200 | + 'prfiltercascade' => array ( |
| 201 | + ApiBase :: PARAM_DFLT => 'all', |
| 202 | + ApiBase :: PARAM_TYPE => array ( |
| 203 | + 'cascading', |
| 204 | + 'noncascading', |
| 205 | + 'all' |
| 206 | + ), |
| 207 | + ), |
196 | 208 | 'limit' => array ( |
197 | 209 | ApiBase :: PARAM_DFLT => 10, |
198 | 210 | ApiBase :: PARAM_TYPE => 'limit', |
— | — | @@ -228,6 +240,7 @@ |
229 | 241 | 'maxsize' => 'Limit to pages with at most this many bytes', |
230 | 242 | 'prtype' => 'Limit to protected pages only', |
231 | 243 | 'prlevel' => 'The protection level (must be used with apprtype= parameter)', |
| 244 | + 'prfiltercascade' => 'Filter protections based on cascadingness (ignored when apprtype isn\'t set)', |
232 | 245 | 'filterlanglinks' => 'Filter based on whether a page has langlinks', |
233 | 246 | 'limit' => 'How many total pages to return.' |
234 | 247 | ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -544,6 +544,8 @@ |
545 | 545 | * (bug 16672) Include canonical namespace name in |
546 | 546 | meta=siteinfo&siprop=namespaces. |
547 | 547 | * (bug 16726) siprop=namespacealiases should also list localized aliases |
| 548 | +* (bug 16730) Added apprfiltercascade parameter to list=allpages to filter |
| 549 | + cascade-protected pages |
548 | 550 | |
549 | 551 | === Languages updated in 1.14 === |
550 | 552 | |