cancelBackup.php
3 years ago
cancelDownload.php
3 years ago
checkBackupCreation.php
3 years ago
checkFreeMigration.php
3 years ago
checkPHPVersionCompatibility.php
3 years ago
checkRestoreCreation.php
3 years ago
chooseProfile.php
3 years ago
cloudDropbox.php
3 years ago
curlChecker.php
3 years ago
deleteBackup.php
3 years ago
downloadBackup.php
3 years ago
getAction.php
3 years ago
getBackupContent.php
3 years ago
getRunningActions.php
3 years ago
hideNotice.php
3 years ago
importBackup.php
3 years ago
isBgUserExists.php
3 years ago
isFeatureAvailable.php
3 years ago
manualBackup.php
3 years ago
modalImport.php
3 years ago
modalManualBackup.php
3 years ago
modalManualRestore.php
3 years ago
modalPrivacy.php
3 years ago
modalReview.php
3 years ago
modalTerms.php
3 years ago
resetStatus.php
3 years ago
restore.php
3 years ago
reviewBannerActions.php
3 years ago
schedule.php
3 years ago
setReviewPopupState.php
3 years ago
settings.php
3 years ago
restore.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__) . '/../boot.php'); |
| 4 | require_once(SG_BACKUP_PATH . 'SGBackup.php'); |
| 5 | |
| 6 | if (backupGuardIsAjax() && count($_POST)) { |
| 7 | $error = array(); |
| 8 | try { |
| 9 | define('BG_EXTERNAL_RESTORE_RUNNING', true); |
| 10 | |
| 11 | $backupName = sanitize_textarea_field($_POST['bname']); |
| 12 | $restoreMode = isset($_POST['type'])? sanitize_textarea_field($_POST['type']) : SG_RESTORE_MODE_FULL; |
| 13 | |
| 14 | $backup = new SGBackup(); |
| 15 | $backup->cleanUpRestoreState($backupName); |
| 16 | $backup->restore($backupName, null, $restoreMode); |
| 17 | } catch (SGException $exception) { |
| 18 | array_push($error, $exception->getMessage()); |
| 19 | die(json_encode($error)); |
| 20 | } |
| 21 | } |
| 22 |