summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwhine.pl21
1 files changed, 11 insertions, 10 deletions
diff --git a/whine.pl b/whine.pl
index 5a04502ac..36c405d15 100755
--- a/whine.pl
+++ b/whine.pl
@@ -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'});