[wp-trac] [WordPress Trac] #25030: Overlapping upload paths with multiple networks
WordPress Trac
noreply at wordpress.org
Thu Aug 15 05:26:43 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 nacin):
Replying to [comment:13 jeremyfelt]:
> 1. What are the repercussions of returning true when `! is_multisite()`?
None, since this is a new function. Given that is_main_site() returns
true, it would make sense for is_main_network() to be consistent in that
regard. If you must know whether you are running multisite, then
is_multisite() is the proper and really only valid check.
> 2. Do we account for a scenario where `$current_site->id` is 1 and
`PRIMARY_NETWORK_ID` is not?
If PRIMARY_NETWORK_ID is defined, we should `return $site_id ==
PRIMARY_NETWORK_ID;`.
> 3. Is `is_main_network()` the best place to cache a backup query for
PRIMARY_NETWORK_ID?
Actually, no, because a switch_to_blog() could hypothetically affect
$current_site. It doesn't currently, but I imagine we'll upend switching
madness at some point. The site-options cache bucket is probably good.
Let's do site_id => network_id for our local variables here, same with all
of the inline documentation. The only use of "site" should be in the
$current_site variable name, is_multisite(), and $wpdb->site.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25030#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list