From: Don Armstrong Date: Mon, 3 Aug 2009 16:13:29 +0000 (-0500) Subject: use split_status_fields and make_list X-Git-Tag: release/2.6.0~456^2~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f1efdea3d7d2341bdbd413ba91d99bd8f4d64944;hp=9415ae826d9efc4e70727e22b2ca29060d1a6a15;p=debbugs.git use split_status_fields and make_list --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 790e1a2..d6d5cf2 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -17,7 +17,7 @@ use Debbugs::CGI qw(:url :html :util); use Debbugs::CGI::Bugreport qw(:all); use Debbugs::Common qw(buglog getmaintainers make_list bug_status); use Debbugs::Packages qw(getpkgsrc); -use Debbugs::Status qw(splitpackages get_bug_status isstrongseverity); +use Debbugs::Status qw(splitpackages split_status_fields get_bug_status isstrongseverity); use Scalar::Util qw(looks_like_number); @@ -137,9 +137,10 @@ if ($buglog =~ m/\.gz$/) { } -my %status = %{get_bug_status(bug=>$ref, - bugusertags => \%bugusertags, - )}; +my %status = + %{split_status_fields(get_bug_status(bug=>$ref, + bugusertags => \%bugusertags, + ))}; my @records; eval{ @@ -309,9 +310,9 @@ foreach my $pkg (@packages) { } # fixup various bits of the status -$status{tags_array} = [sort(split(/\s+/, $status{tags}))]; +$status{tags_array} = [sort(make_list($status{tags}))]; $status{date_text} = strftime('%a, %e %b %Y %T UTC', gmtime($status{date})); -$status{mergedwith_array} = [split(/ /,$status{mergedwith})]; +$status{mergedwith_array} = [make_list($status{mergedwith})]; my $version_graph = ''; @@ -335,7 +336,7 @@ if (@{$status{found_versions}} or @{$status{fixed_versions}}) { -my @blockedby= split(/ /, $status{blockedby}); +my @blockedby= make_list($status{blockedby}); $status{blockedby_array} = []; if (@blockedby && $status{"pending"} ne 'fixed' && ! length($status{done})) { for my $b (@blockedby) { @@ -345,7 +346,7 @@ if (@blockedby && $status{"pending"} ne 'fixed' && ! length($status{done})) { } } -my @blocks= split(/ /, $status{blocks}); +my @blocks= make_list($status{blocks}); $status{blocks_array} = []; if (@blocks && $status{"pending"} ne 'fixed' && ! length($status{done})) { for my $b (@blocks) { @@ -376,6 +377,7 @@ print fill_in_template(template => 'cgi/bugreport', isstrongseverity => \&Debbugs::Status::isstrongseverity, html_escape => \&Debbugs::CGI::html_escape, looks_like_number => \&Scalar::Util::looks_like_number, + make_list => \&Debbugs::Common::make_list, }, hole_var => {'&package_links' => \&Debbugs::CGI::package_links, '&bug_links' => \&Debbugs::CGI::bug_links,