[wp-trac] [WordPress Trac] #14965: multisite global $current_site / get_current_site() is not passing site_name

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 18 18:23:58 UTC 2012


#14965: multisite  global $current_site / get_current_site() is not passing
site_name
--------------------------+----------------------
 Reporter:  Frumph        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------
Changes (by mohanjith):

 * cc: moha@… (added)


Comment:

 This can be fixed if you change sunrise.php like following.

 Replace `$current_site = $wpdb->get_row( "SELECT * from {$wpdb->site}
 WHERE id = '{$current_blog->site_id}' LIMIT 0,1" );` with

 `wpmu_current_site();`

 `$dm_current_site = $wpdb->get_row( "SELECT * from {$wpdb->site} WHERE id
 = '{$current_blog->site_id}' LIMIT 0,1" );`

 `$current_site->id = $dm_current_site->id;`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14965#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list