summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-06-11 17:21:53 +0200
committerByron Jones <glob@mozilla.com>2014-06-11 17:21:53 +0200
commit39953ccace47ab8669e6e0d6d4bb397fec7d19ec (patch)
treecba6dfda0e698f4b996c3037a7df7a4a9f4e9f1a /editusers.cgi
parent8690811cafbac9f588faac26044f6d428354f811 (diff)
downloadbugzilla-39953ccace47ab8669e6e0d6d4bb397fec7d19ec.tar.gz
bugzilla-39953ccace47ab8669e6e0d6d4bb397fec7d19ec.tar.xz
Bug 978146: activity entry when setting flags isn't split across multiple rows
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi11
1 files changed, 3 insertions, 8 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 84b95856b..b6f5a6c52 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -492,10 +492,6 @@ if ($action eq 'search') {
my $sth_set_bug_timestamp =
$dbh->prepare('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?');
- my $sth_updateFlag = $dbh->prepare('INSERT INTO bugs_activity
- (bug_id, attach_id, who, bug_when, fieldid, removed, added)
- VALUES (?, ?, ?, ?, ?, ?, ?)');
-
# Flags
my $flag_ids =
$dbh->selectcol_arrayref('SELECT id FROM flags WHERE requestee_id = ?',
@@ -510,16 +506,15 @@ if ($action eq 'search') {
# so we have to log these changes manually.
my %bugs;
push(@{$bugs{$_->bug_id}->{$_->attach_id || 0}}, $_) foreach @$flags;
- my $fieldid = get_field_id('flagtypes.name');
foreach my $bug_id (keys %bugs) {
foreach my $attach_id (keys %{$bugs{$bug_id}}) {
my @old_summaries = Bugzilla::Flag->snapshot($bugs{$bug_id}->{$attach_id});
$_->_set_requestee() foreach @{$bugs{$bug_id}->{$attach_id}};
my @new_summaries = Bugzilla::Flag->snapshot($bugs{$bug_id}->{$attach_id});
my ($removed, $added) =
- Bugzilla::Flag->update_activity(\@old_summaries, \@new_summaries);
- $sth_updateFlag->execute($bug_id, $attach_id || undef, $userid,
- $timestamp, $fieldid, $removed, $added);
+ Bugzilla::Flag->update_activity(\@old_summaries, \@new_summaries);
+ LogActivityEntry($bug_id, 'flagtypes.name', $removed, $added,
+ $userid, $timestamp, undef, $attach_id);
}
$sth_set_bug_timestamp->execute($timestamp, $bug_id);
$updatedbugs{$bug_id} = 1;