From aafdf047f21fa7c4a3f408e490edc53e58b6c762 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Wed, 29 Jun 2011 23:09:00 +0000 Subject: [PATCH] (Follow-up r91059) Make backlinks query do both null or "" to potentially account for old rows that havn't been updated 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/BacklinkCache.php b/includes/BacklinkCache.php index 37d830e232..8d1571ec69 100644 --- a/includes/BacklinkCache.php +++ b/includes/BacklinkCache.php @@ -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; -- 2.20.1