From 6dcda41d4c40a5617757a3b0ec9bbaeebfde6b55 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Sat, 22 Jan 2000 12:24:39 +0000 Subject: Added a new table fielddefs that records information about the different fields we keep an activity log on. The bugs_activity table now has a pointer into that table instead of recording the name directly. Set up a new, highly experimental email-notification scheme. To turn it on, the maintainer has to turn on the "New email tech" param, and then individual users have to turn on the "New email tech" preference. --- CGI.pl | 11 +-- buglist.cgi | 2 +- changepassword.cgi | 25 +++++- checksetup.pl | 117 +++++++++++++++++++++++++- defparams.pl | 8 ++ globals.pl | 44 ++++++++-- process_bug.cgi | 20 ++++- processmail | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++- sanitycheck.cgi | 16 +++- 9 files changed, 454 insertions(+), 27 deletions(-) diff --git a/CGI.pl b/CGI.pl index 033961424..ecd56860a 100644 --- a/CGI.pl +++ b/CGI.pl @@ -777,13 +777,14 @@ sub DumpBugActivity { $datepart = "and bugs_activity.bug_when >= $starttime"; } my $query = " - select bugs_activity.field, bugs_activity.bug_when, + SELECT fielddefs.name, bugs_activity.bug_when, bugs_activity.oldvalue, bugs_activity.newvalue, profiles.login_name - from bugs_activity,profiles - where bugs_activity.bug_id = $id $datepart - and profiles.userid = bugs_activity.who - order by bugs_activity.bug_when"; + FROM bugs_activity,profiles,fielddefs + WHERE bugs_activity.bug_id = $id $datepart + AND fielddefs.fieldid = bugs_activity.fieldid + AND profiles.userid = bugs_activity.who + ORDER BY bugs_activity.bug_when"; SendSQL($query); diff --git a/buglist.cgi b/buglist.cgi index 2309b3205..7b53b9a15 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -452,7 +452,7 @@ if (defined $ref && 0 < @$ref) { my @list; foreach my $f (@$ref) { - push(@list, "\nbugs_activity.field = " . SqlQuote($f)); + push(@list, "\nbugs_activity.fieldid = " . GetFieldID($f)); } $query .= "and bugs_activity.bug_id = bugs.bug_id and (" . join(' or ', @list) . ") "; diff --git a/changepassword.cgi b/changepassword.cgi index 93b736e55..3e433ed04 100755 --- a/changepassword.cgi +++ b/changepassword.cgi @@ -35,9 +35,9 @@ if (! defined $::FORM{'pwd1'}) { $qacontactpart = ", the current QA Contact"; } my $loginname = SqlQuote($::COOKIE{'Bugzilla_login'}); - SendSQL("select emailnotification,realname from profiles where login_name = " . + SendSQL("select emailnotification,realname,newemailtech from profiles where login_name = " . $loginname); - my ($emailnotification, $realname) = (FetchSQLData()); + my ($emailnotification, $realname, $newemailtech) = (FetchSQLData()); $realname = value_quote($realname); print qq{