From: Don Armstrong Date: Mon, 19 Feb 2007 08:06:29 +0000 (-0800) Subject: add suport for width/height to version.cgi X-Git-Tag: release/2.6.0~585^2^2~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9f1c5de2e5d38315f020837058ee3d351d35b20;p=debbugs.git add suport for width/height to version.cgi --- diff --git a/cgi/version.cgi b/cgi/version.cgi index 338075f..c1df691 100755 --- a/cgi/version.cgi +++ b/cgi/version.cgi @@ -34,12 +34,14 @@ my %img_types = (svg => 'image/svg+xml', my $q = new CGI::Simple; my %cgi_var = cgi_parameters(query => $q, - single => [qw(package format ignore_boring)], + single => [qw(package format ignore_boring width height)], default => {package => 'xterm', found => [], fixed => [], ignore_boring => 1, format => 'png', + width => undef, + height => undef, }, ); @@ -54,6 +56,16 @@ for my $dist (@{$config{distributions}}) { push @{$version_to_dist{$version}}, $dist; } } + +if (defined $cgi_var{width}) { + $cgi_var{width} =~ /(\d+)/; + $cgi_var{width} = $1; +} +if (defined $cgi_var{height}) { + $cgi_var{height} =~ /(\d+)/; + $cgi_var{height} = $1; +} + # then figure out which are affected. # turn found and fixed into full versions @{$cgi_var{found}} = makesourceversions($cgi_var{package},undef,@{$cgi_var{found}}); @@ -96,6 +108,9 @@ for my $found_fixed (qw(found fixed)) { my %all_states = $version->allstates($cgi_var{found},$cgi_var{fixed}); my $dot = "digraph G {\n"; +if (defined $cgi_var{width} and defined $cgi_var{height}) { + $dot .= qq(size="$cgi_var{width},$cgi_var{height}";\n); +} my %state = (found => ['fillcolor="salmon"', 'style="filled"', 'shape="diamond"',