summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-02-26 22:53:57 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-02-26 22:53:57 +0100
commit9fd6e94c03fa3bba09af2aed85d6664575385e9a (patch)
tree1f4e7c14d435d4b2744beaa47e10ab7ec6dd930d /whine.pl
parent5ccff95a61b0c0816fa42da061c298f794daf33d (diff)
downloadbugzilla-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-xwhine.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/whine.pl b/whine.pl
index e6161cfeb..ad6067228 100755
--- a/whine.pl
+++ b/whine.pl
@@ -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'}) {