r44870 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44869‎ | r44870 | r44871 >
Date:12:48, 21 December 2008
Author:catrope
Status:ok
Tags:
Comment:
FlaggedRevs: In lieu of r44866, add orfilterredir to list=oldreviewedpages
Modified paths:
  • /trunk/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php
@@ -55,6 +55,10 @@
5656 // Construct SQL Query
5757 $this->addTables( array( 'page', 'flaggedpages' ) );
5858 $this->addWhereFld( 'page_namespace', $params['namespace'] );
 59+ if( $params['filterredir'] == 'redirects' )
 60+ $this->addWhereFld( 'page_is_redirect', 1 );
 61+ if( $params['filterredir'] == 'nonredirects' )
 62+ $this->addWhereFld( 'page_is_redirect', 0 );
5963 $this->addWhereRange(
6064 'fp_pending_since',
6165 $params['dir'],
@@ -152,9 +156,17 @@
153157 !$wgFlaggedRevsNamespaces ?
154158 NS_MAIN :
155159 $wgFlaggedRevsNamespaces[0],
156 - ApiBase :: PARAM_TYPE => 'namespace',
157 - ApiBase :: PARAM_ISMULTI => true,
 160+ ApiBase::PARAM_TYPE => 'namespace',
 161+ ApiBase::PARAM_ISMULTI => true,
158162 ),
 163+ 'filterredir' => array (
 164+ ApiBase::PARAM_DFLT => 'all',
 165+ ApiBase::PARAM_TYPE => array (
 166+ 'redirects',
 167+ 'nonredirects',
 168+ 'all'
 169+ )
 170+ ),
159171 'limit' => array (
160172 ApiBase::PARAM_DFLT => 10,
161173 ApiBase::PARAM_TYPE => 'limit',
@@ -170,6 +182,7 @@
171183 'start' => 'Start listing at this timestamp.',
172184 'end' => 'Stop listing at this timestamp.',
173185 'namespace' => 'The namespaces to enumerate.',
 186+ 'filterredir' => 'How to filter for redirects',
174187 'limit' => 'How many total pages to return.',
175188 'dir' => array(
176189 'In which direction to list.',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44866(bug 16727) FlaggedRevs: Add option to Special:UnreviewedPages to show redirectsaaron03:21, 21 December 2008

Status & tagging log