mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
fix for full restore
This commit is contained in:
parent
bfa65982ca
commit
525d706644
2 changed files with 16 additions and 12 deletions
|
@ -23,17 +23,21 @@ if ($_GET['type'] == 'cron') $cron = 'yes';
|
||||||
if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']);
|
if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']);
|
||||||
|
|
||||||
if (!empty($_GET['type'])) {
|
if (!empty($_GET['type'])) {
|
||||||
exec (VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir, $output, $return_var);
|
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir;
|
||||||
if ($return_var == 0) {
|
} else {
|
||||||
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
|
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup;
|
||||||
} else {
|
}
|
||||||
$_SESSION['restore_msg'] = implode('<br>', $output);
|
|
||||||
if (empty($_SESSION['restore_msg'])) {
|
exec ($restore_cmd, $output, $return_var);
|
||||||
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
|
if ($return_var == 0) {
|
||||||
}
|
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
|
||||||
if ($return_var == 4) {
|
} else {
|
||||||
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
|
$_SESSION['restore_msg'] = implode('<br>', $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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 12px 8px">
|
<td style="padding: 12px 8px">
|
||||||
<div class="submenu-button-block">
|
<div class="submenu-button-block">
|
||||||
<button class="submenu-button" onclick="location.href='/schedule/restore/'"> <?php print __('Restore All');?> </button>
|
<button class="submenu-button" onclick="location.href='/schedule/restore/?backup=<?php echo $_GET['backup'] ?>'"> <?php print __('Restore All');?> </button>
|
||||||
</div>
|
</div>
|
||||||
<div class="submenu-search-block">
|
<div class="submenu-search-block">
|
||||||
<form action="/search/" method="get">
|
<form action="/search/" method="get">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue