|
@@ 812-819 (lines=8) @@
|
| 809 |
|
$ftp->chdir(preg_replace('~^/home[2]?/[^/]+?~', '', $_POST['ftp_path'])); |
| 810 |
|
} |
| 811 |
|
|
| 812 |
|
if (!in_array($_POST['ftp_path'], array('', '/'))) |
| 813 |
|
{ |
| 814 |
|
$ftp_root = strtr($boarddir, array($_POST['ftp_path'] => '')); |
| 815 |
|
if (substr($ftp_root, -1) == '/' && ($_POST['ftp_path'] == '' || substr($_POST['ftp_path'], 0, 1) == '/')) |
| 816 |
|
$ftp_root = substr($ftp_root, 0, -1); |
| 817 |
|
} |
| 818 |
|
else |
| 819 |
|
$ftp_root = $boarddir; |
| 820 |
|
|
| 821 |
|
$_SESSION['pack_ftp'] = array( |
| 822 |
|
'server' => $_POST['ftp_server'], |
|
@@ 1078-1085 (lines=8) @@
|
| 1075 |
|
} |
| 1076 |
|
else |
| 1077 |
|
{ |
| 1078 |
|
if (!in_array($_POST['ftp_path'], array('', '/'))) |
| 1079 |
|
{ |
| 1080 |
|
$ftp_root = strtr($boarddir, array($_POST['ftp_path'] => '')); |
| 1081 |
|
if (substr($ftp_root, -1) == '/' && ($_POST['ftp_path'] == '' || $_POST['ftp_path'][0] == '/')) |
| 1082 |
|
$ftp_root = substr($ftp_root, 0, -1); |
| 1083 |
|
} |
| 1084 |
|
else |
| 1085 |
|
$ftp_root = $boarddir; |
| 1086 |
|
|
| 1087 |
|
$_SESSION['pack_ftp'] = array( |
| 1088 |
|
'server' => $_POST['ftp_server'], |