From 344794b96a00a8df993bbc0743d05715d2682681 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 6 Feb 2006 01:38:02 +0000 Subject: [PATCH] Use local files instead of www.debian.org ones. Fix handling of packages with missing source package. --- lib/Packages/HTML.pm | 46 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/lib/Packages/HTML.pm b/lib/Packages/HTML.pm index 7493971..90c9569 100644 --- a/lib/Packages/HTML.pm +++ b/lib/Packages/HTML.pm @@ -72,7 +72,7 @@ sub pdeplegend { my $str = "\n"; foreach my $entry (@_) { - $str .= ""; + $str .= ""; } $str .= "\n
[0].gif\" alt=\"[$entry->[0]]\" width=\"16\" height=\"16\">= $entry->[1][0].gif\" alt=\"[$entry->[0]]\" width=\"16\" height=\"16\">= $entry->[1]
\n"; @@ -187,29 +187,31 @@ sub pmoreinfo { } if ($info{maintainers}) { - my @uploaders = @{$page->get_src( 'uploaders' )}; - foreach (@uploaders) { - $_->[0] = encode_entities( $_->[0], '&<>' ); - } - my ($maint_name, $maint_mail ) = @{shift @uploaders}; - unless (@uploaders) { - $str .= "

\n".sprintf( gettext( "%s is responsible for this Debian package." ). - "\n", - "$maint_name" - ); - } else { - my $up_str = "$maint_name"; - my @uploaders_str; - foreach (@uploaders) { - push @uploaders_str, "[1]\">$_->[0]"; + my $uploaders = $page->get_src( 'uploaders' ); + if ($uploaders && @$uploaders) { + foreach (@$uploaders) { + $_->[0] = encode_entities( $_->[0], '&<>' ); + } + my ($maint_name, $maint_mail) = @{shift @$uploaders}; + unless (@$uploaders) { + $str .= "

\n".sprintf( gettext( "%s is responsible for this Debian package." ). + "\n", + "$maint_name" + ); + } else { + my $up_str = "$maint_name"; + my @uploaders_str; + foreach (@$uploaders) { + push @uploaders_str, "[1]\">$_->[0]"; + } + my $last_up = pop @uploaders_str; + $up_str .= ", ".join ", ", @uploaders_str if @uploaders_str; + $up_str .= sprintf( gettext( " and %s are responsible for this Debian package." ), $last_up ); + $str .= "

\n$up_str "; } - my $last_up = pop @uploaders_str; - $up_str .= ", ".join ", ", @uploaders_str if @uploaders_str; - $up_str .= sprintf( gettext( " and %s are responsible for this Debian package." ), $last_up ); - $str .= "

\n$up_str "; } - $str .= sprintf( gettext( "See the developer information for %s." )."

", $QA_URL.$source, $name ); + $str .= sprintf( gettext( "See the developer information for %s." )."

", $QA_URL.$source, $name ) if $source; } if ($info{search}) { @@ -501,7 +503,7 @@ MENU $KEYWORDS_LINE $DESC_LINE $meta - +