UpdraftPlus WordPress Backup Plugin - Version 1.8.13

Version Description

  • 2014/03/07 =

  • FIX: Fix bug that prevented changes to your schedule being saved on network (WPMU) installs (Multisite add-on)

Download this release

Release Info

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

Code changes from version 1.8.12 to 1.8.13

Files changed (3) hide show
  1. admin.php +10 -1
  2. readme.txt +5 -1
  3. updraftplus.php +32 -36
admin.php CHANGED
@@ -2313,7 +2313,16 @@ CREATE TABLE $wpdb->signups (
2313
  <th><?php _e('File backup intervals','updraftplus'); ?>:</th>
2314
  <td><select id="updraft_interval" name="updraft_interval" onchange="updraft_check_same_times();">
2315
  <?php
2316
- $intervals = array ("manual" => _x("Manual",'i.e. Non-automatic','updraftplus'), 'every4hours' => __("Every 4 hours",'updraftplus'), 'every8hours' => __("Every 8 hours",'updraftplus'), 'twicedaily' => __("Every 12 hours",'updraftplus'), 'daily' => __("Daily",'updraftplus'), 'weekly' => __("Weekly",'updraftplus'), 'fortnightly' => __("Fortnightly",'updraftplus'), 'monthly' => __("Monthly",'updraftplus'));
 
 
 
 
 
 
 
 
 
2317
  foreach ($intervals as $cronsched => $descrip) {
2318
  echo "<option value=\"$cronsched\" ";
2319
  if ($cronsched == UpdraftPlus_Options::get_updraft_option('updraft_interval','manual')) echo 'selected="selected"';
2313
  <th><?php _e('File backup intervals','updraftplus'); ?>:</th>
2314
  <td><select id="updraft_interval" name="updraft_interval" onchange="updraft_check_same_times();">
2315
  <?php
2316
+ $intervals = apply_filters('updraftplus_backup_intervals', array(
2317
+ "manual" => _x("Manual", 'i.e. Non-automatic', 'updraftplus'),
2318
+ 'every4hours' => __("Every 4 hours", 'updraftplus'),
2319
+ 'every8hours' => __("Every 8 hours", 'updraftplus'),
2320
+ 'twicedaily' => __("Every 12 hours", 'updraftplus'),
2321
+ 'daily' => __("Daily", 'updraftplus'),
2322
+ 'weekly' => __("Weekly", 'updraftplus'),
2323
+ 'fortnightly' => __("Fortnightly", 'updraftplus'),
2324
+ 'monthly' => __("Monthly", 'updraftplus')
2325
+ ));
2326
  foreach ($intervals as $cronsched => $descrip) {
2327
  echo "<option value=\"$cronsched\" ";
2328
  if ($cronsched == UpdraftPlus_Options::get_updraft_option('updraft_interval','manual')) echo 'selected="selected"';
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, back up, multisite, restoration, sftp, ftps, scp, migrate, duplicate, copy, updraft, schedule, mysql backup, database backup, db backup, website backup, wordpress backup, full backup
4
  Requires at least: 3.2
5
  Tested up to: 3.8.1
6
- Stable tag: 1.8.12
7
  Author URI: http://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
@@ -139,6 +139,10 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
139
 
140
  The <a href="http://updraftplus.com/news/">UpdraftPlus backup blog</a> is the best place to learn in more detail about any important changes.
141
 
 
 
 
 
142
  = 1.8.12 - 2014/02/27 =
143
 
144
  * FIX: Prevent spurious warning message showing when authenticating new Dropbox connections (introduced in 1.8.11)
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, back up, multisite, restoration, sftp, ftps, scp, migrate, duplicate, copy, updraft, schedule, mysql backup, database backup, db backup, website backup, wordpress backup, full backup
4
  Requires at least: 3.2
5
  Tested up to: 3.8.1
6
+ Stable tag: 1.8.13
7
  Author URI: http://updraftplus.com
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
139
 
140
  The <a href="http://updraftplus.com/news/">UpdraftPlus backup blog</a> is the best place to learn in more detail about any important changes.
141
 
142
+ = 1.8.13 - 2014/03/07 =
143
+
144
+ * FIX: Fix bug that prevented changes to your schedule being saved on network (WPMU) installs (Multisite add-on)
145
+
146
  = 1.8.12 - 2014/02/27 =
147
 
148
  * FIX: Prevent spurious warning message showing when authenticating new Dropbox connections (introduced in 1.8.11)
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.8.12
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
@@ -2179,27 +2179,41 @@ class UpdraftPlus {
2179
  }
2180
 
2181
  /*
2182
- this function is both the backup scheduler and ostensibly a filter callback for saving the option.
2183
  it is called in the register_setting for the updraft_interval, which means when the admin settings
2184
- are saved it is called. it returns the actual result from wp_filter_nohtml_kses (a sanitization filter)
2185
- so the option can be properly saved.
2186
  */
2187
  public function schedule_backup($interval) {
2188
- //clear schedule and add new so we don't stack up scheduled backups
 
2189
  wp_clear_scheduled_hook('updraft_backup');
2190
- switch($interval) {
2191
- case 'every4hours':
2192
- case 'every8hours':
2193
- case 'twicedaily':
2194
- case 'daily':
2195
- case 'weekly':
2196
- case 'fortnightly':
2197
- case 'monthly':
2198
- $first_time = apply_filters('updraftplus_schedule_firsttime_files', time()+30);
2199
- wp_schedule_event($first_time, $interval, 'updraft_backup');
2200
- break;
2201
- }
2202
- return wp_filter_nohtml_kses($interval);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2203
  }
2204
 
2205
  public function deactivation () {
@@ -2218,24 +2232,6 @@ class UpdraftPlus {
2218
  return $client_id;
2219
  }
2220
 
2221
- public function schedule_backup_database($interval) {
2222
- //clear schedule and add new so we don't stack up scheduled backups
2223
- wp_clear_scheduled_hook('updraft_backup_database');
2224
- switch($interval) {
2225
- case 'every4hours':
2226
- case 'every8hours':
2227
- case 'twicedaily':
2228
- case 'daily':
2229
- case 'weekly':
2230
- case 'fortnightly':
2231
- case 'monthly':
2232
- $first_time = apply_filters('updraftplus_schedule_firsttime_db', time()+30);
2233
- wp_schedule_event($first_time, $interval, 'updraft_backup_database');
2234
- break;
2235
- }
2236
- return wp_filter_nohtml_kses($interval);
2237
- }
2238
-
2239
  //wp-cron only has hourly, daily and twicedaily, so we need to add some of our own
2240
  public function modify_cron_schedules($schedules) {
2241
  $schedules['weekly'] = array( 'interval' => 604800, 'display' => 'Once Weekly' );
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.8.13
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Text Domain: updraftplus
2179
  }
2180
 
2181
  /*
2182
+ This function is both the backup scheduler and ostensibly a filter callback for saving the option.
2183
  it is called in the register_setting for the updraft_interval, which means when the admin settings
2184
+ are saved it is called.
 
2185
  */
2186
  public function schedule_backup($interval) {
2187
+
2188
+ // Clear schedule so that we don't stack up scheduled backups
2189
  wp_clear_scheduled_hook('updraft_backup');
2190
+
2191
+ if ('manual' == $interval) return 'manual';
2192
+
2193
+ $valid_schedules = wp_get_schedules();
2194
+ if (empty($valid_schedules[$interval])) $interval = 'daily';
2195
+
2196
+ $first_time = apply_filters('updraftplus_schedule_firsttime_files', time()+30);
2197
+ wp_schedule_event($first_time, $interval, 'updraft_backup');
2198
+
2199
+ return $interval;
2200
+ }
2201
+
2202
+ public function schedule_backup_database($interval) {
2203
+
2204
+ // Clear schedule so that we don't stack up scheduled backups
2205
+ wp_clear_scheduled_hook('updraft_backup_database');
2206
+
2207
+ if ('manual' == $interval) return 'manual';
2208
+
2209
+ $valid_schedules = wp_get_schedules();
2210
+ if (empty($valid_schedules[$interval])) $interval = 'daily';
2211
+
2212
+ $first_time = apply_filters('updraftplus_schedule_firsttime_db', time()+30);
2213
+ wp_schedule_event($first_time, $interval, 'updraft_backup_database');
2214
+
2215
+ return $interval;
2216
+
2217
  }
2218
 
2219
  public function deactivation () {
2232
  return $client_id;
2233
  }
2234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2235
  //wp-cron only has hourly, daily and twicedaily, so we need to add some of our own
2236
  public function modify_cron_schedules($schedules) {
2237
  $schedules['weekly'] = array( 'interval' => 604800, 'display' => 'Once Weekly' );