[wp-trac] [WordPress Trac] #25030: Overlapping upload paths with multiple networks

WordPress Trac noreply at wordpress.org
Thu Aug 15 03:23:50 UTC 2013


#25030: Overlapping upload paths with multiple networks
--------------------------+------------------
 Reporter:  ddean         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.7
Component:  Multisite     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by jeremyfelt):

 Focusing on the `is_main_network()` check.

 How about this order:

 1. Introduce new constant for PRIMARY_SITE_ID that is optional via `wp-
 config.php`, `sunrise.php`, or later. Check `$current_site->id` against
 this first.
 1. Check if `1 === $current_site->id;`. If so, we can assume that site_id
 1 still exists and that it is most likely the primary network, if not the
 only network.
 1. Else, query for the smallest site_id, cache the result, and compare
 with the `$current_site->id`.

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


More information about the wp-trac mailing list