Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | $result .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes&sc=1')) . '">' . wfMsg('smw_add_sortcondition') . '</a>'; // note that $urltail uses a , separated list for sorting, so setting sc to 1 always adds one new condition |
260 | 260 | } |
261 | 261 | $result .= '<br /><input type="submit" value="' . wfMsg('smw_ask_submit') . '"/>' . |
262 | | - '<input type="hidden" name="eq" value="yes"/>' . |
| 262 | + '<input type="hidden" name="eq" value="yes"/>' . |
263 | 263 | ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '">' . wfMsg('smw_ask_hidequery') . '</a> | <a href="' . htmlspecialchars(wfMsg('smw_ask_doculink')) . '">' . wfMsg('smw_ask_help') . '</a>' . |
264 | 264 | "\n</form><br />"; |
265 | 265 | } else { |
— | — | @@ -284,7 +284,7 @@ |
285 | 285 | |
286 | 286 | $navigation .= ' <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '– ' . ($offset + $res->getCount()) . '</b> '; |
287 | 287 | |
288 | | - if ($res->hasFurtherResults()) |
| 288 | + if ($res->hasFurtherResults()) |
289 | 289 | $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . $urltail)) . '">' . wfMsg('smw_result_next') . '</a>'; |
290 | 290 | else $navigation .= wfMsg('smw_result_next'); |
291 | 291 | |
— | — | @@ -332,7 +332,7 @@ |
333 | 333 | $html = '<form name="ask" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" . |
334 | 334 | '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>' ; |
335 | 335 | $html .= '<textarea name="query" cols="40" rows="6">' . htmlspecialchars($query) . '</textarea><br />' . "\n"; |
336 | | - |
| 336 | + |
337 | 337 | if ($smwgQSortingSupport) { |
338 | 338 | $html .= wfMsg('smw_ask_sortby') . ' <input type="text" name="sort" value="' . |
339 | 339 | htmlspecialchars($sort) . '"/> <select name="order"><option '; |
— | — | @@ -342,23 +342,23 @@ |
343 | 343 | $html .= 'value="DESC">' . wfMsg('smw_ask_descorder') . '</option></select> <br />'; |
344 | 344 | } |
345 | 345 | $html .= '<br /><input type="submit" value="' . wfMsg('smw_ask_submit') . '"/> <a href="' . $docutitle->getFullURL() . '">' . wfMsg('smw_ask_help') . "</a>\n</form>"; |
346 | | - |
| 346 | + |
347 | 347 | // print results if any |
348 | 348 | if ($smwgQEnabled && ('' != $query) ) { |
349 | 349 | $params = array('offset' => $offset, 'limit' => $limit, 'format' => 'broadtable', 'mainlabel' => ' ', 'link' => 'all', 'default' => wfMsg('smw_result_noresults'), 'sort' => $sort, 'order' => $order); |
350 | 350 | $queryobj = SMWQueryProcessor::createQuery($query, $params, false); |
351 | 351 | $res = smwfGetStore()->getQueryResult($queryobj); |
352 | 352 | $printer = new SMWTableResultPrinter('broadtable',false); |
353 | | - $result = $printer->getResultHTML($res, $params); |
| 353 | + $result = $printer->getResult($res, $params, SMW_OUTPUT_HTML); |
354 | 354 | |
355 | 355 | // prepare navigation bar |
356 | | - if ($offset > 0) |
| 356 | + if ($offset > 0) |
357 | 357 | $navigation = '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . max(0,$offset-$limit) . '&limit=' . $limit . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '">' . wfMsg('smw_result_prev') . '</a>'; |
358 | 358 | else $navigation = wfMsg('smw_result_prev'); |
359 | 359 | |
360 | 360 | $navigation .= ' <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '– ' . ($offset + $res->getCount()) . '</b> '; |
361 | 361 | |
362 | | - if ($res->hasFurtherResults()) |
| 362 | + if ($res->hasFurtherResults()) |
363 | 363 | $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '">' . wfMsg('smw_result_next') . '</a>'; |
364 | 364 | else $navigation .= wfMsg('smw_result_next'); |
365 | 365 | |