mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Move PHP_SELF setup to wp-settings.php. #2153
git-svn-id: http://svn.automattic.com/wordpress/trunk@3382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
095edb0aea
commit
38f4fca0db
@ -1,10 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// On which page are we ?
|
// On which page are we ?
|
||||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
|
||||||
if ( empty($PHP_SELF) )
|
|
||||||
$_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];
|
||||||
} else if (strstr($PHP_SELF, '?')) {
|
} else if (strstr($PHP_SELF, '?')) {
|
||||||
|
@ -42,6 +42,10 @@ if ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_F
|
|||||||
if ( strstr( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) )
|
if ( strstr( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) )
|
||||||
unset($_SERVER['PATH_INFO']);
|
unset($_SERVER['PATH_INFO']);
|
||||||
|
|
||||||
|
// Fix empty PHP_SELF
|
||||||
|
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||||
|
if ( empty($PHP_SELF) )
|
||||||
|
$_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
|
||||||
|
|
||||||
if ( !(phpversion() >= '4.1') )
|
if ( !(phpversion() >= '4.1') )
|
||||||
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );
|
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );
|
||||||
|
Loading…
Reference in New Issue
Block a user