UpdraftPlus WordPress Backup Plugin - Version 1.3.18

Version Description

  • 01/28/2013 =
  • Made 'expert mode' easier to operate, and tidier options for non-expert users.
  • Some (not total) compliance with PHP's strict coding standards mode
  • More detail provided when failing to authorise with Google
Download this release

Release Info

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

Code changes from version 1.3.17 to 1.3.18

Files changed (3) hide show
  1. methods/googledrive.php +7 -1
  2. readme.txt +3 -2
  3. updraftplus.php +4 -5
methods/googledrive.php CHANGED
@@ -80,7 +80,13 @@ class UpdraftPlus_BackupModule_googledrive {
80
  $result = wp_remote_post('https://accounts.google.com/o/oauth2/token', array('timeout' => 30, 'method' => 'POST', 'body' => $post_vars) );
81
 
82
  if (is_wp_error($result)) {
83
- header('Location: '.admin_url('options-general.php?page=updraftplus&error=' . __( 'Bad response!', 'backup' ) ) );
 
 
 
 
 
 
84
  } else {
85
  $json_values = json_decode( $result['body'], true );
86
  if ( isset( $json_values['refresh_token'] ) ) {
80
  $result = wp_remote_post('https://accounts.google.com/o/oauth2/token', array('timeout' => 30, 'method' => 'POST', 'body' => $post_vars) );
81
 
82
  if (is_wp_error($result)) {
83
+ $add_to_url = "Bad response when contacting Google: ";
84
+ foreach ( $result->get_error_messages() as $message ) {
85
+ global $updraftplus;
86
+ $updraftplus->log("Google Drive authentication error: ".$message);
87
+ $add_to_url .= "$message. ";
88
+ }
89
+ header('Location: '.admin_url('options-general.php?page=updraftplus&error='.urlencode($add_to_url)) );
90
  } else {
91
  $json_values = json_decode( $result['body'], true );
92
  if ( isset( $json_values['refresh_token'] ) ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: David Anderson
3
  Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, ftp, cloud, back up, multisite
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
- Stable tag: 1.3.17
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
@@ -141,9 +141,10 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
141
 
142
  == Changelog ==
143
 
144
- = 1.3.17 - 01/28/2013 =
145
  * Made 'expert mode' easier to operate, and tidier options for non-expert users.
146
  * Some (not total) compliance with PHP's strict coding standards mode
 
147
 
148
  = 1.3.15 - 01/26/2013 =
149
  * Various changes to Google Drive authentication to help those who don't enter the correct details first time, or who later need to change accounts.
3
  Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, ftp, cloud, back up, multisite
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.3.18
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
141
 
142
  == Changelog ==
143
 
144
+ = 1.3.18 - 01/28/2013 =
145
  * Made 'expert mode' easier to operate, and tidier options for non-expert users.
146
  * Some (not total) compliance with PHP's strict coding standards mode
147
+ * More detail provided when failing to authorise with Google
148
 
149
  = 1.3.15 - 01/26/2013 =
150
  * Various changes to Google Drive authentication to help those who don't enter the correct details first time, or who later need to change accounts.
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Backup and restore: your content and database can be automatically backed up to Amazon S3, Dropbox, Google Drive, FTP or email, on separate schedules.
6
  Author: David Anderson.
7
- Version: 1.3.17
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
@@ -15,7 +15,6 @@ TODO
15
  //Put in old-WP-version warning, and point them to where they can get help
16
  //Add SFTP, Box.Net, SugarSync and Microsoft Skydrive support??
17
  //The restorer has a hard-coded wp-content - fix
18
- //Read safe-mode only once, remembering it will be totally removed from PHP
19
  //Button for wiping files. Also auto-wipe on de-activate/de-install.
20
  //Change DB encryption to not require whole gzip in memory (twice)
21
  //improve error reporting / pretty up return messages in admin area. One thing: have a "backup is now finished" flag. Otherwise with the resuming things get ambiguous/confusing. See http://wordpress.org/support/topic/backup-status - user was not aware that backup completely failed. Maybe a "backup status" field for each nonce that gets updated? (Even via AJAX?)
@@ -79,7 +78,7 @@ if (!class_exists('UpdraftPlus_Options')) require_once(UPDRAFTPLUS_DIR.'/options
79
 
80
  class UpdraftPlus {
81
 
82
- var $version = '1.3.17';
83
  var $plugin_title = 'UpdraftPlus Backup/Restore';
84
 
85
  // Choices will be shown in the admin menu in the order used here
@@ -896,7 +895,7 @@ class UpdraftPlus {
896
  foreach ($all_tables as $table) {
897
  $total_tables++;
898
  // Increase script execution time-limit to 15 min for every table.
899
- if ( !ini_get('safe_mode') || strtolower(ini_get('safe_mode')) == "off") @set_time_limit(15*60);
900
  // The table file may already exist if we have produced it on a previous run
901
  $table_file_prefix = $file_base.'-db-table-'.$table.'.table';
902
  if (file_exists($updraft_dir.'/'.$table_file_prefix.'.gz')) {
@@ -1337,7 +1336,7 @@ class UpdraftPlus {
1337
  }
1338
  echo '</div>'; //close the updraft_restore_progress div
1339
  # The 'off' check is for badly configured setups - http://wordpress.org/support/topic/plugin-wp-super-cache-warning-php-safe-mode-enabled-but-safe-mode-is-off
1340
- if(ini_get('safe_mode') && strtolower(ini_get('safe_mode')) != "off") {
1341
  echo "<p>DB could not be restored because PHP safe_mode is active on your server. You will need to manually restore the file via phpMyAdmin or another method.</p><br/>";
1342
  return false;
1343
  }
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Backup and restore: your content and database can be automatically backed up to Amazon S3, Dropbox, Google Drive, FTP or email, on separate schedules.
6
  Author: David Anderson.
7
+ Version: 1.3.18
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
15
  //Put in old-WP-version warning, and point them to where they can get help
16
  //Add SFTP, Box.Net, SugarSync and Microsoft Skydrive support??
17
  //The restorer has a hard-coded wp-content - fix
 
18
  //Button for wiping files. Also auto-wipe on de-activate/de-install.
19
  //Change DB encryption to not require whole gzip in memory (twice)
20
  //improve error reporting / pretty up return messages in admin area. One thing: have a "backup is now finished" flag. Otherwise with the resuming things get ambiguous/confusing. See http://wordpress.org/support/topic/backup-status - user was not aware that backup completely failed. Maybe a "backup status" field for each nonce that gets updated? (Even via AJAX?)
78
 
79
  class UpdraftPlus {
80
 
81
+ var $version = '1.3.18';
82
  var $plugin_title = 'UpdraftPlus Backup/Restore';
83
 
84
  // Choices will be shown in the admin menu in the order used here
895
  foreach ($all_tables as $table) {
896
  $total_tables++;
897
  // Increase script execution time-limit to 15 min for every table.
898
+ if ( !@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == "off") @set_time_limit(15*60);
899
  // The table file may already exist if we have produced it on a previous run
900
  $table_file_prefix = $file_base.'-db-table-'.$table.'.table';
901
  if (file_exists($updraft_dir.'/'.$table_file_prefix.'.gz')) {
1336
  }
1337
  echo '</div>'; //close the updraft_restore_progress div
1338
  # The 'off' check is for badly configured setups - http://wordpress.org/support/topic/plugin-wp-super-cache-warning-php-safe-mode-enabled-but-safe-mode-is-off
1339
+ if(@ini_get('safe_mode') && strtolower(@ini_get('safe_mode')) != "off") {
1340
  echo "<p>DB could not be restored because PHP safe_mode is active on your server. You will need to manually restore the file via phpMyAdmin or another method.</p><br/>";
1341
  return false;
1342
  }