Skip to:
Content

bbPress.org

Changeset 1831


Ignore:
Timestamp:
12/08/2008 06:40:56 PM (17 years ago)
Author:
sambauers
Message:

Detect Apache as well as IIS, better IIS detection from WordPress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-settings.php

    r1812 r1831  
    7373
    7474
     75// Server detection
     76
     77/**
     78 * Whether the server software is Apache or something else
     79 * @global bool $is_apache
     80 */
     81$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
     82
    7583/**
    7684 * Whether the server software is IIS or something else
    7785 * @global bool $is_IIS
    7886 */
    79 $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
     87$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false;
    8088
    8189
Note: See TracChangeset for help on using the changeset viewer.