Ticket #22705: 22705.diff

File 22705.diff, 633 bytes (added by markjaquith, 6 months ago)
Line 
1Index: wp-includes/ms-default-constants.php
2===================================================================
3--- wp-includes/ms-default-constants.php        (revision 23001)
4+++ wp-includes/ms-default-constants.php        (working copy)
5@@ -56,8 +56,12 @@
6        /**
7         * @since 1.5.0
8         */
9-       if ( !defined( 'SITECOOKIEPATH' ) )
10-               define( 'SITECOOKIEPATH', $current_site->path );
11+       if ( !defined( 'SITECOOKIEPATH' ) ) {
12+               if ( !is_subdomain_install() )
13+                       define( 'SITECOOKIEPATH', $current_site->path );
14+               else
15+                       define( 'SITECOOKIEPATH', trailingslashit( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ) ) );
16+       }
17 
18        /**
19         * @since 2.6.0