From 525d7066448cd123cec2019ac6a3171960adaca5 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 21 Oct 2013 17:47:24 +0300 Subject: [PATCH] fix for full restore --- web/schedule/restore/index.php | 26 ++++++++++++--------- web/templates/admin/list_backup_detail.html | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/web/schedule/restore/index.php b/web/schedule/restore/index.php index bdc3d22a37..c37c8046f9 100644 --- a/web/schedule/restore/index.php +++ b/web/schedule/restore/index.php @@ -23,17 +23,21 @@ if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']); if (!empty($_GET['type'])) { - 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'); - } else { - $_SESSION['restore_msg'] = implode('
', $output); - if (empty($_SESSION['restore_msg'])) { - $_SESSION['restore_msg'] = __('Error: vesta did not return any output.'); - } - if ($return_var == 4) { - $_SESSION['restore_msg'] = __('RESTORE_EXISTS'); - } + $restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir; +} else { + $restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup; +} + +exec ($restore_cmd, $output, $return_var); +if ($return_var == 0) { + $_SESSION['restore_msg'] = __('RESTORE_SCHEDULED'); +} else { + $_SESSION['restore_msg'] = implode('
', $output); + if (empty($_SESSION['restore_msg'])) { + $_SESSION['restore_msg'] = __('Error: vesta did not return any output.'); + } + if ($return_var == 4) { + $_SESSION['restore_msg'] = __('RESTORE_EXISTS'); } } diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index 9872c39fa1..8c898863be 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -2,7 +2,7 @@