Index: trunk/extensions/LuceneSearch.php |
— | — | @@ -530,15 +530,17 @@ |
531 | 531 | } |
532 | 532 | |
533 | 533 | function showShortDialog($term) { |
534 | | - global $wgScript; |
| 534 | + global $wgScript, $wgLuceneDisableSuggestions; |
535 | 535 | |
536 | 536 | $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 " |
540 | 542 | . "style='margin-left: 25%; width: 50%; ' value=\"" |
541 | | - . htmlspecialchars($term) ."\"" |
542 | | - . " autocomplete=\"off\" name=\"search\" />\n" |
| 543 | + . htmlspecialchars($term) ."\"" |
| 544 | + . " name=\"search\" />\n" |
543 | 545 | . "<span id='loadStatus'></span>" |
544 | 546 | . $searchButton |
545 | 547 | . "<div id='results'></div></div>"; |