From: Don Armstrong Date: Fri, 1 Dec 2006 06:38:26 +0000 (-0800) Subject: * Strip out the rest of the functions from cgi/common.pl that have X-Git-Tag: release/2.6.0~585^2^2~56 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=37c4ff86368a72b1b670c72c59e14e17f42e0e8f;p=debbugs.git * Strip out the rest of the functions from cgi/common.pl that have been moved to Debbugs::CGI --- diff --git a/cgi/common.pl b/cgi/common.pl index 98f66dbc..3de27b2e 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -236,16 +236,6 @@ $debug = 1 if (defined $ret{"debug"} && $ret{"debug"} eq "aj"); return %ret; } -sub quitcgi { - my $msg = shift; - print "Content-Type: text/html\n\n"; - print "Error\n"; - print "An error occurred. Dammit.\n"; - print "Error was: $msg.\n"; - print "\n"; - exit 0; -} - #sub abort { # my $msg = shift; # my $Archive = $common_archive ? "archive" : ""; @@ -713,66 +703,18 @@ sub maintencoded { return $encoded; } -my $_maintainer; -sub getmaintainers { - return $_maintainer if $_maintainer; - my %maintainer; - - open(MM,"$gMaintainerFile") or &quitcgi("open $gMaintainerFile: $!"); - while() { - next unless m/^(\S+)\s+(\S.*\S)\s*$/; - ($a,$b)=($1,$2); - $a =~ y/A-Z/a-z/; - $maintainer{$a}= $b; - } - close(MM); - if (defined $gMaintainerFileOverride) { - open(MM,"$gMaintainerFileOverride") or &quitcgi("open $gMaintainerFileOverride: $!"); - while() { - next unless m/^(\S+)\s+(\S.*\S)\s*$/; - ($a,$b)=($1,$2); - $a =~ y/A-Z/a-z/; - $maintainer{$a}= $b; - } - close(MM); - } - $_maintainer = \%maintainer; - return $_maintainer; -} - -my $_pseudodesc; -sub getpseudodesc { - return $_pseudodesc if $_pseudodesc; - my %pseudodesc; - - open(PSEUDO, "< $gPseudoDescFile") or &quitcgi("open $gPseudoDescFile: $!"); - while() { - next unless m/^(\S+)\s+(\S.*\S)\s*$/; - $pseudodesc{lc $1} = $2; - } - close(PSEUDO); - $_pseudodesc = \%pseudodesc; - return $_pseudodesc; -} sub getbugstatus { - return get_bug_status(bug => shift, - $use_bug_idx ?(bug_index => \%bugidx):(), + my ($bug) = @_; + return get_bug_status(bug => $bug, + $use_bug_idx?(bug_index => \%bugidx):(), usertags => \%common_bugusertags, - defined $common_dist?(dist => $common_dist):(), - defined $common_version?(version => $common_version):(), - defined $common_arch?(arch => $common_arch):() + (defined $common_dist)?(dist => $common_dist):(), + (defined $common_version)?(version => $common_version):(), + (defined $common_arch)?(arch => $common_arch):(), ); } -sub buglog { - my $bugnum = shift; - my $location = getbuglocation($bugnum, 'log'); - return getbugcomponent($bugnum, 'log', $location) if ($location); - $location = getbuglocation($bugnum, 'log.gz'); - return getbugcomponent($bugnum, 'log.gz', $location); -} - sub getversiondesc { my $pkg = shift;