[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r10385 - /man-cgi/man.cgi



Author: jfs
Date: Tue Mar  4 20:22:55 2014
New Revision: 10385

URL: http://svn.debian.org/wsvn/?sc=1&rev=10385
Log:
Add a link keyword search as an alternative when a manpage query is not found.

Modified:
    man-cgi/man.cgi

Modified: man-cgi/man.cgi
URL: http://svn.debian.org/wsvn/man-cgi/man.cgi?rev=10385&op=diff
==============================================================================
--- man-cgi/man.cgi	(original)
+++ man-cgi/man.cgi	Tue Mar  4 20:22:55 2014
@@ -646,7 +646,6 @@
     }
 
 
-
     print "X $manpath - $locale - $manPath{$manpath} x\n" if $debug;
     if ($manpath) {
 	if ($manPath{$manpath}) {
@@ -1439,9 +1438,17 @@
 }
 
 sub not_found {
-    local($type, $section, $locale) = @_;
+    local($type, $section, $locale, $query) = @_;
     my $text ="";
-    $text = qq{
+
+    if ( $type ne 'apropos' and ! $section ) {
+	    $text = $text. "You can try a ". qq{<A HREF="$BASE?apropos=1&query=$query">keyword search.</A>} ."</P>\n";
+    }
+    if ( $type ne 'apropos' and $section ) {
+	    $text = $text. "You can also try a ". qq{<A HREF="$BASE?apropos=1&query=$query">keyword search.</A>} ."</P>\n";
+    }
+
+    $text = $text .qq{
 <p>This might happen because:
 <ul>
 };


Reply to: