From e5b2c5e817cdda881e1bf64c227842aecf152992 Mon Sep 17 00:00:00 2001 From: ajt <> Date: Tue, 23 May 2000 05:59:31 -0800 Subject: [PATCH] [project @ 2000-05-23 06:59:31 by ajt] In pkgreport.cgi?pkg=, foo isn't a regexp, so don't treat it like one. --- cgi/common.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cgi/common.pl b/cgi/common.pl index 47bb36ff..64c48239 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -139,10 +139,10 @@ sub pkgbugs { else { open I, "<$debbugs::gSpoolDir/index.db" || &quit("bugindex: $!"); } while() - { if (/^$pkg\s+(\d+)\s+(.+)/) + { if (m/^(\S+)\s+(\d+)\s+(.+)/ && $1 eq $pkg) { - my $tmpstr = sprintf( "%d: %s", $1, $2 ); - $descstr{ $1 } = $tmpstr; + my $tmpstr = sprintf( "%d: %s", $2, $3 ); + $descstr{ $2 } = $tmpstr; } } return %descstr; @@ -153,7 +153,7 @@ sub pkgbugsindex { my @bugs = (); if ( $archive ) { open I, "<$debbugs::gSpoolDir/index.archive" || &quit("bugindex: $!"); } else { open I, "<$debbugs::gSpoolDir/index.db" || &quit("bugindex: $!"); } - while() { $descstr{ $1 } = 1 if (/^(\S+)/); } + while() { $descstr{ $1 } = 1 if (m/^(\S+)/); } return %descstr; } -- 2.39.5