mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Fixed edit empty ftp user domain; Fixed hints updates on data insertion inside inputs; Fixed bug with resetting passwords for FTP user accounts;
This commit is contained in:
parent
b7724e5b7e
commit
47ade32146
3 changed files with 39 additions and 37 deletions
|
@ -431,7 +431,7 @@ if (!empty($_POST['save'])) {
|
|||
$v_ftp_users_updated = array();
|
||||
foreach ($_POST['v_ftp_user'] as $i => $v_ftp_user_data) {
|
||||
$v_ftp_user_data['v_ftp_user'] = preg_replace("/^".$user."_/i", "", $v_ftp_user_data['v_ftp_user']);
|
||||
if ($v_ftp_user_data['is_new'] == 1) {
|
||||
if ($v_ftp_user_data['is_new'] == 1 && !empty($_POST['v_ftp'])) {
|
||||
if ((!empty($v_ftp_user_data['v_ftp_email'])) && (!filter_var($v_ftp_user_data['v_ftp_email'], FILTER_VALIDATE_EMAIL))) $_SESSION['error_msg'] = __('Please enter valid email address.');
|
||||
if (empty($v_ftp_user_data['v_ftp_user'])) $errors[] = 'ftp user';
|
||||
if (empty($v_ftp_user_data['v_ftp_password'])) $errors[] = 'ftp user password';
|
||||
|
@ -495,6 +495,7 @@ if (!empty($_POST['save'])) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!empty($_POST['v_ftp'])) {
|
||||
// Change FTP Account
|
||||
if (empty($v_ftp_user_data['v_ftp_user'])) $errors[] = __('ftp user');
|
||||
if (empty($v_ftp_user_data['v_ftp_password'])) $errors[] = __('ftp user password');
|
||||
|
@ -513,7 +514,7 @@ if (!empty($_POST['save'])) {
|
|||
$v_ftp_username = escapeshellarg($v_ftp_username);
|
||||
$v_ftp_user_data['v_ftp_password'] = escapeshellarg(trim($v_ftp_user_data['v_ftp_password']));
|
||||
exec (VESTA_CMD."v-change-web-domain-ftp-path ".$v_username." ".$v_domain." ".$v_ftp_username." ".$v_ftp_user_data['v_ftp_path'], $output, $return_var);
|
||||
if ($v_ftp_user_data['v_ftp_password'] != "••••••••" && !empty($v_ftp_user_data['v_ftp_password'])) {
|
||||
if ($v_ftp_user_data['v_ftp_password'] != "'••••••••'" && $v_ftp_user_data['v_ftp_password'] != "••••••••" && !empty($v_ftp_user_data['v_ftp_password'])) {
|
||||
exec (VESTA_CMD."v-change-web-domain-ftp-password ".$v_username." ".$v_domain." ".$v_ftp_username." ".$v_ftp_user_data['v_ftp_password'], $output, $return_var);
|
||||
}
|
||||
check_return_code($return_var, $output);
|
||||
|
@ -531,6 +532,7 @@ if (!empty($_POST['save'])) {
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Restart web server
|
||||
if (!empty($restart_web) && (empty($_SESSION['error_msg']))) {
|
||||
|
|
|
@ -21,7 +21,7 @@ App.Listeners.WEB.keypress_ftp_username = function() {
|
|||
App.Actions.WEB.update_ftp_username_hint(ref, current_val);
|
||||
}
|
||||
|
||||
ref.bind('keypress', function(evt) {
|
||||
ref.bind('keypress input', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
var elm = $(evt.target);
|
||||
|
@ -32,7 +32,7 @@ App.Listeners.WEB.keypress_ftp_username = function() {
|
|||
}
|
||||
|
||||
App.Listeners.WEB.keypress_domain_name = function() {
|
||||
$('#v_domain').bind('keypress', function(evt) {
|
||||
$('#v_domain').bind('keypress input', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
//var elm = $(evt.target);
|
||||
|
@ -67,7 +67,7 @@ App.Listeners.WEB.keypress_ftp_path = function() {
|
|||
App.Actions.WEB.update_ftp_path_hint(ref, current_val);
|
||||
}
|
||||
|
||||
ref.bind('keypress', function(evt) {
|
||||
ref.bind('keypress input', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
var elm = $(evt.target);
|
||||
|
|
|
@ -21,7 +21,7 @@ App.Listeners.WEB.keypress_ftp_username = function() {
|
|||
App.Actions.WEB.update_ftp_username_hint(ref, current_val);
|
||||
}
|
||||
|
||||
ref.bind('keypress', function(evt) {
|
||||
ref.bind('keypress input', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
var elm = $(evt.target);
|
||||
|
@ -57,7 +57,7 @@ App.Listeners.WEB.keypress_ftp_path = function() {
|
|||
App.Actions.WEB.update_ftp_path_hint(ref, current_val);
|
||||
}
|
||||
|
||||
ref.bind('keypress', function(evt) {
|
||||
ref.bind('keypress input', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
var elm = $(evt.target);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue