WordPress.org

Make WordPress Core

Ticket #43306: 43306.2.patch

File 43306.2.patch, 680 bytes (added by aubreypwd, 3 years ago)

Patched the wrong direction on the original. This one, again, works in either subdir or subdomain setup.

  • wp-includes/ms-blogs.php

    diff --git wp-includes/ms-blogs.php wp-includes/ms-blogs.php
    index b18ef17e69..34d6c28c76 100644
    function get_id_from_blogname( $slug ) { 
    8787        $current_network = get_network();
    8888        $slug            = trim( $slug, '/' );
    8989
    90         if ( is_subdomain_install() ) {
    91                 $domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_network->domain );
    92                 $path   = $current_network->path;
    93         } else {
    94                 $domain = $current_network->domain;
    95                 $path   = $current_network->path . $slug . '/';
    96         }
     90        $domain = $current_network->domain;
     91        $path   = $current_network->path . $slug . '/';
    9792
    9893        $site_ids = get_sites(
    9994                array(