WordPress Backup and Migrate Plugin – Backup Guard - Version 1.3.3

Version Description

  • Fixed PHP warnings
Download this release

Release Info

Developer BackupGuard
Plugin Icon 128x128 WordPress Backup and Migrate Plugin – Backup Guard
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

README.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://backup-guard.com/products/backup-wordpress
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.4.1
9
- Stable tag: 1.3.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -157,6 +157,9 @@ When you are facing an issue of any kind with any of our products, the first thi
157
  6. Site backup customization
158
 
159
  == Changelog ==
 
 
 
160
  = 1.3.2 =
161
  * Multiple modal opening issue.
162
  When pressing on backup button multiple times, many modals where opening.
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.4.1
9
+ Stable tag: 1.3.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
157
  6. Site backup customization
158
 
159
  == Changelog ==
160
+ = 1.3.3 =
161
+ * Fixed PHP warnings
162
+
163
  = 1.3.2 =
164
  * Multiple modal opening issue.
165
  When pressing on backup button multiple times, many modals where opening.
backup.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
- * Version: 1.3.2
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
@@ -16,7 +16,7 @@ if (function_exists('activate_backup_guard')) {
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
- define('SG_BACKUP_GUARD_VERSION', '1.3.2');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
+ * Version: 1.3.3
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
+ define('SG_BACKUP_GUARD_VERSION', '1.3.3');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
com/core/SGBoot.php CHANGED
@@ -6,16 +6,16 @@ if (version_compare(PHP_VERSION, '5.3.3', '<')) {
6
 
7
  require_once(SG_EXCEPTION_PATH.'SGException.php');
8
  require_once(SG_CORE_PATH.'functions.php');
9
- @include_once(SG_CORE_PATH.'functions.silver.php');
10
- @include_once(SG_CORE_PATH.'functions.gold.php');
11
- @include_once(SG_CORE_PATH.'functions.platinum.php');
12
  require_once(SG_CORE_PATH.'SGPing.php');
13
  require_once(SG_DATABASE_PATH.'SGDatabase.php');
14
  require_once(SG_CORE_PATH.'SGConfig.php');
15
  require_once(SG_NOTICE_PATH.'SGNotice.php');
16
  require_once(SG_NOTICE_PATH.'SGNoticeHandler.php');
17
- @include_once(SG_BACKUP_PATH.'SGBackupSchedule.php');
18
- @include_once(SG_EXTENSION_PATH.'SGExtension.php');
19
 
20
  class SGBoot
21
  {
6
 
7
  require_once(SG_EXCEPTION_PATH.'SGException.php');
8
  require_once(SG_CORE_PATH.'functions.php');
9
+ backupGuardIncludeFile(SG_CORE_PATH.'functions.silver.php');
10
+ backupGuardIncludeFile(SG_CORE_PATH.'functions.gold.php');
11
+ backupGuardIncludeFile(SG_CORE_PATH.'functions.platinum.php');
12
  require_once(SG_CORE_PATH.'SGPing.php');
13
  require_once(SG_DATABASE_PATH.'SGDatabase.php');
14
  require_once(SG_CORE_PATH.'SGConfig.php');
15
  require_once(SG_NOTICE_PATH.'SGNotice.php');
16
  require_once(SG_NOTICE_PATH.'SGNoticeHandler.php');
17
+ backupGuardIncludeFile(SG_BACKUP_PATH.'SGBackupSchedule.php');
18
+ backupGuardIncludeFile(SG_EXTENSION_PATH.'SGExtension.php');
19
 
20
  class SGBoot
21
  {
com/core/backup/SGBackup.php CHANGED
@@ -2,11 +2,11 @@
2
  require_once(SG_BACKUP_PATH.'SGBackupLog.php');
3
  require_once(SG_RESTORE_PATH.'SGExternalRestore.php');
4
  require_once(SG_LIB_PATH.'SGState.php');
5
- @include_once(SG_LIB_PATH.'SGBackgroundMode.php');
6
  require_once(SG_BACKUP_PATH.'SGBackupFiles.php');
7
  require_once(SG_BACKUP_PATH.'SGBackupDatabase.php');
8
- @include_once(SG_BACKUP_PATH.'SGBackupStorage.php');
9
- @include_once(SG_BACKUP_PATH.'SGBackupMailNotification.php');
10
  require_once(SG_LOG_PATH.'SGFileLogHandler.php');
11
  require_once(SG_LIB_PATH.'SGReloader.php');
12
  require_once(SG_LIB_PATH.'SGCallback.php');
@@ -1173,7 +1173,7 @@ class SGBackup implements SGIBackupDelegate
1173
  foreach ($files as $file) {
1174
  $fileInfo = self::getBackupFileInfo($file);
1175
 
1176
- if (@$fileInfo['extension'] == SGBP_EXT) {
1177
  @mkdir($path.$fileInfo['filename'], 0777);
1178
 
1179
  if(file_exists($path.$fileInfo['filename'])) {
2
  require_once(SG_BACKUP_PATH.'SGBackupLog.php');
3
  require_once(SG_RESTORE_PATH.'SGExternalRestore.php');
4
  require_once(SG_LIB_PATH.'SGState.php');
5
+ backupGuardIncludeFile(SG_LIB_PATH.'SGBackgroundMode.php');
6
  require_once(SG_BACKUP_PATH.'SGBackupFiles.php');
7
  require_once(SG_BACKUP_PATH.'SGBackupDatabase.php');
8
+ backupGuardIncludeFile(SG_BACKUP_PATH.'SGBackupStorage.php');
9
+ backupGuardIncludeFile(SG_BACKUP_PATH.'SGBackupMailNotification.php');
10
  require_once(SG_LOG_PATH.'SGFileLogHandler.php');
11
  require_once(SG_LIB_PATH.'SGReloader.php');
12
  require_once(SG_LIB_PATH.'SGCallback.php');
1173
  foreach ($files as $file) {
1174
  $fileInfo = self::getBackupFileInfo($file);
1175
 
1176
+ if (!empty($fileInfo['extension']) && $fileInfo['extension'] == SGBP_EXT) {
1177
  @mkdir($path.$fileInfo['filename'], 0777);
1178
 
1179
  if(file_exists($path.$fileInfo['filename'])) {
com/core/backup/SGBackupDatabase.php CHANGED
@@ -4,7 +4,7 @@ require_once(SG_BACKUP_PATH.'SGIBackupDelegate.php');
4
  require_once(SG_LIB_PATH.'SGDBState.php');
5
  require_once(SG_LIB_PATH.'SGMysqldump.php');
6
  require_once(SG_LIB_PATH.'SGCharsetHandler.php');
7
- @include_once(SG_LIB_PATH.'SGMigrate.php');
8
 
9
  class SGBackupDatabase implements SGIMysqldumpDelegate
10
  {
4
  require_once(SG_LIB_PATH.'SGDBState.php');
5
  require_once(SG_LIB_PATH.'SGMysqldump.php');
6
  require_once(SG_LIB_PATH.'SGCharsetHandler.php');
7
+ backupGuardIncludeFile(SG_LIB_PATH.'SGMigrate.php');
8
 
9
  class SGBackupDatabase implements SGIMysqldumpDelegate
10
  {
com/core/backup/SGBackupStorage.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  require_once(SG_BACKUP_PATH.'SGBackup.php');
3
- @include_once(SG_STORAGE_PATH.'SGGoogleDriveStorage.php');
4
- @include_once(SG_STORAGE_PATH.'SGDropboxStorage.php');
5
- @include_once(SG_STORAGE_PATH.'SGOneDriveStorage.php');
6
- @include_once(SG_STORAGE_PATH.'SGFTPManager.php');
7
- @include_once(SG_STORAGE_PATH.'SGAmazonStorage.php');
8
 
9
  class SGBackupStorage implements SGIStorageDelegate
10
  {
1
  <?php
2
  require_once(SG_BACKUP_PATH.'SGBackup.php');
3
+ backupGuardIncludeFile(SG_STORAGE_PATH.'SGGoogleDriveStorage.php');
4
+ backupGuardIncludeFile(SG_STORAGE_PATH.'SGDropboxStorage.php');
5
+ backupGuardIncludeFile(SG_STORAGE_PATH.'SGOneDriveStorage.php');
6
+ backupGuardIncludeFile(SG_STORAGE_PATH.'SGFTPManager.php');
7
+ backupGuardIncludeFile(SG_STORAGE_PATH.'SGAmazonStorage.php');
8
 
9
  class SGBackupStorage implements SGIStorageDelegate
10
  {
com/core/functions.php CHANGED
@@ -722,3 +722,10 @@ function backupGuardGetFileSelectiveRestore()
722
  </div>
723
  <?php
724
  }
 
 
 
 
 
 
 
722
  </div>
723
  <?php
724
  }
725
+
726
+ function backupGuardIncludeFile($filePath)
727
+ {
728
+ if (file_exists($filePath)) {
729
+ include_once($filePath);
730
+ }
731
+ }
public/js/main.js CHANGED
@@ -95,7 +95,9 @@ sgBackup.initModals = function(){
95
  body.append(modal);
96
  }
97
  sgBackup.showAjaxSpinner('#sg-content-wrapper');
98
- sgBackup.disableUi();
 
 
99
 
100
  var ajaxHandler = new sgRequestHandler(url, {
101
  param: param,
@@ -107,7 +109,9 @@ sgBackup.initModals = function(){
107
  ajaxHandler.dataType = 'html';
108
  ajaxHandler.callback = function(data, error) {
109
  sgBackup.hideAjaxSpinner();
110
- sgBackup.enableUi();
 
 
111
  if (error===false) {
112
  jQuery('#sg-modal').append(data);
113
  }
95
  body.append(modal);
96
  }
97
  sgBackup.showAjaxSpinner('#sg-content-wrapper');
98
+ if (typeof sgBackup.disableUi == 'function') {
99
+ sgBackup.disableUi();
100
+ }
101
 
102
  var ajaxHandler = new sgRequestHandler(url, {
103
  param: param,
109
  ajaxHandler.dataType = 'html';
110
  ajaxHandler.callback = function(data, error) {
111
  sgBackup.hideAjaxSpinner();
112
+ if (typeof sgBackup.enableUi == 'function') {
113
+ sgBackup.enableUi();
114
+ }
115
  if (error===false) {
116
  jQuery('#sg-modal').append(data);
117
  }