From b62211209a752128b8d8d0a42b403b4ad8a06f7c Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 29 Nov 2005 02:33:25 +0000 Subject: [PATCH] If PHP_SELF is empty, use REQUEST_URI when determining pagenow. git-svn-id: http://svn.automattic.com/wordpress/trunk@3231 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/vars.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/vars.php b/wp-includes/vars.php index f61b9692f..53b8d4d9b 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -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, '?')) {