summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 9989269cf..9769503a7 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -45,6 +45,8 @@ function ajax_qsearch(){
global $lang;
global $INPUT;
+ $maxnumbersuggestions = 50;
+
$query = $INPUT->post->str('q');
if(empty($query)) $query = $INPUT->get->str('q');
if(empty($query)) return;
@@ -57,6 +59,7 @@ function ajax_qsearch(){
print '<strong>'.$lang['quickhits'].'</strong>';
print '<ul>';
+ $counter = 0;
foreach($data as $id => $title){
if (useHeading('navigation')) {
$name = $title;
@@ -69,6 +72,12 @@ function ajax_qsearch(){
}
}
echo '<li>' . html_wikilink(':'.$id,$name) . '</li>';
+
+ $counter ++;
+ if($counter > $maxnumbersuggestions) {
+ echo '<li>...</li>';
+ break;
+ }
}
print '</ul>';
}