r61571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61570‎ | r61571 | r61572 >
Date:11:44, 27 January 2010
Author:catrope
Status:ok
Tags:
Comment:
wmf-deployment: Merge r61447, r61450 and r61456 from trunk
Modified paths:
  • /branches/wmf-deployment/includes/api/ApiQueryBacklinks.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/api/ApiQueryBacklinks.php
@@ -118,7 +118,8 @@
119119 $this->addWhere("{$this->bl_from}>={$this->contID}");
120120 if($this->params['filterredir'] == 'redirects')
121121 $this->addWhereFld('page_is_redirect', 1);
122 - if($this->params['filterredir'] == 'nonredirects')
 122+ if($this->params['filterredir'] == 'nonredirects' && !$this->redirect)
 123+ // bug 22245 - Check for !redirect, as filtering nonredirects, when getting what links to them is contradictory
123124 $this->addWhereFld('page_is_redirect', 0);
124125 $this->addOption('LIMIT', $this->params['limit'] + 1);
125126 $this->addOption('ORDER BY', $this->bl_from);
@@ -413,15 +414,16 @@
414415 'title' => 'Title to search.',
415416 'continue' => 'When more results are available, use this to continue.',
416417 'namespace' => 'The namespace to enumerate.',
417 - 'filterredir' => 'How to filter for redirects'
418418 );
419419 if($this->getModuleName() != 'embeddedin')
420420 return array_merge($retval, array(
421421 'redirect' => 'If linking page is a redirect, find all pages that link to that redirect as well. Maximum limit is halved.',
 422+ 'filterredir' => "How to filter for redirects. If set to nonredirects when {$this->bl_code}redirect is enabled, this is only applied to the second level",
422423 'limit' => "How many total pages to return. If {$this->bl_code}redirect is enabled, limit applies to each level separately (which means you may get up to 2 * limit results)."
423424 ));
424425 return array_merge($retval, array(
425 - 'limit' => "How many total pages to return."
 426+ 'filterredir' => 'How to filter for redirects',
 427+ 'limit' => 'How many total pages to return.'
426428 ));
427429 }
428430
Property changes on: branches/wmf-deployment/includes/api/ApiQueryBacklinks.php
___________________________________________________________________
Name: svn:mergeinfo
429431 + /branches/REL1_15/phase3/includes/api/ApiQueryBacklinks.php:51646
/branches/wmf-deployment/includes/api/ApiQueryBacklinks.php:53381
/trunk/phase3/includes/api/ApiQueryBacklinks.php:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57530,57541,57602,57916,58151,58219,58633,58816,60465,60587,60589,60704,61447-61457

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61447* (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering...reedy23:32, 23 January 2010
r61450minor followup to r61447, moving commmentreedy00:14, 24 January 2010
r61456API: Document the behavior added in r61447catrope10:10, 24 January 2010

Status & tagging log