diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-26 22:53:57 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-26 22:53:57 +0100 |
commit | 9fd6e94c03fa3bba09af2aed85d6664575385e9a (patch) | |
tree | 1f4e7c14d435d4b2744beaa47e10ab7ec6dd930d /whine.pl | |
parent | 5ccff95a61b0c0816fa42da061c298f794daf33d (diff) | |
download | bugzilla-9fd6e94c03fa3bba09af2aed85d6664575385e9a.tar.gz bugzilla-9fd6e94c03fa3bba09af2aed85d6664575385e9a.tar.xz |
Reverted Bug 836067 due to buglist crashing and do not yet know the reason
Diffstat (limited to 'whine.pl')
-rwxr-xr-x | whine.pl | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -453,7 +453,7 @@ sub run_queries { 'user' => $args->{'recipient'}, # the search runs as the recipient ); # If a query fails for whatever reason, it shouldn't kill the script. - my $data = eval { $search->data }; + my $sqlquery = eval { $search->sql }; if ($@) { print STDERR get_text('whine_query_failed', { query_name => $thisquery->{'name'}, author => $args->{'author'}, @@ -461,12 +461,15 @@ sub run_queries { next; } - foreach my $row (@$data) { + $sth = $dbh->prepare($sqlquery); + $sth->execute; + + while (my @row = $sth->fetchrow_array) { my $bug = {}; for my $field (@searchfields) { my $fieldname = $field; $fieldname =~ s/^bugs\.//; # No need for bugs.whatever - $bug->{$fieldname} = shift @$row; + $bug->{$fieldname} = shift @row; } if ($thisquery->{'onemailperbug'}) { |