diff options
author | bugreport%peshkin.net <> | 2004-08-05 06:36:23 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-08-05 06:36:23 +0200 |
commit | f6c796ad212c7cc62687cd02e3808245a993f6b1 (patch) | |
tree | f5113059e78234e47ce4739848ac506fc0cf7047 /Bugzilla | |
parent | e9402c22563ea5c7ddd699f5b50e8e1454f44a90 (diff) | |
download | bugzilla-f6c796ad212c7cc62687cd02e3808245a993f6b1.tar.gz bugzilla-f6c796ad212c7cc62687cd02e3808245a993f6b1.tar.xz |
Bug 185090: Add revamped whining system
patch by: Erik
r=joel
r=jouni
a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/User.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 66087b81c..18ff93392 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -172,10 +172,14 @@ sub queries { return [] unless $self->id; my $dbh = Bugzilla->dbh; - my $sth = $dbh->prepare(q{ SELECT name, query, linkinfooter - FROM namedqueries - WHERE userid=? - ORDER BY UPPER(name)}); + my $sth = $dbh->prepare(q{ SELECT + DISTINCT name, query, linkinfooter, + IF(whine_queries.id IS NOT NULL, 1, 0) + FROM namedqueries + LEFT JOIN whine_queries + ON whine_queries.query_name = name + WHERE userid=? + ORDER BY UPPER(name)}); $sth->execute($self->{id}); my @queries; @@ -184,6 +188,7 @@ sub queries { name => $row->[0], query => $row->[1], linkinfooter => $row->[2], + usedinwhine => $row->[3], }); } $self->{queries} = \@queries; |