Make WordPress Core

Changeset 2779


Ignore:
Timestamp:
08/12/2005 07:09:09 AM (19 years ago)
Author:
matt
Message:

Move above

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/wp-settings.php

    r2771 r2779  
    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 */
     
    1224        $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
    1325    }
    14 }
    15 
    16 // Turn register globals off
    17 if ( ini_get('register_globals') ) {
    18    $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
    19    if ( isset($_SESSION) )
    20         array_unshift($superglobals, $_SESSION);
    21 
    22    foreach ( $superglobals as $superglobal )
    23        foreach ( $superglobal as $global => $value )
    24            unset( $GLOBALS[$global] );
    2526}
    2627
Note: See TracChangeset for help on using the changeset viewer.