unified error msg variable

This commit is contained in:
Serghey Rodin 2013-11-02 16:43:40 +02:00
commit 849d536993
7 changed files with 36 additions and 35 deletions

View file

@ -26,14 +26,14 @@ if (!empty($_POST['udir'])) $udir = escapeshellarg(implode(",",$_POST['udir']));
if ($action == 'restore') {
exec (VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir, $output, $return_var);
if ($return_var == 0) {
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
$_SESSION['error_msg'] = __('RESTORE_SCHEDULED');
} else {
$_SESSION['restore_msg'] = implode('<br>', $output);
if (empty($_SESSION['restore_msg'])) {
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
$_SESSION['error_msg'] = implode('<br>', $output);
if (empty($_SESSION['error_msg'])) {
$_SESSION['error_msg'] = __('Error: vesta did not return any output.');
}
if ($return_var == 4) {
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
$_SESSION['error_msg'] = __('RESTORE_EXISTS');
}
}
}