Make WordPress Core

Changeset 28278


Ignore:
Timestamp:
05/06/2014 05:25:02 AM (12 years ago)
Author:
nacin
Message:

Multisite: Fix case sensitivity regressions in 3.9.

Merges [28276] to the 3.9 branch.

props jeremyfelt.
fixes #27866.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/src/wp-includes/ms-settings.php

    r27724 r28278  
    3636        }
    3737
    38         $path = strtolower( stripslashes( $_SERVER['REQUEST_URI'] ) );
     38        $path = stripslashes( $_SERVER['REQUEST_URI'] );
    3939        if ( is_admin() ) {
    4040                $path = preg_replace( '#(.*)/wp-admin/.*#', '$1/', $path );
     
    5454                }
    5555
    56                 if ( $current_site->domain === $domain && $current_site->path === $path ) {
     56                if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) {
    5757                        $current_blog = get_site_by_path( $domain, $path );
    58                 } elseif ( '/' !== $current_site->path && $current_site->domain === $domain && 0 === strpos( $path, $current_site->path ) ) {
     58                } elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) {
    5959                        // If the current network has a path and also matches the domain and path of the request,
    6060                        // we need to look for a site using the first path segment following the network's path.
Note: See TracChangeset for help on using the changeset viewer.