Use SCRIPT_FILENAME instead of PATH_TRANSLATED since PATH_TRANSLATED is not always set. Consolidate home path logic into get_home_path().

git-svn-id: https://develop.svn.wordpress.org/trunk@1995 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-12-23 00:53:56 +00:00
parent 978063ce7c
commit d4ba9cd960
2 changed files with 19 additions and 28 deletions

View File

@@ -6,15 +6,7 @@ $parent_file = 'options-general.php';
include('admin-header.php');
$home = get_settings('home');
if ( $home != '' && $home != get_settings('siteurl') ) {
$home_path = parse_url($home);
$home_path = $home_root['path'];
$root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["PATH_TRANSLATED"]);
$home_path = $root . $home_path . "/";
} else {
$home_path = ABSPATH;
}
$home_path = get_home_path();
if ( isset($_POST) ) {
if ( isset($_POST['permalink_structure']) ) {