r45310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45309‎ | r45310 | r45311 >
Date:09:06, 2 January 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
fixed use of outdated function
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -258,7 +258,7 @@
259259 $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
260260 }
261261 $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"/>' .
263263 ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '">' . wfMsg('smw_ask_hidequery') . '</a> | <a href="' . htmlspecialchars(wfMsg('smw_ask_doculink')) . '">' . wfMsg('smw_ask_help') . '</a>' .
264264 "\n</form><br />";
265265 } else {
@@ -284,7 +284,7 @@
285285
286286 $navigation .= '&nbsp;&nbsp;&nbsp;&nbsp; <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '&ndash; ' . ($offset + $res->getCount()) . '</b>&nbsp;&nbsp;&nbsp;&nbsp;';
287287
288 - if ($res->hasFurtherResults())
 288+ if ($res->hasFurtherResults())
289289 $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . $urltail)) . '">' . wfMsg('smw_result_next') . '</a>';
290290 else $navigation .= wfMsg('smw_result_next');
291291
@@ -332,7 +332,7 @@
333333 $html = '<form name="ask" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" .
334334 '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>' ;
335335 $html .= '<textarea name="query" cols="40" rows="6">' . htmlspecialchars($query) . '</textarea><br />' . "\n";
336 -
 336+
337337 if ($smwgQSortingSupport) {
338338 $html .= wfMsg('smw_ask_sortby') . ' <input type="text" name="sort" value="' .
339339 htmlspecialchars($sort) . '"/> <select name="order"><option ';
@@ -342,23 +342,23 @@
343343 $html .= 'value="DESC">' . wfMsg('smw_ask_descorder') . '</option></select> <br />';
344344 }
345345 $html .= '<br /><input type="submit" value="' . wfMsg('smw_ask_submit') . '"/> <a href="' . $docutitle->getFullURL() . '">' . wfMsg('smw_ask_help') . "</a>\n</form>";
346 -
 346+
347347 // print results if any
348348 if ($smwgQEnabled && ('' != $query) ) {
349349 $params = array('offset' => $offset, 'limit' => $limit, 'format' => 'broadtable', 'mainlabel' => ' ', 'link' => 'all', 'default' => wfMsg('smw_result_noresults'), 'sort' => $sort, 'order' => $order);
350350 $queryobj = SMWQueryProcessor::createQuery($query, $params, false);
351351 $res = smwfGetStore()->getQueryResult($queryobj);
352352 $printer = new SMWTableResultPrinter('broadtable',false);
353 - $result = $printer->getResultHTML($res, $params);
 353+ $result = $printer->getResult($res, $params, SMW_OUTPUT_HTML);
354354
355355 // prepare navigation bar
356 - if ($offset > 0)
 356+ if ($offset > 0)
357357 $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>';
358358 else $navigation = wfMsg('smw_result_prev');
359359
360360 $navigation .= '&nbsp;&nbsp;&nbsp;&nbsp; <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '&ndash; ' . ($offset + $res->getCount()) . '</b>&nbsp;&nbsp;&nbsp;&nbsp;';
361361
362 - if ($res->hasFurtherResults())
 362+ if ($res->hasFurtherResults())
363363 $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>';
364364 else $navigation .= wfMsg('smw_result_next');
365365

Status & tagging log