From fcb30023e411bf4ec9a5888b7b17221a263c04a0 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sat, 28 Jul 2007 19:43:01 +0000 Subject: [PATCH] shut up perl warnings for searching manual pages with spaces (WTF?) --- en/cgi/man.cgi | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/en/cgi/man.cgi b/en/cgi/man.cgi index cc9807922a..ed2eac609d 100755 --- a/en/cgi/man.cgi +++ b/en/cgi/man.cgi @@ -33,7 +33,7 @@ # BSDI Id: bsdi-man,v 1.2 1995/01/11 02:30:01 polk Exp # Dual CGI/Plexus mode and new interface by sanders@bsdi.com 9/22/1995 # -# $Id: man.cgi,v 1.181 2007-07-27 20:22:11 wosch Exp $ +# $Id: man.cgi,v 1.182 2007-07-28 19:43:01 wosch Exp $ ############################################################################ # !!! man.cgi is stale perl4 code !!! @@ -516,8 +516,15 @@ sub do_man { $name = $1; $section = $2; } - $name = $1 if $name =~ /^([\w\-\.]+)$/; - $section = $1 if $section =~ /^([\w\-\.]+)$/; + if ( $name =~ /^([\w\-\.]+)$/ ) { + $name = $1; + } + else { $name = ''; } + + if ( $section =~ /^([\w\-\.]+)$/ ) { + $section = $1; + } + else { $section = ''; } $apropos ? &apropos($query) : &man( $name, $section ); } @@ -1163,7 +1170,7 @@ ETX } sub copyright { - $id = '$Id: man.cgi,v 1.181 2007-07-27 20:22:11 wosch Exp $'; + $id = '$Id: man.cgi,v 1.182 2007-07-28 19:43:01 wosch Exp $'; return qq{\
@@ -1219,7 +1226,7 @@ sub faq {
           if $manPathAliases{$_};
     }
 
-    local $id = '$Id: man.cgi,v 1.181 2007-07-27 20:22:11 wosch Exp $';
+    local $id = '$Id: man.cgi,v 1.182 2007-07-28 19:43:01 wosch Exp $';
     return qq{\
 
 Copyright (c) 1996-2007 Wolfram Schneider