r22558 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22557‎ | r22558 | r22559 >
Date:10:40, 30 May 2007
Author:kim
Status:old
Tags:
Comment:
fix a minor bug, caught by EA_NOTICE
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -16,13 +16,12 @@
1717 $wgOut, $IP;
1818
1919 $wgOut->disable();
20 - wfDebug("]]]Are we being called at all? \n");
2120 require_once("$IP/includes/Setup.php");
2221 require_once("Attribute.php");
2322 require_once("RecordSet.php");
2423 require_once("Editor.php");
2524 require_once("HTMLtable.php");
26 - require_once("WikiDataAPI.php");
 25+ #require_once("WikiDataAPI.php");
2726 require_once("Transaction.php");
2827 require_once("OmegaWikiEditors.php");
2928 require_once("Wikidata.php");
@@ -36,7 +35,6 @@
3736
3837 function getSuggestions() {
3938
40 - wfDebug("]]]Are we doing getSuggestions? \n");
4139 global $idAttribute;
4240 global $wgUser;
4341 $dc=wdGetDataSetContext();
@@ -137,7 +135,7 @@
138136 $sql .= "10";
139137
140138 # == Actual query here
141 - wfdebug("]]]".$sql."\n");
 139+ //wfdebug("]]]".$sql."\n");
142140 $queryResult = $dbr->query($sql);
143141
144142 $idAttribute = new Attribute("id", "ID", "id");
@@ -175,6 +173,13 @@
176174 list($recordSet, $editor) = getTransactionAsRecordSet($queryResult);
177175 break;
178176 }
 177+ ob_start();
 178+ var_dump($queryResult);
 179+ var_dump($recordSet);
 180+ var_dump($editor);
 181+ wfDebug(ob_get_contents());
 182+ ob_end_clean();
 183+
179184 $output=$editor->view(new IdStack($prefix . 'table'), $recordSet);
180185 //$output="<table><tr><td>HELLO ERIK!</td></tr></table>";
181186 //wfDebug($output);
@@ -191,7 +196,7 @@
192197 #if ($actual_query==$fallback_query)
193198 # return $actual_query;
194199
195 - $sql.="SELECT * FROM (SELECT ";
 200+ $sql="SELECT * FROM (SELECT ";
196201
197202 $sql_with_comma=$sql;
198203 foreach ($fields as $field) {