WordPress.org

Make WordPress Core

Ticket #22639: 22639.2.patch

File 22639.2.patch, 2.5 KB (added by evansolomon, 3 years ago)

Also update file_exists() checks

  • wp-admin/network.php

     
    349349                <h3><?php esc_html_e( 'Enabling the Network' ); ?></h3> 
    350350                <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p> 
    351351                <div class="updated inline"><p><?php 
    352                         if ( file_exists( ABSPATH . '.htaccess' ) ) 
     352                        if ( file_exists( trailingslashit( str_replace( $wp_dir_from_root, '', ABSPATH ) ) . '.htaccess' ) ) 
    353353                                printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), '.htaccess' ); 
    354                         elseif ( file_exists( ABSPATH . 'web.config' ) ) 
     354                        elseif ( file_exists( trailingslashit( str_replace( $wp_dir_from_root, '', ABSPATH ) ) . 'web.config' ) ) 
    355355                                printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), 'web.config' ); 
    356356                        else 
    357357                                _e( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> file.' ); 
     
    454454EOF; 
    455455 
    456456        ?> 
    457                 <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), trailingslashit( str_replace( trailingslashit( $wp_siteurl_subdir ), '', ABSPATH ) ) ); ?></p> 
     457                <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), trailingslashit( str_replace( $wp_dir_from_root, '', ABSPATH ) ) ); ?></p> 
    458458                <?php 
    459459                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 
    460460                        echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>'; 
     
    488488EOF; 
    489489 
    490490                ?> 
    491                 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p> 
     491                <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), trailingslashit( str_replace( $wp_dir_from_root, '', ABSPATH ) ) ); ?></p> 
    492492                <?php 
    493493                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 
    494494                        echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';