summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.perlcriticrc1
-rw-r--r--Bugzilla.pm2
-rw-r--r--scripts/undo.pl10
3 files changed, 7 insertions, 6 deletions
diff --git a/.perlcriticrc b/.perlcriticrc
index 44254f64e..0b8e4c862 100644
--- a/.perlcriticrc
+++ b/.perlcriticrc
@@ -46,6 +46,7 @@ severity = 2
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitVersionStrings]
+[-ValuesAndExpressions::ProhibitImplicitNewlines]
[-Variables::ProhibitLocalVars]
[-Variables::ProhibitPackageVars]
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 897433e47..5928e2e3f 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -22,7 +22,7 @@ BEGIN {
}
}
-our $VERSION = '20180523.1';
+our $VERSION = '20180529.1';
use Bugzilla::Auth;
use Bugzilla::Auth::Persist::Cookie;
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;