Populate PHP_SELF from REQUEST_URI if blank.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-16 08:04:41 +00:00
parent 708d693096
commit 4260bf8b16
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
// On which page are we ? // On which page are we ?
$PHP_SELF = $_SERVER['PHP_SELF']; $PHP_SELF = $_SERVER['PHP_SELF'];
if ( empty($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)) { if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
$pagenow = $self_matches[1]; $pagenow = $self_matches[1];