]> git.donarmstrong.com Git - debbugs.git/commitdiff
supply schema_arg to get_bug_status
authorDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2018 00:31:35 +0000 (17:31 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2018 00:31:35 +0000 (17:31 -0700)
cgi/bugreport.cgi

index 5cd3d060d0741c24e1e0c05ea34474af75545e86..e61b2bfe24525d564a34e5789bb618f690d4986c 100755 (executable)
@@ -58,9 +58,11 @@ use URI::Escape qw(uri_escape_utf8);
 use List::AllUtils qw(max);
 
 my $s;
+my @schema_arg = ();
 if (defined $config{database}) {
     $s = Debbugs::DB->connect($config{database}) or
-        die "Unable to connect to database";
+        die "Unable to connect to DB";
+    @schema_arg = ('schema',$s);
 }
 
 use CGI::Simple;
@@ -436,7 +438,7 @@ my @blockedby= make_list($status{blockedby});
 $status{blockedby_array} = [];
 if (@blockedby && $status{"pending"} ne 'fixed' && ! length($status{done})) {
     for my $b (@blockedby) {
-        my %s = %{get_bug_status($b)};
+        my %s = %{get_bug_status($b,@schema_arg)};
         next if (defined $s{pending} and
                  $s{"pending"} eq 'fixed') or
                      length $s{done};
@@ -448,7 +450,7 @@ my @blocks= make_list($status{blocks});
 $status{blocks_array} = [];
 if (@blocks && $status{"pending"} ne 'fixed' && ! length($status{done})) {
     for my $b (@blocks) {
-        my %s = %{get_bug_status($b)};
+        my %s = %{get_bug_status($b,@schema_arg)};
         next if $s{"pending"} eq 'fixed' || length $s{done};
        push @{$status{blocks_array}}, {bug_num => $b, subject => $s{subject}, status => \%s};
     }