From 88458a6565247863a96ea2f3a99f22c5d4a79a9e Mon Sep 17 00:00:00 2001 From: "dmose%mozilla.org" <> Date: Thu, 25 Jan 2001 04:26:23 +0000 Subject: patch from bug 17464 to give user some control over what sorts of bug mail get sent to an account. Original patch by al_raetz@yahoo.com and lots of additional hacking by me; r=donm@bluemartini.com --- editusers.cgi | 62 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 24 deletions(-) (limited to 'editusers.cgi') diff --git a/editusers.cgi b/editusers.cgi index e5784c8db..72e42f03d 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -21,6 +21,7 @@ # Contributor(s): Holger Schurig # Dave Miller # Joe Robins +# Dan Mosedale # # Direct any questions on this source code to # @@ -38,6 +39,7 @@ require "globals.pl"; sub sillyness { my $zz; $zz = $::userid; + $zz = $::superusergroupset; } my $editall; @@ -95,10 +97,10 @@ sub EmitElement ($$) # Displays the form to edit a user parameters # -sub EmitFormElements ($$$$$$$) +sub EmitFormElements ($$$$$$$$) { my ($user, $password, $realname, $groupset, $blessgroupset, - $emailnotification, $disabledtext) = @_; + $emailnotification, $disabledtext, $newemailtech) = @_; print " Login name:\n"; EmitElement("user", $user); @@ -116,20 +118,26 @@ sub EmitFormElements ($$$$$$$) print " \n"; } print "\n"; - print " Email notification:\n"; - print qq{}; + foreach my $i (["ExcludeSelfChanges", + "All qualifying bugs except those which I change"], + ["CConly", + "Only those bugs which I am listed on the CC line"], + ["All", "All qualifying bugs"]) { + my ($tag, $desc) = (@$i); + my $selectpart = ""; + if ($tag eq $emailnotification) { + $selectpart = " SELECTED"; + } + print qq{$desc\n}; } - print qq{$desc\n}; + print "\n"; + print "\n"; } - print "\n"; - print "\n"; + print " Disable text:\n"; print " \n"; @@ -389,7 +397,7 @@ if ($action eq 'add') { print "
\n"; print "\n"; - EmitFormElements('', '', '', 0, 0, 'ExcludeSelfChanges', ''); + EmitFormElements('', '', '', 0, 0, 'ExcludeSelfChanges', '', 1); print "
\n
\n"; print "\n"; @@ -507,10 +515,11 @@ if ($action eq 'del') { CheckUser($user); # display some data about the user - SendSQL("SELECT realname, groupset, emailnotification + SendSQL("SELECT realname, groupset, emailnotification, newemailtech FROM profiles WHERE login_name=" . SqlQuote($user)); - my ($realname, $groupset, $emailnotification) = FetchSQLData(); + my ($realname, $groupset, $emailnotification, $newemailtech) = + FetchSQLData(); $realname ||= "missing"; print "\n"; @@ -526,9 +535,11 @@ if ($action eq 'del') { print " \n"; print " \n"; - print "\n"; - print " \n"; - print " \n"; + if ( !$newemailtech ) { + print "\n"; + print " \n"; + print " \n"; + } print "\n"; print " \n"; @@ -670,17 +681,17 @@ if ($action eq 'edit') { # get data of user SendSQL("SELECT password, realname, groupset, blessgroupset, - emailnotification, disabledtext + emailnotification, disabledtext, newemailtech FROM profiles WHERE login_name=" . SqlQuote($user)); my ($password, $realname, $groupset, $blessgroupset, $emailnotification, - $disabledtext) = FetchSQLData(); + $disabledtext, $newemailtech) = FetchSQLData(); print "\n"; print "
Real name:$realname
E-Mail notification:$emailnotification
E-Mail notification:$emailnotification
Group set:
\n"; EmitFormElements($user, $password, $realname, $groupset, $blessgroupset, - $emailnotification, $disabledtext); + $emailnotification, $disabledtext, $newemailtech); print "
\n"; @@ -691,7 +702,10 @@ if ($action eq 'edit') { print "\n"; print "\n"; print "\n"; - print "\n"; + if (!$newemailtech) { + print "\n"; + } print "\n"; print "\n"; -- cgit v1.2.3-24-g4f1b