Revision: 46135
Author: catrope
Date: 2009-01-24 13:03:40 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
Backport r46134 (killed filesort in ApiQueryBacklinks)
Modified Paths:
--------------
branches/REL1_14/phase3/includes/api/ApiQueryBacklinks.php
Modified: branches/REL1_14/phase3/includes/api/ApiQueryBacklinks.php
===================================================================
--- branches/REL1_14/phase3/includes/api/ApiQueryBacklinks.php 2009-01-24
13:00:43 UTC (rev 46134)
+++ branches/REL1_14/phase3/includes/api/ApiQueryBacklinks.php 2009-01-24
13:03:40 UTC (rev 46135)
@@ -137,13 +137,12 @@
$this->addFields($this->bl_title);
if($this->hasNS)
$this->addFields($this->bl_ns);
- $titleWhere = '';
+ $titleWhere = array();
foreach($this->redirTitles as $t)
- $titleWhere .= ($titleWhere != '' ? " OR " : '') .
- "({$this->bl_title} =
".$db->addQuotes($t->getDBKey()).
+ $titleWhere[] = "({$this->bl_title} =
".$db->addQuotes($t->getDBKey()).
($this->hasNS ? " AND {$this->bl_ns} =
'{$t->getNamespace()}'" : "") .
")";
- $this->addWhere($titleWhere);
+ $this->addWhere($db->makeList($titleWhere, LIST_OR));
$this->addWhereFld('page_namespace',
$this->params['namespace']);
if(!is_null($this->redirID))
{
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs