From e2466aae1fda4c2ce67c517074fdc4369d68b848 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Sat, 8 Jan 2005 04:56:01 +0000 Subject: Bug 108870: Bugzilla does not set email prefs for new user until user visits userprefs.cgi Patch: travis r=mkanat a=justdave Also includes fixes for Bug 109573: New bugzilla accounts should by default have 'CC field changes' turned off, and Bug 275599: flag request email prefs not behaving correctly --- userprefs.cgi | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 323c87d53..1c9cf2068 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -36,22 +36,10 @@ use Bugzilla::RelationSet; # Use global template variables. use vars qw($template $vars $userid); -# The default email flags leave all email on. -my $defaultflagstring = "ExcludeSelf~on~"; - my @roles = ("Owner", "Reporter", "QAcontact", "CClist", "Voter"); my @reasons = ("Removeme", "Comments", "Attachments", "Status", "Resolved", "Keywords", "CC", "Other", "Unconfirmed"); -foreach my $role (@roles) { - foreach my $reason (@reasons) { - $defaultflagstring .= "email$role$reason~on~"; - } -} - -# Remove final "~". -chop $defaultflagstring; - ############################################################################### # Each panel has two functions - panel Foo has a DoFoo, to get the data # necessary for displaying the panel, and a SaveFoo, to save the panel's @@ -161,16 +149,6 @@ sub DoEmail { my ($flagstring) = FetchSQLData(); - # If the emailflags haven't been set before, that means that this user - # hasn't been to the email pane of userprefs.cgi since the change to - # use emailflags. Create a default flagset for them, based on - # static defaults. - if (!$flagstring) { - $flagstring = $defaultflagstring; - SendSQL("UPDATE profiles SET emailflags = " . - SqlQuote($flagstring) . " WHERE userid = $userid"); - } - # The 255 param is here, because without a third param, split will # trim any trailing null fields, which causes Perl to eject lots of # warnings. Any suitably large number would do. -- cgit v1.2.3-24-g4f1b