summaryrefslogtreecommitdiffstats
path: root/extensions/PhabBugz/lib
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2017-08-30 09:55:09 +0200
committerDavid Lawrence <dkl@mozilla.com>2017-08-30 09:55:09 +0200
commita164a52baf8b6b676627780114543d76329cbced (patch)
tree5e62801061cf216e768742188ae7f84bc731d879 /extensions/PhabBugz/lib
parentc48fede1691feb1056cd21422716f297af9e7bc3 (diff)
downloadbugzilla-a164a52baf8b6b676627780114543d76329cbced.tar.gz
bugzilla-a164a52baf8b6b676627780114543d76329cbced.tar.xz
Revert "Bug 1395346 - Allow setting obsolete to false for phabricator attachments when a user reclaims a revision"
Diffstat (limited to 'extensions/PhabBugz/lib')
-rw-r--r--extensions/PhabBugz/lib/WebService.pm10
1 files changed, 2 insertions, 8 deletions
diff --git a/extensions/PhabBugz/lib/WebService.pm b/extensions/PhabBugz/lib/WebService.pm
index e09a72036..5668eac81 100644
--- a/extensions/PhabBugz/lib/WebService.pm
+++ b/extensions/PhabBugz/lib/WebService.pm
@@ -231,16 +231,10 @@ sub obsolete_attachments {
ThrowCodeError('param_required', { param => 'bug_id' })
}
- my $make_obsolete = $params->{make_obsolete};
- unless (defined $make_obsolete) {
- ThrowCodeError('param_required', { param => 'make_obsolete' })
- }
- $make_obsolete = $make_obsolete ? 1 : 0;
-
my $bug = Bugzilla::Bug->check($bug_id);
my @attachments =
- grep { is_attachment_phab_revision($_, 1) } @{ $bug->attachments() };
+ grep { is_attachment_phab_revision($_) } @{ $bug->attachments() };
return { result => [] } if !@attachments;
@@ -252,7 +246,7 @@ sub obsolete_attachments {
my ($curr_revision_id) = ($attachment->filename =~ PHAB_ATTACHMENT_PATTERN);
next if $revision_id != $curr_revision_id;
- $attachment->set_is_obsolete($make_obsolete);
+ $attachment->set_is_obsolete(1);
$attachment->update($timestamp);
push(@updated_attach_ids, $attachment->id);