From 2c4ed3fd34b242ce91e22650446200b4a7e939e7 Mon Sep 17 00:00:00 2001 From: "jake%acutex.net" <> Date: Thu, 24 May 2001 10:10:47 +0000 Subject: Bug 71552 - Remove oldemailtech from Bugzilla r= justdave@syndicomm.com --- checksetup.pl | 45 ++--- defparams.pl | 54 +---- editusers.cgi | 57 +----- globals.pl | 3 +- processmail | 625 ++++++++-------------------------------------------------- userprefs.cgi | 178 ++++------------- 6 files changed, 157 insertions(+), 805 deletions(-) diff --git a/checksetup.pl b/checksetup.pl index 2953f9b2b..ae3f06152 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -518,7 +518,6 @@ sub isExecutableFile { } if ($my_webservergroup) { - mkdir 'shadow', 0770 unless -d 'shadow'; # Funny! getgrname returns the GID if fed with NAME ... my $webservergid = getgrnam($my_webservergroup); # chmod needs to be called with a valid uid, not 0. $< returns the @@ -540,7 +539,7 @@ if ($my_webservergroup) { } # make sure that contrib keeps the permissions it had (don't touch it) - chmod 0770, 'data', 'shadow', 'graphs'; + chmod 0770, 'data', 'graphs'; chmod 0666, glob('data/*'); chmod 01777, glob('data/*/'); # directories stay executable } @@ -817,9 +816,7 @@ $table{profiles} = cryptpassword varchar(64), realname varchar(255), groupset bigint not null, - emailnotification enum("ExcludeSelfChanges", "CConly", "All") not null default "ExcludeSelfChanges", disabledtext mediumtext, - newemailtech tinyint not null default 1, mybugslink tinyint not null default 1, blessgroupset bigint not null default 0, emailflags mediumtext, @@ -1186,7 +1183,6 @@ sub CheckEnumField ($$@) $dbh->do("ALTER TABLE $table CHANGE $field $field $_"); - $::regenerateshadow = 1; } } @@ -1328,8 +1324,8 @@ _End_Of_SQL_ $dbh->do(<<_End_Of_SQL_); INSERT INTO profiles - (login_name, realname, password, cryptpassword, groupset, newemailtech) - VALUES ($login, $realname, $pass1, encrypt($pass1), 0x7fffffffffffffff, 1) + (login_name, realname, password, cryptpassword, groupset) + VALUES ($login, $realname, $pass1, encrypt($pass1), 0x7fffffffffffffff) _End_Of_SQL_ } else { $dbh->do(<<_End_Of_SQL_); @@ -1467,8 +1463,6 @@ sub TableExists ($) return $exists; } -$::regenerateshadow = 0; - # really old fields that were added before checksetup.pl existed # but aren't in very old bugzilla's (like 2.1) @@ -1484,14 +1478,6 @@ AddField('components', 'description', 'mediumtext not null'); ChangeFieldType('components', 'program', 'varchar(64)'); -# 1999-05-12 Added a pref to control how much email you get. This needs a new -# column in the profiles table, so feed the following to mysql: - -AddField('profiles', 'emailnotification', 'enum("ExcludeSelfChanges", "CConly", - "All") not null default "ExcludeSelfChanges"'); - - - # 1999-06-22 Added an entry to the attachments table to record who the # submitter was. Nothing uses this yet, but it still should be recorded. @@ -1724,8 +1710,6 @@ if (GetFieldDef('bugs', 'long_desc')) { DropField('bugs', 'long_desc'); $dbh->do("UNLOCK TABLES"); - $::regenerateshadow = 1; - } @@ -1768,14 +1752,14 @@ if (GetFieldDef('bugs_activity', 'field')) { # record when email notifications were last sent about this bug. Also, # added a user pref whether a user wants to use the brand new experimental # stuff. +# 2001-04-29 jake@acutex.net - The newemailtech field is no longer needed +# http://bugzilla.mozilla.org/show_bugs.cgi?id=71552 if (!GetFieldDef('bugs', 'lastdiffed')) { AddField('bugs', 'lastdiffed', 'datetime not null'); $dbh->do('UPDATE bugs SET lastdiffed = now(), delta_ts = delta_ts'); } -AddField('profiles', 'newemailtech', 'tinyint not null'); - # 2000-01-22 The "login_name" field in the "profiles" table was not # declared to be unique. Sure enough, somehow, I got 22 duplicated entries @@ -1999,8 +1983,6 @@ if ( CountIndexes('cc') != 3 ) { DropIndexes('cc'); $dbh->do("ALTER TABLE cc ADD UNIQUE (bug_id,who)"); $dbh->do("ALTER TABLE cc ADD INDEX (who)"); - - $::regenerateshadow=1; # cc fields no longer have spaces in them } if ( CountIndexes('keywords') != 3 ) { @@ -2045,8 +2027,6 @@ if (!($sth->fetchrow_arrayref()->[0])) { $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')"); # BugItsADupeOf Dupe } - - $::regenerateshadow = 1; } # 2000-12-14 New graphing system requires a directory to put the graphs in @@ -2162,6 +2142,17 @@ unless (-d 'data/duplicates') { } } +# 2001-04-29 jake@acutex.net - Remove oldemailtech +# http://bugzilla.mozilla.org/show_bugs.cgi?id=71552 +if (-d 'shadow') { + print "Removing shadow directory...\n"; + unlink glob("shadow/*"); + unlink glob("shadow/.*"); + rmdir "shadow"; +} +DropField("profiles", "emailnotification"); +DropField("profiles", "newemailtech"); + # If you had to change the --TABLE-- definition in any way, then add your # differential change code *** A B O V E *** this comment. # @@ -2173,10 +2164,6 @@ unless (-d 'data/duplicates') { # # # Final checks... -if ($::regenerateshadow) { - print "Now regenerating the shadow database for all bugs.\n"; - system("./processmail", "regenerate"); -} unlink "data/versioncache"; print "Reminder: Bugzilla now requires version 8.7 or later of sendmail.\n"; diff --git a/defparams.pl b/defparams.pl index d13efe89f..1b99751bc 100644 --- a/defparams.pl +++ b/defparams.pl @@ -145,11 +145,6 @@ DefParam("preferlists", "b", 1); -DefParam("prettyasciimail", - "If this is on, Bugzilla will send email reports formatted (assuming 76 character monospace font display). If this is off, email reports are sent using the old 'one-item-per-line' format.", - "b", - 0); - DefParam("capitalizelists", "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.", "b", @@ -374,51 +369,18 @@ To use the wonders of Bugzilla, you can use the following: }); - -DefParam("changedmail", -q{The email that gets sent to people when a bug changes. Within this -text, %to% gets replaced by the assigned-to and reported-by people, -separated by a comma (with duplication removed, if they're the same -person). %cc% gets replaced by the list of people on the CC list, -separated by commas. %bugid% gets replaced by the bug number. -%diffs% gets replaced by the diff text from the old version to the new -version of this bug. %neworchanged% is "New: " if this mail is -reporting a new bug or empty if changes were made -to an existing one. %summary% gets replaced by the summary of this -bug. %anythingelse% gets replaced by the definition of that -parameter (as defined on this page).}, - "l", -"From: bugzilla-daemon -To: %to% -Cc: %cc% -Subject: [Bug %bugid%] %neworchanged%%summary% - -%urlbase%show_bug.cgi?id=%bugid% - -%diffs%"); - -DefParam("newemailtech", -q{The way that email diffs are constructed by Bugzilla. You can revert to -the old technology by turning this off, but this is not advised, as the old -email tech will probably disappear in the next version of Bugzilla. Some -features (watches, server side mail filtering) depend on newemailtech being -set to on.}, - "b", - 1); - -DefParam("newemailtechdefault", -q{Make "newemailtech" the default for all new accounts created. This will -not change any existing accounts nor will it remove a users ability to go -back to the oldmail system (requires "newemailtech" to be on as well).}, - "b", - 1); - DefParam("newchangedmail", -q{The same as 'changedmail', but used for the newemailtech stuff.}, +q{The email that gets sent to people when a bug changes. Within this +text, %to% gets replaced with the e-mail address of the person recieving +the mail. %bugid% gets replaced by the bug number. %diffs% gets +replaced with what's changed. %neworchanged% is "New:" if this mail is +reporting a new bug or empty if changes were made to an existing one. +%summary% gets replaced by the summary of this bug. %anythingelse% +gets replaced by the definition of that parameter (as defined on this +page).}, "l", "From: bugzilla-daemon To: %to% -Cc: %cc% Subject: [Bug %bugid%] %neworchanged%%summary% %urlbase%show_bug.cgi?id=%bugid% diff --git a/editusers.cgi b/editusers.cgi index 3fe7ccb8b..a38f86b3c 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -97,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, $newemailtech) = @_; + $disabledtext) = @_; print "