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:
parent
47bc943716
commit
0577003eb9
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
// On which page are we ?
|
// On which page are we ?
|
||||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||||
|
if ( empty($PHP_SELF) )
|
||||||
|
$PHP_SELF = $_SERVER["REQUEST_URI"];
|
||||||
|
|
||||||
if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
|
if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
|
||||||
$pagenow = $self_matches[1];
|
$pagenow = $self_matches[1];
|
||||||
} else if (strstr($PHP_SELF, '?')) {
|
} else if (strstr($PHP_SELF, '?')) {
|
||||||
|
|
Loading…
Reference in New Issue