r91138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91137‎ | r91138 | r91139 >
Date:23:09, 29 June 2011
Author:bawolff
Status:ok (Comments)
Tags:
Comment:
(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).
Modified paths:
  • /trunk/phase3/includes/BacklinkCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/BacklinkCache.php
@@ -217,7 +217,10 @@
218218 $conds = array(
219219 "{$prefix}_namespace" => $this->title->getNamespace(),
220220 "{$prefix}_title" => $this->title->getDBkey(),
221 - "{$prefix}_interwiki" => '',
 221+ $this->getDb()->makeList( array(
 222+ "{$prefix}_interwiki = ''",
 223+ "{$prefix}_interwiki is null",
 224+ ), LIST_OR ),
222225 "page_id={$prefix}_from"
223226 );
224227 break;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91059BacklinkCache was forgetting to check rd_interwiki when getting redirects, an...bawolff07:19, 29 June 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   01:17, 30 June 2011

I'd prefer "IS NULL"

Status & tagging log