From 32c04430626da6095e213cfe6effafa577f9e3ab Mon Sep 17 00:00:00 2001 From: andi Date: Tue, 17 May 2005 22:17:19 +0200 Subject: some ajax quicksearch tweaking added a half second delay before the suggstions appear, moved the postion to appear besides the browsers autocomplete... I'm still not sure if this is useful at all. darcs-hash:20050517201719-9977f-6e71a415dd08a84af38bd3643860beb7002088f5.gz --- ajax.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ajax.php') diff --git a/ajax.php b/ajax.php index 7af88d835..26bccc4d0 100644 --- a/ajax.php +++ b/ajax.php @@ -30,6 +30,7 @@ if(function_exists($call)){ */ function ajax_qsearch(){ global $conf; + global $lang; $query = cleanID($_REQUEST['q']); if(empty($query)) return; @@ -41,6 +42,9 @@ function ajax_qsearch(){ $data = array(); search($data,$conf['datadir'],'search_qsearch',array(query => $query),$nsdir); + if(!count($data)) return; + + print ''.$lang['quickhits'].''; print html_buildlist($data,'qsearch','html_list_index'); } -- cgit v1.2.3