WordPress.org

Make WordPress Core

Changeset 23669


Ignore:
Timestamp:
03/12/13 11:04:14 (13 months ago)
Author:
SergeyBiryukov
Message:

Make get_home_path() return consistent slashes. fixes #23175.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r23563 r23669  
    9191    } 
    9292 
    93     return $home_path; 
     93    return str_replace( '\\', '/', $home_path ); 
    9494} 
    9595 
  • trunk/wp-admin/network.php

    r23567 r23669  
    315315    $document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) ); 
    316316    $abspath_fix       = str_replace( '\\', '/', ABSPATH ); 
    317     $home_path         = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : str_replace( '\\', '/', get_home_path() ); 
     317    $home_path         = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path(); 
    318318    $wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix ); 
    319319    $rewrite_base      = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; 
Note: See TracChangeset for help on using the changeset viewer.