summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-08-14 21:48:26 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-08-14 21:48:26 +0200
commitbd2f6c2fb24eecedecd4bbffae0a92bb5acbece7 (patch)
treeb21dc99e6ea2166ab2cea248241c5cf2e35ea98f /lib/exe
parent09a5b61f4b388f9824bb5e1bed7ec6cbe3619ff7 (diff)
downloadrpg-bd2f6c2fb24eecedecd4bbffae0a92bb5acbece7.tar.gz
rpg-bd2f6c2fb24eecedecd4bbffae0a92bb5acbece7.tar.bz2
display the (shortened) namespace for page quicksearch
When displaying pagename matches in the Ajax quick search or normal search, the namespace of the page is shown behind the pagename. This makes it easier to distinguish the pages when the same namespace is used in different namespaces. To avoid breaking the layout in deep nested namespace hierarchies, the namespace is shortened in the middle when needed. This patch also disables the effect of the useheadings option in the Ajax quick search. After all the results should show what was found and since the search works on pagenames not headings it should show pagenames as result. darcs-hash:20080814194826-7ad00-9add9c1bbbb4f4ede3c6884d37427644b2cddc56.gz
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/ajax.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 5d8a0e4e6..b4bd20b70 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -66,7 +66,13 @@ function ajax_qsearch(){
print '<ul>';
foreach($data as $id){
print '<li>';
- print html_wikilink(':'.$id);
+ $ns = getNS($id);
+ if($ns){
+ $name = shorten(noNS($id), ' ('.$ns.')',30);
+ }else{
+ $name = $id;
+ }
+ print html_wikilink(':'.$id,$name);
print '</li>';
}
print '</ul>';