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
checkFreeMigration.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__) . '/../boot.php'); |
| 4 | require_once(SG_LIB_PATH . 'BackupGuard/Core/SGBGArchive.php'); |
| 5 | |
| 6 | $pluginCapabilities = backupGuardGetCapabilities(); |
| 7 | |
| 8 | if ($pluginCapabilities != BACKUP_GUARD_CAPABILITIES_FREE && $pluginCapabilities != BACKUP_GUARD_CAPABILITIES_SILVER) { |
| 9 | return ''; |
| 10 | } |
| 11 | $backupName = sanitize_text_field($_POST['bname']); |
| 12 | |
| 13 | $path = SG_BACKUP_DIRECTORY . $backupName . '/' . $backupName . '.sgbp'; |
| 14 | |
| 15 | $archive = new SGBGArchive($path); |
| 16 | $archive->open('r'); |
| 17 | $headers = $archive->getHeaders(); |
| 18 | |
| 19 | $siteUrl = $headers['siteUrl']; |
| 20 | $dbPrefix = $headers['dbPrefix']; |
| 21 | |
| 22 | if ($siteUrl != SG_SITE_URL) { |
| 23 | printf("The source url (%s) doesn’t match the current url (%s). This is considered as migration and it is not available in this plan. <a href='%s' target='_blank'>Upgrade now</a>", $siteUrl, SG_SITE_URL, BG_UPGRADE_URL); |
| 24 | } else if ($dbPrefix != SG_ENV_DB_PREFIX) { |
| 25 | printf("The source db prefix (%s) doesn’t match the current db prefix (%s). This is considered as migration and it is not available in this plan. |
| 26 | You can change the current db prefix manually or upgrade. <a href='%s' target='_blank'>Upgrade now</a>", $dbPrefix, SG_ENV_DB_PREFIX, BG_UPGRADE_URL); |
| 27 | } |
| 28 |