diff options
author | travis%sedsystems.ca <> | 2005-03-16 00:10:17 +0000 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-03-16 00:10:17 +0000 |
commit | a54f3f23447038f15de353b3a8642701325b00ec (patch) | |
tree | 489aeb46641d43fd082353c56514c2324ba3746e /userprefs.cgi | |
parent | 04705e885416930880ca5dfa5eb29f34ef995aea (diff) | |
download | bugs-a54f3f23447038f15de353b3a8642701325b00ec.tar bugs-a54f3f23447038f15de353b3a8642701325b00ec.tar.gz bugs-a54f3f23447038f15de353b3a8642701325b00ec.tar.bz2 bugs-a54f3f23447038f15de353b3a8642701325b00ec.tar.xz bugs-a54f3f23447038f15de353b3a8642701325b00ec.zip |
Bug 280517 : Let me know who is watching my account
Patch by Frederic Buclin <LpSolit@gmail.com> r=myk a=myk
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 13 |
1 files changed, 13 insertions, 0 deletions
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"); |