PluginProbe ʕ •ᴥ•ʔ
JetBackup – Backup, Restore & Migrate / 1.5.4
JetBackup – Backup, Restore & Migrate v1.5.4
3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 1.6.11 1.6.12 1.6.13 1.6.15 1.6.5.1 1.6.8.8 1.6.9 1.6.9.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7.5 2.0.8.7 2.0.9.11 2.0.9.14 2.0.9.15 2.0.9.6 2.0.9.7 2.0.9.9 3.1.10.7 3.1.11.1 3.1.12.3 3.1.13.4 3.1.14.17 3.1.15.4 3.1.16.1 3.1.17.5 3.1.18.10 3.1.18.8 3.1.18.9 3.1.19.8 3.1.20.3 3.1.21.3 3.1.7.9 3.1.9.2 trunk 1.1.90 1.1.91 1.2.0 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2
backup / public / ajax / settings.php
backup / public / ajax Last commit date
awake.php 5 years ago bgLogin.php 5 years ago cancelBackup.php 5 years ago cancelDownload.php 5 years ago checkBackupCreation.php 5 years ago checkFreeMigration.php 5 years ago checkPHPVersionCompatibility.php 5 years ago checkRestoreCreation.php 5 years ago chooseProfile.php 5 years ago cloudDropbox.php 5 years ago createCloudUser.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 isBgUserExists.php 5 years ago isFeatureAvailable.php 5 years ago manualBackup.php 5 years ago modalBackupGuardDetails.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 sendUsageStatus.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
settings.php
158 lines
1 <?php
2 require_once(dirname(__FILE__).'/../boot.php');
3 $error = array();
4 $success = array('success'=>1);
5
6 if (backupGuardIsAjax() && isset($_POST['cancel'])) {
7 SGConfig::set('SG_NOTIFICATIONS_ENABLED', '0');
8 SGConfig::set('SG_NOTIFICATIONS_EMAIL_ADDRESS', '');
9
10 die(json_encode($success));
11 }
12
13 if (backupGuardIsAjax() && count($_POST)) {
14 $_POST = backupGuardRemoveSlashes($_POST);
15 $_POST = backupGuardSanitizeTextField($_POST);
16
17 $amountOfBackupsToKeep = (int)@$_POST['amount-of-backups-to-keep'];
18 if ($amountOfBackupsToKeep <= 0) {
19 $amountOfBackupsToKeep = SG_NUMBER_OF_BACKUPS_TO_KEEP;
20 }
21 SGConfig::set('SG_AMOUNT_OF_BACKUPS_TO_KEEP', $amountOfBackupsToKeep);
22
23 SGConfig::set('SG_NOTIFICATIONS_ENABLED', '0');
24 $emails = '';
25 if (isset($_POST['sgIsEmailNotification'])) {
26 $emails = @$_POST['sgUserEmail'];
27 $emailsArray = explode(',', $emails);
28
29 if (empty($emails)) {
30 array_push($error, _backupGuardT('Email is required.', true));
31 }
32
33 foreach ($emailsArray as $email) {
34 $email = trim($email);
35 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
36 array_push($error, _backupGuardT('Invalid email address.', true));
37 }
38 }
39
40 SGConfig::set('SG_NOTIFICATIONS_ENABLED', '1');
41 }
42 $ajaxInterval = (int)$_POST['ajaxInterval'];
43
44 if (count($error)) {
45 die(json_decode($error));
46 }
47
48 if (isset($_POST['sg-hide-ads'])) {
49 SGConfig::set('SG_DISABLE_ADS', '1');
50 }
51 else {
52 SGConfig::set('SG_DISABLE_ADS', '0');
53 }
54
55 if (isset($_POST['sg-download-via-php'])) {
56 SGConfig::set('SG_DOWNLOAD_VIA_PHP', '1');
57 }
58 else {
59 SGConfig::set('SG_DOWNLOAD_VIA_PHP', '0');
60 }
61
62 if (isset($_POST['sg-background-reload-method'])) {
63 SGConfig::set('SG_BACKGROUND_RELOAD_METHOD', (int)$_POST['sg-background-reload-method']);
64 }
65 else {
66 SGConfig::set('SG_BACKGROUND_RELOAD_METHOD', SG_RELOAD_METHOD_CURL);
67 }
68
69 if (isset($_POST['delete-backup-after-upload'])) {
70 SGConfig::set('SG_DELETE_BACKUP_AFTER_UPLOAD', '1');
71 }
72 else {
73 SGConfig::set('SG_DELETE_BACKUP_AFTER_UPLOAD', '0');
74 }
75
76 if (isset($_POST['delete-backup-from-cloud'])) {
77 SGConfig::set('SG_DELETE_BACKUP_FROM_CLOUD', '1');
78 }
79 else {
80 SGConfig::set('SG_DELETE_BACKUP_FROM_CLOUD', '0');
81 }
82
83 if (isset($_POST['alert-before-update'])) {
84 SGConfig::set('SG_ALERT_BEFORE_UPDATE', '1');
85 }
86 else {
87 SGConfig::set('SG_ALERT_BEFORE_UPDATE', '0');
88 }
89
90 if (isset($_POST['show-statistics-widget'])) {
91 SGConfig::set('SG_SHOW_STATISTICS_WIDGET', '1');
92
93 }
94 else {
95 SGConfig::set('SG_SHOW_STATISTICS_WIDGET', '0');
96 }
97
98 if (isset($_POST['ftp-passive-mode'])) {
99 SGConfig::set('SG_FTP_PASSIVE_MODE', '1');
100 }
101 else {
102 SGConfig::set('SG_FTP_PASSIVE_MODE', '0');
103 }
104
105 if (isset($_POST['sg-number-of-rows-to-backup'])) {
106 SGConfig::set('SG_BACKUP_DATABASE_INSERT_LIMIT', (int)$_POST['sg-number-of-rows-to-backup']);
107 }
108 else {
109 SGConfig::set('SG_BACKUP_DATABASE_INSERT_LIMIT', SG_BACKUP_DATABASE_INSERT_LIMIT);
110 }
111
112 $backupFileName = 'sg_backup_';
113 if (isset($_POST['backup-file-name'])) {
114 $backupFileName = $_POST['backup-file-name'];
115 }
116
117 $isReloadingsEnabled = 0;
118 if (isset($_POST['backup-with-reloadings'])) {
119 $isReloadingsEnabled = 1;
120 }
121
122 if (isset($_POST['sg-paths-to-exclude'])) {
123 SGConfig::set('SG_PATHS_TO_EXCLUDE', $_POST['sg-paths-to-exclude']);
124 }
125 else {
126 SGConfig::set('SG_PATHS_TO_EXCLUDE', '');
127 }
128
129 if (isset($_POST['sg-tables-to-exclude'])) {
130 SGConfig::set('SG_TABLES_TO_EXCLUDE', $_POST['sg-tables-to-exclude']);
131 }
132 else {
133 SGConfig::set('SG_TABLES_TO_EXCLUDE', '');
134 }
135
136 if (isset($_POST['sg-upload-cloud-chunk-size'])) {
137 SGConfig::set('SG_BACKUP_CLOUD_UPLOAD_CHUNK_SIZE', $_POST['sg-upload-cloud-chunk-size']);
138 }
139 else {
140 SGConfig::set('SG_BACKUP_CLOUD_UPLOAD_CHUNK_SIZE', '');
141 }
142
143 SGConfig::set('SG_BACKUP_WITH_RELOADINGS', $isReloadingsEnabled);
144 SGConfig::set('SG_BACKUP_FILE_NAME_PREFIX', $backupFileName);
145 SGConfig::set('SG_AJAX_REQUEST_FREQUENCY', $ajaxInterval);
146 SGConfig::set('SG_NOTIFICATIONS_EMAIL_ADDRESS', $emails);
147 die(json_encode($success));
148 }
149
150 if (backupGuardIsAjax() && $_SERVER['REQUEST_METHOD'] === 'GET') {
151 if ($_GET["type"] == "updateSetting") {
152 //disable alert-before-update from updates page
153 if (isset($_GET["alert-before-update"])) {
154 SGConfig::set('SG_ALERT_BEFORE_UPDATE', $_GET["alert-before-update"]);
155 }
156 }
157 }
158