UpdraftPlus WordPress Backup Plugin - Version 1.12.35

Version Description

  • 03/Mar/2017 =

  • FIX: Fix an issue that causing corruption of interrupted Dropbox backups. All Dropbox users are recommended to update asap.

  • TWEAK: Fix a regression that prevented information about a faulty WP scheduler from being shown in recent releases (incomplete fix in 1.12.34)

  • TWEAK: submit_button() needs to be available (possible UpdraftCentral fatal when requesting filesystem creds)

  • TWEAK: Remove an ES5 JavaScript construct (incompatible with some old browsers)

  • TWEAK: Fix incorrect variable name in routine that triggered WP automatic update check

  • TWEAK: Fix a logic error whereby if Google Drive and Google Cloud were both in use and partially set up, a notice about completing the setup of Cloud could fail to show

Download this release

Release Info

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

Code changes from version 1.12.34 to 1.12.35

admin.php CHANGED
@@ -99,15 +99,17 @@ class UpdraftPlus_Admin {
99
  $clientid = UpdraftPlus_Options::get_updraft_option('updraft_googledrive_clientid', '');
100
  $token = UpdraftPlus_Options::get_updraft_option('updraft_googledrive_token', '');
101
  } else {
102
- $clientid = $opts['clientid'];
103
  $token = (empty($opts['token'])) ? '' : $opts['token'];
104
  }
105
  if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googledrive'));
 
 
106
  }
107
  if ('googlecloud' === $service || (is_array($service) && in_array('googlecloud', $service))) {
108
  $opts = UpdraftPlus_Options::get_updraft_option('updraft_googlecloud');
109
  if (!empty($opts)) {
110
- $clientid = $opts['clientid'];
111
  $token = (empty($opts['token'])) ? '' : $opts['token'];
112
  }
113
  if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googlecloud'));
99
  $clientid = UpdraftPlus_Options::get_updraft_option('updraft_googledrive_clientid', '');
100
  $token = UpdraftPlus_Options::get_updraft_option('updraft_googledrive_token', '');
101
  } else {
102
+ $clientid = empty($opts['clientid']) ? '' : $opts['clientid'];
103
  $token = (empty($opts['token'])) ? '' : $opts['token'];
104
  }
105
  if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googledrive'));
106
+ unset($token);
107
+ unset($clientid);
108
  }
109
  if ('googlecloud' === $service || (is_array($service) && in_array('googlecloud', $service))) {
110
  $opts = UpdraftPlus_Options::get_updraft_option('updraft_googlecloud');
111
  if (!empty($opts)) {
112
+ $clientid = empty($opts['clientid']) ? '' : $opts['clientid'];
113
  $token = (empty($opts['token'])) ? '' : $opts['token'];
114
  }
115
  if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googlecloud'));
central/modules/core.php CHANGED
@@ -35,8 +35,9 @@ class UpdraftCentral_Core_Commands extends UpdraftCentral_Commands {
35
  }
36
  }
37
 
38
- //Include the needed WP Core file(s)
39
- $this->_admin_include('file.php');
 
40
 
41
  //Directory entities that we currently need permissions
42
  //to update.
35
  }
36
  }
37
 
38
+ // Include the needed WP Core file(s)
39
+ // template.php needed for submit_button() which is called by request_filesystem_credentials()
40
+ $this->_admin_include('file.php', 'template.php');
41
 
42
  //Directory entities that we currently need permissions
43
  //to update.
