Skip to content

Commit cd195b5

Browse files
committed
Fix issues for ftp
1 parent 88c6bc2 commit cd195b5

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

web/add/web/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
$v_ftp_user_data['is_new'] = 1;
343343
}
344344

345-
$v_ftp_username = preg_replace("/^".$user."_/", "", $v_ftp_user_data['v_ftp_user']);
345+
$v_ftp_username = $user.'_'.$v_ftp_user_data['v_ftp_user'];
346346
$v_ftp_users_updated[] = array(
347347
'is_new' => $v_ftp_user_data['is_new'],
348348
'v_ftp_user' => $return_var == 0 ? $v_ftp_username_full : $v_ftp_username,

web/js/pages/add_web.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
4242
if (hint.trim() == '') {
4343
$(elm).parent().find('.hint').html('');
4444
}
45-
46-
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
47-
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
48-
}
45+
4946
hint = hint.replace(/[^\w\d]/gi, '');
5047

5148
$(elm).parent().find('.v-ftp-user').val(hint);

web/js/pages/edit_web.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
4242
$(elm).parent().find('.hint').html('');
4343
}
4444

45-
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
46-
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
47-
}
4845
hint = hint.replace(/[^\w\d]/gi, '');
4946

5047
$(elm).parent().find('.v-ftp-user').val(hint);

0 commit comments

Comments
 (0)