Make WordPress Core

Changeset 2772


Ignore:
Timestamp:
08/09/2005 10:38:32 PM (19 years ago)
Author:
matt
Message:

Tweak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r2770 r2772  
    11<?php
     2// Turn register globals off
     3if ( ini_get('register_globals') ) {
     4    $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
     5    if ( isset($_SESSION) )
     6        array_unshift($superglobals, $_SESSION);
     7   
     8    foreach ( $superglobals as $superglobal )
     9        foreach ( $superglobal as $global => $value )
     10            if ( 'table_prefix' != $global )
     11                unset( $GLOBALS[$global] );
     12}
     13
    214$HTTP_HOST = getenv('HTTP_HOST');  /* domain name */
    315$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
    416$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
    5 
    6 // Turn register globals off
    7 if ( ini_get('register_globals') ) {
    8    $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
    9    if ( isset($_SESSION) )
    10         array_unshift($superglobals, $_SESSION);
    11 
    12    foreach ( $superglobals as $superglobal )
    13        foreach ( $superglobal as $global => $value )
    14            unset( $GLOBALS[$global] );
    15 }
    1617
    1718// Fix for IIS, which doesn't set REQUEST_URI
Note: See TracChangeset for help on using the changeset viewer.