Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -255,14 +255,14 @@ |
256 | 256 | $i++; |
257 | 257 | } |
258 | 258 | $result .= '<input type="hidden" name="sc" value="' . $i . '"/>'; |
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 |
| 259 | + $result .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes&sc=1')) . '" rel="nofollow">' . 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 | 262 | '<input type="hidden" name="eq" value="yes"/>' . |
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>' . |
| 263 | + ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail)) . '" rel="nofollow">' . 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 { |
266 | | - $result .= '<p><a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes')) . '">' . wfMsg('smw_ask_editquery') . '</a></p>'; |
| 266 | + $result .= '<p><a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask',$urltail . '&eq=yes')) . '" rel="nofollow">' . wfMsg('smw_ask_editquery') . '</a></p>'; |
267 | 267 | } |
268 | 268 | return $result; |
269 | 269 | } |
— | — | @@ -277,7 +277,7 @@ |
278 | 278 | $limit = $this->m_params['limit']; |
279 | 279 | // prepare navigation bar |
280 | 280 | if ($offset > 0) { |
281 | | - $navigation = '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . max(0,$offset-$limit) . '&limit=' . $limit . $urltail)) . '">' . wfMsg('smw_result_prev') . '</a>'; |
| 281 | + $navigation = '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . max(0,$offset-$limit) . '&limit=' . $limit . $urltail)) . '" rel="nofollow">' . wfMsg('smw_result_prev') . '</a>'; |
282 | 282 | } else { |
283 | 283 | $navigation = wfMsg('smw_result_prev'); |
284 | 284 | } |
— | — | @@ -285,22 +285,18 @@ |
286 | 286 | $navigation .= ' <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '– ' . ($offset + $res->getCount()) . '</b> '; |
287 | 287 | |
288 | 288 | if ($res->hasFurtherResults()) |
289 | | - $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . $urltail)) . '">' . wfMsg('smw_result_next') . '</a>'; |
| 289 | + $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . $urltail)) . '" rel="nofollow">' . wfMsg('smw_result_next') . '</a>'; |
290 | 290 | else $navigation .= wfMsg('smw_result_next'); |
291 | 291 | |
292 | | - $max = false; $first=true; |
| 292 | + $first=true; |
293 | 293 | foreach (array(20,50,100,250,500) as $l) { |
294 | | - if ($max) continue; |
| 294 | + if ($l > $smwgQMaxLimit) break; |
295 | 295 | if ($first) { |
296 | 296 | $navigation .= ' ('; |
297 | 297 | $first = false; |
298 | 298 | } else $navigation .= ' | '; |
299 | | - if ($l > $smwgQMaxLimit) { |
300 | | - $l = $smwgQMaxLimit; |
301 | | - $max = true; |
302 | | - } |
303 | 299 | if ( $limit != $l ) { |
304 | | - $navigation .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . $offset . '&limit=' . $l . $urltail)) . '">' . $l . '</a>'; |
| 300 | + $navigation .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . $offset . '&limit=' . $l . $urltail)) . '" rel="nofollow">' . $l . '</a>'; |
305 | 301 | } else { |
306 | 302 | $navigation .= '<b>' . $l . '</b>'; |
307 | 303 | } |
— | — | @@ -353,13 +349,13 @@ |
354 | 350 | |
355 | 351 | // prepare navigation bar |
356 | 352 | if ($offset > 0) |
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>'; |
| 353 | + $navigation = '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . max(0,$offset-$limit) . '&limit=' . $limit . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '" rel="nofollow">' . wfMsg('smw_result_prev') . '</a>'; |
358 | 354 | else $navigation = wfMsg('smw_result_prev'); |
359 | 355 | |
360 | 356 | $navigation .= ' <b>' . wfMsg('smw_result_results') . ' ' . ($offset+1) . '– ' . ($offset + $res->getCount()) . '</b> '; |
361 | 357 | |
362 | 358 | if ($res->hasFurtherResults()) |
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>'; |
| 359 | + $navigation .= ' <a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . ($offset+$limit) . '&limit=' . $limit . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '" rel="nofollow">' . wfMsg('smw_result_next') . '</a>'; |
364 | 360 | else $navigation .= wfMsg('smw_result_next'); |
365 | 361 | |
366 | 362 | $max = false; $first=true; |
— | — | @@ -374,7 +370,7 @@ |
375 | 371 | $max = true; |
376 | 372 | } |
377 | 373 | if ( $limit != $l ) { |
378 | | - $navigation .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . $offset . '&limit=' . $l . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '">' . $l . '</a>'; |
| 374 | + $navigation .= '<a href="' . htmlspecialchars($skin->makeSpecialUrl('Ask','offset=' . $offset . '&limit=' . $l . '&query=' . urlencode($query) . '&sort=' . urlencode($sort) .'&order=' . urlencode($order))) . '" rel="nofollow">' . $l . '</a>'; |
379 | 375 | } else { |
380 | 376 | $navigation .= '<b>' . $l . '</b>'; |
381 | 377 | } |