[bugzilla-gnome-org-extensions] 4.4 migration: Do not use deprecated new invocation
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] 4.4 migration: Do not use deprecated new invocation
- Date: Thu, 20 Nov 2014 22:27:09 +0000 (UTC)
commit 5be646f6be8e214d62ec7ed7994ffeeb45d65d9e
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Tue Nov 18 13:14:30 2014 +0100
4.4 migration: Do not use deprecated new invocation
lib/WebService.pm | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/WebService.pm b/lib/WebService.pm
index 1a67005..024ca3d 100644
--- a/lib/WebService.pm
+++ b/lib/WebService.pm
@@ -59,12 +59,12 @@ sub publish_review {
my $attachment_status = $params->{attachment_status};
if (defined $attachment_status) {
- my $field_object = new Bugzilla::Field({ name => 'attachments.status' });
+ my $field_object = Bugzilla::Field->new({ name => 'attachments.status' });
my $legal_values = [map { $_->name } @{ $field_object->legal_values }];
check_field('attachments.status', $attachment_status, $legal_values);
}
- my $attachment = new Bugzilla::Attachment($params->{attachment_id});
+ my $attachment = Bugzilla::Attachment->new($params->{attachment_id});
defined $attachment
|| ThrowUserError("invalid_attach_id",
{ attach_id => $params->{attachment_id} });
@@ -74,7 +74,7 @@ sub publish_review {
# allow it.
check_can_access($attachment);
- my $bug = new Bugzilla::Bug($attachment->bug_id);
+ my $bug = Bugzilla::Bug->new($attachment->bug_id);
Bugzilla->user->can_edit_product($bug->product_id)
|| ThrowUserError("product_edit_denied", {product => $bug->product});
@@ -104,7 +104,7 @@ sub publish_review {
WHERE attach_id = ?",
undef, ($attachment_status, $timestamp, $attachment->id));
- my $updated_attachment = new Bugzilla::Attachment($attachment->id);
+ my $updated_attachment = Bugzilla::Attachment->new($attachment->id);
if ($attachment->status ne $updated_attachment->status) {
my $fieldid = get_field_id('attachments.status');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]