Ticket #8255 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

WPCOMism in xmllrpc.php

Reported by: donncha Owned by: josephscott
Priority: normal Milestone: 2.7
Component: XML-RPC Version: 2.7
Severity: normal Keywords:
Cc:

Description

The check for site_id on line 432 of xmlrpc.php is a piece of legacy code from WordPress.com and has been taken out in WordPress MU.

That foreach() loop is also missing a restore_current_blog() call, the complement of switch_to_blog(). It should be added immediately after the definition of $is_admin.

Attachments

xmlrpc.php.diff Download (573 bytes) - added by josephscott 3 years ago.

Change History

comment:1   ryan3 years ago

Those functions don't exist in WP.

comment:2   ryan3 years ago

  • Owner changed from anonymous to josephscott
  • Component changed from General to XML-RPC

Here's an untested patch based on a brief discussion with Donncha.

comment:4   ryan3 years ago

get_blogs_of_user() doesn't exist for WP. Nor do the switch and restore functions.

comment:5   ryan3 years ago

Ah, I see. We test for is_site_admin() to short-circuit for WP. The fix is so WPMU picks it up on merge.

comment:6   ryan3 years ago

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

(In [9798]) wp_getUsersBlogs() fix from josephscott. fixes #8255

Note: See TracTickets for help on using tickets.