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

Version Description

Release Date: June 11th, 2018

  • Bug fix: System Cron detection failed in some environments.
  • Update: Clarified verbiage on setting up Premium connect key.
Download this release

Release Info

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

Code changes from version 1.6.2 to 1.6.3

admin/class-boldgrid-backup-admin-core.php CHANGED
@@ -485,7 +485,9 @@ class Boldgrid_Backup_Admin_Core {
485
  * @global $wp_filesystem.
486
  */
487
  public function __construct() {
 
488
  global $wp_filesystem;
 
489
  global $pagenow;
490
 
491
  $this->doing_cron = ( defined( 'DOING_CRON' ) && DOING_CRON ) || isset( $_GET['doing_wp_cron'] );
@@ -493,6 +495,7 @@ class Boldgrid_Backup_Admin_Core {
493
  $this->doing_wp_cron = ! empty( $_SERVER['SCRIPT_FILENAME'] ) && $_SERVER['SCRIPT_FILENAME'] === trailingslashit( ABSPATH ) . 'wp-cron.php';
494
 
495
  $this->wp_filesystem = $wp_filesystem;
 
496
  $this->pagenow = $pagenow;
497
 
498
  // Instantiate Boldgrid_Backup_Admin_Settings.
485
  * @global $wp_filesystem.
486
  */
487
  public function __construct() {
488
+ WP_Filesystem();
489
  global $wp_filesystem;
490
+
491
  global $pagenow;
492
 
493
  $this->doing_cron = ( defined( 'DOING_CRON' ) && DOING_CRON ) || isset( $_GET['doing_wp_cron'] );
495
  $this->doing_wp_cron = ! empty( $_SERVER['SCRIPT_FILENAME'] ) && $_SERVER['SCRIPT_FILENAME'] === trailingslashit( ABSPATH ) . 'wp-cron.php';
496
 
497
  $this->wp_filesystem = $wp_filesystem;
498
+
499
  $this->pagenow = $pagenow;
500
 
501
  // Instantiate Boldgrid_Backup_Admin_Settings.
admin/class-boldgrid-backup-admin-go-pro.php CHANGED
@@ -76,24 +76,25 @@ class Boldgrid_Backup_Admin_Go_Pro {
76
 
77
  $notices = array(
78
  array(
79
- 'id' => 'boldgrid_backup_activate_premium',
80
- 'show' => $is_premium && $this->core->config->is_premium_installed,
81
  'message' => '<p>' . sprintf(
82
  __( 'You have a <strong>Premium BoldGrid Connect Key</strong> and you have the <strong>BoldGrid Backup Premium Extension installed</strong>. Please go to your <a href="%1$s">plugins page</a> and activate your premium extension!', 'boldgrid-backup' ),
83
  admin_url( 'plugins.php' )
84
  ) . '</p>',
85
  ),
86
  array(
87
- 'id' => 'boldgrid_backup_upgrade_premium',
88
- 'show' => ! $is_premium && $this->core->config->is_premium_active,
89
  'message' => '<p>' . sprintf(
90
- __( 'Thank you for activating the <strong>BoldGrid Backup Premium Extension</strong>! Before you can begin using all of the premium features, please visit <a href="%1$s" target="_blank">BoldGrid Central</a> and upgrade your BoldGrid Connect Key.', 'boldgrid-backup' ),
91
- self::$url
 
92
  ) . '</p>',
93
  ),
94
  array(
95
- 'id' => 'boldgrid_backup_download_premium',
96
- 'show' => $is_premium && ! $this->core->config->is_premium_installed,
97
  'message' => '<p>' . sprintf(
98
  __( 'Hello there! We see that you have a <strong>Premium BoldGrid Connect Key</strong> and you have the <strong>BoldGrid Backup Plugin</strong> activated! Be sure to download the <strong>BoldGrid Backup Premium Extension</strong> from <a href="%1$s">BoldGrid Central</a> to gain access to more features!', 'boldgrid-backup' ),
99
  'https://www.boldgrid.com/central'
@@ -119,7 +120,8 @@ class Boldgrid_Backup_Admin_Go_Pro {
119
  * @return string
120
  */
121
  public function get_premium_button( $url = 'https://boldgrid.com/update-backup', $text = 'Get Premium' ) {
122
- return sprintf( '
 
123
  <a href="%1$s" class="button button-success" target="_blank">%2$s</a>',
124
  esc_url( $url ),
125
  $text
76
 
77
  $notices = array(
78
  array(
79
+ 'id' => 'boldgrid_backup_activate_premium',
80
+ 'show' => $is_premium && $this->core->config->is_premium_installed,
81
  'message' => '<p>' . sprintf(
82
  __( 'You have a <strong>Premium BoldGrid Connect Key</strong> and you have the <strong>BoldGrid Backup Premium Extension installed</strong>. Please go to your <a href="%1$s">plugins page</a> and activate your premium extension!', 'boldgrid-backup' ),
83
  admin_url( 'plugins.php' )
84
  ) . '</p>',
85
  ),
86
  array(
87
+ 'id' => 'boldgrid_backup_upgrade_premium',
88
+ 'show' => ! $is_premium && $this->core->config->is_premium_active,
89
  'message' => '<p>' . sprintf(
90
+ __( 'Thank you for activating the <strong>BoldGrid Backup Premium Extension</strong>! Before you can begin using all of the premium features, you must <a href="%2$s">add your premium key</a>. If you are using an Official BoldGrid Host, contact them or login to their management system to retrieve your Premium key. Otherwise, please visit <a href="%1$s" target="_blank">BoldGrid Central</a> to upgrade.', 'boldgrid-backup' ),
91
+ self::$url,
92
+ admin_url( 'admin.php?page=boldgrid-backup-settings&section=connect_key' )
93
  ) . '</p>',
94
  ),
95
  array(
96
+ 'id' => 'boldgrid_backup_download_premium',
97
+ 'show' => $is_premium && ! $this->core->config->is_premium_installed,
98
  'message' => '<p>' . sprintf(
99
  __( 'Hello there! We see that you have a <strong>Premium BoldGrid Connect Key</strong> and you have the <strong>BoldGrid Backup Plugin</strong> activated! Be sure to download the <strong>BoldGrid Backup Premium Extension</strong> from <a href="%1$s">BoldGrid Central</a> to gain access to more features!', 'boldgrid-backup' ),
100
  'https://www.boldgrid.com/central'
120
  * @return string
121
  */
122
  public function get_premium_button( $url = 'https://boldgrid.com/update-backup', $text = 'Get Premium' ) {
123
+ return sprintf(
124
+ '
125
  <a href="%1$s" class="button button-success" target="_blank">%2$s</a>',
126
  esc_url( $url ),
127
  $text
admin/class-boldgrid-backup-admin-test.php CHANGED
@@ -636,15 +636,39 @@ class Boldgrid_Backup_Admin_Test {
636
  */
637
  public function get_cli_support() {
638
  $default = array(
639
- 'has_curl_ssl' => false,
640
  'has_url_fopen' => false,
641
  );
642
 
643
- $cmd = 'php -f ' . trailingslashit( BOLDGRID_BACKUP_PATH ) . 'cron/cli-support.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
644
 
645
- $result = $this->core->execute_command( $cmd );
646
- $result = json_decode( $result, true );
647
- $result = is_array( $result ) ? $result : $default;
648
 
649
  $result['can_remote_get'] = $result['has_curl_ssl'] || $result['has_url_fopen'];
650
 
@@ -753,4 +777,22 @@ class Boldgrid_Backup_Admin_Test {
753
  ! empty( $_SERVER['SERVER_SOFTWARE'] ) &&
754
  false !== strpos( $_SERVER['SERVER_SOFTWARE'], 'IIS' );
755
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
756
  }
636
  */
637
  public function get_cli_support() {
638
  $default = array(
639
+ 'has_curl_ssl' => false,
640
  'has_url_fopen' => false,
641
  );
642
 
643
+ // Configure an array of commands to run.
644
+ $cmds = array(
645
+ 'php -qf ' . trailingslashit( BOLDGRID_BACKUP_PATH ) . 'cron/cli-support.php',
646
+ );
647
+
648
+ if ( ! $this->is_windows() && $this->core->execute_command( 'env' ) ) {
649
+ // Some environments may run PHP in CGI mode; try to force CLI, by preferencing paths.
650
+ $cmds[] = 'env PATH=/usr/local/bin:/usr/bin:/bin ' . $cmds[0];
651
+
652
+ if ( $this->is_ea4_cli() ) {
653
+ // If is a cPanel EA4 server with php-cli, then try using env first.
654
+ sort( $cmds );
655
+ }
656
+ }
657
+
658
+ // Find a command that gives us an array.
659
+ foreach ( $cmds as $cmd ) {
660
+ $result = $this->core->execute_command( $cmd );
661
+
662
+ $result = json_decode( $result, true );
663
+
664
+ if ( ! is_array( $result ) ) {
665
+ continue;
666
+ }
667
+
668
+ break;
669
+ }
670
 
671
+ $result = is_array( $result ) ? wp_parse_args( $result, $default ) : $default;
 
 
672
 
673
  $result['can_remote_get'] = $result['has_curl_ssl'] || $result['has_url_fopen'];
674
 
777
  ! empty( $_SERVER['SERVER_SOFTWARE'] ) &&
778
  false !== strpos( $_SERVER['SERVER_SOFTWARE'], 'IIS' );
779
  }
780
+
781
+ /**
782
+ * Determine if this server has cPanel EasyApache 4 with php-cli installed.
783
+ *
784
+ * @since 1.6.3
785
+ *
786
+ * @link https://developer.wordpress.org/reference/classes/wp_filesystem_direct/
787
+ *
788
+ * @return bool
789
+ */
790
+ public function is_ea4_cli() {
791
+ $is_ea4 = $this->core->wp_filesystem->exists( '/etc/cpanel/ea4/is_ea4' ) ||
792
+ $this->core->wp_filesystem->is_dir( '/etc/cpanel/ea4' );
793
+
794
+ $has_php_cli = $this->core->wp_filesystem->exists( '/usr/local/bin/php' );
795
+
796
+ return $is_ea4 && $has_php_cli;
797
+ }
798
  }
boldgrid-backup.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: BoldGrid Backup
16
  * Plugin URI: https://www.boldgrid.com/boldgrid-backup/
17
  * Description: BoldGrid Backup provides WordPress backup and restoration with update protection.
18
- * Version: 1.6.2
19
  * Author: BoldGrid
20
  * Author URI: https://www.boldgrid.com/
21
  * License: GPL-2.0+
15
  * Plugin Name: BoldGrid Backup
16
  * Plugin URI: https://www.boldgrid.com/boldgrid-backup/
17
  * Description: BoldGrid Backup provides WordPress backup and restoration with update protection.
18
+ * Version: 1.6.3
19
  * Author: BoldGrid
20
  * Author URI: https://www.boldgrid.com/
21
  * License: GPL-2.0+
cron/cli-support.php CHANGED
@@ -9,11 +9,10 @@
9
 
10
  // Require Boldgrid_Backup_Url_Helper class.
11
  require dirname( __FILE__ ) . '/url-helper.php';
 
12
  $url_helper = new Boldgrid_Backup_Url_Helper();
13
 
14
- $support = array(
15
  'has_curl_ssl' => $url_helper->has_curl_ssl(),
16
  'has_url_fopen' => $url_helper->has_url_fopen(),
17
- );
18
-
19
- echo json_encode( $support );
9
 
10
  // Require Boldgrid_Backup_Url_Helper class.
11
  require dirname( __FILE__ ) . '/url-helper.php';
12
+
13
  $url_helper = new Boldgrid_Backup_Url_Helper();
14
 
15
+ die( json_encode( array(
16
  'has_curl_ssl' => $url_helper->has_curl_ssl(),
17
  'has_url_fopen' => $url_helper->has_url_fopen(),
18
+ ) ) );
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: boldgrid, backup, restore, migrate, migration
4
  Requires at least: 4.4
5
  Tested up to: 4.9.6
6
  Requires PHP: 5.3
7
- Stable tag: 1.6.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -28,6 +28,13 @@ WordPress backup and restoration with update protection.
28
 
29
  == Changelog ==
30
 
 
 
 
 
 
 
 
31
  = 1.6.2 =
32
 
33
  Release Date: May 25th, 2018
4
  Requires at least: 4.4
5
  Tested up to: 4.9.6
6
  Requires PHP: 5.3
7
+ Stable tag: 1.6.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
28
 
29
  == Changelog ==
30
 
31
+ = 1.6.3 =
32
+
33
+ Release Date: June 11th, 2018
34
+
35
+ * Bug fix: System Cron detection failed in some environments.
36
+ * Update: Clarified verbiage on setting up Premium connect key.
37
+
38
  = 1.6.2 =
39
 
40
  Release Date: May 25th, 2018
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit3e84638393c3ae1a1355713a4a501090::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6bc481f22016af48b669a607eb56454a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit6bc481f22016af48b669a607eb56454a
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit6bc481f22016af48b669a607eb56454a::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire6bc481f22016af48b669a607eb56454a($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire6bc481f22016af48b669a607eb56454a($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit3e84638393c3ae1a1355713a4a501090
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3e84638393c3ae1a1355713a4a501090', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3e84638393c3ae1a1355713a4a501090', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit3e84638393c3ae1a1355713a4a501090::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit3e84638393c3ae1a1355713a4a501090::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire3e84638393c3ae1a1355713a4a501090($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire3e84638393c3ae1a1355713a4a501090($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6bc481f22016af48b669a607eb56454a
8
  {
9
  public static $files = array (
10
  'f15d016d70663d5e96ccd2b863511eb8' => __DIR__ . '/..' . '/cbschuld/browser.php/lib/Browser.php',
@@ -44,8 +44,8 @@ class ComposerStaticInit6bc481f22016af48b669a607eb56454a
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
- $loader->prefixLengthsPsr4 = ComposerStaticInit6bc481f22016af48b669a607eb56454a::$prefixLengthsPsr4;
48
- $loader->prefixDirsPsr4 = ComposerStaticInit6bc481f22016af48b669a607eb56454a::$prefixDirsPsr4;
49
 
50
  }, null, ClassLoader::class);
51
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit3e84638393c3ae1a1355713a4a501090
8
  {
9
  public static $files = array (
10
  'f15d016d70663d5e96ccd2b863511eb8' => __DIR__ . '/..' . '/cbschuld/browser.php/lib/Browser.php',
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
+ $loader->prefixLengthsPsr4 = ComposerStaticInit3e84638393c3ae1a1355713a4a501090::$prefixLengthsPsr4;
48
+ $loader->prefixDirsPsr4 = ComposerStaticInit3e84638393c3ae1a1355713a4a501090::$prefixDirsPsr4;
49
 
50
  }, null, ClassLoader::class);
51
  }