WordPress.org

Make WordPress Core

Changeset 858


Ignore:
Timestamp:
02/10/2004 08:43:23 AM (18 years ago)
Author:
saxmatt
Message:

Work around IIS' lack of REQUEST_URI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r844 r858  
    33$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
    44$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
     5
     6// Fix for IIS, which doesn't set REQUEST_URI
     7$_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')));
    58
    69// Change to E_ALL for development/debugging
     
    2528
    2629$wpdb->hide_errors();
    27 if (!$wpdb->get_row("SELECT * FROM $tableusers LIMIT 1") && !strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php')) {
     30if (!$wpdb->get_row("SELECT * FROM $tableusers LIMIT 1") && !strstr($_SERVER['REQUEST_URI'], 'install.php')) {
    2831    die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
    2932}
     
    4548// get_settings() wherever these are needed OR
    4649// accessing a single global $all_settings var
    47 if (!strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php') && !strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'wp-admin/import')) {
     50if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
    4851    $siteurl = get_settings('siteurl');
    4952    // "When trying to design a foolproof system,
     
    116119}
    117120
     121
     122
    118123?>
Note: See TracChangeset for help on using the changeset viewer.