UpdraftPlus WordPress Backup Plugin - Version 1.9.5

Version Description

  • 2014/04/25 =
  • FIX: Backups were not uploaded successfully in 1.9.4 if you were using both an encrypted database and Google Drive storage
Download this release

Release Info

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

Code changes from version 1.9.4 to 1.9.5

admin.php CHANGED
@@ -744,7 +744,7 @@ class UpdraftPlus_Admin {
744
  $max_execution_time = (int)@ini_get('max_execution_time');
745
 
746
  if ($max_execution_time>0 && $max_execution_time<61) {
747
- $warn[] = __('The PHP setup on this webserver allows only %s seconds for PHP to run, and does not allow this limit to be raised. If you have a lot of data to import, and if the restore operation times out, then you will need to ask your web hosting company for ways to raise this limit (or attempt the restoration piece-by-piece).', 'updraftplus');
748
  }
749
 
750
  if (isset($backups[$timestamp]['native']) && false == $backups[$timestamp]['native']) {
744
  $max_execution_time = (int)@ini_get('max_execution_time');
745
 
746
  if ($max_execution_time>0 && $max_execution_time<61) {
747
+ $warn[] = sprintf(__('The PHP setup on this webserver allows only %s seconds for PHP to run, and does not allow this limit to be raised. If you have a lot of data to import, and if the restore operation times out, then you will need to ask your web hosting company for ways to raise this limit (or attempt the restoration piece-by-piece).', 'updraftplus'), $max_execution_time);
748
  }
749
 
750
  if (isset($backups[$timestamp]['native']) && false == $backups[$timestamp]['native']) {
backup.php CHANGED
@@ -297,7 +297,16 @@ class UpdraftPlus_Backup {
297
  // Services *must* be an array
298
  public function prune_retained_backups($services) {
299
 
300
- global $updraftplus;
 
 
 
 
 
 
 
 
 
301
 
302
  // If they turned off deletion on local backups, then there is nothing to do
303
  if (UpdraftPlus_Options::get_updraft_option('updraft_delete_local') == 0 && count($services) == 1 && in_array('none', $services)) {
297
  // Services *must* be an array
298
  public function prune_retained_backups($services) {
299
 
300
+ global $updraftplus, $wpdb;
301
+
302
+ if (method_exists($wpdb, 'check_connection')) {
303
+ if (!$wpdb->check_connection(false)) {
304
+ $updraftplus->reschedule(60);
305
+ $updraftplus->log("It seems the database went away; scheduling a resumption and terminating for now");
306
+ $updraftplus->record_still_alive();
307
+ die;
308
+ }
309
+ }
310
 
311
  // If they turned off deletion on local backups, then there is nothing to do
312
  if (UpdraftPlus_Options::get_updraft_option('updraft_delete_local') == 0 && count($services) == 1 && in_array('none', $services)) {
includes/Google/IO/Stream.php CHANGED
@@ -76,9 +76,16 @@ class Google_IO_Stream extends Google_IO_Abstract
76
  // $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
77
  // }
78
 
 
 
 
 
 
79
  // Added
80
  if (empty($this->options['disable_verify_peer'])) {
81
  $requestSslContext['verify_peer'] = true;
 
 
82
  $requestSslContext['allow_self_signed'] = true;
83
  }
84
  if (!empty($this->options['cafile'])) $requestSslContext['cafile'] = $this->options['cafile'];
@@ -96,8 +103,6 @@ if (!empty($this->options['cafile'])) $requestSslContext['cafile'] = $this->opti
96
 
97
  $context = stream_context_create($options);
98
 
99
- $url = $request->getUrl();
100
-
101
  if ($request->canGzip()) {
102
  $url = self::ZLIB . $url;
103
  }
76
  // $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
77
  // }
78
 
79
+
80
+ $url = $request->getUrl();
81
+
82
+ if (preg_match('#^https?://([^/]+)/#', $url, $umatches)) { $cname = $umatches[1]; } else { $cname = false; }
83
+
84
  // Added
85
  if (empty($this->options['disable_verify_peer'])) {
86
  $requestSslContext['verify_peer'] = true;
87
+ if (!empty($cname)) $requestSslContext['CN_match'] = $cname;
88
+ } else {
89
  $requestSslContext['allow_self_signed'] = true;
90
  }
91
  if (!empty($this->options['cafile'])) $requestSslContext['cafile'] = $this->options['cafile'];
103
 
104
  $context = stream_context_create($options);
105
 
 
 
106
  if ($request->canGzip()) {
107
  $url = self::ZLIB . $url;
108
  }
includes/S3.php CHANGED
@@ -131,6 +131,9 @@ class UpdraftPlus_S3
131
  self::$useSSLValidation = $validate;
132
  }
133
 
 
 
 
134
 
135
  /**
136
  * Set SSL client certificates (experimental)
@@ -976,6 +979,7 @@ class UpdraftPlus_S3
976
  */
977
  public static function getBucketLocation($bucket)
978
  {
 
979
  $rest = new UpdraftPlus_S3Request('GET', $bucket, '', self::$endpoint);
980
  $rest->setParameter('location', null);
981
  $rest = $rest->getResponse();
@@ -2001,7 +2005,7 @@ final class UpdraftPlus_S3Request
2001
  if (UpdraftPlus_S3::$useSSL)
2002
  {
2003
  // SSL Validation can now be optional for those with broken OpenSSL installations
2004
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, UpdraftPlus_S3::$useSSLValidation ? 1 : 0);
2005
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, UpdraftPlus_S3::$useSSLValidation ? 1 : 0);
2006
 
2007
  if (UpdraftPlus_S3::$sslKey !== null) curl_setopt($curl, CURLOPT_SSLKEY, UpdraftPlus_S3::$sslKey);
131
  self::$useSSLValidation = $validate;
132
  }
133
 
134
+ public static function getuseSSL() {
135
+ return self::$useSSL;
136
+ }
137
 
138
  /**
139
  * Set SSL client certificates (experimental)
979
  */
980
  public static function getBucketLocation($bucket)
981
  {
982
+
983
  $rest = new UpdraftPlus_S3Request('GET', $bucket, '', self::$endpoint);
984
  $rest->setParameter('location', null);
985
  $rest = $rest->getResponse();
2005
  if (UpdraftPlus_S3::$useSSL)
2006
  {
2007
  // SSL Validation can now be optional for those with broken OpenSSL installations
2008
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, UpdraftPlus_S3::$useSSLValidation ? 2 : 0);
2009
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, UpdraftPlus_S3::$useSSLValidation ? 1 : 0);
2010
 
2011
  if (UpdraftPlus_S3::$sslKey !== null) curl_setopt($curl, CURLOPT_SSLKEY, UpdraftPlus_S3::$sslKey);
methods/ftp.php CHANGED
@@ -95,7 +95,7 @@ class UpdraftPlus_BackupModule_ftp {
95
  if (!$ftp->connect()) return new WP_Error('ftp_login_failed', sprintf(__("%s login failure",'updraftplus'), 'FTP'));
96
 
97
  $ftp_remote_path = $updraftplus->get_job_option('updraft_ftp_remote_path');
98
- if ($ftp_remote_path) $ftp_remote_path = trailingslashit($ftp_remove_path);
99
 
100
  $dirlist = $ftp->dir_list($ftp_remote_path);
101
 
95
  if (!$ftp->connect()) return new WP_Error('ftp_login_failed', sprintf(__("%s login failure",'updraftplus'), 'FTP'));
96
 
97
  $ftp_remote_path = $updraftplus->get_job_option('updraft_ftp_remote_path');
98
+ if ($ftp_remote_path) $ftp_remote_path = trailingslashit($ftp_remote_path);
99
 
100
  $dirlist = $ftp->dir_list($ftp_remote_path);
101
 
methods/googledrive.php CHANGED
@@ -346,6 +346,7 @@ class UpdraftPlus_BackupModule_googledrive {
346
  $parent_id = $this->get_parent_id($opts);
347
  } catch (Exception $e) {
348
  $updraftplus->log("Google Drive delete: failed to access parent folder: ".$e->getMessage().' (line: '.$e->getLine().', file: '.$e->getFile().')');
 
349
  return false;
350
  }
351
 
@@ -419,7 +420,10 @@ class UpdraftPlus_BackupModule_googledrive {
419
  }
420
  }
421
 
422
- if (false === strpos(get_include_path(), UPDRAFTPLUS_DIR.'/includes')) set_include_path(get_include_path().PATH_SEPARATOR.UPDRAFTPLUS_DIR.'/includes');
 
 
 
423
 
424
  if (!class_exists('Google_Config')) require_once 'Google/Config.php';
425
  if (!class_exists('Google_Client')) require_once 'Google/Client.php';
@@ -463,7 +467,7 @@ class UpdraftPlus_BackupModule_googledrive {
463
  } elseif (is_a($io, 'Google_IO_Stream')) {
464
  $setopts['timeout'] = 15;
465
  # We had to modify the SDK to support this
466
- if (!UpdraftPlus_Options::get_updraft_option('updraft_ssl_useservercerts')) $setopts['cacert'] = UPDRAFTPLUS_DIR.'/includes/cacert.pem';
467
  if (UpdraftPlus_Options::get_updraft_option('updraft_ssl_disableverify')) $setopts['disable_verify_peer'] = true;
468
  }
469
 
346
  $parent_id = $this->get_parent_id($opts);
347
  } catch (Exception $e) {
348
  $updraftplus->log("Google Drive delete: failed to access parent folder: ".$e->getMessage().' (line: '.$e->getLine().', file: '.$e->getFile().')');
349
+ $updraftplus->log(sprintf(__('Failed to upload to %s','updraftplus'),__('Google Drive','updraftplus')).': '.__('failed to access parent folder', 'updraftplus').' ('.$e->getMessage().')', 'error');
350
  return false;
351
  }
352
 
420
  }
421
  }
422
 
423
+ $included_paths = explode(PATH_SEPARATOR, get_include_path());
424
+ if (!in_array(UPDRAFTPLUS_DIR.'/includes', $included_paths)) {
425
+ set_include_path(UPDRAFTPLUS_DIR.'/includes'.PATH_SEPARATOR.get_include_path());
426
+ }
427
 
428
  if (!class_exists('Google_Config')) require_once 'Google/Config.php';
429
  if (!class_exists('Google_Client')) require_once 'Google/Client.php';
467
  } elseif (is_a($io, 'Google_IO_Stream')) {
468
  $setopts['timeout'] = 15;
469
  # We had to modify the SDK to support this
470
+ if (!UpdraftPlus_Options::get_updraft_option('updraft_ssl_useservercerts') || (version_compare(PHP_VERSION, '5.6.0', '<'))) $setopts['cafile'] = UPDRAFTPLUS_DIR.'/includes/cacert.pem';
471
  if (UpdraftPlus_Options::get_updraft_option('updraft_ssl_disableverify')) $setopts['disable_verify_peer'] = true;
472
  }
473
 
methods/openstack2.php CHANGED
@@ -136,7 +136,8 @@ class UpdraftPlus_BackupModule_openstack extends UpdraftPlus_BackupModule_openst
136
  <?php
137
  }
138
 
139
- public function config_print_javascript_onready() {
 
140
  parent::config_print_javascript_onready(array('tenant', 'user', 'password', 'authurl', 'region'));
141
  }
142
 
136
  <?php
137
  }
