r61435 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61434‎ | r61435 | r61436 >
Date:21:25, 23 January 2010
Author:reedy
Status:ok
Tags:
Comment:
filterredir is mutually exclusive (one value)

Change 2nd if for else if in both 1st and 2nd queries
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -118,7 +118,7 @@
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+ else if ( $this->params['filterredir'] == 'nonredirects' )
123123 $this->addWhereFld( 'page_is_redirect', 0 );
124124 $this->addOption( 'LIMIT', $this->params['limit'] + 1 );
125125 $this->addOption( 'ORDER BY', $this->bl_from );
@@ -168,7 +168,7 @@
169169 }
170170 if ( $this->params['filterredir'] == 'redirects' )
171171 $this->addWhereFld( 'page_is_redirect', 1 );
172 - if ( $this->params['filterredir'] == 'nonredirects' )
 172+ else if ( $this->params['filterredir'] == 'nonredirects' )
173173 $this->addWhereFld( 'page_is_redirect', 0 );
174174 $this->addOption( 'LIMIT', $this->params['limit'] + 1 );
175175 $this->addOption( 'ORDER BY', $this->bl_sort );

Status & tagging log