r44863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44862‎ | r44863 | r44864 >
Date:23:54, 20 December 2008
Author:catrope
Status:ok
Tags:
Comment:
API: (bug 16730) Added apprfiltercascade parameter to list=allpages to filter cascade-protected pages
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllpages.php
@@ -99,6 +99,10 @@
100100 $prlevel = array_diff($params['prlevel'], array('', '*'));
101101 if (!empty($prlevel))
102102 $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);
103107
104108 $this->addOption('DISTINCT');
105109
@@ -192,6 +196,14 @@
193197 ApiBase :: PARAM_TYPE => $wgRestrictionLevels,
194198 ApiBase :: PARAM_ISMULTI => true
195199 ),
 200+ 'prfiltercascade' => array (
 201+ ApiBase :: PARAM_DFLT => 'all',
 202+ ApiBase :: PARAM_TYPE => array (
 203+ 'cascading',
 204+ 'noncascading',
 205+ 'all'
 206+ ),
 207+ ),
196208 'limit' => array (
197209 ApiBase :: PARAM_DFLT => 10,
198210 ApiBase :: PARAM_TYPE => 'limit',
@@ -228,6 +240,7 @@
229241 'maxsize' => 'Limit to pages with at most this many bytes',
230242 'prtype' => 'Limit to protected pages only',
231243 'prlevel' => 'The protection level (must be used with apprtype= parameter)',
 244+ 'prfiltercascade' => 'Filter protections based on cascadingness (ignored when apprtype isn\'t set)',
232245 'filterlanglinks' => 'Filter based on whether a page has langlinks',
233246 'limit' => 'How many total pages to return.'
234247 );
Index: trunk/phase3/RELEASE-NOTES
@@ -544,6 +544,8 @@
545545 * (bug 16672) Include canonical namespace name in
546546 meta=siteinfo&siprop=namespaces.
547547 * (bug 16726) siprop=namespacealiases should also list localized aliases
 548+* (bug 16730) Added apprfiltercascade parameter to list=allpages to filter
 549+ cascade-protected pages
548550
549551 === Languages updated in 1.14 ===
550552

Status & tagging log