138
 
139
+ // The default value is needed only to satisfy PHP strict standards
140
+ public function config_print_javascript_onready($keys = array()) {
141
  parent::config_print_javascript_onready(array('tenant', 'user', 'password', 'authurl', 'region'));
142
  }
143
 
methods/s3.php CHANGED
@@ -65,23 +65,25 @@ class UpdraftPlus_BackupModule_s3 {
65
 
66
  if (!$nossl) {
67
  $curl_version = (function_exists('curl_version')) ? curl_version() : array('features' => null);
68
- $curl_ssl_supported= ($curl_version['features'] & CURL_VERSION_SSL);
69
  if ($curl_ssl_supported) {
70
- $s3->useSSL = true;
71
  if ($disableverify) {
72
- $s3->useSSLValidation = false;
73
  $updraftplus->log("S3: Disabling verification of SSL certificates");
 
 
74
  }
75
  if ($useservercerts) {
76
  $updraftplus->log("S3: Using the server's SSL certificates");
77
  } else {
78
- $s3->SSLCACert = UPDRAFTPLUS_DIR.'/includes/cacert.pem';
79
  }
80
  } else {
 
81
  $updraftplus->log("S3: Curl/SSL is not available. Communications will not be encrypted.");
82
  }
83
  } else {
84
- $s3->useSSL = false;
85
  $updraftplus->log("SSL was disabled via the user's preference. Communications will not be encrypted.");
86
  }
87
 
@@ -622,7 +624,7 @@ class UpdraftPlus_BackupModule_s3 {
622
  } else {
623
  echo __('Success','updraftplus').": ${bucket_verb}".__('We accessed the bucket, and were able to create files within it.','updraftplus').' ';
624
  $comm_with = ($config['key'] == 's3generic') ? $endpoint : $config['whoweare_long'];
625
- if ($s3->useSSL) {
626
  echo sprintf(__('The communication with %s was encrypted.', 'updraftplus'), $comm_with);
627
  } else {
628
  echo sprintf(__('The communication with %s was not encrypted.', 'updraftplus'), $comm_with);
65
 
66
  if (!$nossl) {
67
  $curl_version = (function_exists('curl_version')) ? curl_version() : array('features' => null);
68
+ $curl_ssl_supported = ($curl_version['features'] & CURL_VERSION_SSL);
69
  if ($curl_ssl_supported) {
 
70
  if ($disableverify) {
71
+ $s3->setSSL(true, false);
72
  $updraftplus->log("S3: Disabling verification of SSL certificates");
73
+ } else {
74
+ $s3->setSSL(true, true);
75
  }
76
  if ($useservercerts) {
77
  $updraftplus->log("S3: Using the server's SSL certificates");
78
  } else {
79
+ $s3->setSSLAuth(null, null, UPDRAFTPLUS_DIR.'/includes/cacert.pem');
80
  }
81
  } else {
82
+ $s3->setSSL(false, false);
83
  $updraftplus->log("S3: Curl/SSL is not available. Communications will not be encrypted.");
84
  }
85
  } else {
86
+ $s3->setSSL(false, false);
87
  $updraftplus->log("SSL was disabled via the user's preference. Communications will not be encrypted.");
88
  }
89
 
624
  } else {
625
  echo __('Success','updraftplus').": ${bucket_verb}".__('We accessed the bucket, and were able to create files within it.','updraftplus').' ';
626
  $comm_with = ($config['key'] == 's3generic') ? $endpoint : $config['whoweare_long'];
627
+ if ($s3->getuseSSL()) {
628
  echo sprintf(__('The communication with %s was encrypted.', 'updraftplus'), $comm_with);
629
  } else {
630
  echo sprintf(__('The communication with %s was not encrypted.', 'updraftplus'), $comm_with);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Backup with UpdraftPlus, DavidAnderson
3
  Tags: backup, backups, restore, database, rackspace, amazon, s3, amazon s3, s3 compatible, dropbox, google drive, rackspace cloud files, rackspace, cloud files, dreamhost, dreamobjects, ftp, ftp backup, webdav, google cloud storage, cloudian, cloudn, connectria, constant cloud, eucalyptus, nifty, nimbula, bitcasa, back up, multisite, restoration, sftp, ftps, scp, migrate, duplicate, copy, updraft, schedule, mysql backup, database backup, db backup, website backup, wordpress backup, full backup, openstack, swift
4
  Requires at least: 3.2
5
  Tested up to: 3.9
6
- Stable tag: 1.9.4
7
  Author URI: http://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
@@ -16,7 +16,7 @@ Easy and complete backups + restoration. Manual or automated backups (backup to
16
 
17
  <strong>Top-quality:</strong> UpdraftPlus is the <a href="http://rankwp.com/plugins/updraftplus">highest-ranking backup plugin on rankwp.com</a> (ranks in the top 50 out of 30,000 WordPress plugins for quality on rankwp.com - last checked 8th January 2014).
18
 
19
- <strong>Tens of thousands of users:</strong> widely tested and reliable (over 790,000 downloads). Ranks in the top 100 most used of all WordPress plugins on rankwp.com. Millions of backups completed!
20
 
21
  * Supports WordPress backups to Amazon S3 (or compatible), Dropbox, Rackspace Cloud Files, Google Drive, Google Cloud Storage, DreamHost DreamObjects, FTP, OpenStack (Swift) and email. Also (via an add-on) FTP over SSL, SFTP, SCP, WebDAV (and compatible services, e.g. Yandex) and Bitcasa. (Note: Microsoft forbid OneDrive/SkyDrive to be used by backup software). Some examples of S3-compatible providers: Cloudian, Connectria, Constant, Eucalyptus, Nifty, Nimbula, Cloudn.
22
  * Quick restore (both file and database backups)
@@ -143,6 +143,9 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
143
 
144
  The <a href="http://updraftplus.com/news/">UpdraftPlus backup blog</a> is the best place to learn in more detail about any important changes.
145
 
 
 
 
146
  = 1.9.4 - 2014/04/23 =
147
 
148
  * FEATURE: New remote storage back-end for OpenStack Swift
@@ -812,4 +815,4 @@ We recognise and thank the following for code and/or libraries used and/or modif
812
  Furthermore, reliance upon any non-English translation is at your own risk. UpdraftPlus can give no guarantees that translations from the original English are accurate.
813
 
814
  == Upgrade Notice ==
815
- * 1.9.4 : New back-ends for GoogleDrive, Bitcasa and OpenStack. Restore BackWPup backups. Various tweaks + bugfixes. Translations updated. Recommended update for all.
3
  Tags: backup, backups, restore, database, rackspace, amazon, s3, amazon s3, s3 compatible, dropbox, google drive, rackspace cloud files, rackspace, cloud files, dreamhost, dreamobjects, ftp, ftp backup, webdav, google cloud storage, cloudian, cloudn, connectria, constant cloud, eucalyptus, nifty, nimbula, bitcasa, back up, multisite, restoration, sftp, ftps, scp, migrate, duplicate, copy, updraft, schedule, mysql backup, database backup, db backup, website backup, wordpress backup, full backup, openstack, swift
4
  Requires at least: 3.2
5
  Tested up to: 3.9
6
+ Stable tag: 1.9.5
7
  Author URI: http://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
16
 
17
  <strong>Top-quality:</strong> UpdraftPlus is the <a href="http://rankwp.com/plugins/updraftplus">highest-ranking backup plugin on rankwp.com</a> (ranks in the top 50 out of 30,000 WordPress plugins for quality on rankwp.com - last checked 8th January 2014).
18
 
19
+ <strong>Tens of thousands of users:</strong> widely tested and reliable (over 780,000 downloads). Ranks in the top 100 most used of all WordPress plugins on rankwp.com. Millions of backups completed!
20
 
21
  * Supports WordPress backups to Amazon S3 (or compatible), Dropbox, Rackspace Cloud Files, Google Drive, Google Cloud Storage, DreamHost DreamObjects, FTP, OpenStack (Swift) and email. Also (via an add-on) FTP over SSL, SFTP, SCP, WebDAV (and compatible services, e.g. Yandex) and Bitcasa. (Note: Microsoft forbid OneDrive/SkyDrive to be used by backup software). Some examples of S3-compatible providers: Cloudian, Connectria, Constant, Eucalyptus, Nifty, Nimbula, Cloudn.
22
  * Quick restore (both file and database backups)
143
 
144
  The <a href="http://updraftplus.com/news/">UpdraftPlus backup blog</a> is the best place to learn in more detail about any important changes.
145
 
146
+ = 1.9.5 - 2014/04/25 =
147
+ * FIX: Backups were not uploaded successfully in 1.9.4 if you were using both an encrypted database and Google Drive storage
148
+
149
  = 1.9.4 - 2014/04/23 =
150
 
151
  * FEATURE: New remote storage back-end for OpenStack Swift
815
  Furthermore, reliance upon any non-English translation is at your own risk. UpdraftPlus can give no guarantees that translations from the original English are accurate.
816
 
817
  == Upgrade Notice ==
818
+ * 1.9.4 : New back-ends for GoogleDrive, Bitcasa and OpenStack. Restore BackWPup backups. Various tweaks + bugfixes. Translations updated. Recommended update for all. 1.9.5: Essential fix for 1.9.4 for uploading your backup to Google Drive if your database was encrypted.
restorer.php CHANGED
@@ -1006,7 +1006,6 @@ class Updraft_Restorer extends WP_Upgrader {
1006
  # 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
1007
  if (@ini_get('safe_mode') && 'off' != strtolower(@ini_get('safe_mode'))) {
1008
  echo "<p>".__('Warning: PHP safe_mode is active on your server. Timeouts are much more likely. If these happen, then you will need to manually restore the file via phpMyAdmin or another method.', 'updraftplus')."</p><br/>";
1009
- return false;
1010
  }
1011
 
1012
  $db_basename = 'backup.db.gz';
@@ -1239,7 +1238,7 @@ class Updraft_Restorer extends WP_Upgrader {
1239
 
1240
  # We now have a complete line - process it
1241
 
1242
- if (3 == $sql_type && $sql_line && strlen($sql_line.$buffer) > $max_allowed_packet) {
1243
  $logit = substr($sql_line.$buffer, 0, 100);
1244
  $updraftplus->log(sprintf("An SQL line that is larger than the maximum packet size and cannot be split was found: %s", '('.strlen($sql_line).', '.strlen($buffer).', '.$logit.' ...)'));
1245
 
1006
  # 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
1007
  if (@ini_get('safe_mode') && 'off' != strtolower(@ini_get('safe_mode'))) {
1008
  echo "<p>".__('Warning: PHP safe_mode is active on your server. Timeouts are much more likely. If these happen, then you will need to manually restore the file via phpMyAdmin or another method.', 'updraftplus')."</p><br/>";
 
1009
  }
1010
 
1011
  $db_basename = 'backup.db.gz';
1238
 
1239
  # We now have a complete line - process it
1240
 
1241
+ if (3 == $sql_type && $sql_line && strlen($sql_line) > $max_allowed_packet) {
1242
  $logit = substr($sql_line.$buffer, 0, 100);
1243
  $updraftplus->log(sprintf("An SQL line that is larger than the maximum packet size and cannot be split was found: %s", '('.strlen($sql_line).', '.strlen($buffer).', '.$logit.' ...)'));
1244
 
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: http://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.9.4
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
@@ -193,7 +193,7 @@ define('UPDRAFT_DEFAULT_UPLOADS_EXCLUDE','backup*,*backups,backwpup*,wp-clone');
193
 
194
  # The following can go in your wp-config.php
195
  # Tables whose data can be safed without significant loss, if (and only if) the attempt to back them up fails (e.g. bwps_log, from WordPress Better Security, is log data; but individual entries can be huge and cause out-of-memory fatal errors on low-resource environments). Comma-separate the table names (without the WordPress table prefix).
196
- if (!defined('UPDRAFTPLUS_DATA_OPTIONAL_TABLES')) define('UPDRAFTPLUS_DATA_OPTIONAL_TABLES', 'bwps_log,statpress,slim_stats,redirection_logs');
197
  if (!defined('UPDRAFTPLUS_ZIP_EXECUTABLE')) define('UPDRAFTPLUS_ZIP_EXECUTABLE', "/usr/bin/zip,/bin/zip,/usr/local/bin/zip,/usr/sfw/bin/zip,/usr/xdg4/bin/zip,/opt/bin/zip");
198
  if (!defined('UPDRAFTPLUS_MYSQLDUMP_EXECUTABLE')) define('UPDRAFTPLUS_MYSQLDUMP_EXECUTABLE', "/usr/bin/mysqldump,/bin/mysqldump,/usr/local/bin/mysqldump,/usr/sfw/bin/mysqldump,/usr/xdg4/bin/mysqldump,/opt/bin/mysqldump");
199
  # If any individual file size is greater than this, then a warning is given
@@ -491,7 +491,13 @@ class UpdraftPlus {
491
 
492
  public function load_translations() {
493
  // Tell WordPress where to find the translations
494
- load_plugin_textdomain('updraftplus', false, basename(dirname(__FILE__)).'/languages');
 
 
 
 
 
 
495
  }
496
 
497
  // Cleans up temporary files found in the updraft directory (and some in the site root - pclzip)
@@ -506,6 +512,7 @@ class UpdraftPlus {
506
  foreach ($all_jobs as $job) {
507
  $val = maybe_unserialize($job['option_value']);
508
  # TODO: Can simplify this after a while (now all jobs use job_time_ms) - 1 Jan 2014
 
509
  if (!empty($val['backup_time_ms']) && time() > $val['backup_time_ms'] + 86400) {
510
  delete_option($job['option_name']);
511
  } elseif (!empty($val['job_time_ms']) && time() > $val['job_time_ms'] + 86400) {
@@ -928,21 +935,6 @@ class UpdraftPlus {
928
  return (false == $ciphertext) ? $rijndael->decrypt(file_get_contents($fullpath)) : $rijndael->decrypt($ciphertext);
929
  }
930
 
931
- public function encrypt($fullpath, $key, $rformat = 'inline') {
932
- if (!function_exists('mcrypt_encrypt')) {
933
- $this->log(sprintf(__('Your web-server does not have the %s module installed.', 'updraftplus'), 'mcrypt').' '.__('Without it, encryption will be a lot slower.', 'updraftplus'), 'warning', 'nomcrypt');
934
- }
935
- if ($this->have_addons < 10) {
936
- $this->log(__("A future release of UpdraftPlus will move the encryption feature into an add-on (and add more features to it).", 'updraftplus').' '.sprintf(__('See: %s', 'updraftplus'), 'http://updraftplus.com/next-updraftplus-release-ready-testing/'), 'warning', 'needpremiumforcrypt');
937
- }
938
- $this->ensure_phpseclib('Crypt_Rijndael', 'Crypt/Rijndael');
939
- $rijndael = new Crypt_Rijndael();
940
- $rijndael->setKey($key);
941
- if ('inline' === $rformat) {
942
- return $rijndael->encrypt(file_get_contents($fullpath));
943
- }
944
- }
945
-
946
  function detect_safe_mode() {
947
  return (@ini_get('safe_mode') && strtolower(@ini_get('safe_mode')) != "off") ? 1 : 0;
948
  }
4
  Plugin URI: http://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.9.5
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
193
 
194
  # The following can go in your wp-config.php
195
  # Tables whose data can be safed without significant loss, if (and only if) the attempt to back them up fails (e.g. bwps_log, from WordPress Better Security, is log data; but individual entries can be huge and cause out-of-memory fatal errors on low-resource environments). Comma-separate the table names (without the WordPress table prefix).
196
+ if (!defined('UPDRAFTPLUS_DATA_OPTIONAL_TABLES')) define('UPDRAFTPLUS_DATA_OPTIONAL_TABLES', 'bwps_log,statpress,slim_stats,redirection_logs,Counterize,Counterize_Referers,Counterize_UserAgents');
197
  if (!defined('UPDRAFTPLUS_ZIP_EXECUTABLE')) define('UPDRAFTPLUS_ZIP_EXECUTABLE', "/usr/bin/zip,/bin/zip,/usr/local/bin/zip,/usr/sfw/bin/zip,/usr/xdg4/bin/zip,/opt/bin/zip");
198
  if (!defined('UPDRAFTPLUS_MYSQLDUMP_EXECUTABLE')) define('UPDRAFTPLUS_MYSQLDUMP_EXECUTABLE', "/usr/bin/mysqldump,/bin/mysqldump,/usr/local/bin/mysqldump,/usr/sfw/bin/mysqldump,/usr/xdg4/bin/mysqldump,/opt/bin/mysqldump");
199
  # If any individual file size is greater than this, then a warning is given
491
 
492
  public function load_translations() {
493
  // Tell WordPress where to find the translations
494
+ load_plugin_textdomain('updraftplus', false, basename(dirname(__FILE__)).'/languages/');
495
+ # The Google Analyticator plugin does something horrible: loads an old version of the Google SDK on init, always - which breaks us
496
+ if ((defined('DOING_CRON') && DOING_CRON) || (isset($_GET['page']) && $_GET['page'] == 'updraftplus')) {
497
+ remove_action('init', 'ganalyticator_stats_init');
498
+ # Appointments+ does the same; but provides a cleaner way to disable it
499
+ define('APP_GCAL_DISABLE', true);
500
+ }
501
  }
502
 
503
  // Cleans up temporary files found in the updraft directory (and some in the site root - pclzip)
512
  foreach ($all_jobs as $job) {
513
  $val = maybe_unserialize($job['option_value']);
514
  # TODO: Can simplify this after a while (now all jobs use job_time_ms) - 1 Jan 2014
515
+ # TODO: This will need changing when incremental backups are introduced
516
  if (!empty($val['backup_time_ms']) && time() > $val['backup_time_ms'] + 86400) {
517
  delete_option($job['option_name']);
518
  } elseif (!empty($val['job_time_ms']) && time() > $val['job_time_ms'] + 86400) {
935
  return (false == $ciphertext) ? $rijndael->decrypt(file_get_contents($fullpath)) : $rijndael->decrypt($ciphertext);
936
  }
937
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
938
  function detect_safe_mode() {
939
  return (@ini_get('safe_mode') && strtolower(@ini_get('safe_mode')) != "off") ? 1 : 0;
940
  }