diff options
author | Klap-in <klapinklapin@gmail.com> | 2013-07-14 13:35:06 +0200 |
---|---|---|
committer | Klap-in <klapinklapin@gmail.com> | 2013-07-14 13:35:06 +0200 |
commit | 33c3b3817b00aa9384760813643fac0e33daaaff (patch) | |
tree | 481c880b00a32ba5887834b52a17248bac8bfc7c /lib/exe/ajax.php | |
parent | 040f0e135c37c5b544f16277ff69205369df5f1f (diff) | |
parent | fbd8067eeeb9f424981aad8b283e17f734c738c3 (diff) | |
download | rpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.gz rpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.bz2 |
merge master in branch
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r-- | lib/exe/ajax.php | 9 |
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>'; } |