Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -29,9 +29,6 @@ |
30 | 30 | */ |
31 | 31 | private $autocompleteenabled = false; |
32 | 32 | |
33 | | - /* |
34 | | - * |
35 | | - */ |
36 | 33 | const ENABLE_AUTO_SUGGEST = true; |
37 | 34 | const DISABLE_AUTO_SUGGEST = false; |
38 | 35 | |
— | — | @@ -196,54 +193,6 @@ |
197 | 194 | } |
198 | 195 | |
199 | 196 | /** |
200 | | - * |
201 | | - * @global OutputPage $wgOut |
202 | | - * @global <type> $wgRequest |
203 | | - * @param <type> $p |
204 | | - * @todo remove this method |
205 | | - */ |
206 | | - protected function makeRes( $p ) { |
207 | | - /* |
208 | | - * TODO: extract parameters from $p and decide: |
209 | | - * (1) if form elements need to be displayed |
210 | | - * (2) if any results need to be displayed |
211 | | - * (3) which factory method of UIhelper should be called |
212 | | - * Most of the code here in this method will anyway be removed later |
213 | | - */ |
214 | | - global $wgOut, $wgRequest; |
215 | | - $htmloutput = ""; |
216 | | - $htmloutput .= $this->getForm(); |
217 | | - $param = array(); |
218 | | - |
219 | | - $this->uiCore = $helper = new SMWQueryUIHelper; // or some factory method |
220 | | - // here come some driver lines for testing; this is very temporary |
221 | | - |
222 | | - // form parameters default values |
223 | | - $helper->setQueryString( |
224 | | - $wgRequest->getVal( 'q', '[[Located in:: Germany]]' ) ); |
225 | | - $helper->setParams( array( |
226 | | - 'format' => $wgRequest->getVal( 'format', 'ol' ), |
227 | | - 'offset' => $wgRequest->getVal( 'offset', '0' ), |
228 | | - 'limit' => $wgRequest->getVal( 'limit', '20' ) |
229 | | - ) ); |
230 | | - $helper->setPrintOuts( array( '?Population' ) ); |
231 | | - $helper->extractParameters( $p ); |
232 | | - |
233 | | - $helper->execute(); |
234 | | - |
235 | | - if ( $this->usesNavigationBar() ) { |
236 | | - $htmloutput .= $this->getNavigationBar ( $helper->getLimit(), $helper->getOffset(), $helper->hasFurtherResults() ); // ? can we preload offset and limit? |
237 | | - } |
238 | | - |
239 | | - $htmloutput .= $helper->getHTMLResult(); |
240 | | - |
241 | | - if ( $this->usesNavigationBar() ) { |
242 | | - $htmloutput .= $this->getNavigationBar ( $helper->getLimit(), $helper->getOffset(), $helper->hasFurtherResults() ); // ? can we preload offset and limit? |
243 | | - } |
244 | | - $wgOut->addHTML( $htmloutput ); |
245 | | - } |
246 | | - |
247 | | - /** |
248 | 197 | * Build the navigation bar for some given query result. |
249 | 198 | * |
250 | 199 | * UI may overload this for a different layout. The navigation bar |
— | — | @@ -336,28 +285,6 @@ |
337 | 286 | } |
338 | 287 | |
339 | 288 | /** |
340 | | - * Creates the form elements and populates them with parameters. |
341 | | - * UI implementations need to overload this if a different layout and form |
342 | | - * elements are desired |
343 | | - * |
344 | | - * @return string Form elements in HTML |
345 | | - */ |
346 | | - protected function getForm() { |
347 | | - /* |
348 | | - * Although the following methods will retuen form elements, which can |
349 | | - * then be placed in wOut as pleased, they will |
350 | | - * also write javascript (if relevant) directly to wgOut. |
351 | | - */ |
352 | | - |
353 | | - // $result=""; |
354 | | - // $result.= getQueryFormBox($contents, $errors); |
355 | | - // $result.= getPOFormBox($content, $enableAutoComplete); |
356 | | - // $result.= getParamBox($content); //avoid ajax, load form elements in the UI by default |
357 | | - $result = "<br>Stub: The Form elements come here<br><br>"; |
358 | | - return $result; |
359 | | - } |
360 | | - |
361 | | - /** |
362 | 289 | * Generates the form element(s) for the Query-string. Use its |
363 | 290 | * complement processQueryFormBox() to decode data sent through these elements. |
364 | 291 | * UI's may overload both to change form parameters. |