Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#18683 closed task (blessed) (fixed)

XMLRPC wp.getMediaLibrary doesn't return attachment ids

Reported by: skithund's profile skithund Owned by: josephscott's profile josephscott
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.2.1
Component: XML-RPC Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

XMLRPC wp.getMediaLibrary method loops attachments through wp_getMediaItem function, which doesn't return attachment ids.

Attachments (1)

getmediaitem.diff (496 bytes) - added by skithund 13 years ago.
Return attachment_id in wp_getMediaItem

Download all attachments as: .zip

Change History (9)

@skithund
13 years ago

Return attachment_id in wp_getMediaItem

#1 @ocollet
13 years ago

  • Cc oc@… added

#2 @josephscott
12 years ago

  • Keywords commit added

Looks good to me, I'd be fine committing this.

#3 @SergeyBiryukov
12 years ago

  • Milestone changed from Awaiting Review to 3.4

#4 @ericmann
12 years ago

+1 On returning IDs. I know of at least 2 XMLRPC clients that would benefit from this addition.

#5 @daniloercoli
12 years ago

  • Cc ercoli@… added

#6 @josephscott
12 years ago

  • Type changed from enhancement to task (blessed)

#7 @westi
12 years ago

  • Keywords dev-reviewed added
  • Owner set to josephscott
  • Status changed from new to assigned

Can we make this patch ensure that the IDs are returned as strings not ints so that we have no chance of returning invalid data in an XML-RPC response - our IDs go to values bigger than the spec for integers in xml-rpc.

With that change this should be fine to commit.

#8 @josephscott
12 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In [19885]:

Provide the attachment_id of a media item in the XML-RPC call wp.getMediaItem.

Props skithund
Fixes #18683

Note: See TracTickets for help on using tickets.