summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-07-21 00:18:25 +0200
committerjake%acutex.net <>2001-07-21 00:18:25 +0200
commit32c74ca90011bfa5cfc781ca0879529abb3c5d30 (patch)
treea37625309a4e03167eea6977451b70246fe7fa46 /CGI.pl
parent708fafdbfa042bea7e5bb006ca1bdcde69248431 (diff)
downloadbugzilla-32c74ca90011bfa5cfc781ca0879529abb3c5d30.tar.gz
bugzilla-32c74ca90011bfa5cfc781ca0879529abb3c5d30.tar.xz
Fix for bugs 55161 and 12819. The activity log now stores only what's changed in multi-value fields.
r= justdave@syndicomm.com
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl26
1 files changed, 11 insertions, 15 deletions
diff --git a/CGI.pl b/CGI.pl
index f248b2599..06d32d05f 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -1105,12 +1105,12 @@ sub CheckIfVotedConfirmed {
"WHERE bug_id = $id");
my $fieldid = GetFieldID("bug_status");
SendSQL("INSERT INTO bugs_activity " .
- "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " .
+ "(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
"($id,$who,now(),$fieldid,'$::unconfirmedstate','NEW')");
if (!$everconfirmed) {
$fieldid = GetFieldID("everconfirmed");
SendSQL("INSERT INTO bugs_activity " .
- "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " .
+ "(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
"($id,$who,now(),$fieldid,'0','1')");
}
AppendComment($id, DBID_to_name($who),
@@ -1136,7 +1136,7 @@ sub DumpBugActivity {
my $query = "
SELECT IFNULL(fielddefs.name, bugs_activity.fieldid),
bugs_activity.bug_when,
- bugs_activity.oldvalue, bugs_activity.newvalue,
+ bugs_activity.removed, bugs_activity.added,
profiles.login_name
FROM bugs_activity LEFT JOIN fielddefs ON
bugs_activity.fieldid = fielddefs.fieldid,
@@ -1149,25 +1149,21 @@ sub DumpBugActivity {
print "<table border cellpadding=4>\n";
print "<tr>\n";
- print " <th>Who</th><th>What</th><th>Old value</th><th>New value</th><th>When</th>\n";
+ print " <th>Who</th><th>What</th><th>Removed</th><th>Added</th><th>When</th>\n";
print "</tr>\n";
my @row;
while (@row = FetchSQLData()) {
- my ($field,$when,$old,$new,$who) = (@row);
- $old = value_quote($old);
- $new = value_quote($new);
- if ($old eq "") {
- $old = "&nbsp;";
- }
- if ($new eq "") {
- $new = "&nbsp;";
- }
+ my ($field,$when,$removed,$added,$who) = (@row);
+ $removed = html_quote($removed);
+ $added = html_quote($added);
+ $removed ||= "&nbsp;";
+ $added ||= "&nbsp;";
print "<tr>\n";
print "<td>$who</td>\n";
print "<td>$field</td>\n";
- print "<td>$old</td>\n";
- print "<td>$new</td>\n";
+ print "<td>$removed</td>\n";
+ print "<td>$added</td>\n";
print "<td>$when</td>\n";
print "</tr>\n";
}