awake.php
5 years ago
cancelBackup.php
5 years ago
cancelDownload.php
5 years ago
checkBackupCreation.php
5 years ago
checkPHPVersionCompatibility.php
5 years ago
checkRestoreCreation.php
5 years ago
cloudDropbox.php
5 years ago
curlChecker.php
5 years ago
deleteBackup.php
5 years ago
dismissDiscountNotice.php
5 years ago
downloadBackup.php
5 years ago
getAction.php
5 years ago
getBackupContent.php
5 years ago
getRunningActions.php
5 years ago
hideNotice.php
5 years ago
importBackup.php
5 years ago
isFeatureAvailable.php
5 years ago
manualBackup.php
5 years ago
modalImport.php
5 years ago
modalManualBackup.php
5 years ago
modalManualRestore.php
5 years ago
modalPrivacy.php
5 years ago
modalReview.php
5 years ago
modalTerms.php
5 years ago
resetStatus.php
5 years ago
restore.php
5 years ago
reviewBannerActions.php
5 years ago
schedule.php
5 years ago
setReviewPopupState.php
5 years ago
setUserInfoVerificationPopupState.php
5 years ago
settings.php
5 years ago
storeSubscriberInfo.php
5 years ago
storeSurveyResult.php
5 years ago
checkRestoreCreation.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__).'/../boot.php'); |
| 4 | require_once(SG_BACKUP_PATH.'SGBackup.php'); |
| 5 | $runningActions = array(); |
| 6 | |
| 7 | if (backupGuardIsAjax()) { |
| 8 | $timeout = 10; //in sec |
| 9 | while ($timeout != 0) { |
| 10 | sleep(1); |
| 11 | $timeout--; |
| 12 | $created = SGConfig::get('SG_RUNNING_ACTION', true); |
| 13 | |
| 14 | if ($created) { |
| 15 | $runningActions = SGBackup::getRunningActions(); |
| 16 | // when there are multiple uncompleted actions |
| 17 | if ($runningActions && count($runningActions) == 1 && $runningActions[0]['progress'] == 0) { |
| 18 | $actionId = $runningActions[0]['id']; |
| 19 | die(json_encode(array( |
| 20 | 'status' => 0, |
| 21 | 'external_enabled' => SGExternalRestore::isEnabled()?1:0, |
| 22 | 'external_url' => SGExternalRestore::getInstance()->getDestinationFileUrl() |
| 23 | ))); |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | $runningActions = SGBackup::getRunningActions(); |
| 28 | |
| 29 | if (empty($runningActions)) { |
| 30 | break; |
| 31 | } |
| 32 | } |
| 33 | if (!empty($runningActions)) { |
| 34 | SGBackup::cleanRunningActions($runningActions); |
| 35 | die(json_encode(array( |
| 36 | 'status' => 'cleaned' |
| 37 | ))); |
| 38 | } |
| 39 | |
| 40 | die('{"status":1}'); |
| 41 | } |
| 42 |