WordPress.org

Make WordPress Core

Changeset 15680


Ignore:
Timestamp:
10/02/2010 03:08:02 AM (9 years ago)
Author:
dd32
Message:

utilise wp_guess_url() in installation redirection to provide an Absolute URL. See #14062. See #14904

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15638 r15680  
    34843484        $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    34853485    }
    3486     return $url;
     3486    return rtrim($url, '/');
    34873487}
    34883488
  • trunk/wp-includes/load.php

    r15638 r15680  
    420420            wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) );
    421421    } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) {
    422         if ( defined( 'WP_SITEURL' ) )
    423             $link = WP_SITEURL . '/wp-admin/install.php';
    424         elseif ( false !== strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) )
    425             $link = preg_replace( '|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php';
    426         else
    427             $link = preg_replace( '|/[^/]+?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php';
     422
     423        $link = wp_guess_url() . '/wp-admin/install.php';
     424
    428425        require( ABSPATH . WPINC . '/kses.php' );
    429426        require( ABSPATH . WPINC . '/pluggable.php' );
Note: See TracChangeset for help on using the changeset viewer.