From: ajt <> Date: Tue, 23 May 2000 13:59:31 +0000 (-0800) Subject: [project @ 2000-05-23 06:59:31 by ajt] X-Git-Tag: release/2.6.0~1276 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e5b2c5e817cdda881e1bf64c227842aecf152992;p=debbugs.git [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. --- 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; }