* (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering
authorSam Reed <reedy@users.mediawiki.org>
Sat, 23 Jan 2010 23:32:15 +0000 (23:32 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 23 Jan 2010 23:32:15 +0000 (23:32 +0000)
If filterredir == 'nonredirects', only filter if !redirect

RELEASE-NOTES
includes/api/ApiQueryBacklinks.php

index 58e90b8..c69dced 100644 (file)
@@ -801,6 +801,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22061) API: add prop=headitems to action=parse
 * (bug 22240) API: include time in siteinfo
 * (bug 22241) Quick edit is still using the deprecated watch parameter (API: Setting default for watch/unwatch wrongly set)
+* (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering
 
 === Languages updated in 1.16 ===
 
index 2ec54f7..ea3a6df 100644 (file)
@@ -122,7 +122,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
 
                if ( $this->params['filterredir'] == 'redirects' )
                        $this->addWhereFld( 'page_is_redirect', 1 );
-               else if ( $this->params['filterredir'] == 'nonredirects' )
+               else if ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) //bug 22245 - Check for !redirect, as filtering nonredirects, when getting what links to them is contradictory
                        $this->addWhereFld( 'page_is_redirect', 0 );
 
                $this->addOption( 'LIMIT', $this->params['limit'] + 1 );