Make WordPress Core

Changeset 31120


Ignore:
Timestamp:
01/10/2015 04:58:49 AM (10 years ago)
Author:
wonderboymusic
Message:

Use PHP_SAPI constant instead of php_sapi_name() in iis7_supports_permalinks(), wp_fix_server_vars(), and wp_redirect().

See #30799.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r31090 r31120  
    36203620         * via ISAPI then pretty permalinks will not work.
    36213621         */
    3622         $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && ( php_sapi_name() == 'cgi-fcgi' );
     3622        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && ( PHP_SAPI == 'cgi-fcgi' );
    36233623    }
    36243624
  • trunk/src/wp-includes/load.php

    r31090 r31120  
    5353
    5454    // Fix for IIS when running with PHP ISAPI
    55     if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
     55    if ( empty( $_SERVER['REQUEST_URI'] ) || ( PHP_SAPI != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
    5656
    5757        // IIS Mod-Rewrite
  • trunk/src/wp-includes/pluggable.php

    r31107 r31120  
    11731173    $location = wp_sanitize_redirect($location);
    11741174
    1175     if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
     1175    if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
    11761176        status_header($status); // This causes problems on IIS and some FastCGI setups
    11771177
Note: See TracChangeset for help on using the changeset viewer.