Version Description
- Update: Display backup set name in available backup lists.
- Update: Remove backup retention limitations for WP BackItUp lite.
- Fix: Downloads for large files was running into buffer errors when other plugins turn on output buffers incorrectly. Added logic to flush and turn off buffering for all WP BackItUp downloads.
- Fix: Backup lists were not being ordered properly under available backups.
- Fix: Backup cleanup routines were not purging backups in correct order.
Download this release
Release Info
Developer | cssimmon |
Plugin | Backup and Restore WordPress – WPBackItUp Backup Plugin |
Version | 1.10.1 |
Comparing to | |
See all releases |
Code changes from version 1.10.0 to 1.10.1
- lib/includes/class-filesystem.php +3 -2
- lib/includes/class-wpbackitup-admin.php +15 -14
- lib/includes/handler_download.php +16 -7
- readme.txt +9 -2
- views/backup.php +6 -4
- wp-backitup.php +2 -2
lib/includes/class-filesystem.php
CHANGED
@@ -374,11 +374,12 @@ class WPBackItUp_FileSystem {
|
|
374 |
}
|
375 |
|
376 |
$folder_list = glob($path . $pattern, GLOB_ONLYDIR);
|
|
|
377 |
//Sort by Date Time so oldest is deleted first
|
378 |
-
usort($folder_list, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
379 |
|
380 |
$backup_count=0;
|
381 |
-
foreach ($folder_list as $key => $folder)
|
382 |
{
|
383 |
$this->logger->log_info(__METHOD__,' Folder:'.$folder);
|
384 |
$this->logger->log_info(__METHOD__,' Folder Date Time:'.filemtime($folder));
|
374 |
}
|
375 |
|
376 |
$folder_list = glob($path . $pattern, GLOB_ONLYDIR);
|
377 |
+
|
378 |
//Sort by Date Time so oldest is deleted first
|
379 |
+
//usort($folder_list, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
380 |
|
381 |
$backup_count=0;
|
382 |
+
foreach (array_reverse($folder_list) as $key => $folder)
|
383 |
{
|
384 |
$this->logger->log_info(__METHOD__,' Folder:'.$folder);
|
385 |
$this->logger->log_info(__METHOD__,' Folder Date Time:'.filemtime($folder));
|
lib/includes/class-wpbackitup-admin.php
CHANGED
@@ -645,7 +645,7 @@ class WPBackitup_Admin {
|
|
645 |
$backup_folder_name = str_replace('deleteRow', '', $_POST['filed']);
|
646 |
|
647 |
$backup_folder_path = WPBACKITUP__BACKUP_PATH .'/' . $backup_folder_name;
|
648 |
-
$DLT_backup_folder_path = WPBACKITUP__BACKUP_PATH .'/DLT_' . $backup_folder_name .'_' . current_time( 'timestamp' )
|
649 |
|
650 |
$logger->log_info(__METHOD__,'From:'.$backup_folder_path );
|
651 |
$logger->log_info(__METHOD__,'To:'.$DLT_backup_folder_path );
|
@@ -734,16 +734,16 @@ class WPBackitup_Admin {
|
|
734 |
}
|
735 |
|
736 |
//exceeds lite threshold
|
737 |
-
if ( !empty($data['backup_retained_number']) && ($this->license_type()==0) && ($data['backup_retained_number'] > 1) ){
|
738 |
-
$data['backup_retained_number'] = $this->defaults['lite_backup_retained_number'];
|
739 |
-
set_transient('settings-license-error', __(ucfirst($license_description) .' license holders may only save 1 backup archive.', $this->namespace), 60);
|
740 |
-
}
|
741 |
-
|
742 |
-
//exceeds pro threshold
|
743 |
-
if (!empty($data['backup_retained_number']) && ($this->license_type()==1) && ($data['backup_retained_number'] > 3)){
|
744 |
-
$data['backup_retained_number'] = $this->defaults['backup_retained_number'];
|
745 |
-
set_transient('settings-license-error', __(ucfirst($license_description) .' license holders may only save up to 3 backup archives.', $this->namespace), 60);
|
746 |
-
}
|
747 |
|
748 |
}
|
749 |
|
@@ -1273,10 +1273,11 @@ class WPBackitup_Admin {
|
|
1273 |
// ];
|
1274 |
}
|
1275 |
}
|
1276 |
-
//sort the list by date
|
1277 |
-
|
|
|
1278 |
|
1279 |
-
return $backup_list;
|
1280 |
}
|
1281 |
|
1282 |
return false;
|
645 |
$backup_folder_name = str_replace('deleteRow', '', $_POST['filed']);
|
646 |
|
647 |
$backup_folder_path = WPBACKITUP__BACKUP_PATH .'/' . $backup_folder_name;
|
648 |
+
$DLT_backup_folder_path = WPBACKITUP__BACKUP_PATH .'/DLT_' . $backup_folder_name .'_' . current_time( 'timestamp' );
|
649 |
|
650 |
$logger->log_info(__METHOD__,'From:'.$backup_folder_path );
|
651 |
$logger->log_info(__METHOD__,'To:'.$DLT_backup_folder_path );
|
734 |
}
|
735 |
|
736 |
//exceeds lite threshold
|
737 |
+
// if ( !empty($data['backup_retained_number']) && ($this->license_type()==0) && ($data['backup_retained_number'] > 1) ){
|
738 |
+
// $data['backup_retained_number'] = $this->defaults['lite_backup_retained_number'];
|
739 |
+
// set_transient('settings-license-error', __(ucfirst($license_description) .' license holders may only save 1 backup archive.', $this->namespace), 60);
|
740 |
+
// }
|
741 |
+
//
|
742 |
+
// //exceeds pro threshold
|
743 |
+
// if (!empty($data['backup_retained_number']) && ($this->license_type()==1) && ($data['backup_retained_number'] > 3)){
|
744 |
+
// $data['backup_retained_number'] = $this->defaults['backup_retained_number'];
|
745 |
+
// set_transient('settings-license-error', __(ucfirst($license_description) .' license holders may only save up to 3 backup archives.', $this->namespace), 60);
|
746 |
+
// }
|
747 |
|
748 |
}
|
749 |
|
1273 |
// ];
|
1274 |
}
|
1275 |
}
|
1276 |
+
//sort the list by date - doesnt work when impoing folders..use filename descending
|
1277 |
+
|
1278 |
+
//usort($backup_list, create_function('$a,$b', 'return $b["date_time"] - $a["date_time"];'));
|
1279 |
|
1280 |
+
return array_reverse($backup_list);
|
1281 |
}
|
1282 |
|
1283 |
return false;
|
lib/includes/handler_download.php
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
<?php if (!defined ('ABSPATH')) die('No direct access allowed (viewlog)');
|
2 |
@set_time_limit(WPBACKITUP__SCRIPT_TIMEOUT_SECONDS);
|
3 |
|
|
|
|
|
|
|
4 |
// required for IE, otherwise Content-disposition is ignored
|
5 |
-
//@apache_setenv('no-gzip', 1); Causes failure on siteground...research
|
6 |
@ini_set('zlib.output_compression', 'Off');
|
7 |
|
8 |
global $logger;
|
@@ -48,25 +51,31 @@ if ( isset($_REQUEST['_wpnonce']) && !empty($_REQUEST['_wpnonce'])
|
|
48 |
$logger->log_info( __METHOD__, 'Backup file path:' . $backup_path );
|
49 |
|
50 |
if ( !empty($backup_filename) && file_exists( $backup_path ) ) {
|
|
|
51 |
$file_size = filesize($backup_path);
|
52 |
-
$chunksize =
|
53 |
$buffer = '';
|
54 |
$cnt =0;
|
55 |
$handle = fopen($backup_path, 'rb');
|
56 |
if ($handle !== false) {
|
57 |
//Output Headers
|
58 |
-
header("
|
59 |
-
header("Cache-Control:
|
|
|
60 |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT" );
|
|
|
|
|
|
|
|
|
61 |
header("Content-type: application/zip");
|
62 |
header("Content-Transfer-Encoding: binary");
|
63 |
header("Content-Length: ".$file_size);
|
64 |
|
65 |
-
while (!feof($handle)) {
|
66 |
$buffer = fread($handle, $chunksize);
|
67 |
echo $buffer;
|
68 |
-
ob_flush();
|
69 |
-
flush();
|
70 |
}
|
71 |
|
72 |
fclose($handle);
|
1 |
<?php if (!defined ('ABSPATH')) die('No direct access allowed (viewlog)');
|
2 |
@set_time_limit(WPBACKITUP__SCRIPT_TIMEOUT_SECONDS);
|
3 |
|
4 |
+
//Turn off output buffering if it was on.
|
5 |
+
while (@ob_end_flush());
|
6 |
+
|
7 |
// required for IE, otherwise Content-disposition is ignored
|
8 |
+
//@apache_setenv('no-gzip', 1); //Causes failure on siteground...research
|
9 |
@ini_set('zlib.output_compression', 'Off');
|
10 |
|
11 |
global $logger;
|
51 |
$logger->log_info( __METHOD__, 'Backup file path:' . $backup_path );
|
52 |
|
53 |
if ( !empty($backup_filename) && file_exists( $backup_path ) ) {
|
54 |
+
$file_name=basename( $backup_path );
|
55 |
$file_size = filesize($backup_path);
|
56 |
+
$chunksize = 1024*1024; // how many bytes per chunk
|
57 |
$buffer = '';
|
58 |
$cnt =0;
|
59 |
$handle = fopen($backup_path, 'rb');
|
60 |
if ($handle !== false) {
|
61 |
//Output Headers
|
62 |
+
header("Cache-Control: no-store, no-cache, must-revalidate");
|
63 |
+
header("Cache-Control: post-check=0, pre-check=0", false);
|
64 |
+
header("Pragma: no-cache");
|
65 |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT" );
|
66 |
+
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
67 |
+
|
68 |
+
header("Content-Disposition: inline; filename=$file_name");
|
69 |
+
|
70 |
header("Content-type: application/zip");
|
71 |
header("Content-Transfer-Encoding: binary");
|
72 |
header("Content-Length: ".$file_size);
|
73 |
|
74 |
+
while (!feof($handle) && (connection_status()==0) ) {
|
75 |
$buffer = fread($handle, $chunksize);
|
76 |
echo $buffer;
|
77 |
+
@ob_flush();
|
78 |
+
@flush();
|
79 |
}
|
80 |
|
81 |
fclose($handle);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: cssimmon,jcpeden
|
|
3 |
Donate link: http://www.wpbackitup.com
|
4 |
Tags: backup, back up, backups, backup wordpress, backup database, backup plugin, backup and restore, database, database backup, database restore, db, db backup, db restore, download database, full backup, mysql backup, restore, restore database,restore wordpress, restore wordpress backup,restoring wordpress, website backup, wordpress backup, wordpress restore, plugin, backup buddy
|
5 |
Requires at least: 3.8.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -151,6 +151,13 @@ Our online documentation and full list of FAQs can be found at [www.wpbackitup.c
|
|
151 |
|
152 |
|
153 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.10.0 =
|
155 |
* New Feature: Add support request to plugin
|
156 |
* New Feature: Add large backup support
|
3 |
Donate link: http://www.wpbackitup.com
|
4 |
Tags: backup, back up, backups, backup wordpress, backup database, backup plugin, backup and restore, database, database backup, database restore, db, db backup, db restore, download database, full backup, mysql backup, restore, restore database,restore wordpress, restore wordpress backup,restoring wordpress, website backup, wordpress backup, wordpress restore, plugin, backup buddy
|
5 |
Requires at least: 3.8.0
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 1.10.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
151 |
|
152 |
|
153 |
== Changelog ==
|
154 |
+
= 1.10.1 =
|
155 |
+
* Update: Display backup set name in available backup lists.
|
156 |
+
* Update: Remove backup retention limitations for WP BackItUp lite.
|
157 |
+
* Fix: Downloads for large files was running into buffer errors when other plugins turn on output buffers incorrectly. Added logic to flush and turn off buffering for all WP BackItUp downloads.
|
158 |
+
* Fix: Backup lists were not being ordered properly under available backups.
|
159 |
+
* Fix: Backup cleanup routines were not purging backups in correct order.
|
160 |
+
|
161 |
= 1.10.0 =
|
162 |
* New Feature: Add support request to plugin
|
163 |
* New Feature: Add large backup support
|
views/backup.php
CHANGED
@@ -199,13 +199,14 @@ if (!$backup_folder_exists) {
|
|
199 |
<h3><i class="fa fa-cloud-download"></i> <?php _e('Available Backups', $namespace); ?></h3>
|
200 |
|
201 |
<!--View Log Form-->
|
202 |
-
<form id = "viewlog" name = "viewlog" action="admin-post.php" method="post">
|
203 |
<input type="hidden" name="action" value="viewlog">
|
204 |
<input type="hidden" id="backup_name" name="backup_name" value="">
|
205 |
<?php wp_nonce_field($this->namespace . "-viewlog"); ?>
|
206 |
</form>
|
207 |
|
208 |
-
|
|
|
209 |
<input type="hidden" name="action" value="download_backup">
|
210 |
<input type="hidden" id="backup_file" name="backup_file" value="">
|
211 |
<?php wp_nonce_field($this->namespace . "-download_backup"); ?>
|
@@ -228,7 +229,7 @@ if (!$backup_folder_exists) {
|
|
228 |
?>
|
229 |
|
230 |
<tr <?php echo $class ?> id="row<?php echo $i; ?>">
|
231 |
-
<td><?php echo $
|
232 |
|
233 |
<!--Download Link-->
|
234 |
<td>
|
@@ -414,7 +415,8 @@ if (!$backup_folder_exists) {
|
|
414 |
$count=0;
|
415 |
?>
|
416 |
<div id="<?php echo preg_replace('/[^A-Za-z0-9\-]/', '', $backup_name) ?>" style="display:none;">
|
417 |
-
<h2>WP BackItUp Backup Set
|
|
|
418 |
<p>Below are the archive files included in this backup set. Click the link to download.</p>
|
419 |
<table id="datatable" class="widefat">
|
420 |
<tbody>
|
199 |
<h3><i class="fa fa-cloud-download"></i> <?php _e('Available Backups', $namespace); ?></h3>
|
200 |
|
201 |
<!--View Log Form-->
|
202 |
+
<form id = "viewlog" name = "viewlog" action="admin-post.php/?sc=<?php _e(current_time( 'timestamp' ) )?>" method="post">
|
203 |
<input type="hidden" name="action" value="viewlog">
|
204 |
<input type="hidden" id="backup_name" name="backup_name" value="">
|
205 |
<?php wp_nonce_field($this->namespace . "-viewlog"); ?>
|
206 |
</form>
|
207 |
|
208 |
+
|
209 |
+
<form id = "download_backup" name = "download_backup" action="admin-post.php/?sc=<?php _e(current_time( 'timestamp' ) )?>" method="post">
|
210 |
<input type="hidden" name="action" value="download_backup">
|
211 |
<input type="hidden" id="backup_file" name="backup_file" value="">
|
212 |
<?php wp_nonce_field($this->namespace . "-download_backup"); ?>
|
229 |
?>
|
230 |
|
231 |
<tr <?php echo $class ?> id="row<?php echo $i; ?>">
|
232 |
+
<td><?php echo $backup_name ?></td>
|
233 |
|
234 |
<!--Download Link-->
|
235 |
<td>
|
415 |
$count=0;
|
416 |
?>
|
417 |
<div id="<?php echo preg_replace('/[^A-Za-z0-9\-]/', '', $backup_name) ?>" style="display:none;">
|
418 |
+
<h2>WP BackItUp Backup Set:</h2>
|
419 |
+
<h2><em><?php echo $backup_name ?></em></h2>
|
420 |
<p>Below are the archive files included in this backup set. Click the link to download.</p>
|
421 |
<table id="datatable" class="widefat">
|
422 |
<tbody>
|
wp-backitup.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
Plugin Name: WP Backitup
|
13 |
Plugin URI: http://www.wpbackitup.com
|
14 |
Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
|
15 |
-
Version: 1.10.
|
16 |
Author: Chris Simmons
|
17 |
Author URI: http://www.wpbackitup.com
|
18 |
License: GPL3
|
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
34 |
*/
|
35 |
|
36 |
define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
|
37 |
-
define( 'WPBACKITUP__VERSION', '1.10.
|
38 |
define( 'WPBACKITUP__DEBUG', false );
|
39 |
define( 'WPBACKITUP__MINIMUM_WP_VERSION', '3.0' );
|
40 |
define( 'WPBACKITUP__ITEM_NAME', 'WP Backitup' );
|
12 |
Plugin Name: WP Backitup
|
13 |
Plugin URI: http://www.wpbackitup.com
|
14 |
Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
|
15 |
+
Version: 1.10.1
|
16 |
Author: Chris Simmons
|
17 |
Author URI: http://www.wpbackitup.com
|
18 |
License: GPL3
|
34 |
*/
|
35 |
|
36 |
define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
|
37 |
+
define( 'WPBACKITUP__VERSION', '1.10.1');
|
38 |
define( 'WPBACKITUP__DEBUG', false );
|
39 |
define( 'WPBACKITUP__MINIMUM_WP_VERSION', '3.0' );
|
40 |
define( 'WPBACKITUP__ITEM_NAME', 'WP Backitup' );
|