]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/CGI/Pkgreport.pm
get_bug_status can now accept a schema to pull from DB
[debbugs.git] / Debbugs / CGI / Pkgreport.pm
index 3e9cb3f86ebccf08404dd2e2a370e686f5c7cccc..078fecaa69844f0fe3fbcd5ea803d14be7eb2c2c 100644 (file)
@@ -128,7 +128,7 @@ sub generate_package_info{
      my @references;
      my $pseudodesc = getpseudodesc();
      if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) {
-         push @references, "to the <a href=\"http://$config{web_domain}/pseudo-packages$config{html_suffix}\">".
+         push @references, "to the <a href=\"$config{web_domain}/pseudo-packages$config{html_suffix}\">".
               "list of other pseudo-packages</a>";
      }
      elsif (not defined $maint and not @{$param{bugs}}) {
@@ -141,14 +141,14 @@ sub generate_package_info{
      else {
          if ($package and defined $config{package_pages} and length $config{package_pages}) {
               push @references, sprintf "to the <a href=\"%s\">%s package page</a>",
-                   html_escape("http://$config{package_pages}/$package"), html_escape("$package");
+                   html_escape("$config{package_pages}/$package"), html_escape("$package");
          }
-         if (defined $config{subscription_domain} and
-             length $config{subscription_domain}) {
+         if (defined $config{package_tracking_domain} and
+             length $config{package_tracking_domain}) {
               my $ptslink = $param{binary} ? $srcforpkg : $package;
               # the pts only wants the source, and doesn't care about src: (#566089)
               $ptslink =~ s/^src://;
-              push @references, q(to the <a href="http://).html_escape("$config{subscription_domain}/$ptslink").q(">Package Tracking System</a>);
+              push @references, q(to the <a href=").html_escape("$config{package_tracking_domain}/$ptslink").q(">Package Tracking System</a>);
          }
          # Only output this if the source listing is non-trivial.
          if ($param{binary} and $srcforpkg) {
@@ -166,7 +166,7 @@ sub generate_package_info{
      if (defined $maint) {
          print {$output} "<p>If you find a bug not listed here, please\n";
          printf {$output} "<a href=\"%s\">report it</a>.</p>\n",
-              html_escape("http://$config{web_domain}/Reporting$config{html_suffix}");
+              html_escape("$config{web_domain}/Reporting$config{html_suffix}");
      }
      return decode_utf8($output_scalar);
 }
@@ -301,6 +301,9 @@ sub pkg_htmlizebugs {
                                          dist     => {type => SCALAR,
                                                       optional => 1,
                                                      },
+                                         schema   => {type => OBJECT,
+                                                      optional => 1,
+                                                     },
                                         }
                              );
      my @bugs = @{$param{bugs}};
@@ -351,10 +354,10 @@ sub pkg_htmlizebugs {
      }
 
      foreach my $bug (@bugs) {
-         my %status = %{get_bug_status(bug=>$bug,
-                                       (exists $param{dist}?(dist => $param{dist}):()),
-                                       bugusertags => $param{bugusertags},
-                                       (exists $param{version}?(version => $param{version}):()),
+        my %status = %{get_bug_status(bug=>$bug,
+                                      (map {exists $param{$_}?($_,$param{$_}):()}
+                                       qw(dist version schema bugusertags)
+                                      ),
                                        (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})),
                                       )};
          next unless %status;
@@ -367,7 +370,6 @@ sub pkg_htmlizebugs {
                            );
 
          my $html = "<li>"; #<a href=\"%s\">#%d: %s</a>\n<br>",
-              #bug_url($bug), $bug, html_escape($status{subject});
          $html .= short_bug_status_html(status  => \%status,
                                         options => $param{options},
                                        ) . "\n";