WordPress.org

Make WordPress Core

Ticket #14873: 14873.diff

File 14873.diff, 1.4 KB (added by dd32, 8 years ago)

mareck's file in patch form.

  • ms-settings.php

     
    8080                }
    8181        }
    8282
     83        $protocol = is_ssl() ? 'https://' : 'http://';
     84
    8385        if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) {
    8486                if ( defined( 'NOBLOGREDIRECT' ) ) {
    8587                        $destination = NOBLOGREDIRECT;
    8688                        if ( '%siteurl%' == $destination )
    87                                 $destination = "http://" . $current_site->domain . $current_site->path;
     89                                $destination = $protocol . $current_site->domain . $current_site->path;
    8890                } else {
    89                         $destination = 'http://' . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
     91                        $destination = $protocol . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
    9092                }
    9193                header( 'Location: ' . $destination );
    9294                die();
     
    9597        if ( ! defined( 'WP_INSTALLING' ) ) {
    9698                if ( $current_site && ! $current_blog ) {
    9799                        if ( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
    98                                 header( 'Location: http://' . $current_site->domain . $current_site->path );
     100                                header( 'Location: ' . $protocol . $current_site->domain . $current_site->path );
    99101                                exit;
    100102                        }
    101103                        $current_blog = get_blog_details( array( 'domain' => $current_site->domain, 'path' => $current_site->path ), false );