Multisite in a subdirectory: For subdomain installs, use a root admin cookie path, not a wp-admin specific one.

This is necessary because, like subdirectory installs, we will have wp-admin accessed at different levels.

fixes #22705.



git-svn-id: http://core.svn.wordpress.org/trunk@23005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-04 00:51:02 +00:00
parent 9a1ef788ce
commit 987c35a790

View File

@ -63,7 +63,7 @@ function ms_cookie_constants( ) {
* @since 2.6.0 * @since 2.6.0
*/ */
if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {
if( !is_subdomain_install() ) { if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) {
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
} else { } else {
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );