Index: branches/REL1_14/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -137,13 +137,12 @@ |
138 | 138 | $this->addFields($this->bl_title); |
139 | 139 | if($this->hasNS) |
140 | 140 | $this->addFields($this->bl_ns); |
141 | | - $titleWhere = ''; |
| 141 | + $titleWhere = array(); |
142 | 142 | foreach($this->redirTitles as $t) |
143 | | - $titleWhere .= ($titleWhere != '' ? " OR " : '') . |
144 | | - "({$this->bl_title} = ".$db->addQuotes($t->getDBKey()). |
| 143 | + $titleWhere[] = "({$this->bl_title} = ".$db->addQuotes($t->getDBKey()). |
145 | 144 | ($this->hasNS ? " AND {$this->bl_ns} = '{$t->getNamespace()}'" : "") . |
146 | 145 | ")"; |
147 | | - $this->addWhere($titleWhere); |
| 146 | + $this->addWhere($db->makeList($titleWhere, LIST_OR)); |
148 | 147 | $this->addWhereFld('page_namespace', $this->params['namespace']); |
149 | 148 | if(!is_null($this->redirID)) |
150 | 149 | { |