Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid - Version 1.15.1

Version Description

Release date: May 18th, 2022

  • Bug fix: Fixed bad rewrite rules on restorations due to cached permalink settings.
Download this release

Release Info

Developer boldgrid
Plugin Icon 128x128 Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid
Version 1.15.1
Comparing to
See all releases

Code changes from version 1.15.0 to 1.15.1

admin/class-boldgrid-backup-admin-core.php CHANGED
@@ -1263,6 +1263,7 @@ class Boldgrid_Backup_Admin_Core {
1263
  * @see Boldgrid_Backup_Admin_Utility::update_siteurl()
1264
  * @global WP_Filesystem $wp_filesystem The WordPress Filesystem API global object.
1265
  * @global wpdb $wpdb The WordPress database class object.
 
1266
  *
1267
  * @param string $db_dump_filepath File path to the mysql dump file.
1268
  * @param string $db_prefix The database prefix to use, if restoring and it changed.
@@ -1333,6 +1334,23 @@ class Boldgrid_Backup_Admin_Core {
1333
  // Clear the WordPress cache.
1334
  wp_cache_flush();
1335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1336
  // Get the restored "siteurl" and "home".
1337
  $restored_wp_siteurl = get_option( 'siteurl' );
1338
  $restored_wp_home = get_option( 'home' );
1263
  * @see Boldgrid_Backup_Admin_Utility::update_siteurl()
1264
  * @global WP_Filesystem $wp_filesystem The WordPress Filesystem API global object.
1265
  * @global wpdb $wpdb The WordPress database class object.
1266
+ * @global WP_Rewrite $wp_rewrite Core class used to implement a rewrite component API.
1267
  *
1268
  * @param string $db_dump_filepath File path to the mysql dump file.
1269
  * @param string $db_prefix The database prefix to use, if restoring and it changed.
1334
  // Clear the WordPress cache.
1335
  wp_cache_flush();
1336
 
1337
+ /**
1338
+ * In addition to flushing the cache (above), some classes may have cached option values (or other
1339
+ * data from the database) in some other way - e.g. in class properties. That cached data cannot
1340
+ * be flushed with wp_cache_flush.
1341
+ *
1342
+ * For example, the global $wp_rewrite class caches the permalink_structure option's value during
1343
+ * its init method. Running the cache flush above will not update this class' permalink_structure
1344
+ * property.
1345
+ *
1346
+ * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-rewrite.php#L1894
1347
+ *
1348
+ * This is important because if trying to rebuild the .htaccess file, it won't rebuild correctly
1349
+ * based on the permalink_structure option in the database just restored.
1350
+ */
1351
+ global $wp_rewrite;
1352
+ $wp_rewrite->init();
1353
+
1354
  // Get the restored "siteurl" and "home".
1355
  $restored_wp_siteurl = get_option( 'siteurl' );
1356
  $restored_wp_home = get_option( 'home' );
admin/class-boldgrid-backup-admin-restore-helper.php CHANGED
@@ -135,15 +135,11 @@ class Boldgrid_Backup_Admin_Restore_Helper {
135
  $original = ABSPATH . $file['filename'];
136
  $new = $original . '.bgb';
137
 
138
- // Determine if the file was restored from backup.
139
- $file_restored = false;
140
- if ( $file['copied'] && sha1_file( $original ) !== sha1_file( $new ) ) {
141
- $file_restored = true;
142
- } elseif ( $file['copy'] && ! $file['copied'] && $wp_filesystem->exists( $original ) ) {
143
- $file_restored = true;
144
- }
145
 
146
- if ( $file_restored ) {
147
  /**
148
  * Action to take after a specific file has been restored.
149
  *
@@ -182,6 +178,9 @@ class Boldgrid_Backup_Admin_Restore_Helper {
182
  $wp_filesystem->copy( $original, $new, true, 0644 );
183
  $this->monitor_files[ $key ]['copied'] = true;
184
  }
 
 
 
185
  }
186
 
187
  // Only register this action when we know we're doing a restore.
135
  $original = ABSPATH . $file['filename'];
136
  $new = $original . '.bgb';
137
 
138
+ // Determine if the file was changed during restoration.
139
+ $post_sha1 = sha1_file( $original );
140
+ $has_changed = $this->monitors_files[ $key ]['pre_sha1'] !== $post_sha1;
 
 
 
 
141
 
142
+ if ( $has_changed ) {
143
  /**
144
  * Action to take after a specific file has been restored.
145
  *
178
  $wp_filesystem->copy( $original, $new, true, 0644 );
179
  $this->monitor_files[ $key ]['copied'] = true;
180
  }
181
+
182
+ // Store sha1 to help identify if file was restored (later on).
183
+ $this->monitor_files[ $key ]['pre_sha1'] = sha1_file( $original );
184
  }
185
 
186
  // Only register this action when we know we're doing a restore.
admin/class-boldgrid-backup-admin-utility.php CHANGED
@@ -806,7 +806,6 @@ class Boldgrid_Backup_Admin_Utility {
806
  * (soft flush).
807
  */
808
  public static function flush_rewrite_rules( $hard = true ) {
809
- // A requirement for rewriting the .htaccess file.
810
  if ( $hard && ! function_exists( 'save_mod_rewrite_rules' ) ) {
811
  require_once ABSPATH . 'wp-admin/includes/misc.php';
812
  }
806
  * (soft flush).
807
  */
808
  public static function flush_rewrite_rules( $hard = true ) {
 
809
  if ( $hard && ! function_exists( 'save_mod_rewrite_rules' ) ) {
810
  require_once ABSPATH . 'wp-admin/includes/misc.php';
811
  }
boldgrid-backup.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: Total Upkeep
17
  * Plugin URI: https://www.boldgrid.com/boldgrid-backup/
18
  * Description: Automated backups, remote backup to Amazon S3 and Google Drive, stop website crashes before they happen and more. Total Upkeep is the backup solution you need.
19
- * Version: 1.15.0
20
  * Author: BoldGrid
21
  * Author URI: https://www.boldgrid.com/
22
  * License: GPL-2.0+
16
  * Plugin Name: Total Upkeep
17
  * Plugin URI: https://www.boldgrid.com/boldgrid-backup/
18
  * Description: Automated backups, remote backup to Amazon S3 and Google Drive, stop website crashes before they happen and more. Total Upkeep is the backup solution you need.
19
+ * Version: 1.15.1
20
  * Author: BoldGrid
21
  * Author URI: https://www.boldgrid.com/
22
  * License: GPL-2.0+
cli/{verify-dd66c7edb75333982c82a15ab5b733f0.php → verify-f8dd1223236165ea1d79b693ef5e7209.php} RENAMED
File without changes
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid ===
2
- Contributors: boldgrid, joemoto, imh_brad, rramo012, bgnicolepaschen, jamesros161
3
  Tags: backup, cloud backup, database backup, restore, wordpress backup
4
  Requires at least: 4.4
5
- Tested up to: 5.9
6
  Requires PHP: 5.4
7
- Stable tag: 1.15.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -132,6 +132,12 @@ Have a problem? First, take a look at our [Getting Started](https://www.boldgrid
132
 
133
  == Changelog ==
134
 
 
 
 
 
 
 
135
  = 1.15.0 =
136
 
137
  Release date: March 15th, 2022
1
  === Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid ===
2
+ Contributors: boldgrid, joemoto, imh_brad, rramo012, bgnicolepaschen, jamesros161, joe9663
3
  Tags: backup, cloud backup, database backup, restore, wordpress backup
4
  Requires at least: 4.4
5
+ Tested up to: 6.0
6
  Requires PHP: 5.4
7
+ Stable tag: 1.15.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
132
 
133
  == Changelog ==
134
 
135
+ = 1.15.1 =
136
+
137
+ Release date: May 18th, 2022
138
+
139
+ * Bug fix: Fixed bad rewrite rules on restorations due to cached permalink settings.
140
+
141
  = 1.15.0 =
142
 
143
  Release date: March 15th, 2022
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit8d79154a46eda58f41153dbc5aafc250::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit21ce95d681fa0cbccf157df200b627c0::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit21ce95d681fa0cbccf157df200b627c0
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit21ce95d681fa0cbccf157df200b627c0::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire21ce95d681fa0cbccf157df200b627c0($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire21ce95d681fa0cbccf157df200b627c0($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit8d79154a46eda58f41153dbc5aafc250
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit8d79154a46eda58f41153dbc5aafc250', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit8d79154a46eda58f41153dbc5aafc250', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit8d79154a46eda58f41153dbc5aafc250::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit8d79154a46eda58f41153dbc5aafc250::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire8d79154a46eda58f41153dbc5aafc250($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire8d79154a46eda58f41153dbc5aafc250($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit21ce95d681fa0cbccf157df200b627c0
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
@@ -91,9 +91,9 @@ class ComposerStaticInit21ce95d681fa0cbccf157df200b627c0
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
- $loader->prefixLengthsPsr4 = ComposerStaticInit21ce95d681fa0cbccf157df200b627c0::$prefixLengthsPsr4;
95
- $loader->prefixDirsPsr4 = ComposerStaticInit21ce95d681fa0cbccf157df200b627c0::$prefixDirsPsr4;
96
- $loader->classMap = ComposerStaticInit21ce95d681fa0cbccf157df200b627c0::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit8d79154a46eda58f41153dbc5aafc250
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
+ $loader->prefixLengthsPsr4 = ComposerStaticInit8d79154a46eda58f41153dbc5aafc250::$prefixLengthsPsr4;
95
+ $loader->prefixDirsPsr4 = ComposerStaticInit8d79154a46eda58f41153dbc5aafc250::$prefixDirsPsr4;
96
+ $loader->classMap = ComposerStaticInit8d79154a46eda58f41153dbc5aafc250::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }