Make WordPress Core

Changeset 3382


Ignore:
Timestamp:
12/29/2005 11:11:26 PM (20 years ago)
Author:
ryan
Message:

Move PHP_SELF setup to wp-settings.php. #2153

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/vars.php

    r3319 r3382  
    22
    33// On which page are we ?
    4 $PHP_SELF = $_SERVER['PHP_SELF'];
    5 if ( empty($PHP_SELF) )
    6     $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
    7 
    84if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
    95    $pagenow = $self_matches[1];
  • trunk/wp-settings.php

    r3069 r3382  
    4343    unset($_SERVER['PATH_INFO']);
    4444
     45// Fix empty PHP_SELF
     46$PHP_SELF = $_SERVER['PHP_SELF'];
     47if ( empty($PHP_SELF) )
     48    $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
    4549
    4650if ( !(phpversion() >= '4.1') )
Note: See TracChangeset for help on using the changeset viewer.