X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/fbc70c03af36d901a27ba6426bf436e297892e65..251195be66761203a58f20b889fe9247541c5d55:/cgi-bin/show_history.pl diff --git a/cgi-bin/show_history.pl b/cgi-bin/show_history.pl index 902fdb5..2b822ca 100755 --- a/cgi-bin/show_history.pl +++ b/cgi-bin/show_history.pl @@ -1,5 +1,13 @@ #!/usr/bin/perl +=comment + +Copyright (c) 2003-2010, Andrew Dunstan + +See accompanying License file for license details + +=cut + use strict; use DBI; use Template; @@ -35,33 +43,39 @@ my $latest_personality = $db->selectrow_arrayref(q{ order by effective_date desc limit 1 }, undef, $member); -# we don't really need to do this join, since we only want -# one row from buildsystems. but it means we only have to run one -# query. If it gets heavy we'll split it up and run two - -my $statement = <prepare($systemdata); +$sth->execute($member); +my $sysrow = $sth->fetchrow_hashref; my $statrows=[]; -my $sth=$db->prepare($statement); +$sth=$db->prepare($statement); $sth->execute($member,$branch); while (my $row = $sth->fetchrow_hashref) { + last unless $sysrow; + while (my($k,$v) = each %$sysrow) { $row->{$k} = $v; } $row->{owner_email} =~ s/\@/ [ a t ] /; if ($latest_personality) {