mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Make the template editor use the home setting to find the index.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1139d6fd36
commit
849ff56997
@ -96,8 +96,15 @@ default:
|
||||
}
|
||||
}
|
||||
|
||||
$file = validate_file($file);
|
||||
$real_file = '../' . $file;
|
||||
$home = get_settings('home');
|
||||
if ($home != '' && ('index.php' == $file || get_settings('blogfilename') == $file)) {
|
||||
$home_root = str_replace('http://', '', $home);
|
||||
$home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
|
||||
$real_file = $_SERVER['DOCUMENT_ROOT'] . $home_root . '/' . $file;
|
||||
} else {
|
||||
$file = validate_file($file);
|
||||
$real_file = '../' . $file;
|
||||
}
|
||||
|
||||
if (!is_file($real_file))
|
||||
$error = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user