summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-05-29 21:20:58 +0200
committerGitHub <noreply@github.com>2018-05-29 21:20:58 +0200
commit283e9a03efc9185e1a86e2ea2de3b6693a42224b (patch)
tree4facf2312b943d7b65cc8b40ed4b86203f16e833 /scripts
parent42d7fa7b22e40f97fb8f1b809719e22a86dc8ebe (diff)
downloadbugzilla-283e9a03efc9185e1a86e2ea2de3b6693a42224b.tar.gz
bugzilla-283e9a03efc9185e1a86e2ea2de3b6693a42224b.tar.xz
bump version to 20180529.1 (#589)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/undo.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/undo.pl b/scripts/undo.pl
index 852c786fd..5de3104fa 100644
--- a/scripts/undo.pl
+++ b/scripts/undo.pl
@@ -65,7 +65,7 @@ sub undo {
}
my $dbh = Bugzilla->dbh;
- my @bug_ids = sort { $b <=> $a } keys %action;
+ my @bug_ids = reverse sort { $a <=> $b } keys %action;
say 'Found ', 0 + @bug_ids, ' bugs';
foreach my $bug_id (@bug_ids) {
$dbh->bz_start_transaction;
@@ -113,11 +113,11 @@ sub undo {
$previous_last_ts, $previous_last_ts, $bug_id );
my $del_comments = $dbh->prepare('DELETE FROM longdescs WHERE comment_id = ?');
my $del_activity = $dbh->prepare('DELETE FROM bugs_activity WHERE id = ?');
- foreach my $c (@{ $action->{remove_comments}}) {
- $del_comments->execute($c->{id}) or die "failed to delete comment $c->{id}";
+ foreach my $comment (@{ $action->{remove_comments}}) {
+ $del_comments->execute($comment->{id}) or die "failed to delete comment $c->{id}";
}
- foreach my $a (@{ $action->{remove_activities}}) {
- $del_activity->execute($a->{id}) or die "failed to delete comment $a->{id}";
+ foreach my $activity (@{ $action->{remove_activities}}) {
+ $del_activity->execute($activity->{id}) or die "failed to delete comment $a->{id}";
}
tag_for_recount_from_bug($bug_id);
$dbh->bz_commit_transaction;