Make WordPress Core

Ticket #25098: 25098.diff

File 25098.diff, 2.3 KB (added by johnbillion, 11 years ago)
  • wp-admin/includes/misc.php

    diff --git wp-admin/includes/misc.php wp-admin/includes/misc.php
    index 5b609e4..9546fdd 100644
     
    77 */
    88
    99/**
    10  * {@internal Missing Short Description}}
     10 * Returns whether or not the server is running Apache with the mod_rewrite module loaded.
    1111 *
    1212 * @since 2.0.0
    1313 *
    function got_mod_rewrite() { 
    1919}
    2020
    2121/**
     22 * Returns whether or not the server supports URL rewriting.
     23 *
     24 * @since 3.7
     25 *
     26 * @return bool Whether the server supports URL rewriting
     27 */
     28function got_url_rewrite() {
     29    $got_url_rewrite = ( got_mod_rewrite() || is_nginx() || iis7_supports_permalinks() );
     30    return apply_filters( 'got_url_rewrite', $got_url_rewrite );
     31}
     32
     33/**
    2234 * {@internal Missing Short Description}}
    2335 *
    2436 * @since 1.5.0
  • wp-admin/options-permalink.php

    diff --git wp-admin/options-permalink.php wp-admin/options-permalink.php
    index d086fdc..3817095 100644
    $home_path = get_home_path(); 
    7575$iis7_permalinks = iis7_supports_permalinks();
    7676
    7777$prefix = $blog_prefix = '';
    78 if ( ! got_mod_rewrite() && ! $iis7_permalinks )
     78if ( ! got_url_rewrite() )
    7979        $prefix = '/index.php';
    8080if ( is_multisite() && !is_subdomain_install() && is_main_site() )
    8181        $blog_prefix = '/blog';
  • wp-includes/functions.php

    diff --git wp-includes/functions.php wp-includes/functions.php
    index 51f2b8f..c117216 100644
    function is_lighttpd_before_150() { 
    30363036}
    30373037
    30383038/**
     3039 * Is the server running Nginx?
     3040 *
     3041 * @since 3.7
     3042 *
     3043 * @return bool Whether the server is running Nginx
     3044 */
     3045function is_nginx() {
     3046        return $GLOBALS['is_nginx'];
     3047}
     3048
     3049/**
    30393050 * Does the specified module exist in the Apache config?
    30403051 *
    30413052 * @since 2.5.0
  • wp-includes/vars.php

    diff --git wp-includes/vars.php wp-includes/vars.php
    index f55cdbd..1eac808 100644
    $is_IE = ( $is_macIE || $is_winIE ); 
    8787$is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
    8888
    8989/**
     90 * Whether the server software is Nginx or something else
     91 * @global bool $is_nginx
     92 */
     93$is_nginx = (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
     94 
     95/**
    9096 * Whether the server software is IIS or something else
    9197 * @global bool $is_IIS
    9298 */