X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgreport.cgi;fp=cgi%2Fpkgreport.cgi;h=d27caa13dc39c58dd5dc0a7216d1086fd39c32a1;hb=53c435119200ab9b1c2538a96b8374c51a078855;hp=abf739dec4c544f55dcfebb88b3c99d8ad78f245;hpb=0e8f07fda6e40b5967d9c6b28b3200db22766343;p=debbugs.git diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index abf739d..d27caa1 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -39,6 +39,14 @@ use Debbugs::CGI::Pkgreport qw(:all); use Debbugs::Text qw(:templates); +use Debbugs::DB; + +my $s; +if (defined $config{database}) { + $s = Debbugs::DB->connect($config{database}) or + die "Unable to connect to DB"; +} + use CGI::Simple; my $q = new CGI::Simple; @@ -379,6 +387,7 @@ my $title = $gBugs.' '.join(' and ', map {/ or /?"($_)":$_} @title); grep {$_ ne 'newest'} keys %package_search_keys, 'archive'), usertags => \%ut, + defined $s?(schema => $s):(), ); # shove in bugs which affect this package if there is a package or a @@ -392,6 +401,7 @@ if (not exists $param{affects} and not exists $param{noaffects} and grep {$_ ne 'newest'} keys %package_search_keys, 'archive'), usertags => \%ut, + defined $s?(schema => $s):(), ); } @@ -436,6 +446,7 @@ my $result = pkg_htmlizebugs(bugs => \@bugs, exclude => $exclude, this => $this, options => \%param, + defined $s?(schema => $s):(), (exists $param{dist})?(dist => $param{dist}):(), );