(Follow-up r91059) Make backlinks query do both null or "" to potentially account...
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 29 Jun 2011 23:09:00 +0000 (23:09 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 29 Jun 2011 23:09:00 +0000 (23:09 +0000)
yet to new conventions.

Hopefully I got the syntax right for the OR thing using mw's db functions (I tested the query, its fine, I'm just not 100% sure thats the most correct way using mw's db funcs, I've never really had to build an OR query using the db funcs).

includes/BacklinkCache.php

index 37d830e..8d1571e 100644 (file)
@@ -217,7 +217,10 @@ class BacklinkCache {
                                $conds = array(
                                        "{$prefix}_namespace" => $this->title->getNamespace(),
                                        "{$prefix}_title"     => $this->title->getDBkey(),
-                                       "{$prefix}_interwiki" => '',
+                                       $this->getDb()->makeList( array(
+                                               "{$prefix}_interwiki = ''",
+                                               "{$prefix}_interwiki is null",
+                                       ), LIST_OR ),
                                        "page_id={$prefix}_from"
                                );
                                break;