Changeset 25396
- Timestamp:
- 09/12/2013 06:56:20 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/setup-config.php
r25173 r25396 55 55 // Turn register_globals off. 56 56 wp_unregister_GLOBALS(); 57 58 // Standardize $_SERVER variables across setups. 59 wp_fix_server_vars(); 57 60 58 61 require_once(ABSPATH . WPINC . '/compat.php'); … … 199 202 require_once( ABSPATH . WPINC . '/class-http.php' ); 200 203 require_once( ABSPATH . WPINC . '/http.php' ); 201 wp_fix_server_vars();202 204 /**#@+ 203 205 * @ignore 204 206 */ 205 207 function get_bloginfo() { 206 return ( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . str_replace( $_SERVER['PHP_SELF'], '/wp-admin/setup-config.php', '' ));208 return wp_guess_url(); 207 209 } 208 210 /**#@-*/ -
trunk/src/wp-includes/functions.php
r25371 r25396 3232 3232 $url = WP_SITEURL; 3233 3233 } else { 3234 // The request is for the admin 3235 if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false || strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) !== false ) { 3236 $path = preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', $_SERVER['REQUEST_URI'] ); 3237 3238 // The request is for a file in ABSPATH 3239 } elseif ( dirname( $_SERVER['SCRIPT_FILENAME'] ) . '/' == ABSPATH ) { 3240 // Strip off any file/query params in the path 3241 $path = preg_replace( '#/[^/]*$#i', '', $_SERVER['PHP_SELF'] ); 3242 3243 } else { 3244 if ( false !== strpos( $_SERVER['SCRIPT_FILENAME'], ABSPATH ) ) { 3245 // Request is hitting a file inside ABSPATH 3246 $directory = str_replace( ABSPATH, '', dirname( $_SERVER['SCRIPT_FILENAME'] ) ); 3247 // Strip off the sub directory, and any file/query paramss 3248 $path = preg_replace( '#/' . preg_quote( $directory, '#' ) . '/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ); 3249 } else { 3250 // Request is hitting a file above ABSPATH 3251 $subdirectory = str_replace( dirname( $_SERVER['SCRIPT_FILENAME'] ), '', ABSPATH ); 3252 // Strip off any file/query params from the path, appending the sub directory to the install 3253 $path = preg_replace( '#/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ) . $subdirectory; 3254 } 3255 } 3256 3234 3257 $schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet 3235 $url = preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );3258 $url = $schema . $_SERVER['HTTP_HOST'] . $path; 3236 3259 } 3237 3260 -
trunk/src/wp-includes/load.php
r25289 r25396 446 446 wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) ); 447 447 } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) { 448 449 $link = wp_guess_url() . '/wp-admin/install.php';450 451 448 require( ABSPATH . WPINC . '/kses.php' ); 452 449 require( ABSPATH . WPINC . '/pluggable.php' ); 453 450 require( ABSPATH . WPINC . '/formatting.php' ); 451 452 $link = wp_guess_url() . '/wp-admin/install.php'; 453 454 454 wp_redirect( $link ); 455 455 die(); -
trunk/src/wp-load.php
r25385 r25396 51 51 require_once( ABSPATH . WPINC . '/functions.php' ); 52 52 53 // Set a path for the link to the installer 54 if ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) { 55 $path = 'setup-config.php'; 56 } elseif ( file_exists( dirname( $_SERVER['SCRIPT_FILENAME'] ) . '/wp-admin/setup-config.php' ) ) { 57 $path = 'wp-admin/setup-config.php'; 58 } else { 59 // WordPress files are in a sub directory, and the user is hitting the index.php in the parent directory 60 $path = str_replace( dirname( $_SERVER['SCRIPT_FILENAME'] ) . '/', '', dirname( __FILE__ ) . '/wp-admin/setup-config.php' ); 61 } 53 $path = wp_guess_url() . '/wp-admin/setup-config.php'; 62 54 63 55 // Die with an error message
Note: See TracChangeset
for help on using the changeset viewer.