WordPress Backup and Migrate Plugin – Backup Guard - Version 1.5.0

Version Description

  • Fixed the database restore process failure which was caused by the backup tree file
Download this release

Release Info

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

Code changes from version 1.4.9 to 1.5.0

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.5.3
9
- Stable tag: 1.4.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -167,6 +167,9 @@ When you are facing an issue of any kind with any of our products, the first thi
167
  6. Site backup customization
168
 
169
  == Changelog ==
 
 
 
170
  = 1.4.9 =
171
  * Fixed messages
172
 
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.5.3
9
+ Stable tag: 1.5.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
167
  6. Site backup customization
168
 
169
  == Changelog ==
170
+ = 1.5.0 =
171
+ * Fixed the database restore process failure which was caused by the backup tree file
172
+
173
  = 1.4.9 =
174
  * Fixed messages
175
 
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.4.9
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.4.9');
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.5.0
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.5.0');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
com/core/backup/SGBackup.php CHANGED
@@ -387,6 +387,11 @@ class SGBackup implements SGIBackupDelegate
387
  }
388
 
389
  if ($this->state->getType() == SG_STATE_TYPE_FILE) {
 
 
 
 
 
390
  $treeFilePath = SG_BACKUP_DIRECTORY.$this->fileName.'/'.SG_TREE_FILE_NAME;
391
  $treeFilePathWithoutRootDir = substr($treeFilePath, strlen($rootDirectory));
392
  $this->backupFiles->addDontExclude($treeFilePath);
@@ -394,6 +399,7 @@ class SGBackup implements SGIBackupDelegate
394
  $allItems = $backupItems?explode(',', $backupItems):array();
395
  $allItems[] = $treeFilePathWithoutRootDir;
396
  $options['SG_BACKUP_FILE_PATHS'] = implode(',', $allItems);
 
397
 
398
  $this->backupFiles->setPendingStorageUploads($this->pendingStorageUploads);
399
  $this->backupFiles->backup($this->filesBackupPath, $options, $this->state);
@@ -512,8 +518,8 @@ class SGBackup implements SGIBackupDelegate
512
  private function clear()
513
  {
514
  @unlink(dirname($this->filesBackupPath).'/'.SG_REPORT_FILE_NAME);
515
-
516
- @unlink(SG_BACKUP_DIRECTORY.$this->fileName.'/'.SG_TREE_FILE_NAME);
517
  @unlink(SG_BACKUP_DIRECTORY.SG_STATE_FILE_NAME);
518
  @unlink(SG_BACKUP_DIRECTORY.SG_RELOADER_STATE_FILE_NAME);
519
  @unlink(SG_PING_FILE_PATH);
387
  }
388
 
389
  if ($this->state->getType() == SG_STATE_TYPE_FILE) {
390
+
391
+ /*
392
+ * ToDo check this logic
393
+ * */
394
+ /*
395
  $treeFilePath = SG_BACKUP_DIRECTORY.$this->fileName.'/'.SG_TREE_FILE_NAME;
396
  $treeFilePathWithoutRootDir = substr($treeFilePath, strlen($rootDirectory));
397
  $this->backupFiles->addDontExclude($treeFilePath);
399
  $allItems = $backupItems?explode(',', $backupItems):array();
400
  $allItems[] = $treeFilePathWithoutRootDir;
401
  $options['SG_BACKUP_FILE_PATHS'] = implode(',', $allItems);
402
+ */
403
 
404
  $this->backupFiles->setPendingStorageUploads($this->pendingStorageUploads);
405
  $this->backupFiles->backup($this->filesBackupPath, $options, $this->state);
518
  private function clear()
519
  {
520
  @unlink(dirname($this->filesBackupPath).'/'.SG_REPORT_FILE_NAME);
521
+ /// ToDo check this logic
522
+ //@unlink(SG_BACKUP_DIRECTORY.$this->fileName.'/'.SG_TREE_FILE_NAME);
523
  @unlink(SG_BACKUP_DIRECTORY.SG_STATE_FILE_NAME);
524
  @unlink(SG_BACKUP_DIRECTORY.SG_RELOADER_STATE_FILE_NAME);
525
  @unlink(SG_PING_FILE_PATH);
com/core/backup/SGBackupFiles.php CHANGED
@@ -326,8 +326,11 @@ class SGBackupFiles implements SGArchiveDelegate
326
  private function prepareFileTree($allItems)
327
  {
328
  $entries = array();
329
-
330
- file_put_contents(dirname($this->filePath).'/'.SG_TREE_FILE_NAME, "");
 
 
 
331
 
332
  foreach ($allItems as $item) {
333
  $path = $this->rootDirectory.$item;
326
  private function prepareFileTree($allItems)
327
  {
328
  $entries = array();
329
+
330
+ /**
331
+ * ToDo check this logic
332
+ */
333
+ //file_put_contents(dirname($this->filePath).'/'.SG_TREE_FILE_NAME, "");
334
 
335
  foreach ($allItems as $item) {
336
  $path = $this->rootDirectory.$item;
public/img/backup-icons-old.png DELETED
Binary file