r8107 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r8106‎ | r8107 | r8108 >
Date:10:12, 7 April 2005
Author:vibber
Status:old
Tags:
Comment:
Fix $wgLuceneDisableSuggestions
Modified paths:
  • /trunk/extensions/LuceneSearch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LuceneSearch.php
@@ -530,15 +530,17 @@
531531 }
532532
533533 function showShortDialog($term) {
534 - global $wgScript;
 534+ global $wgScript, $wgLuceneDisableSuggestions;
535535
536536 $action = "$wgScript";
537 - $searchButton = '<input type="submit" name="fulltext" value="' .
538 - htmlspecialchars(wfMsg('powersearch')) . "\" />\n";
539 - $searchField = "<div><input type='text' id='lsearchbox' onkeyup=\"resultType()\" "
 537+ $searchButton = '<input type="submit" name="fulltext" value="' .
 538+ htmlspecialchars(wfMsg('powersearch')) . "\" />\n";
 539+ $onkeyup = $wgLuceneDisableSuggestions ? '' :
 540+ ' onkeyup="resultType()" autocomplete="off" ';
 541+ $searchField = "<div><input type='text' id='lsearchbox' $onkeyup "
540542 . "style='margin-left: 25%; width: 50%; ' value=\""
541 - . htmlspecialchars($term) ."\""
542 - . " autocomplete=\"off\" name=\"search\" />\n"
 543+ . htmlspecialchars($term) ."\""
 544+ . " name=\"search\" />\n"
543545 . "<span id='loadStatus'></span>"
544546 . $searchButton
545547 . "<div id='results'></div></div>";

Status & tagging log