Populate PHP_SELF from REQUEST_URI if blank.

git-svn-id: https://develop.svn.wordpress.org/trunk@3319 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-16 08:04:41 +00:00
parent ae35044963
commit dcd75531cb
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
// On which page are we ?
$PHP_SELF = $_SERVER['PHP_SELF'];
if ( empty($PHP_SELF) )
$PHP_SELF = $_SERVER["REQUEST_URI"];
$_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
$pagenow = $self_matches[1];