Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#20703 closed defect (bug) (fixed)

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

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

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 14 years ago.

Download all attachments as: .zip

Change History (7)

#1 @aercolino
14 years ago

  • Cc cappuccino.e.cornetto@… added

@maxcutler
14 years ago

#2 @maxcutler
14 years ago

  • Cc max@… added
  • Keywords has-patch added
  • Milestone Awaiting Review → 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
14 years ago

  • Keywords commit added

#4 @westi
14 years ago

Looks good to me too.

#5 @ryan
14 years ago

  • Owner set to ryan
  • Resolution → fixed
  • Status new → closed

In [20856]:

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

#6 @aercolino
14 years ago

Thanks :-)

Note: See TracTickets for help on using tickets.