WordPress.org

Make WordPress Core

Ticket #41166: 41166v2.diff

File 41166v2.diff, 1.3 KB (added by lipathor, 3 years ago)

Second version

  • src/wp-admin/includes/network.php

    diff --git src/wp-admin/includes/network.php src/wp-admin/includes/network.php
    index fef6b66..1b7dac9 100644
    function network_step1( $errors = false ) { 
    335335 */
    336336function network_step2( $errors = false ) {
    337337        global $wpdb;
     338        global $is_nginx;
    338339
    339340        $hostname          = get_clean_basedomain();
    340341        $slashed_home      = trailingslashit( get_option( 'home' ) );
    define('BLOG_ID_CURRENT_SITE', 1); 
    548549                </textarea></li>
    549550                </ol>
    550551
    551         <?php else : // end iis7_supports_permalinks(). construct an htaccess file instead:
     552        <?php elseif($is_nginx): // end iis7_supports_permalinks(). check if server is nginx and print link to Codex:
     553                $section = $subdomain_install ? 'WordPress_Multisite_subdomains_rules' : 'WordPress_Multisite_Subdirectory_rules';
     554                echo  '<li><p>';
     555                printf(
     556                        __('It seems your network is running with NGINX webserver. Please, visit %1$s to get details about further configuration'),
     557                        '<a href="https://codex.wordpress.org/Nginx#'.$section.'" target="_blank">https://codex.wordpress.org/Nginx#'.$section.'</a>'
     558                );
     559                echo '</p>'
     560                ?>
     561        <?php else : // end of nginx variant, construct .htaccess
    552562
    553563                $ms_files_rewriting = '';
    554564                if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {