diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-04 00:02:29 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-04 00:02:29 +0200 |
commit | 506fa8936561993b7f70aa507d0c39a44a6ebab9 (patch) | |
tree | d5df1af7e8c1de99397e68e2e7ba39e63ab25c0c /lib | |
parent | b5a8175656b99ced69244b3ce593c00fb61ab825 (diff) | |
download | rpg-506fa8936561993b7f70aa507d0c39a44a6ebab9.tar.gz rpg-506fa8936561993b7f70aa507d0c39a44a6ebab9.tar.bz2 |
the search now uses the index
darcs-hash:20050903220229-7ad00-5d95f905eaeb3f6b867aa3ee43c2a8bccc533c00.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/ajax.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 5b0c1633e..28d064fc9 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -42,17 +42,22 @@ function ajax_qsearch(){ $query = cleanID($_POST['q']); if(empty($query)) return; - $nsdir = str_replace(':','/',getNS($query)); - require_once(DOKU_INC.'inc/search.php'); require_once(DOKU_INC.'inc/html.php'); + require_once(DOKU_INC.'inc/fulltext.php'); $data = array(); - search($data,$conf['datadir'],'search_qsearch',array(query => $query),$nsdir); + $data = ft_pageLookup($query); if(!count($data)) return; print '<b>'.$lang['quickhits'].'</b>'; - print html_buildlist($data,'qsearch','html_list_index'); + print '<ul>'; + foreach($data as $id){ + print '<li>'; + print html_wikilink(':'.$id,$conf['useheading']?NULL:$id); + print '</li>'; + } + print '</ul>'; } //Setup VIM: ex: et ts=2 enc=utf-8 : |