diff options
author | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2007-11-27 01:01:07 +0100 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2007-11-27 01:01:07 +0100 |
commit | 28514e3d8ea1cfdc0e920ee3612738f7731d73fb (patch) | |
tree | f152302049291fa59f1029d1533fa0868a7daf60 | |
parent | a103e43763ec859782928d74833aca343fdaccea (diff) |
Show empty results for specific search.
-rwxr-xr-x | cgi-bin/lxr | 2 | ||||
-rw-r--r-- | tmpl/search_result.tt2 | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cgi-bin/lxr b/cgi-bin/lxr index f71d061..28d6635 100755 --- a/cgi-bin/lxr +++ b/cgi-bin/lxr @@ -357,6 +357,8 @@ sub search { } my $html = ''; $template_args{'tree'} = $context->tree; + $template_args{'search_type'} = $type if + $type =~ /^(search|file|text|code|ident|ambig)$/; $template->process('search_result.tt2', \%template_args, \$html) diff --git a/tmpl/search_result.tt2 b/tmpl/search_result.tt2 index 1a38e22..d093968 100644 --- a/tmpl/search_result.tt2 +++ b/tmpl/search_result.tt2 @@ -3,7 +3,7 @@ <img border="0" src="../../gfx/close.png" alt="X"></a> </span> -[% IF code_res and code_res.idents %] +[% IF search_type == "code" or (code_res and code_res.idents.0) %] <div class="query_desc">Code search: [% code_res.query %]</div> <ul> [% FOREACH ident = code_res.idents %] |