From a54f3f23447038f15de353b3a8642701325b00ec Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Wed, 16 Mar 2005 00:10:17 +0000 Subject: Bug 280517 : Let me know who is watching my account Patch by Frederic Buclin r=myk a=myk --- userprefs.cgi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 3331d5b91..d369660e2 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -182,6 +182,19 @@ sub DoEmail { . " WHERE watcher = ? AND watch.watched = profiles.userid", undef, $userid); $vars->{'watchedusers'} = join(',', @$watched_ref); + + my $watcher_ids = $dbh->selectcol_arrayref( + "SELECT watcher FROM watch WHERE watched = ?", + undef, $userid); + + my @watchers; + foreach my $watcher_id (@$watcher_ids) { + my $watcher = new Bugzilla::User($watcher_id); + push (@watchers, Bugzilla::User::identity($watcher)); + } + + @watchers = sort { lc($a) cmp lc($b) } @watchers; + $vars->{'watchers'} = \@watchers; } SendSQL("SELECT emailflags FROM profiles WHERE userid = $userid"); -- cgit v1.2.1