Make WordPress Core

Ticket #23533: vars.diff

File vars.diff, 830 bytes (added by hurtige, 12 years ago)

Added float $iis_version which solves forward compatability issues with using $is_iis7. Also changed $is_iis7 to also return true if running IIS 8 to fix current plugins and features

  • wp-includes/vars.php

     
    9696 * Whether the server software is IIS 7.X
    9797 * @global bool $is_iis7
    9898 */
    99 $is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
    10099
     100$is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') || strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/8.') !== false);
     101
    101102/**
     103 * Returns the numeric IIS server version, false if not IIS
     104 * @global float $iis_version
     105 */
     106$iis_version = $is_IIS ? floatval(substr($_SERVER['SERVER_SOFTWARE'], 14)) : false;
     107
     108
     109/**
    102110 * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
    103111 *
    104112 * @return bool true|false