mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Siteurl autoupdate now requires RELOCATE flag - http://mosquito.wordpress.org/view.php?id=602
git-svn-id: http://svn.automattic.com/wordpress/trunk@2130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
25e08bf743
commit
99ea3245af
@ -9,12 +9,13 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Cache-Control: no-cache, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
// If someone has moved WordPress let's try to detect it
|
||||
if ( defined('RELOCATE') ) { // Move flag is set
|
||||
if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
|
||||
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
||||
|
||||
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
|
||||
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
|
||||
}
|
||||
|
||||
switch($action) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user