Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php |
— | — | @@ -16,13 +16,12 @@ |
17 | 17 | $wgOut, $IP; |
18 | 18 | |
19 | 19 | $wgOut->disable(); |
20 | | - wfDebug("]]]Are we being called at all? \n"); |
21 | 20 | require_once("$IP/includes/Setup.php"); |
22 | 21 | require_once("Attribute.php"); |
23 | 22 | require_once("RecordSet.php"); |
24 | 23 | require_once("Editor.php"); |
25 | 24 | require_once("HTMLtable.php"); |
26 | | - require_once("WikiDataAPI.php"); |
| 25 | + #require_once("WikiDataAPI.php"); |
27 | 26 | require_once("Transaction.php"); |
28 | 27 | require_once("OmegaWikiEditors.php"); |
29 | 28 | require_once("Wikidata.php"); |
— | — | @@ -36,7 +35,6 @@ |
37 | 36 | |
38 | 37 | function getSuggestions() { |
39 | 38 | |
40 | | - wfDebug("]]]Are we doing getSuggestions? \n"); |
41 | 39 | global $idAttribute; |
42 | 40 | global $wgUser; |
43 | 41 | $dc=wdGetDataSetContext(); |
— | — | @@ -137,7 +135,7 @@ |
138 | 136 | $sql .= "10"; |
139 | 137 | |
140 | 138 | # == Actual query here |
141 | | - wfdebug("]]]".$sql."\n"); |
| 139 | + //wfdebug("]]]".$sql."\n"); |
142 | 140 | $queryResult = $dbr->query($sql); |
143 | 141 | |
144 | 142 | $idAttribute = new Attribute("id", "ID", "id"); |
— | — | @@ -175,6 +173,13 @@ |
176 | 174 | list($recordSet, $editor) = getTransactionAsRecordSet($queryResult); |
177 | 175 | break; |
178 | 176 | } |
| 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 | + |
179 | 184 | $output=$editor->view(new IdStack($prefix . 'table'), $recordSet); |
180 | 185 | //$output="<table><tr><td>HELLO ERIK!</td></tr></table>"; |
181 | 186 | //wfDebug($output); |
— | — | @@ -191,7 +196,7 @@ |
192 | 197 | #if ($actual_query==$fallback_query) |
193 | 198 | # return $actual_query; |
194 | 199 | |
195 | | - $sql.="SELECT * FROM (SELECT "; |
| 200 | + $sql="SELECT * FROM (SELECT "; |
196 | 201 | |
197 | 202 | $sql_with_comma=$sql; |
198 | 203 | foreach ($fields as $field) { |