r44012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44011‎ | r44012 | r44013 >
Date:11:36, 28 November 2008
Author:btongminh
Status:ok
Tags:
Comment:
Allow easier debugging of this module by distinguishing between the two queries
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -124,9 +124,9 @@
125125
126126 private function prepareSecondQuery($resultPageSet = null) {
127127 /* SELECT page_id, page_title, page_namespace, page_is_redirect, pl_title, pl_namespace
128 - * FROM pagelinks, page WHERE pl_from=page_id
129 - * AND (pl_title='Foo' AND pl_namespace=0) OR (pl_title='Bar' AND pl_namespace=1)
130 - * LIMIT 11 ORDER BY pl_namespace, pl_title, pl_from
 128+ FROM pagelinks, page WHERE pl_from=page_id
 129+ AND (pl_title='Foo' AND pl_namespace=0) OR (pl_title='Bar' AND pl_namespace=1)
 130+ ORDER BY pl_namespace, pl_title, pl_from LIMIT 11
131131 */
132132 $db = $this->getDB();
133133 $this->addTables(array('page', $this->bl_table));
@@ -186,7 +186,7 @@
187187 $this->prepareFirstQuery($resultPageSet);
188188
189189 $db = $this->getDB();
190 - $res = $this->select(__METHOD__);
 190+ $res = $this->select(__METHOD__.'::firstQuery');
191191
192192 $count = 0;
193193 $this->data = array ();
@@ -215,7 +215,7 @@
216216 {
217217 $this->resetQueryParams();
218218 $this->prepareSecondQuery($resultPageSet);
219 - $res = $this->select(__METHOD__);
 219+ $res = $this->select(__METHOD__.'::secondQuery');
220220 $count = 0;
221221 while($row = $db->fetchObject($res))
222222 {

Status & tagging log