From 6372a14f42746fb75ad30e6243cdf1dc6959130e Mon Sep 17 00:00:00 2001 From: rboren Date: Sat, 9 Oct 2004 02:00:34 +0000 Subject: [PATCH] pagenow fixes git-svn-id: http://svn.automattic.com/wordpress/trunk@1765 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/vars.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/vars.php b/wp-includes/vars.php index d6dd744d9..82a5b5b52 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -43,7 +43,7 @@ $wp_htmltranswinuni = array( $PHP_SELF = $_SERVER['PHP_SELF']; if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) { $pagenow = $self_matches[1]; -} else { +} else if (strstr($PHP_SELF, '?')) { $pagenow = explode('/', $PHP_SELF); $pagenow = trim($pagenow[(sizeof($pagenow)-1)]); $pagenow = explode('?', $pagenow); @@ -51,6 +51,8 @@ if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) { if (($querystring_start == '/') && ($pagenow != 'post.php')) { $pagenow = get_settings('siteurl') . '/' . get_settings('blogfilename'); } +} else { + $pagenow = 'index.php'; } // Simple browser detection