fixing more path-related warnings when editing an ftp-user, refs #1578

This commit is contained in:
Michael Kaufmann (d00p)
2015-12-21 14:12:30 +01:00
parent 67b85e5708
commit 038bb803db

View File

@@ -254,7 +254,7 @@ if ($page == 'overview') {
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility 'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'USR_NAME' => $username, 'USR_NAME' => $username,
'USR_PASS' => $password, 'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot']))) 'USR_PATH' => makeCorrectDir(str_replace($userinfo['documentroot'], "/", $path))
); );
$def_language = $userinfo['def_language']; $def_language = $userinfo['def_language'];
@@ -417,7 +417,7 @@ if ($page == 'overview') {
redirectTo($filename, array('page' => $page, 's' => $s)); redirectTo($filename, array('page' => $page, 's' => $s));
} else { } else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) { if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = substr($result['homedir'], strlen($userinfo['documentroot'])); $homedir = str_replace($userinfo['documentroot'], "/", $row['homedir']);
} else { } else {
$homedir = $result['homedir']; $homedir = $result['homedir'];
} }