Version Description
Download this release
Release Info
| Developer | willmot |
| Plugin | |
| Version | 1.6.5 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.4 to 1.6.5
- admin.actions.php +2 -2
- admin.backup-button.php +1 -1
- admin.backups-table.php +1 -1
- admin.menus.php +3 -2
- admin.page.php +1 -1
- functions/backup.functions.php +20 -14
- functions/core.functions.php +4 -2
- functions/interface.functions.php +4 -4
- hm-backup/hm-backup.php +9 -4
- plugin.php +5 -3
- readme.txt +23 -12
admin.actions.php
CHANGED
|
@@ -206,7 +206,7 @@ add_action( 'admin_init', 'hmbkp_dismiss_error' );
|
|
| 206 |
*/
|
| 207 |
function hmbkp_ajax_is_backup_in_progress() {
|
| 208 |
|
| 209 |
-
if ( !
|
| 210 |
echo 0;
|
| 211 |
|
| 212 |
else
|
|
@@ -281,7 +281,7 @@ function hmbkp_constant_changes() {
|
|
| 281 |
hmbkp_path_move( $from, HMBKP_PATH );
|
| 282 |
|
| 283 |
// If a custom backup path has been removed
|
| 284 |
-
if ( ( ( defined( 'HMBKP_PATH' ) && ! HMBKP_PATH ) || !defined( 'HMBKP_PATH' ) && hmbkp_conform_dir( hmbkp_path_default() ) != ( $from = hmbkp_conform_dir( get_option( 'hmbkp_path' ) ) ) ) )
|
| 285 |
hmbkp_path_move( $from, hmbkp_path_default() );
|
| 286 |
|
| 287 |
// If the custom path has changed and the new directory isn't writable
|
| 206 |
*/
|
| 207 |
function hmbkp_ajax_is_backup_in_progress() {
|
| 208 |
|
| 209 |
+
if ( ! hmbkp_in_progress() )
|
| 210 |
echo 0;
|
| 211 |
|
| 212 |
else
|
| 281 |
hmbkp_path_move( $from, HMBKP_PATH );
|
| 282 |
|
| 283 |
// If a custom backup path has been removed
|
| 284 |
+
if ( ( ( defined( 'HMBKP_PATH' ) && ! HMBKP_PATH ) || ! defined( 'HMBKP_PATH' ) && hmbkp_conform_dir( hmbkp_path_default() ) != ( $from = hmbkp_conform_dir( get_option( 'hmbkp_path' ) ) ) ) )
|
| 285 |
hmbkp_path_move( $from, hmbkp_path_default() );
|
| 286 |
|
| 287 |
// If the custom path has changed and the new directory isn't writable
|
admin.backup-button.php
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<?php if (
|
| 2 |
|
| 3 |
<a id="hmbkp_backup" class="add-new-h2 hmbkp_running" href="tools.php?page=<?php echo HMBKP_PLUGIN_SLUG; ?>&action=hmbkp_cancel"><?php echo hmbkp_get_status(); ?> [cancel]</a>
|
| 4 |
|
| 1 |
+
<?php if ( hmbkp_in_progress() ) : ?>
|
| 2 |
|
| 3 |
<a id="hmbkp_backup" class="add-new-h2 hmbkp_running" href="tools.php?page=<?php echo HMBKP_PLUGIN_SLUG; ?>&action=hmbkp_cancel"><?php echo hmbkp_get_status(); ?> [cancel]</a>
|
| 4 |
|
admin.backups-table.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
// If max backups has changed
|
| 4 |
-
if ( !
|
| 5 |
hmbkp_delete_old_backups();
|
| 6 |
|
| 7 |
if ( ( $backup_archives = hmbkp_get_backups() ) && count( $backup_archives ) ) : ?>
|
| 1 |
<?php
|
| 2 |
|
| 3 |
// If max backups has changed
|
| 4 |
+
if ( ! hmbkp_in_progress() )
|
| 5 |
hmbkp_delete_old_backups();
|
| 6 |
|
| 7 |
if ( ( $backup_archives = hmbkp_get_backups() ) && count( $backup_archives ) ) : ?>
|
admin.menus.php
CHANGED
|
@@ -39,10 +39,11 @@ function hmbkp_plugin_action_link( $links, $file ) {
|
|
| 39 |
add_filter('plugin_action_links', 'hmbkp_plugin_action_link', 10, 2 );
|
| 40 |
|
| 41 |
/**
|
| 42 |
-
*
|
| 43 |
*
|
| 44 |
-
*
|
| 45 |
*
|
|
|
|
| 46 |
* @return null
|
| 47 |
*/
|
| 48 |
function hmbkp_contextual_help() {
|
| 39 |
add_filter('plugin_action_links', 'hmbkp_plugin_action_link', 10, 2 );
|
| 40 |
|
| 41 |
/**
|
| 42 |
+
* Add Contextual Help to Backups tools page.
|
| 43 |
*
|
| 44 |
+
* Help is pulled from the readme FAQ.
|
| 45 |
*
|
| 46 |
+
* @todo get plugin info from local readme and use plugin_updates cache to check if we are running the latest version so we don't have to do a wp_remote_get on every page load.
|
| 47 |
* @return null
|
| 48 |
*/
|
| 49 |
function hmbkp_contextual_help() {
|
admin.page.php
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<div class="wrap<?php if (
|
| 2 |
|
| 3 |
<?php screen_icon( 'backupwordpress' ); ?>
|
| 4 |
|
| 1 |
+
<div class="wrap<?php if ( hmbkp_in_progress() ) { ?> hmbkp_running<?php } ?>">
|
| 2 |
|
| 3 |
<?php screen_icon( 'backupwordpress' ); ?>
|
| 4 |
|
functions/backup.functions.php
CHANGED
|
@@ -31,12 +31,14 @@ function hmbkp_do_backup() {
|
|
| 31 |
if ( ! $handle = @fopen( $file, 'w' ) )
|
| 32 |
return;
|
| 33 |
|
| 34 |
-
fwrite( $handle,
|
| 35 |
|
| 36 |
fclose( $handle );
|
| 37 |
|
| 38 |
}
|
| 39 |
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
|
| 42 |
/**
|
|
@@ -59,7 +61,6 @@ function hmbkp_delete_old_backups() {
|
|
| 59 |
/**
|
| 60 |
* Returns an array of backup files
|
| 61 |
*
|
| 62 |
-
* @todo exclude the currently running backup
|
| 63 |
* @todo use RecursiveDirectoryIterator
|
| 64 |
* @return array $files
|
| 65 |
*/
|
|
@@ -94,7 +95,11 @@ function hmbkp_get_backups() {
|
|
| 94 |
|
| 95 |
endif;
|
| 96 |
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
return $files;
|
| 100 |
}
|
|
@@ -109,7 +114,7 @@ function hmbkp_delete_backup( $file ) {
|
|
| 109 |
$file = base64_decode( $file );
|
| 110 |
|
| 111 |
// Delete the file
|
| 112 |
-
if ( strpos( $file, hmbkp_path() ) !== false || strpos( $file, WP_CONTENT_DIR . '/backups' ) !== false )
|
| 113 |
unlink( $file );
|
| 114 |
|
| 115 |
}
|
|
@@ -122,8 +127,12 @@ function hmbkp_delete_backup( $file ) {
|
|
| 122 |
*/
|
| 123 |
function hmbkp_email_backup() {
|
| 124 |
|
| 125 |
-
|
|
|
|
|
|
|
| 126 |
return;
|
|
|
|
|
|
|
| 127 |
|
| 128 |
// Raise the memory and time limit
|
| 129 |
@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
|
|
@@ -131,6 +140,7 @@ function hmbkp_email_backup() {
|
|
| 131 |
|
| 132 |
// @todo admin_url?
|
| 133 |
$download = get_bloginfo( 'wpurl' ) . '/wp-admin/tools.php?page=' . HMBKP_PLUGIN_SLUG . '&hmbkp_download=' . base64_encode( $file );
|
|
|
|
| 134 |
$domain = parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ) . parse_url( get_bloginfo( 'url' ), PHP_URL_PATH );
|
| 135 |
|
| 136 |
$subject = sprintf( __( 'Backup of %s', 'hmbkp' ), $domain );
|
|
@@ -151,16 +161,12 @@ function hmbkp_email_backup() {
|
|
| 151 |
endif;
|
| 152 |
|
| 153 |
// Set option for email not sent error
|
| 154 |
-
if (
|
| 155 |
-
update_option( 'hmbkp_email_error', 'hmbkp_email_failed' );
|
| 156 |
-
|
| 157 |
-
else
|
| 158 |
delete_option( 'hmbkp_email_error' );
|
| 159 |
|
| 160 |
return true;
|
| 161 |
|
| 162 |
}
|
| 163 |
-
add_action( 'hmbkp_backup_complete', 'hmbkp_email_backup', 11 );
|
| 164 |
|
| 165 |
/**
|
| 166 |
* Set the status of the running backup
|
|
@@ -175,7 +181,7 @@ function hmbkp_set_status( $message = '' ) {
|
|
| 175 |
if ( ! $handle = @fopen( $file, 'w' ) )
|
| 176 |
return;
|
| 177 |
|
| 178 |
-
fwrite( $handle, $message );
|
| 179 |
|
| 180 |
fclose( $handle );
|
| 181 |
|
|
@@ -191,7 +197,7 @@ function hmbkp_get_status() {
|
|
| 191 |
if ( ! file_exists( hmbkp_path() . '/.backup_running' ) )
|
| 192 |
return '';
|
| 193 |
|
| 194 |
-
return file_get_contents( hmbkp_path() .'/.backup_running' );
|
| 195 |
|
| 196 |
}
|
| 197 |
|
|
@@ -254,8 +260,8 @@ function hmbkp_valid_custom_excludes() {
|
|
| 254 |
*
|
| 255 |
* @return bool
|
| 256 |
*/
|
| 257 |
-
function
|
| 258 |
-
return file_exists( hmbkp_path() . '/.backup_running' );
|
| 259 |
}
|
| 260 |
|
| 261 |
/**
|
| 31 |
if ( ! $handle = @fopen( $file, 'w' ) )
|
| 32 |
return;
|
| 33 |
|
| 34 |
+
fwrite( $handle, HM_Backup::get_instance()->archive_filename() );
|
| 35 |
|
| 36 |
fclose( $handle );
|
| 37 |
|
| 38 |
}
|
| 39 |
|
| 40 |
+
hmbkp_email_backup();
|
| 41 |
+
|
| 42 |
}
|
| 43 |
|
| 44 |
/**
|
| 61 |
/**
|
| 62 |
* Returns an array of backup files
|
| 63 |
*
|
|
|
|
| 64 |
* @todo use RecursiveDirectoryIterator
|
| 65 |
* @return array $files
|
| 66 |
*/
|
| 95 |
|
| 96 |
endif;
|
| 97 |
|
| 98 |
+
ksort( $files );
|
| 99 |
+
|
| 100 |
+
// Don't include the currently running backup
|
| 101 |
+
if ( $key = array_search( trailingslashit( hmbkp_path() ) . hmbkp_in_progress(), $files ) )
|
| 102 |
+
unset( $files[$key] );
|
| 103 |
|
| 104 |
return $files;
|
| 105 |
}
|
| 114 |
$file = base64_decode( $file );
|
| 115 |
|
| 116 |
// Delete the file
|
| 117 |
+
if ( ( strpos( $file, hmbkp_path() ) !== false || strpos( $file, WP_CONTENT_DIR . '/backups' ) !== false ) && file_exists( $file ) )
|
| 118 |
unlink( $file );
|
| 119 |
|
| 120 |
}
|
| 127 |
*/
|
| 128 |
function hmbkp_email_backup() {
|
| 129 |
|
| 130 |
+
$file = HM_Backup::get_instance()->archive_filepath();
|
| 131 |
+
|
| 132 |
+
if ( ! hmbkp_get_email_address() || ! file_exists( $file ) )
|
| 133 |
return;
|
| 134 |
+
|
| 135 |
+
update_option( 'hmbkp_email_error', 'hmbkp_email_failed' );
|
| 136 |
|
| 137 |
// Raise the memory and time limit
|
| 138 |
@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
|
| 140 |
|
| 141 |
// @todo admin_url?
|
| 142 |
$download = get_bloginfo( 'wpurl' ) . '/wp-admin/tools.php?page=' . HMBKP_PLUGIN_SLUG . '&hmbkp_download=' . base64_encode( $file );
|
| 143 |
+
|
| 144 |
$domain = parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ) . parse_url( get_bloginfo( 'url' ), PHP_URL_PATH );
|
| 145 |
|
| 146 |
$subject = sprintf( __( 'Backup of %s', 'hmbkp' ), $domain );
|
| 161 |
endif;
|
| 162 |
|
| 163 |
// Set option for email not sent error
|
| 164 |
+
if ( $sent )
|
|
|
|
|
|
|
|
|
|
| 165 |
delete_option( 'hmbkp_email_error' );
|
| 166 |
|
| 167 |
return true;
|
| 168 |
|
| 169 |
}
|
|
|
|
| 170 |
|
| 171 |
/**
|
| 172 |
* Set the status of the running backup
|
| 181 |
if ( ! $handle = @fopen( $file, 'w' ) )
|
| 182 |
return;
|
| 183 |
|
| 184 |
+
fwrite( $handle, HM_Backup::get_instance()->archive_filename() . '::' . $message );
|
| 185 |
|
| 186 |
fclose( $handle );
|
| 187 |
|
| 197 |
if ( ! file_exists( hmbkp_path() . '/.backup_running' ) )
|
| 198 |
return '';
|
| 199 |
|
| 200 |
+
return end( explode( '::', file_get_contents( hmbkp_path() . '/.backup_running' ) ) );
|
| 201 |
|
| 202 |
}
|
| 203 |
|
| 260 |
*
|
| 261 |
* @return bool
|
| 262 |
*/
|
| 263 |
+
function hmbkp_in_progress() {
|
| 264 |
+
return file_exists( hmbkp_path() . '/.backup_running' ) ? reset( explode( '::', file_get_contents( hmbkp_path() .'/.backup_running' ) ) ) : '';
|
| 265 |
}
|
| 266 |
|
| 267 |
/**
|
functions/core.functions.php
CHANGED
|
@@ -374,7 +374,7 @@ function hmbkp_path_move( $from, $to ) {
|
|
| 374 |
if ( is_writable( dirname( $to ) ) && ! is_dir( $to ) )
|
| 375 |
mkdir( $to, 0755 );
|
| 376 |
|
| 377 |
-
if ( !is_dir( $to ) || !is_writable( $to ) || !is_dir( $from ) )
|
| 378 |
return false;
|
| 379 |
|
| 380 |
hmbkp_cleanup();
|
|
@@ -507,9 +507,11 @@ function hmbkp_possible() {
|
|
| 507 |
*/
|
| 508 |
function hmbkp_cleanup() {
|
| 509 |
|
|
|
|
|
|
|
| 510 |
$hmbkp_path = hmbkp_path();
|
| 511 |
|
| 512 |
-
if ( !is_dir( $hmbkp_path ) )
|
| 513 |
return;
|
| 514 |
|
| 515 |
if ( $handle = opendir( $hmbkp_path ) ) :
|
| 374 |
if ( is_writable( dirname( $to ) ) && ! is_dir( $to ) )
|
| 375 |
mkdir( $to, 0755 );
|
| 376 |
|
| 377 |
+
if ( ! is_dir( $to ) || ! is_writable( $to ) || ! is_dir( $from ) )
|
| 378 |
return false;
|
| 379 |
|
| 380 |
hmbkp_cleanup();
|
| 507 |
*/
|
| 508 |
function hmbkp_cleanup() {
|
| 509 |
|
| 510 |
+
delete_option( 'hmbkp_email_error' );
|
| 511 |
+
|
| 512 |
$hmbkp_path = hmbkp_path();
|
| 513 |
|
| 514 |
+
if ( ! is_dir( $hmbkp_path ) )
|
| 515 |
return;
|
| 516 |
|
| 517 |
if ( $handle = opendir( $hmbkp_path ) ) :
|
functions/interface.functions.php
CHANGED
|
@@ -103,20 +103,20 @@ function hmbkp_admin_notices() {
|
|
| 103 |
endif;
|
| 104 |
|
| 105 |
// If the email address is invalid
|
| 106 |
-
if (
|
| 107 |
|
| 108 |
function hmbkp_email_invalid_warning() {
|
| 109 |
-
echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%s is not a valid email address.', 'hmbkp' ), '<code>' .
|
| 110 |
}
|
| 111 |
add_action( 'admin_notices', 'hmbkp_email_invalid_warning' );
|
| 112 |
|
| 113 |
endif;
|
| 114 |
|
| 115 |
// If the email failed to send
|
| 116 |
-
if (
|
| 117 |
|
| 118 |
function hmbkp_email_failed_warning() {
|
| 119 |
-
echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . __( 'The last backup email failed to send.', 'hmbkp' ) . '</p></div>';
|
| 120 |
}
|
| 121 |
add_action( 'admin_notices', 'hmbkp_email_failed_warning' );
|
| 122 |
|
| 103 |
endif;
|
| 104 |
|
| 105 |
// If the email address is invalid
|
| 106 |
+
if ( hmbkp_get_email_address() && ! is_email( hmbkp_get_email_address() ) ) :
|
| 107 |
|
| 108 |
function hmbkp_email_invalid_warning() {
|
| 109 |
+
echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%s is not a valid email address.', 'hmbkp' ), '<code>' . hmbkp_get_email_address() . '</code>' ) . '</p></div>';
|
| 110 |
}
|
| 111 |
add_action( 'admin_notices', 'hmbkp_email_invalid_warning' );
|
| 112 |
|
| 113 |
endif;
|
| 114 |
|
| 115 |
// If the email failed to send
|
| 116 |
+
if ( hmbkp_get_email_address() && get_option( 'hmbkp_email_error' ) ) :
|
| 117 |
|
| 118 |
function hmbkp_email_failed_warning() {
|
| 119 |
+
echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . __( 'The last backup email failed to send. It\'s likely that the file is to large.', 'hmbkp' ) . '</p></div>';
|
| 120 |
}
|
| 121 |
add_action( 'admin_notices', 'hmbkp_email_failed_warning' );
|
| 122 |
|
hm-backup/hm-backup.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/**
|
| 4 |
* Generic file and database backup class
|
| 5 |
*
|
| 6 |
-
* @version 1.
|
| 7 |
*/
|
| 8 |
class HM_Backup {
|
| 9 |
|
|
@@ -874,18 +874,23 @@ class HM_Backup {
|
|
| 874 |
*/
|
| 875 |
public function conform_dir( $dir, $recursive = false ) {
|
| 876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 877 |
// Replace single forward slash (looks like double slash because we have to escape it)
|
| 878 |
$dir = str_replace( '\\', '/', $dir );
|
| 879 |
$dir = str_replace( '//', '/', $dir );
|
| 880 |
|
| 881 |
// Remove the trailing slash
|
| 882 |
-
|
|
|
|
| 883 |
|
| 884 |
// Carry on until completely normalized
|
| 885 |
if ( ! $recursive && $this->conform_dir( $dir, true ) != $dir )
|
| 886 |
return $this->conform_dir( $dir );
|
| 887 |
|
| 888 |
-
return $dir;
|
| 889 |
|
| 890 |
}
|
| 891 |
|
|
@@ -1218,7 +1223,7 @@ class HM_Backup {
|
|
| 1218 |
*/
|
| 1219 |
public function error_handler( $type ) {
|
| 1220 |
|
| 1221 |
-
if (
|
| 1222 |
return false;
|
| 1223 |
|
| 1224 |
$args = func_get_args();
|
| 3 |
/**
|
| 4 |
* Generic file and database backup class
|
| 5 |
*
|
| 6 |
+
* @version 1.5
|
| 7 |
*/
|
| 8 |
class HM_Backup {
|
| 9 |
|
| 874 |
*/
|
| 875 |
public function conform_dir( $dir, $recursive = false ) {
|
| 876 |
|
| 877 |
+
// Assume empty dir is root
|
| 878 |
+
if ( ! $dir )
|
| 879 |
+
$dir = '/';
|
| 880 |
+
|
| 881 |
// Replace single forward slash (looks like double slash because we have to escape it)
|
| 882 |
$dir = str_replace( '\\', '/', $dir );
|
| 883 |
$dir = str_replace( '//', '/', $dir );
|
| 884 |
|
| 885 |
// Remove the trailing slash
|
| 886 |
+
if ( $dir !== '/' )
|
| 887 |
+
$dir = untrailingslashit( strtolower( $dir ) );
|
| 888 |
|
| 889 |
// Carry on until completely normalized
|
| 890 |
if ( ! $recursive && $this->conform_dir( $dir, true ) != $dir )
|
| 891 |
return $this->conform_dir( $dir );
|
| 892 |
|
| 893 |
+
return (string) $dir;
|
| 894 |
|
| 895 |
}
|
| 896 |
|
| 1223 |
*/
|
| 1224 |
public function error_handler( $type ) {
|
| 1225 |
|
| 1226 |
+
if ( ( defined( 'E_DEPRECATED' ) && $type == E_DEPRECATED ) || ( defined( 'E_STRICT' ) && $type == E_STRICT ) || error_reporting() === 0 )
|
| 1227 |
return false;
|
| 1228 |
|
| 1229 |
$args = func_get_args();
|
plugin.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin Name: BackUpWordPress
|
|
| 5 |
Plugin URI: http://hmn.md/backupwordpress/
|
| 6 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>.
|
| 7 |
Author: Human Made Limited
|
| 8 |
-
Version: 1.6.
|
| 9 |
Author URI: http://hmn.md/
|
| 10 |
*/
|
| 11 |
|
|
@@ -30,7 +30,9 @@ define( 'HMBKP_PLUGIN_SLUG', 'backupwordpress' );
|
|
| 30 |
define( 'HMBKP_PLUGIN_PATH', WP_PLUGIN_DIR . '/' . HMBKP_PLUGIN_SLUG );
|
| 31 |
define( 'HMBKP_PLUGIN_URL', WP_PLUGIN_URL . '/' . HMBKP_PLUGIN_SLUG );
|
| 32 |
define( 'HMBKP_REQUIRED_WP_VERSION', '3.1' );
|
| 33 |
-
|
|
|
|
|
|
|
| 34 |
|
| 35 |
if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) )
|
| 36 |
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
|
|
@@ -126,7 +128,7 @@ require_once( HMBKP_PLUGIN_PATH . '/functions/backup.functions.php' );
|
|
| 126 |
// Load the wp cli command
|
| 127 |
if ( defined( 'WP_CLI' ) && WP_CLI )
|
| 128 |
include( HMBKP_PLUGIN_PATH . '/functions/wp-cli.php' );
|
| 129 |
-
|
| 130 |
if ( ! defined( 'PCLZIP_TEMPORARY_DIR' ) )
|
| 131 |
define( 'PCLZIP_TEMPORARY_DIR', trailingslashit( hmbkp_path() ) );
|
| 132 |
|
| 5 |
Plugin URI: http://hmn.md/backupwordpress/
|
| 6 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>.
|
| 7 |
Author: Human Made Limited
|
| 8 |
+
Version: 1.6.5
|
| 9 |
Author URI: http://hmn.md/
|
| 10 |
*/
|
| 11 |
|
| 30 |
define( 'HMBKP_PLUGIN_PATH', WP_PLUGIN_DIR . '/' . HMBKP_PLUGIN_SLUG );
|
| 31 |
define( 'HMBKP_PLUGIN_URL', WP_PLUGIN_URL . '/' . HMBKP_PLUGIN_SLUG );
|
| 32 |
define( 'HMBKP_REQUIRED_WP_VERSION', '3.1' );
|
| 33 |
+
|
| 34 |
+
if ( ! defined( 'HMBKP_SECURE_KEY' ) )
|
| 35 |
+
define( 'HMBKP_SECURE_KEY', md5( ABSPATH . time() ) );
|
| 36 |
|
| 37 |
if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) )
|
| 38 |
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
|
| 128 |
// Load the wp cli command
|
| 129 |
if ( defined( 'WP_CLI' ) && WP_CLI )
|
| 130 |
include( HMBKP_PLUGIN_PATH . '/functions/wp-cli.php' );
|
| 131 |
+
|
| 132 |
if ( ! defined( 'PCLZIP_TEMPORARY_DIR' ) )
|
| 133 |
define( 'PCLZIP_TEMPORARY_DIR', trailingslashit( hmbkp_path() ) );
|
| 134 |
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: humanmade, joehoyle, mattheu, tcrsavage, willmot
|
|
| 3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
|
| 4 |
Requires at least: 3.1
|
| 5 |
Tested up to: 3.3
|
| 6 |
-
Stable tag: 1.6.
|
| 7 |
|
| 8 |
Simple automated back ups of your WordPress powered website.
|
| 9 |
|
|
@@ -95,23 +95,34 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
|
|
| 95 |
|
| 96 |
== Changelog ==
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
#### 1.6.4
|
| 99 |
|
| 100 |
* Don't show warning message as they cause to much panic.
|
| 101 |
* Move previous methods errors to warnings in fallback methods.
|
| 102 |
-
* Wrap `.htaccess` rewrite rules in if mod_rewrite check.
|
| 103 |
* Add link to new restore help article to FAQ.
|
| 104 |
* Fix issue that could cause "not using latest stable version" message to show when you were in-fact using the latest version.
|
| 105 |
-
* Bug fix in `zip command` check that could cause an incorrect zip path to be used.
|
| 106 |
-
* Detect and pass MySQL port to `mysqldump`.
|
| 107 |
|
| 108 |
#### 1.6.3
|
| 109 |
|
| 110 |
* Don't fail archive verification for errors in previous archive methods.
|
| 111 |
-
* Improved detection of zip and mysqldump
|
| 112 |
* Fix issues when `ABSPATH` is `/`.
|
| 113 |
-
* Remove
|
| 114 |
-
* Use `warning()` not `error()` for issues reported by `zip`, `ZipArchive`
|
| 115 |
* Fix download zip on Windows when `ABSPATH` contains a trailing forward slash.
|
| 116 |
* Send backup email after backup completes so that fatal errors in email code don't stop the backup from completing.
|
| 117 |
* Add missing / to `PCLZIP_TEMPORARY_DIR` define.
|
|
@@ -119,13 +130,13 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
|
|
| 119 |
|
| 120 |
#### 1.6.2
|
| 121 |
|
| 122 |
-
* Track PHP errors as backup warnings not errors.
|
| 123 |
-
* Only show warning message for PHP errors in BackUpWordPress files.
|
| 124 |
* Ability to dismiss the error / warning messages.
|
| 125 |
-
* Disable use of PclZip for full archive checking for now as it causes memory issues on some large sites.
|
| 126 |
* Don't delete "number of backups" setting on update.
|
| 127 |
-
* Better handling of
|
| 128 |
-
* Mark backup as running and increase callback timeout to 500 when firing backup via ajax.
|
| 129 |
* Don't send backup email if backup failed.
|
| 130 |
* Filter out duplicate exclude rules.
|
| 131 |
|
| 3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
|
| 4 |
Requires at least: 3.1
|
| 5 |
Tested up to: 3.3
|
| 6 |
+
Stable tag: 1.6.5
|
| 7 |
|
| 8 |
Simple automated back ups of your WordPress powered website.
|
| 9 |
|
| 95 |
|
| 96 |
== Changelog ==
|
| 97 |
|
| 98 |
+
#### 1.6.5
|
| 99 |
+
|
| 100 |
+
* Fix an issue with emailing backups that could cause the backup file to not be attached.
|
| 101 |
+
* Fix an issue that could cause the backup to be marked as running for ever if emailing the backup `FATAL` error'd.
|
| 102 |
+
* Never show the running backup in the list of backups.
|
| 103 |
+
* Show an error backup email failed to send.
|
| 104 |
+
* Fix possible notice when deleting a backup file which doesn't exist.
|
| 105 |
+
* Fix possible notice on older versions of `PHP` which don't define `E_DEPRECATED`.
|
| 106 |
+
* Make `HMBKP_SECURE_KEY` override-able.
|
| 107 |
+
* BackUpWordPress should now work when `ABSPATH` is `/`.
|
| 108 |
+
|
| 109 |
#### 1.6.4
|
| 110 |
|
| 111 |
* Don't show warning message as they cause to much panic.
|
| 112 |
* Move previous methods errors to warnings in fallback methods.
|
| 113 |
+
* Wrap `.htaccess` rewrite rules in if `mod_rewrite` check.
|
| 114 |
* Add link to new restore help article to FAQ.
|
| 115 |
* Fix issue that could cause "not using latest stable version" message to show when you were in-fact using the latest version.
|
| 116 |
+
* Bug fix in `zip command` check that could cause an incorrect `zip` path to be used.
|
| 117 |
+
* Detect and pass `MySQL` port to `mysqldump`.
|
| 118 |
|
| 119 |
#### 1.6.3
|
| 120 |
|
| 121 |
* Don't fail archive verification for errors in previous archive methods.
|
| 122 |
+
* Improved detection of the `zip` and `mysqldump` commands.
|
| 123 |
* Fix issues when `ABSPATH` is `/`.
|
| 124 |
+
* Remove reliance on `SECURE_AUTH_KEY` as it's often not defined.
|
| 125 |
+
* Use `warning()` not `error()` for issues reported by `zip`, `ZipArchive` & `PclZip`.
|
| 126 |
* Fix download zip on Windows when `ABSPATH` contains a trailing forward slash.
|
| 127 |
* Send backup email after backup completes so that fatal errors in email code don't stop the backup from completing.
|
| 128 |
* Add missing / to `PCLZIP_TEMPORARY_DIR` define.
|
| 130 |
|
| 131 |
#### 1.6.2
|
| 132 |
|
| 133 |
+
* Track `PHP` errors as backup warnings not errors.
|
| 134 |
+
* Only show warning message for `PHP` errors in BackUpWordPress files.
|
| 135 |
* Ability to dismiss the error / warning messages.
|
| 136 |
+
* Disable use of `PclZip` for full archive checking for now as it causes memory issues on some large sites.
|
| 137 |
* Don't delete "number of backups" setting on update.
|
| 138 |
+
* Better handling of multibyte characters in archive and database dump filenames.
|
| 139 |
+
* Mark backup as running and increase callback timeout to `500` when firing backup via ajax.
|
| 140 |
* Don't send backup email if backup failed.
|
| 141 |
* Filter out duplicate exclude rules.
|
| 142 |
|
