Jaap Marcus 5 лет назад
Родитель
Сommit
cd195b572e
3 измененных файлов с 2 добавлено и 8 удалено
  1. 1 1
      web/add/web/index.php
  2. 1 4
      web/js/pages/add_web.js
  3. 0 3
      web/js/pages/edit_web.js

+ 1 - 1
web/add/web/index.php

@@ -342,7 +342,7 @@ if (!empty($_POST['ok'])) {
                     $v_ftp_user_data['is_new'] = 1;
                 }
 
-                $v_ftp_username = preg_replace("/^".$user."_/", "", $v_ftp_user_data['v_ftp_user']);
+                $v_ftp_username = $user.'_'.$v_ftp_user_data['v_ftp_user'];
                 $v_ftp_users_updated[] = array(
                     'is_new'            => $v_ftp_user_data['is_new'],
                     'v_ftp_user'        => $return_var == 0 ? $v_ftp_username_full : $v_ftp_username,

+ 1 - 4
web/js/pages/add_web.js

@@ -42,10 +42,7 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
     if (hint.trim() == '') {
         $(elm).parent().find('.hint').html('');
     }
-
-    if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
-        hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
-    }
+    
     hint = hint.replace(/[^\w\d]/gi, '');
 
     $(elm).parent().find('.v-ftp-user').val(hint);

+ 0 - 3
web/js/pages/edit_web.js

@@ -42,9 +42,6 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
         $(elm).parent().find('.hint').html('');
     }
 
-    if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
-        hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
-    }
     hint = hint.replace(/[^\w\d]/gi, '');
 
     $(elm).parent().find('.v-ftp-user').val(hint);