includes/Dropbox2/API.php CHANGED
@@ -170,7 +170,7 @@ class UpdraftPlus_Dropbox_API {
170
  /*
171
  Set firstCommit to true so that the upload session start endpoint is called.
172
  */
173
- $firstCommit = true;
174
 
175
  // Read from the file handle until EOF, uploading each chunk
176
  while ($data = fread($handle, $this->chunkSize)) {
@@ -179,11 +179,22 @@ class UpdraftPlus_Dropbox_API {
179
  $this->OAuth->setInFile($data);
180
 
181
  if ($firstCommit) {
182
- $params = array('close' => false, 'api_v2' => true, 'content_upload' => true);
 
 
 
 
183
  $response = $this->fetch('POST', self::CONTENT_URL_V2, 'files/upload_session/start', $params);
184
  $firstCommit = false;
185
  } else {
186
- $params = array('cursor' => array('session_id' => $uploadID, 'offset' => $offset), 'api_v2' => true, 'content_upload' => true);
 
 
 
 
 
 
 
187
  $response = $this->append_upload($params, false);
188
  }
189
 
@@ -206,7 +217,18 @@ class UpdraftPlus_Dropbox_API {
206
 
207
  // Complete the chunked upload
208
  $filename = (is_string($filename)) ? $filename : basename($file);
209
- $params = array('cursor' => array('session_id' => $uploadID, 'offset' => $offset), 'commit' => array('path' => '/' . $this->encodePath($path . $filename), 'mode' => 'add'), 'api_v2' => true, 'content_upload' => true);
 
 
 
 
 
 
 
 
 
 
 
210
  $response = $this->append_upload($params, true);
211
  return $response;
212
  } else {
170
  /*
171
  Set firstCommit to true so that the upload session start endpoint is called.
172
  */
173
+ $firstCommit = (0 == $offset);
174
 
175
  // Read from the file handle until EOF, uploading each chunk
176
  while ($data = fread($handle, $this->chunkSize)) {
179
  $this->OAuth->setInFile($data);
180
 
181
  if ($firstCommit) {
182
+ $params = array(
183
+ 'close' => false,
184
+ 'api_v2' => true,
185
+ 'content_upload' => true
186
+ );
187
  $response = $this->fetch('POST', self::CONTENT_URL_V2, 'files/upload_session/start', $params);
188
  $firstCommit = false;
189
  } else {
190
+ $params = array(
191
+ 'cursor' => array(
192
+ 'session_id' => $uploadID,
193
+ 'offset' => $offset
194
+ ),
195
+ 'api_v2' => true,
196
+ 'content_upload' => true
197
+ );
198
  $response = $this->append_upload($params, false);
199
  }
200
 
217
 
218
  // Complete the chunked upload
219
  $filename = (is_string($filename)) ? $filename : basename($file);
220
+ $params = array(
221
+ 'cursor' => array(
222
+ 'session_id' => $uploadID,
223
+ 'offset' => $offset
224
+ ),
225
+ 'commit' => array(
226
+ 'path' => '/' . $this->encodePath($path . $filename),
227
+ 'mode' => 'add'
228
+ ),
229
+ 'api_v2' => true,
230
+ 'content_upload' => true
231
+ );
232
  $response = $this->append_upload($params, true);
233
  return $response;
234
  } else {
includes/class-wpadmin-commands.php CHANGED
@@ -286,7 +286,7 @@ class UpdraftPlus_WPAdmin_Commands extends UpdraftPlus_Commands {
286
 
287
  public function check_overdue_crons() {
288
  $how_many_overdue = $this->_updraftplus_admin->howmany_overdue_crons();
289
- return ($how_many_overdue >= 4) ? array('m' => $this->show_admin_warning_overdue_crons($how_many_overdue)) : array();
290
  }
291
 
292
  public function whichdownloadsneeded($params) {
286
 
287
  public function check_overdue_crons() {
288
  $how_many_overdue = $this->_updraftplus_admin->howmany_overdue_crons();
289
+ return ($how_many_overdue >= 4) ? array('m' => $this->_updraftplus_admin->show_admin_warning_overdue_crons($how_many_overdue)) : array();
290
  }
291
 
292
  public function whichdownloadsneeded($params) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Backup with UpdraftPlus, DavidAnderson, DNutbourne, aporter, snigh
3
  Tags: backup, restore, database backup, wordpress backup, database backup, cloud backup, restore, s3, dropbox, google drive, onedrive, ftp, backups
4
  Requires at least: 3.2
5
  Tested up to: 4.7
6
- Stable tag: 1.12.34
7
  Author URI: https://updraftplus.com
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
@@ -127,6 +127,15 @@ 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.34 of the free version correspond to changes made in 2.12.34.x of the paid version.
129
 
 
 
 
 
 
 
 
 
 
130
  = 1.12.34 - 23/Feb/2017 =
131
 
132
  * FEATURE: Added the ability to allow other plugins to call an automatic backup more easily
@@ -412,4 +421,4 @@ We recognise and thank the following for code and/or libraries used and/or modif
412
 
413
 
414
  == Upgrade Notice ==
415
- * 1.12.34: Allow other WP dashboard pages to call a backup easily. Various tweaks and small improvements.
3
  Tags: backup, restore, database backup, wordpress backup, database backup, cloud backup, restore, s3, dropbox, google drive, onedrive, ftp, backups
4
  Requires at least: 3.2
5
  Tested up to: 4.7
6
+ Stable tag: 1.12.35
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.34 of the free version correspond to changes made in 2.12.34.x of the paid version.
129
 
130
+ = 1.12.35 - 03/Mar/2017 =
131
+
132
+ * FIX: Fix an issue that causing corruption of interrupted Dropbox backups. All Dropbox users are recommended to update asap.
133
+ * TWEAK: Fix a regression that prevented information about a faulty WP scheduler from being shown in recent releases (incomplete fix in 1.12.34)
134
+ * TWEAK: submit_button() needs to be available (possible UpdraftCentral fatal when requesting filesystem creds)
135
+ * TWEAK: Remove an ES5 JavaScript construct (incompatible with some old browsers)
136
+ * TWEAK: Fix incorrect variable name in routine that triggered WP automatic update check
137
+ * TWEAK: Fix a logic error whereby if Google Drive and Google Cloud were both in use and partially set up, a notice about completing the setup of Cloud could fail to show
138
+
139
  = 1.12.34 - 23/Feb/2017 =
140
 
141
  * FEATURE: Added the ability to allow other plugins to call an automatic backup more easily
421
 
422
 
423
  == Upgrade Notice ==
424
+ * 1.12.35: Fix an issue causing corruption of interrupted Dropbox backups.
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.34
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
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.35
8
  Donate link: https://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus