UpdraftPlus WordPress Backup Plugin - Version 1.12.40

Version Description

  • 01/Apr/2017 =

  • TWEAK: The in-page log file display had stopped continuously updating in 1.12.32

  • FIX: In some circumstances, settings for the storage modules refactored in 1.12.37 could fail to show

  • FIX: The free version of 1.12.37/38 in some circumstances could fail to complete Dropbox authentication

Download this release

Release Info

Developer DavidAnderson
Plugin Icon 128x128 UpdraftPlus WordPress Backup Plugin
Version 1.12.40
Comparing to
See all releases

Code changes from version 1.12.39 to 1.12.40

admin.php CHANGED
@@ -1663,7 +1663,7 @@ class UpdraftPlus_Admin {
1663
 
1664
  if (!empty($nonce)) {
1665
  $updraft_dir = $updraftplus->backups_dir_location();
1666
-
1667
  $potential_log_file = $updraft_dir."/log.".$nonce.".txt";
1668
 
1669
  if (is_readable($potential_log_file)){
@@ -1681,6 +1681,7 @@ class UpdraftPlus_Admin {
1681
 
1682
  $new_pointer = ftell($log_file);
1683
  $log_content = implode("", $templog_array);
 
1684
 
1685
  } else {
1686
  $log_content .= __('The log file could not be read.', 'updraftplus');
1663
 
1664
  if (!empty($nonce)) {
1665
  $updraft_dir = $updraftplus->backups_dir_location();
1666
+
1667
  $potential_log_file = $updraft_dir."/log.".$nonce.".txt";
1668
 
1669
  if (is_readable($potential_log_file)){
1681
 
1682
  $new_pointer = ftell($log_file);
1683
  $log_content = implode("", $templog_array);
1684
+
1685
 
1686
  } else {
1687
  $log_content .= __('The log file could not be read.', 'updraftplus');
methods/backup-module.php CHANGED
@@ -65,7 +65,7 @@ abstract class UpdraftPlus_BackupModule {
65
  *
66
  * @return Array - an array of options
67
  */
68
- protected function get_default_options() {
69
  return array();
70
  }
71
 
65
  *
66
  * @return Array - an array of options
67
  */
68
+ public function get_default_options() {
69
  return array();
70
  }
71
 
methods/dropbox.php CHANGED
@@ -71,7 +71,7 @@ class UpdraftPlus_BackupModule_dropbox extends UpdraftPlus_BackupModule {
71
  return array('multi_options');
72
  }
73
 
74
- protected function get_default_options() {
75
  return array(
76
  'appkey' => '',
77
  'secret' => '',
@@ -125,7 +125,7 @@ class UpdraftPlus_BackupModule_dropbox extends UpdraftPlus_BackupModule {
125
  try {
126
 
127
  /*
128
- Quota information is no longer provided with account information a new call to qoutaInfo must be made to get this information.
129
  */
130
  if (1 == $use_api_ver) {
131
  $quotaInfo = $dropbox->accountInfo();
@@ -134,7 +134,7 @@ class UpdraftPlus_BackupModule_dropbox extends UpdraftPlus_BackupModule {
134
  }
135
 
136
  if ($quotaInfo['code'] != "200") {
137
- $message = "Dropbox account/info did not return HTTP 200; returned: ". $accountInfo['code'];
138
  } elseif (!isset($quotaInfo['body'])) {
139
  $message = "Dropbox account/info did not return the expected data";
140
  } else {
71
  return array('multi_options');
72
  }
73
 
74
+ public function get_default_options() {
75
  return array(
76
  'appkey' => '',
77
  'secret' => '',
125
  try {
126
 
127
  /*
128
+ Quota information is no longer provided with account information a new call to quotaInfo must be made to get this information.
129
  */
130
  if (1 == $use_api_ver) {
131
  $quotaInfo = $dropbox->accountInfo();
134
  }
135
 
136
  if ($quotaInfo['code'] != "200") {
137
+ $message = "Dropbox account/info did not return HTTP 200; returned: ". $quotaInfo['code'];
138
  } elseif (!isset($quotaInfo['body'])) {
139
  $message = "Dropbox account/info did not return the expected data";
140
  } else {
methods/ftp.php CHANGED
@@ -54,7 +54,7 @@ class UpdraftPlus_BackupModule_ftp extends UpdraftPlus_BackupModule {
54
  return array('multi_options');
55
  }
56
 
57
- protected function get_default_options() {
58
  return array(
59
  'host' => '',
60
  'user' => '',
54
  return array('multi_options');
55
  }
56
 
57
+ public function get_default_options() {
58
  return array(
59
  'host' => '',
60
  'user' => '',
methods/googledrive.php CHANGED
@@ -27,7 +27,7 @@ class UpdraftPlus_BackupModule_googledrive extends UpdraftPlus_BackupModule {
27
  return array('multi_options');
28
  }
29
 
30
- protected function get_default_options() {
31
  # parentid is deprecated since April 2014; it should not be in the default options (its presence is used to detect an upgraded-from-previous-SDK situation). For the same reason, 'folder' is also unset; which enables us to know whether new-style settings have ever been set.
32
  return array(
33
  'clientid' => '',
27
  return array('multi_options');
28
  }
29
 
30
+ public function get_default_options() {
31
  # parentid is deprecated since April 2014; it should not be in the default options (its presence is used to detect an upgraded-from-previous-SDK situation). For the same reason, 'folder' is also unset; which enables us to know whether new-style settings have ever been set.
32
  return array(
33
  'clientid' => '',
methods/updraftvault.php CHANGED
@@ -32,7 +32,7 @@ class UpdraftPlus_BackupModule_updraftvault extends UpdraftPlus_BackupModule_s3
32
  }
33
  }
34
 
35
- protected function get_default_options() {
36
  return array(
37
  'token' => '',
38
  'email' => '',
32
  }
33
  }
34
 
35
+ public function get_default_options() {
36
  return array(
37
  'token' => '',
38
  'email' => '',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Backup with UpdraftPlus, DavidAnderson, DNutbourne, aporter, snigh
3
  Tags: backup, restore, database backup, wordpress backup, cloud backup, s3, dropbox, google drive, onedrive, ftp, backups
4
  Requires at least: 3.2
5
  Tested up to: 4.7
6
- Stable tag: 1.12.39
7
  Author URI: https://updraftplus.com
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
@@ -127,8 +127,10 @@ The <a href="https://updraftplus.com/news/">UpdraftPlus backup blog</a> is the b
127
 
128
  N.B. Paid versions of UpdraftPlus Backup / Restore have a version number which is 1 higher in the first digit, and has an extra component on the end, but the changelog below still applies. i.e. changes listed for 1.12.38 of the free version correspond to changes made in 2.12.38.x of the paid version.
129
 
130
- = 1.12.39 - 01/Apr/2017 =
131
 
 
 
132
  * FIX: The free version of 1.12.37/38 in some circumstances could fail to complete Dropbox authentication
133
 
134
  = 1.12.38 - 31/Mar/2017 =
@@ -445,4 +447,4 @@ We recognise and thank the following for code and/or libraries used and/or modif
445
 
446
 
447
  == Upgrade Notice ==
448
- * 1.12.39: The free version of 1.12.37/38 in some circumstances could fail to complete Dropbox authentication
3
  Tags: backup, restore, database backup, wordpress backup, cloud backup, s3, dropbox, google drive, onedrive, ftp, backups
4
  Requires at least: 3.2
5
  Tested up to: 4.7
6
+ Stable tag: 1.12.40
7
  Author URI: https://updraftplus.com
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
127
 
128
  N.B. Paid versions of UpdraftPlus Backup / Restore have a version number which is 1 higher in the first digit, and has an extra component on the end, but the changelog below still applies. i.e. changes listed for 1.12.38 of the free version correspond to changes made in 2.12.38.x of the paid version.
129
 
130
+ = 1.12.40 - 01/Apr/2017 =
131
 
132
+ * TWEAK: The in-page log file display had stopped continuously updating in 1.12.32
133
+ * FIX: In some circumstances, settings for the storage modules refactored in 1.12.37 could fail to show
134
  * FIX: The free version of 1.12.37/38 in some circumstances could fail to complete Dropbox authentication
135
 
136
  = 1.12.38 - 31/Mar/2017 =
447
 
448
 
449
  == Upgrade Notice ==
450
+ * 1.12.40: The free version of 1.12.37/38 in some circumstances could fail to complete Dropbox authentication; and for new users, the Google Drive settings might fail to show.
templates/wp-admin/settings/form-contents.php CHANGED
@@ -169,12 +169,19 @@ foreach ($default_options as $k => $v) {
169
  error_log("UpdraftPlus: failed to convert storage options format: $method");
170
  $settings = array('settings' => array());
171
  }
172
-
173
  if (empty($settings['settings'])) {
174
  // See: https://wordpress.org/support/topic/cannot-setup-connectionauthenticate-with-dropbox/
175
  error_log("UpdraftPlus: Warning: settings for $method are empty. A dummy field is usually needed so that something is saved.");
 
 
 
 
 
 
 
176
  }
177
-
178
  if (!empty($settings['settings'])) {
179
  foreach ($settings['settings'] as $instance_id => $storage_options) {
180
  $remote_storage->set_options($storage_options, false, $instance_id);
169
  error_log("UpdraftPlus: failed to convert storage options format: $method");
170
  $settings = array('settings' => array());
171
  }
172
+
173
  if (empty($settings['settings'])) {
174
  // See: https://wordpress.org/support/topic/cannot-setup-connectionauthenticate-with-dropbox/
175
  error_log("UpdraftPlus: Warning: settings for $method are empty. A dummy field is usually needed so that something is saved.");
176
+
177
+ // Try to recover by getting a default set of options for display
178
+ if (is_callable(array($remote_storage, 'get_default_options'))) {
179
+ $uuid = 's-'.md5(rand().uniqid().microtime(true));
180
+ $settings['settings'] = array($uuid => $remote_storage->get_default_options());
181
+ }
182
+
183
  }
184
+
185
  if (!empty($settings['settings'])) {
186
  foreach ($settings['settings'] as $instance_id => $storage_options) {
187
  $remote_storage->set_options($storage_options, false, $instance_id);
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: https://updraftplus.com
5
  Description: Backup and restore: take backups locally, or backup to Amazon S3, Dropbox, Google Drive, Rackspace, (S)FTP, WebDAV & email, on automatic schedules.
6
  Author: UpdraftPlus.Com, DavidAnderson
7
- Version: 1.12.39
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
@@ -13,7 +13,7 @@ Author URI: https://updraftplus.com
13
  */
14
 
15
  /*
16
- Portions copyright 2011-16 David Anderson
17
  Portions copyright 2010 Paul Kehrer
18
  Other portions copyright as indicated by authors in the relevant files
19
 
4
  Plugin URI: https://updraftplus.com
5
  Description: Backup and restore: take backups locally, or backup to Amazon S3, Dropbox, Google Drive, Rackspace, (S)FTP, WebDAV & email, on automatic schedules.
6
  Author: UpdraftPlus.Com, DavidAnderson
7
+ Version: 1.12.40
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
13
  */
14
 
15
  /*
16
+ Portions copyright 2011-17 David Anderson
17
  Portions copyright 2010 Paul Kehrer
18
  Other portions copyright as indicated by authors in the relevant files
19