]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Fix link to pseudopackages
authorDon Armstrong <don@donarmstrong.com>
Thu, 25 Sep 2008 03:19:11 +0000 (20:19 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 25 Sep 2008 03:19:11 +0000 (20:19 -0700)
 * Add back link to reporting instructions
 * Fix source entry for psuedopackages on bugreport_pkginfo.tmpl

Debbugs/CGI/Pkgreport.pm
cgi/bugreport.cgi
templates/en_US/cgi/bugreport_pkginfo.tmpl

index 085b31ea321ee8d7397f78154b55cbcd3fc4e393..beba95a89694f563b6085fccf20664d66ee9b800 100644 (file)
@@ -129,17 +129,18 @@ 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://${debbugs::gWebDomain}/pseudo-packages${debbugs::gHTMLSuffix}\">".
+         push @references, "to the <a href=\"http://$config{web_domain}/pseudo-packages$config{html_suffix}\">".
               "list of other pseudo-packages</a>";
      }
      else {
-         if ($package and defined $gPackagePages) {
+         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://${gPackagePages}/$package"), html_escape("$package");
+                   html_escape("http://$config{package_pages}/$package"), html_escape("$package");
          }
-         if (defined $gSubscriptionDomain) {
+         if (defined $config{subscription_domain} and
+             length $config{subscription_domain}) {
               my $ptslink = $param{binary} ? $srcforpkg : $package;
-              push @references, q(to the <a href="http://).html_escape("$gSubscriptionDomain/$ptslink").q(">Package Tracking System</a>);
+              push @references, q(to the <a href="http://).html_escape("$config{subscription_domain}/$ptslink").q(">Package Tracking System</a>);
          }
          # Only output this if the source listing is non-trivial.
          if ($param{binary} and $srcforpkg) {
@@ -154,12 +155,12 @@ sub generate_package_info{
          $references[$#references] = "or $references[$#references]" if @references > 1;
          print {$output} "<p>You might like to refer ", join(", ", @references), ".</p>\n";
      }
-     if (defined $param{maint} || defined $param{maintenc}) {
+     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://${debbugs::gWebDomain}/Reporting${debbugs::gHTMLSuffix}");
+              html_escape("http://$config{web_domain}/Reporting$config{html_suffix}");
      }
-     if (not $maint and not @{$param{bugs}}) {
+     if (not defined $maint and not @{$param{bugs}}) {
          print {$output} "<p>There is no record of the " . html_escape($package) .
               ($param{binary} ? " package" : " source package") .
                    ", and no bugs have been filed against it.</p>";
index f3c7ff6f59789cf00987a75d4fd9b73da05149f7..456bd69e9091d7264dc0de750e3bc0b36b50d8e3 100755 (executable)
@@ -259,7 +259,7 @@ my @packages = splitpackages($status{package});
 
 foreach my $pkg (@packages) {
      $package{$pkg} = {maintainer => exists($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)',
-                      source     => exists($pkgsrc{$pkg}) ? $pkgsrc{$pkg} : '(unknown)',
+                      exists($pkgsrc{$pkg}) ? (source => $pkgsrc{$pkg}) : (),
                       package    => $pkg,
                      };
 }
index 22806f7c6e8fd2891882366f2eb10c007408c9ed..4a39ba375ddc4a1da94081b8d97baa0ddbfa35c3 100644 (file)
@@ -8,8 +8,10 @@
  for my $package (values %package) {
      $output .= q(Maintainer for ).package_links(package=>$package->{package}).qq( is ).
                 package_links(maintainer => $package->{maintainer}).qq(; );
-     $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ).
-                package_links(source => $package->{source}).qq(. );
+     if (exists $package->{source}) {
+       $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ).
+                   package_links(source => $package->{source}).qq(. );
+     }
  }
  $output;
 }</p>