From 038bb803dbca63e7099fbfad753493e23c255a20 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 21 Dec 2015 14:12:30 +0100 Subject: [PATCH] fixing more path-related warnings when editing an ftp-user, refs #1578 --- customer_ftp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/customer_ftp.php b/customer_ftp.php index 2605793e..af633872 100644 --- a/customer_ftp.php +++ b/customer_ftp.php @@ -254,7 +254,7 @@ if ($page == 'overview') { 'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility 'USR_NAME' => $username, 'USR_PASS' => $password, - 'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot']))) + 'USR_PATH' => makeCorrectDir(str_replace($userinfo['documentroot'], "/", $path)) ); $def_language = $userinfo['def_language']; @@ -417,7 +417,7 @@ if ($page == 'overview') { redirectTo($filename, array('page' => $page, 's' => $s)); } else { if (strpos($result['homedir'], $userinfo['documentroot']) === 0) { - $homedir = substr($result['homedir'], strlen($userinfo['documentroot'])); + $homedir = str_replace($userinfo['documentroot'], "/", $row['homedir']); } else { $homedir = $result['homedir']; }