If PHP_SELF is empty, use REQUEST_URI when determining pagenow.

git-svn-id: https://develop.svn.wordpress.org/trunk@3231 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-11-29 02:33:25 +00:00
parent 47bc943716
commit 0577003eb9
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,9 @@
// On which page are we ?
$PHP_SELF = $_SERVER['PHP_SELF'];
if ( empty($PHP_SELF) )
$PHP_SELF = $_SERVER["REQUEST_URI"];
if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
$pagenow = $self_matches[1];
} else if (strstr($PHP_SELF, '?')) {