Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20703 closed defect (bug) (fixed)

wp.getComments logs in the user (1 + #comments) times

Reported by: aercolino's profile aercolino Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.3.2
Component: XML-RPC Keywords: has-patch commit
Focuses: Cc:

Description

Also wp.getPages had a similar bug, before [20807].

I've been writing an enhancement for my LoginDongle plugin, where I will use a query string param to allow an XML-RPC user to log in. All calls work fine except getComments and it's because it reuses the getComment() method, which causes the unneeded logins.

getComments issue
|
getPages issue

Attachments (1)

20703.patch (4.5 KB) - added by maxcutler 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @aercolino
12 years ago

  • Cc cappuccino.e.cornetto@… added

@maxcutler
12 years ago

#2 @maxcutler
12 years ago

  • Cc max@… added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.4

Added a patch that moves the formatting logic out into a _prepare_comment method like we've done for all other content types in the 3.4 release. Also fixes a potential source of notices if the caller omits the optional fourth argument.

Added some unit tests for these two methods in [UT720].

#3 @nacin
12 years ago

  • Keywords commit added

#4 @westi
12 years ago

Looks good to me too.

#5 @ryan
12 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [20856]:

Introduce _prepare_comment(). Avoid repeated auth attempts. Props maxcutler. fixes #20703

#6 @aercolino
12 years ago

Thanks :-)

Note: See TracTickets for help on using tickets.