From: Hugo Date: Fri, 30 Nov 2012 19:14:10 +0000 (-0500) Subject: Bug 813191 - Bug.add_attachment should only return the attachment ID X-Git-Tag: bugzilla-4.4rc2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02f4d9da6752920687e21843ab2da241e9246861;p=thirdparty%2Fbugzilla.git Bug 813191 - Bug.add_attachment should only return the attachment ID r=dkl, a=LpSolit --- diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 7c3d7cca64..f4181c336d 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -659,10 +659,9 @@ sub add_attachment { $_->send_changes() foreach @bugs; - my %attachments = map { $_->id => $self->_attachment_to_hash($_, $params) } - @created; + my @created_ids = map { $_->id } @created; - return { attachments => \%attachments }; + return { ids => \@created_ids }; } sub add_comment { @@ -2562,7 +2561,7 @@ Bugzilla B<4.4>. =head2 add_attachment -B +B =over @@ -2625,9 +2624,8 @@ Defaults to False if not specified. =item B -A single item C, which contains the created -attachments in the same format as the C return -value from L. +A single item C, which contains an array of the +attachment id(s) created. =item B @@ -2666,6 +2664,8 @@ You set the "data" field to an empty string. =item The C parameter was removed in Bugzilla B<4.2>. +=item The return value has changed in Bugzilla B<4.4>. + =back =back