Commit 10272c25 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 313806: Whine E-mails do not "Order" the Queries Correctly - Patch by…

Bug 313806: Whine E-mails do not "Order" the Queries Correctly - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
parent d9c41435
......@@ -51,7 +51,7 @@ my @seen_schedules = ();
# allow the database to keep their SQL compiled.
my $sth_run_queries =
$dbh->prepare("SELECT " .
"id, query_name, title, onemailperbug " .
"query_name, title, onemailperbug " .
"FROM whine_queries " .
"WHERE eventid=? " .
"ORDER BY sortkey");
......@@ -425,18 +425,19 @@ sub run_queries {
my $return_queries = [];
$sth_run_queries->execute($args->{'eventid'});
my $queries = {};
my @queries = ();
for (@{$sth_run_queries->fetchall_arrayref}) {
$queries->{$_->[0]} = {
'name' => $_->[1],
'title' => $_->[2],
'onemailperbug' => $_->[3],
'bugs' => [],
};
push(@queries,
{
'name' => $_->[0],
'title' => $_->[1],
'onemailperbug' => $_->[2],
'bugs' => [],
}
);
}
for my $query_id (keys %{$queries}) {
my $thisquery = $queries->{$query_id};
foreach my $thisquery (@queries) {
next unless $thisquery->{'name'}; # named query is blank
my $savedquery = get_query($thisquery->{'name'}, $args->{'author'});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment