BackUpWordPress - Version 3.4.2

Version Description

= 3.4 =

  • This version introduces a major refactoring of the code responsible for the core backup engine. We made sure to write unit tests for the new code, and we have tested it on several user's sites. It fixes a lot of old bugs, and Windows users should see major improvements to reliability.

= 3.3.4 =

  • WordPress 4.4 compatibility.

= 3.3.1 =

  • Fixes a bug that would prevent downloading backups since 3.3.0 - please update.

= 3.2.5 =

  • Security fixes related to add_query_arg

= 3.2.1 =

  • Important bug fixes. Please upgrade to this version to avoid incomplete or broken backups.

= 3.1.3 =

  • Fixes backwards compatibility for add-ons and avoids a Fatal Error. Please upgrade straight to this version before upgrading your add-ons.

= 3.0.4 =

  • Fixes a few minor bugs. Immediate update is recommended.

= 3.0.2 =

  • Important: we have dropped support for PHP 5.2, you will not be able to activate BackUpWordPress on a server running PHP versions older than PHP 5.3.29

= 3.0.1 =

  • This is a critical update. Fixes a bug in the core backup library. Please update immediately.
Download this release

Release Info

Developer willmot
Plugin Icon 128x128 BackUpWordPress
Version 3.4.2
Comparing to
See all releases

Code changes from version 3.4.1 to 3.4.2

backupwordpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: BackUpWordPress
4
  Plugin URI: http://bwp.hmn.md/
5
  Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, you'll find me under the Network Settings menu.
6
- Version: 3.4.1
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  License: GPL-2+
3
  Plugin Name: BackUpWordPress
4
  Plugin URI: http://bwp.hmn.md/
5
  Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, you'll find me under the Network Settings menu.
6
+ Version: 3.4.2
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  License: GPL-2+
classes/class-path.php CHANGED
@@ -103,14 +103,18 @@ class Path {
103
 
104
  $home_path = $site_path;
105
 
106
- // Handle wordpress installed in a subdirectory
107
- if ( file_exists( dirname( $site_path ) . '/wp-config.php' ) && ! file_exists( $site_path . '/wp-config.php' ) && file_exists( dirname( $site_path ) . '/index.php' ) ) {
108
- $home_path = dirname( $site_path );
109
- }
 
 
 
 
 
 
 
110
 
111
- // Handle wp-config.php being above site_path
112
- if ( file_exists( dirname( $site_path ) . '/wp-config.php' ) && ! file_exists( $site_path . '/wp-config.php' ) && ! file_exists( dirname( $site_path ) . '/index.php' ) ) {
113
- $home_path = $site_path;
114
  }
115
 
116
  return wp_normalize_path( untrailingslashit( $home_path ) );
103
 
104
  $home_path = $site_path;
105
 
106
+ if ( path_in_php_open_basedir( dirname( $site_path ) ) ) {
107
+
108
+ // Handle wordpress installed in a subdirectory
109
+ if ( file_exists( dirname( $site_path ) . '/wp-config.php' ) && ! file_exists( $site_path . '/wp-config.php' ) && file_exists( dirname( $site_path ) . '/index.php' ) ) {
110
+ $home_path = dirname( $site_path );
111
+ }
112
+
113
+ // Handle wp-config.php being above site_path
114
+ if ( file_exists( dirname( $site_path ) . '/wp-config.php' ) && ! file_exists( $site_path . '/wp-config.php' ) && ! file_exists( dirname( $site_path ) . '/index.php' ) ) {
115
+ $home_path = $site_path;
116
+ }
117
 
 
 
 
118
  }
119
 
120
  return wp_normalize_path( untrailingslashit( $home_path ) );
classes/class-plugin.php CHANGED
@@ -6,7 +6,7 @@ namespace HM\BackUpWordPress;
6
  * Class Plugin
7
  */
8
  final class Plugin {
9
- const PLUGIN_VERSION = '3.4.1';
10
 
11
  /**
12
  * @var Plugin The singleton instance.
6
  * Class Plugin
7
  */
8
  final class Plugin {
9
+ const PLUGIN_VERSION = '3.4.2';
10
 
11
  /**
12
  * @var Plugin The singleton instance.
classes/class-requirement.php CHANGED
@@ -16,7 +16,7 @@ abstract class Requirement {
16
  /**
17
  * @return mixed
18
  */
19
- abstract protected function test();
20
 
21
  /**
22
  * @return mixed
@@ -68,7 +68,7 @@ class Requirement_Zip_Archive extends Requirement {
68
  /**
69
  * @return bool
70
  */
71
- protected function test() {
72
 
73
  if ( class_exists( 'ZipArchive' ) ) {
74
  return true;
@@ -96,7 +96,7 @@ class Requirement_Directory_Iterator_Follow_Symlinks extends Requirement {
96
  /**
97
  * @return bool
98
  */
99
- protected function test() {
100
 
101
  if ( defined( 'RecursiveDirectoryIterator::FOLLOW_SYMLINKS' ) ) {
102
  return true;
@@ -124,7 +124,7 @@ class Requirement_Zip_Command_Path extends Requirement {
124
  /**
125
  * @return string
126
  */
127
- protected function test() {
128
 
129
  $backup = new Zip_File_Backup_Engine;
130
 
@@ -150,7 +150,7 @@ class Requirement_Mysqldump_Command_Path extends Requirement {
150
  /**
151
  * @return string
152
  */
153
- protected function test() {
154
 
155
  $backup = new Mysqldump_Database_Backup_Engine;
156
 
@@ -174,7 +174,7 @@ class Requirement_PHP_User extends Requirement {
174
  /**
175
  * @return string
176
  */
177
- protected function test() {
178
 
179
  if ( ! Backup_Utilities::is_exec_available() ) {
180
  return '';
@@ -200,7 +200,7 @@ class Requirement_PHP_Group extends Requirement {
200
  /**
201
  * @return string
202
  */
203
- protected function test() {
204
 
205
  if ( ! Backup_Utilities::is_exec_available() ) {
206
  return '';
@@ -226,7 +226,7 @@ class Requirement_PHP_Version extends Requirement {
226
  /**
227
  * @return string
228
  */
229
- protected function test() {
230
  return PHP_VERSION;
231
  }
232
 
@@ -246,7 +246,7 @@ class Requirement_Cron_Array extends Requirement {
246
  /**
247
  * @return bool|mixed
248
  */
249
- protected function test() {
250
 
251
  $cron = get_option( 'cron' );
252
 
@@ -274,7 +274,7 @@ class Requirement_Language extends Requirement {
274
  /**
275
  * @return bool|mixed
276
  */
277
- protected function test() {
278
 
279
  // Since 4.0
280
  $language = get_option( 'WPLANG' );
@@ -307,7 +307,7 @@ class Requirement_Safe_Mode extends Requirement {
307
  /**
308
  * @return bool
309
  */
310
- protected function test() {
311
  return Backup_Utilities::is_safe_mode_on();
312
  }
313
 
@@ -317,22 +317,22 @@ Requirements::register( 'HM\BackUpWordPress\Requirement_Safe_Mode', 'PHP' );
317
  /**
318
  * Class Requirement_Shell_Exec
319
  */
320
- class Requirement_Shell_Exec extends Requirement {
321
 
322
  /**
323
  * @var string
324
  */
325
- var $name = 'Shell Exec';
326
 
327
  /**
328
  * @return bool
329
  */
330
- protected function test() {
331
  return Backup_Utilities::is_exec_available();
332
  }
333
 
334
  }
335
- Requirements::register( 'HM\BackUpWordPress\Requirement_Shell_Exec', 'PHP' );
336
 
337
  /**
338
  * Class Requirement_Memory_Limit
@@ -347,7 +347,7 @@ class Requirement_PHP_Memory_Limit extends Requirement {
347
  /**
348
  * @return string
349
  */
350
- protected function test() {
351
  return @ini_get( 'memory_limit' );
352
  }
353
 
@@ -367,7 +367,7 @@ class Requirement_Backup_Path extends Requirement {
367
  /**
368
  * @return string
369
  */
370
- protected function test() {
371
  return Path::get_path();
372
  }
373
 
@@ -387,7 +387,7 @@ class Requirement_Backup_Path_Permissions extends Requirement {
387
  /**
388
  * @return string
389
  */
390
- protected function test() {
391
  return substr( sprintf( '%o', fileperms( Path::get_path() ) ), - 4 );
392
  }
393
 
@@ -407,7 +407,7 @@ class Requirement_WP_CONTENT_DIR extends Requirement {
407
  /**
408
  * @return string
409
  */
410
- protected function test() {
411
  return WP_CONTENT_DIR;
412
  }
413
 
@@ -427,7 +427,7 @@ class Requirement_WP_CONTENT_DIR_Permissions extends Requirement {
427
  /**
428
  * @return string
429
  */
430
- protected function test() {
431
  return substr( sprintf( '%o', fileperms( WP_CONTENT_DIR ) ), - 4 );
432
  }
433
 
@@ -447,7 +447,7 @@ class Requirement_ABSPATH extends Requirement {
447
  /**
448
  * @return string
449
  */
450
- protected function test() {
451
  return ABSPATH;
452
  }
453
 
@@ -467,7 +467,7 @@ class Requirement_Backup_Root_Path extends Requirement {
467
  /**
468
  * @return string
469
  */
470
- protected function test() {
471
  return Path::get_root();
472
  }
473
 
@@ -487,7 +487,7 @@ class Requirement_Calculated_Size extends Requirement {
487
  /**
488
  * @return array
489
  */
490
- protected function test() {
491
 
492
  $backup_sizes = array();
493
 
@@ -523,7 +523,7 @@ class Requirement_WP_Cron_Test extends Requirement {
523
  /**
524
  * @return mixed
525
  */
526
- protected function test() {
527
  return (bool) get_option( 'hmbkp_wp_cron_test_failed' );
528
  }
529
 
@@ -543,7 +543,7 @@ class Requirement_PHP_API extends Requirement {
543
  /**
544
  * @return string
545
  */
546
- protected function test() {
547
  return php_sapi_name();
548
  }
549
 
@@ -563,7 +563,7 @@ class Requirement_Server_Software extends Requirement {
563
  /**
564
  * @return bool
565
  */
566
- protected function test() {
567
 
568
  if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) )
569
  return $_SERVER['SERVER_SOFTWARE'];
@@ -588,7 +588,7 @@ class Requirement_Server_OS extends Requirement {
588
  /**
589
  * @return string
590
  */
591
- protected function test() {
592
  return PHP_OS;
593
  }
594
 
@@ -608,7 +608,7 @@ class Requirement_PHP_Disable_Functions extends Requirement {
608
  /**
609
  * @return string
610
  */
611
- protected function test() {
612
  return @ini_get( 'disable_functions' );
613
  }
614
 
@@ -628,7 +628,7 @@ class Requirement_PHP_Open_Basedir extends Requirement {
628
  /**
629
  * @return string
630
  */
631
- protected function test() {
632
  return @ini_get( 'open_basedir' );
633
  }
634
 
@@ -650,7 +650,7 @@ class Requirement_Define_HMBKP_PATH extends Requirement {
650
  /**
651
  * @return string
652
  */
653
- protected function test() {
654
  return defined( 'HMBKP_PATH' ) ? HMBKP_PATH : '';
655
  }
656
 
@@ -670,7 +670,7 @@ class Requirement_Define_HMBKP_ROOT extends Requirement {
670
  /**
671
  * @return string
672
  */
673
- protected function test() {
674
  return defined( 'HMBKP_ROOT' ) ? HMBKP_ROOT : '';
675
  }
676
 
@@ -690,7 +690,7 @@ class Requirement_Define_HMBKP_MYSQLDUMP_PATH extends Requirement {
690
  /**
691
  * @return string
692
  */
693
- protected function test() {
694
  return defined( 'HMBKP_MYSQLDUMP_PATH' ) ? HMBKP_MYSQLDUMP_PATH : '';
695
  }
696
 
@@ -710,7 +710,7 @@ class Requirement_Define_HMBKP_ZIP_PATH extends Requirement {
710
  /**
711
  * @return string
712
  */
713
- protected function test() {
714
  return defined( 'HMBKP_ZIP_PATH' ) ? HMBKP_ZIP_PATH : '';
715
  }
716
 
@@ -730,7 +730,7 @@ class Requirement_Define_HMBKP_CAPABILITY extends Requirement {
730
  /**
731
  * @return string
732
  */
733
- protected function test() {
734
  return defined( 'HMBKP_CAPABILITY' ) ? HMBKP_CAPABILITY : '';
735
  }
736
 
@@ -750,7 +750,7 @@ class Requirement_Define_HMBKP_EMAIL extends Requirement {
750
  /**
751
  * @return string
752
  */
753
- protected function test() {
754
  return defined( 'HMBKP_EMAIL' ) ? HMBKP_EMAIL : '';
755
  }
756
 
@@ -770,7 +770,7 @@ class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE extends Requirement {
770
  /**
771
  * @return string
772
  */
773
- protected function test() {
774
  return defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ? HMBKP_ATTACHMENT_MAX_FILESIZE : '';
775
  }
776
 
@@ -790,7 +790,7 @@ class Requirement_Define_HMBKP_EXCLUDE extends Requirement {
790
  /**
791
  * @return string
792
  */
793
- protected function test() {
794
  return defined( 'HMBKP_EXCLUDE' ) ? HMBKP_EXCLUDE : '';
795
  }
796
 
@@ -801,7 +801,7 @@ class Requirement_Active_Plugins extends Requirement {
801
 
802
  var $name = 'Active Plugins';
803
 
804
- protected function test(){
805
  return get_option( 'active_plugins' );
806
  }
807
 
@@ -812,7 +812,7 @@ class Requirement_Home_Url extends Requirement {
812
 
813
  var $name = 'Home URL';
814
 
815
- protected function test(){
816
  return home_url();
817
  }
818
 
@@ -823,7 +823,7 @@ class Requirement_Site_Url extends Requirement {
823
 
824
  var $name = 'Site URL';
825
 
826
- protected function test() {
827
  return site_url();
828
  }
829
 
@@ -833,7 +833,7 @@ Requirements::register( 'HM\BackUpWordPress\Requirement_Site_Url', 'Site' );
833
  class Requirement_Plugin_Version extends Requirement {
834
  var $name = 'Plugin Version';
835
 
836
- protected function test() {
837
  return Plugin::PLUGIN_VERSION;
838
  }
839
  }
@@ -843,7 +843,7 @@ class Requirement_Max_Exec extends Requirement {
843
 
844
  var $name = 'Max execution time';
845
 
846
- protected function test(){
847
  return @ini_get( 'max_execution_time' );
848
  }
849
  }
@@ -853,7 +853,7 @@ class Requirement_PDO extends Requirement {
853
 
854
  var $name = 'PDO';
855
 
856
- protected function test(){
857
 
858
  if ( class_exists( 'PDO' ) && \PDO::getAvailableDrivers() ) {
859
  return implode( ', ', \PDO::getAvailableDrivers() );
16
  /**
17
  * @return mixed
18
  */
19
+ protected static function test() {}
20
 
21
  /**
22
  * @return mixed
68
  /**
69
  * @return bool
70
  */
71
+ public static function test() {
72
 
73
  if ( class_exists( 'ZipArchive' ) ) {
74
  return true;
96
  /**
97
  * @return bool
98
  */
99
+ public static function test() {
100
 
101
  if ( defined( 'RecursiveDirectoryIterator::FOLLOW_SYMLINKS' ) ) {
102
  return true;
124
  /**
125
  * @return string
126
  */
127
+ public static function test() {
128
 
129
  $backup = new Zip_File_Backup_Engine;
130
 
150
  /**
151
  * @return string
152
  */
153
+ public static function test() {
154
 
155
  $backup = new Mysqldump_Database_Backup_Engine;
156
 
174
  /**
175
  * @return string
176
  */
177
+ public static function test() {
178
 
179
  if ( ! Backup_Utilities::is_exec_available() ) {
180
  return '';
200
  /**
201
  * @return string
202
  */
203
+ public static function test() {
204
 
205
  if ( ! Backup_Utilities::is_exec_available() ) {
206
  return '';
226
  /**
227
  * @return string
228
  */
229
+ public static function test() {
230
  return PHP_VERSION;
231
  }
232
 
246
  /**
247
  * @return bool|mixed
248
  */
249
+ public static function test() {
250
 
251
  $cron = get_option( 'cron' );
252
 
274
  /**
275
  * @return bool|mixed
276
  */
277
+ public static function test() {
278
 
279
  // Since 4.0
280
  $language = get_option( 'WPLANG' );
307
  /**
308
  * @return bool
309
  */
310
+ public static function test() {
311
  return Backup_Utilities::is_safe_mode_on();
312
  }
313
 
317
  /**
318
  * Class Requirement_Shell_Exec
319
  */
320
+ class Requirement_Exec extends Requirement {
321
 
322
  /**
323
  * @var string
324
  */
325
+ var $name = 'Exec';
326
 
327
  /**
328
  * @return bool
329
  */
330
+ public static function test() {
331
  return Backup_Utilities::is_exec_available();
332
  }
333
 
334
  }
335
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Exec', 'PHP' );
336
 
337
  /**
338
  * Class Requirement_Memory_Limit
347
  /**
348
  * @return string
349
  */
350
+ public static function test() {
351
  return @ini_get( 'memory_limit' );
352
  }
353
 
367
  /**
368
  * @return string
369
  */
370
+ public static function test() {
371
  return Path::get_path();
372
  }
373
 
387
  /**
388
  * @return string
389
  */
390
+ public static function test() {
391
  return substr( sprintf( '%o', fileperms( Path::get_path() ) ), - 4 );
392
  }
393
 
407
  /**
408
  * @return string
409
  */
410
+ public static function test() {
411
  return WP_CONTENT_DIR;
412
  }
413
 
427
  /**
428
  * @return string
429
  */
430
+ public static function test() {
431
  return substr( sprintf( '%o', fileperms( WP_CONTENT_DIR ) ), - 4 );
432
  }
433
 
447
  /**
448
  * @return string
449
  */
450
+ public static function test() {
451
  return ABSPATH;
452
  }
453
 
467
  /**
468
  * @return string
469
  */
470
+ public static function test() {
471
  return Path::get_root();
472
  }
473
 
487
  /**
488
  * @return array
489
  */
490
+ public static function test() {
491
 
492
  $backup_sizes = array();
493
 
523
  /**
524
  * @return mixed
525
  */
526
+ public static function test() {
527
  return (bool) get_option( 'hmbkp_wp_cron_test_failed' );
528
  }
529
 
543
  /**
544
  * @return string
545
  */
546
+ public static function test() {
547
  return php_sapi_name();
548
  }
549
 
563
  /**
564
  * @return bool
565
  */
566
+ public static function test() {
567
 
568
  if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) )
569
  return $_SERVER['SERVER_SOFTWARE'];
588
  /**
589
  * @return string
590
  */
591
+ public static function test() {
592
  return PHP_OS;
593
  }
594
 
608
  /**
609
  * @return string
610
  */
611
+ public static function test() {
612
  return @ini_get( 'disable_functions' );
613
  }
614
 
628
  /**
629
  * @return string
630
  */
631
+ public static function test() {
632
  return @ini_get( 'open_basedir' );
633
  }
634
 
650
  /**
651
  * @return string
652
  */
653
+ public static function test() {
654
  return defined( 'HMBKP_PATH' ) ? HMBKP_PATH : '';
655
  }
656
 
670
  /**
671
  * @return string
672
  */
673
+ public static function test() {
674
  return defined( 'HMBKP_ROOT' ) ? HMBKP_ROOT : '';
675
  }
676
 
690
  /**
691
  * @return string
692
  */
693
+ public static function test() {
694
  return defined( 'HMBKP_MYSQLDUMP_PATH' ) ? HMBKP_MYSQLDUMP_PATH : '';
695
  }
696
 
710
  /**
711
  * @return string
712
  */
713
+ public static function test() {
714
  return defined( 'HMBKP_ZIP_PATH' ) ? HMBKP_ZIP_PATH : '';
715
  }
716
 
730
  /**
731
  * @return string
732
  */
733
+ public static function test() {
734
  return defined( 'HMBKP_CAPABILITY' ) ? HMBKP_CAPABILITY : '';
735
  }
736
 
750
  /**
751
  * @return string
752
  */
753
+ public static function test() {
754
  return defined( 'HMBKP_EMAIL' ) ? HMBKP_EMAIL : '';
755
  }
756
 
770
  /**
771
  * @return string
772
  */
773
+ public static function test() {
774
  return defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ? HMBKP_ATTACHMENT_MAX_FILESIZE : '';
775
  }
776
 
790
  /**
791
  * @return string
792
  */
793
+ public static function test() {
794
  return defined( 'HMBKP_EXCLUDE' ) ? HMBKP_EXCLUDE : '';
795
  }
796
 
801
 
802
  var $name = 'Active Plugins';
803
 
804
+ public static function test(){
805
  return get_option( 'active_plugins' );
806
  }
807
 
812
 
813
  var $name = 'Home URL';
814
 
815
+ public static function test(){
816
  return home_url();
817
  }
818
 
823
 
824
  var $name = 'Site URL';
825
 
826
+ public static function test() {
827
  return site_url();
828
  }
829
 
833
  class Requirement_Plugin_Version extends Requirement {
834
  var $name = 'Plugin Version';
835
 
836
+ public static function test() {
837
  return Plugin::PLUGIN_VERSION;
838
  }
839
  }
843
 
844
  var $name = 'Max execution time';
845
 
846
+ public static function test(){
847
  return @ini_get( 'max_execution_time' );
848
  }
849
  }
853
 
854
  var $name = 'PDO';
855
 
856
+ public static function test() {
857
 
858
  if ( class_exists( 'PDO' ) && \PDO::getAvailableDrivers() ) {
859
  return implode( ', ', \PDO::getAvailableDrivers() );
functions/core.php CHANGED
@@ -107,10 +107,28 @@ function update() {
107
  }
108
 
109
  // Set the archive filename to what it used to be
110
- $legacy_schedule->backup->set_archive_filename( implode( '-', array( get_bloginfo( 'name' ), 'backup', current_time( 'Y-m-d-H-i-s' ) ) ) . '.zip' );
111
 
112
  $legacy_schedule->save();
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  // Remove the legacy options
115
  foreach ( array( 'hmbkp_database_only', 'hmbkp_files_only', 'hmbkp_max_backups', 'hmbkp_email_address', 'hmbkp_email', 'hmbkp_schedule_frequency', 'hmbkp_disable_automatic_backup' ) as $option_name ) {
116
  delete_option( $option_name );
@@ -320,7 +338,7 @@ function setup_default_schedules() {
320
 
321
  }
322
 
323
- add_action( 'admin_init', '\HM\BackUpWordPress\setup_default_schedules' );
324
 
325
  /**
326
  * Return an array of cron schedules
107
  }
108
 
109
  // Set the archive filename to what it used to be
110
+ $legacy_schedule->backup_filename = implode( '-', array( get_bloginfo( 'name' ), 'backup', current_time( 'Y-m-d-H-i-s' ) ) ) . '.zip';
111
 
112
  $legacy_schedule->save();
113
 
114
+ $legacy_path = get_option( 'hmbkp_path' );
115
+
116
+ if ( $legacy_path ) {
117
+
118
+ // Prepend 'backup-' to the beginning of any legacy backups so they are picked up by the legacy schedule
119
+ if ( $handle = opendir( $legacy_path ) ) {
120
+ while ( false !== ( $file = readdir( $handle ) ) ) {
121
+ if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) {
122
+ rename( trailingslashit( $legacy_path ) . $file, trailingslashit( $legacy_path ) . 'backup-' . $file );
123
+ }
124
+ }
125
+ closedir( $handle );
126
+ }
127
+
128
+ PATH::get_instance()->move_old_backups( $legacy_path );
129
+
130
+ }
131
+
132
  // Remove the legacy options
133
  foreach ( array( 'hmbkp_database_only', 'hmbkp_files_only', 'hmbkp_max_backups', 'hmbkp_email_address', 'hmbkp_email', 'hmbkp_schedule_frequency', 'hmbkp_disable_automatic_backup' ) as $option_name ) {
134
  delete_option( $option_name );
338
 
339
  }
340
 
341
+ add_action( 'admin_init', '\HM\BackUpWordPress\setup_default_schedules', 11 );
342
 
343
  /**
344
  * Return an array of cron schedules
functions/interface.php CHANGED
@@ -149,21 +149,12 @@ function set_server_config_notices() {
149
 
150
  $messages = array();
151
 
152
- if ( ! Backup_Utilities::is_exec_available() ) {
153
- $php_user = '<PHP USER>';
154
- $php_group = '<PHP GROUP>';
155
- } else {
156
- $php_user = shell_exec( 'whoami' );
157
- $groups = explode( ' ', shell_exec( 'groups' ) );
158
- $php_group = reset( $groups );
159
- }
160
-
161
  if ( ! is_dir( Path::get_path() ) ) {
162
- $messages[] = sprintf( __( 'The backups directory can\'t be created because your %1$s directory isn\'t writable. Run %2$s or %3$s or create the folder yourself.', 'backupwordpress' ), '<code>' . esc_html( dirname( Path::get_path() ) ) . '</code>', '<code>chown ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( dirname( Path::get_path() ) ) . '</code>', '<code>chmod 777 ' . esc_html( dirname( Path::get_path() ) ) . '</code>' );
163
  }
164
 
165
  if ( is_dir( Path::get_path() ) && ! wp_is_writable( Path::get_path() ) ) {
166
- $messages[] = sprintf( __( 'Your backups directory isn\'t writable. Run %1$s or %2$s or set the permissions yourself.', 'backupwordpress' ), '<code>chown -R ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( Path::get_path() ) . '</code>', '<code>chmod -R 777 ' . esc_html( Path::get_path() ) . '</code>' );
167
  }
168
 
169
  if ( Backup_Utilities::is_safe_mode_on() ) {
@@ -173,21 +164,19 @@ function set_server_config_notices() {
173
  if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) {
174
 
175
  // Suppress open_basedir warning https://bugs.php.net/bug.php?id=53041
176
- if ( ! @file_exists( HMBKP_PATH ) ) {
 
177
 
 
178
  $messages[] = sprintf( __( 'Your custom path does not exist', 'backupwordpress' ) );
179
 
180
- } elseif ( is_restricted_custom_path() ) {
181
-
182
- $messages[] = sprintf( __( 'Your custom path is unreachable due to a restriction set in your PHP configuration (open_basedir)', 'backupwordpress' ) );
183
-
184
  } else {
185
 
186
- if ( ! @is_dir( HMBKP_PATH ) ) {
187
  $messages[] = sprintf( __( 'Your custom backups directory %1$s doesn\'t exist and can\'t be created, your backups will be saved to %2$s instead.', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( Path::get_path() ) . '</code>' );
188
  }
189
 
190
- if ( @is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) {
191
  $messages[] = sprintf( __( 'Your custom backups directory %1$s isn\'t writable, new backups will be saved to %2$s instead.', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( Path::get_path() ) . '</code>' );
192
 
193
  }
@@ -198,6 +187,10 @@ function set_server_config_notices() {
198
  $messages[] = sprintf( __( 'Your site root path %s isn\'t readable.', 'backupwordpress' ), '<code>' . Path::get_root() . '</code>' );
199
  }
200
 
 
 
 
 
201
  if ( count( $messages ) > 0 ) {
202
  $notices->set_notices( 'server_config', $messages, false );
203
  }
@@ -390,27 +383,32 @@ function clear_settings_errors(){
390
  return delete_transient( 'hmbkp_settings_errors' );
391
  }
392
 
393
- function is_restricted_custom_path() {
394
 
395
- $open_basedir = @ini_get( 'open_basedir' );
396
 
397
- if ( 0 === strlen( $open_basedir ) ) {
398
- return false;
399
  }
400
 
401
- $open_basedir_paths = array_map( 'trim', explode( ':', $open_basedir ) );
402
 
403
- // Is backups path in the open_basedir allowed paths?
404
- if ( in_array( HMBKP_PATH, $open_basedir_paths ) ) {
405
- return false;
406
  }
407
 
408
- // Is backups path a subdirectory of one of the allowed paths?
409
- foreach ( $open_basedir_paths as $path ) {
410
- if ( 0 === strpos( HMBKP_PATH, $path ) ) {
411
- return false;
 
 
 
 
 
412
  }
413
  }
414
 
415
- return true;
 
416
  }
149
 
150
  $messages = array();
151
 
 
 
 
 
 
 
 
 
 
152
  if ( ! is_dir( Path::get_path() ) ) {
153
+ $messages[] = sprintf( __( 'The backups directory can\'t be created because your %s directory isn\'t writable. Please create the folder manually.', 'backupwordpress' ), '<code>' . esc_html( dirname( Path::get_path() ) ) . '</code>' );
154
  }
155
 
156
  if ( is_dir( Path::get_path() ) && ! wp_is_writable( Path::get_path() ) ) {
157
+ $messages[] = __( 'The backups directory isn\'t writable. Please fix the permissions.', 'backupwordpress' );
158
  }
159
 
160
  if ( Backup_Utilities::is_safe_mode_on() ) {
164
  if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) {
165
 
166
  // Suppress open_basedir warning https://bugs.php.net/bug.php?id=53041
167
+ if ( ! path_in_php_open_basedir( HMBKP_PATH ) ) {
168
+ $messages[] = sprintf( __( 'Your server has an %1$s restriction in effect and your custom backups directory (%2$s) is not within the allowed path(s): (%3$s).', 'backupwordpress' ), '<code>open_basedir</code>', '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( @ini_get( 'open_basedir' ) ) . '</code>' );
169
 
170
+ } elseif ( ! file_exists( HMBKP_PATH ) ) {
171
  $messages[] = sprintf( __( 'Your custom path does not exist', 'backupwordpress' ) );
172
 
 
 
 
 
173
  } else {
174
 
175
+ if ( ! is_dir( HMBKP_PATH ) ) {
176
  $messages[] = sprintf( __( 'Your custom backups directory %1$s doesn\'t exist and can\'t be created, your backups will be saved to %2$s instead.', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( Path::get_path() ) . '</code>' );
177
  }
178
 
179
+ if ( is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) {
180
  $messages[] = sprintf( __( 'Your custom backups directory %1$s isn\'t writable, new backups will be saved to %2$s instead.', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( Path::get_path() ) . '</code>' );
181
 
182
  }
187
  $messages[] = sprintf( __( 'Your site root path %s isn\'t readable.', 'backupwordpress' ), '<code>' . Path::get_root() . '</code>' );
188
  }
189
 
190
+ if ( ! Requirement_Mysqldump_Command_Path::test() && ! Requirement_PDO::test() ) {
191
+ $messages[] = sprintf( __( 'Your database cannot be backed up because your server doesn\'t support %1$s or %2$s. Please contact your host and ask them to enable them.', 'backupwordpress' ), '<code>mysqldump</code>', '<code>PDO</code>' );
192
+ }
193
+
194
  if ( count( $messages ) > 0 ) {
195
  $notices->set_notices( 'server_config', $messages, false );
196
  }
383
  return delete_transient( 'hmbkp_settings_errors' );
384
  }
385
 
386
+ function path_in_php_open_basedir( $path, $ini_get = 'ini_get' ) {
387
 
388
+ $open_basedir = @call_user_func( $ini_get, 'open_basedir' );
389
 
390
+ if ( ! $open_basedir ) {
391
+ return true;
392
  }
393
 
394
+ $open_basedir_paths = array_map( 'trim', explode( PATH_SEPARATOR, $open_basedir ) );
395
 
396
+ if ( ! $open_basedir_paths ) {
397
+ return true;
 
398
  }
399
 
400
+ // Is path in the open_basedir allowed paths?
401
+ if ( in_array( $path, $open_basedir_paths ) ) {
402
+ return true;
403
+ }
404
+
405
+ // Is path a subdirectory of one of the allowed paths?
406
+ foreach ( $open_basedir_paths as $basedir_path ) {
407
+ if ( 0 === strpos( $path, $basedir_path ) ) {
408
+ return true;
409
  }
410
  }
411
 
412
+ return false;
413
+
414
  }
languages/backupwordpress.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: BackUpWordPress 3.4.1\n"
6
  "Report-Msgid-Bugs-To: backupwordpress@hmn.md\n"
7
- "POT-Creation-Date: 2016-01-21 12:16:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -799,7 +799,7 @@ msgstr ""
799
  msgid "Unfortunately, the backup file was too large to attach to this email."
800
  msgstr ""
801
 
802
- #: classes/class-path.php:332
803
  msgid "This %s file ensures that other people cannot download your backup files."
804
  msgstr ""
805
 
@@ -841,7 +841,7 @@ msgstr ""
841
  msgid "Argument 1 for %s must be a valid cron recurrence or \"manually\""
842
  msgstr ""
843
 
844
- #: classes/class-scheduled-backup.php:428 functions/interface.php:272
845
  msgid "Starting backup..."
846
  msgstr ""
847
 
@@ -901,41 +901,41 @@ msgstr ""
901
  msgid "Error: %s"
902
  msgstr ""
903
 
904
- #: functions/core.php:318
905
  msgid "BackUpWordPress has set up your default schedules."
906
  msgstr ""
907
 
908
- #: functions/core.php:318
909
  msgid ""
910
  "By default BackUpWordPress performs a daily backup of your database and a "
911
  "weekly backup of your database &amp; files. You can modify these schedules."
912
  msgstr ""
913
 
914
- #: functions/core.php:334
915
  msgid "Once Hourly"
916
  msgstr ""
917
 
918
- #: functions/core.php:335
919
  msgid "Twice Daily"
920
  msgstr ""
921
 
922
- #: functions/core.php:336
923
  msgid "Once Daily"
924
  msgstr ""
925
 
926
- #: functions/core.php:337
927
  msgid "Once Weekly"
928
  msgstr ""
929
 
930
- #: functions/core.php:338
931
  msgid "Once Every Two Weeks"
932
  msgstr ""
933
 
934
- #: functions/core.php:339
935
  msgid "Once Monthly"
936
  msgstr ""
937
 
938
- #: functions/core.php:358
939
  msgid "You can only delete directories inside your WordPress installation"
940
  msgstr ""
941
 
@@ -952,167 +952,171 @@ msgstr ""
952
  msgid "Dismiss this notice."
953
  msgstr ""
954
 
955
- #: functions/interface.php:162
956
  msgid ""
957
- "The backups directory can't be created because your %1$s directory isn't "
958
- "writable. Run %2$s or %3$s or create the folder yourself."
959
  msgstr ""
960
 
961
- #: functions/interface.php:166
962
- msgid ""
963
- "Your backups directory isn't writable. Run %1$s or %2$s or set the "
964
- "permissions yourself."
965
  msgstr ""
966
 
967
- #: functions/interface.php:170
968
  msgid ""
969
  "%1$s is running in %2$s, please contact your host and ask them to disable "
970
  "it. BackUpWordPress may not work correctly whilst %3$s is on."
971
  msgstr ""
972
 
973
- #: functions/interface.php:170
974
  msgid "http://php.net/manual/en/features.safe-mode.php"
975
  msgstr ""
976
 
977
- #: functions/interface.php:170
978
  msgid "Safe Mode"
979
  msgstr ""
980
 
981
- #: functions/interface.php:178
982
- msgid "Your custom path does not exist"
 
 
983
  msgstr ""
984
 
985
- #: functions/interface.php:182
986
- msgid ""
987
- "Your custom path is unreachable due to a restriction set in your PHP "
988
- "configuration (open_basedir)"
989
  msgstr ""
990
 
991
- #: functions/interface.php:187
992
  msgid ""
993
  "Your custom backups directory %1$s doesn't exist and can't be created, your "
994
  "backups will be saved to %2$s instead."
995
  msgstr ""
996
 
997
- #: functions/interface.php:191
998
  msgid ""
999
  "Your custom backups directory %1$s isn't writable, new backups will be "
1000
  "saved to %2$s instead."
1001
  msgstr ""
1002
 
1003
- #: functions/interface.php:198
1004
  msgid "Your site root path %s isn't readable."
1005
  msgstr ""
1006
 
1007
- #: functions/interface.php:239
 
 
 
 
 
 
1008
  msgid "Database and Files"
1009
  msgstr ""
1010
 
1011
- #: functions/interface.php:243
1012
  msgid "Files"
1013
  msgstr ""
1014
 
1015
- #: functions/interface.php:247
1016
  msgid "Database"
1017
  msgstr ""
1018
 
1019
- #: functions/interface.php:254
1020
  msgid "Legacy"
1021
  msgstr ""
1022
 
1023
- #: functions/interface.php:271
1024
  msgid "Started %s ago"
1025
  msgstr ""
1026
 
1027
- #: functions/interface.php:273
1028
  msgid "cancel"
1029
  msgstr ""
1030
 
1031
- #: functions/interface.php:291
1032
  msgid "No backups completed"
1033
  msgstr ""
1034
 
1035
- #: functions/interface.php:302
1036
  msgid "Complete Hourly"
1037
  msgstr ""
1038
 
1039
- #: functions/interface.php:303
1040
  msgid "File Hourly"
1041
  msgstr ""
1042
 
1043
- #: functions/interface.php:304
1044
  msgid "Database Hourly"
1045
  msgstr ""
1046
 
1047
- #: functions/interface.php:305
1048
  msgid "Complete Twice Daily"
1049
  msgstr ""
1050
 
1051
- #: functions/interface.php:306
1052
  msgid "File Twice Daily"
1053
  msgstr ""
1054
 
1055
- #: functions/interface.php:307
1056
  msgid "Database Twice Daily"
1057
  msgstr ""
1058
 
1059
- #: functions/interface.php:308
1060
  msgid "Complete Daily"
1061
  msgstr ""
1062
 
1063
- #: functions/interface.php:309
1064
  msgid "File Daily"
1065
  msgstr ""
1066
 
1067
- #: functions/interface.php:310
1068
  msgid "Database Daily"
1069
  msgstr ""
1070
 
1071
- #: functions/interface.php:311
1072
  msgid "Complete Weekly"
1073
  msgstr ""
1074
 
1075
- #: functions/interface.php:312
1076
  msgid "File Weekly"
1077
  msgstr ""
1078
 
1079
- #: functions/interface.php:313
1080
  msgid "Database Weekly"
1081
  msgstr ""
1082
 
1083
- #: functions/interface.php:314
1084
  msgid "Complete Every Two Weeks"
1085
  msgstr ""
1086
 
1087
- #: functions/interface.php:315
1088
  msgid "File Every Two Weeks"
1089
  msgstr ""
1090
 
1091
- #: functions/interface.php:316
1092
  msgid "Database Every Two Weeks"
1093
  msgstr ""
1094
 
1095
- #: functions/interface.php:317
1096
  msgid "Complete Monthly"
1097
  msgstr ""
1098
 
1099
- #: functions/interface.php:318
1100
  msgid "File Monthly"
1101
  msgstr ""
1102
 
1103
- #: functions/interface.php:319
1104
  msgid "Database Monthly"
1105
  msgstr ""
1106
 
1107
- #: functions/interface.php:320
1108
  msgid "Complete Manually"
1109
  msgstr ""
1110
 
1111
- #: functions/interface.php:321
1112
  msgid "File Manually"
1113
  msgstr ""
1114
 
1115
- #: functions/interface.php:322
1116
  msgid "Database Manually"
1117
  msgstr ""
1118
 
@@ -1142,7 +1146,7 @@ msgctxt ""
1142
  msgid "Backup my %1$s %2$s %3$s, %4$s."
1143
  msgstr ""
1144
 
1145
- #: functions/interface.php:293
1146
  msgctxt "backups count"
1147
  msgid "One backup completed"
1148
  msgid_plural "%1$s backups completed"
2
  # This file is distributed under the GPL-2+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: BackUpWordPress 3.4.2\n"
6
  "Report-Msgid-Bugs-To: backupwordpress@hmn.md\n"
7
+ "POT-Creation-Date: 2016-01-25 16:25:00+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
799
  msgid "Unfortunately, the backup file was too large to attach to this email."
800
  msgstr ""
801
 
802
+ #: classes/class-path.php:336
803
  msgid "This %s file ensures that other people cannot download your backup files."
804
  msgstr ""
805
 
841
  msgid "Argument 1 for %s must be a valid cron recurrence or \"manually\""
842
  msgstr ""
843
 
844
+ #: classes/class-scheduled-backup.php:428 functions/interface.php:265
845
  msgid "Starting backup..."
846
  msgstr ""
847
 
901
  msgid "Error: %s"
902
  msgstr ""
903
 
904
+ #: functions/core.php:336
905
  msgid "BackUpWordPress has set up your default schedules."
906
  msgstr ""
907
 
908
+ #: functions/core.php:336
909
  msgid ""
910
  "By default BackUpWordPress performs a daily backup of your database and a "
911
  "weekly backup of your database &amp; files. You can modify these schedules."
912
  msgstr ""
913
 
914
+ #: functions/core.php:352
915
  msgid "Once Hourly"
916
  msgstr ""
917
 
918
+ #: functions/core.php:353
919
  msgid "Twice Daily"
920
  msgstr ""
921
 
922
+ #: functions/core.php:354
923
  msgid "Once Daily"
924
  msgstr ""
925
 
926
+ #: functions/core.php:355
927
  msgid "Once Weekly"
928
  msgstr ""
929
 
930
+ #: functions/core.php:356
931
  msgid "Once Every Two Weeks"
932
  msgstr ""
933
 
934
+ #: functions/core.php:357
935
  msgid "Once Monthly"
936
  msgstr ""
937
 
938
+ #: functions/core.php:376
939
  msgid "You can only delete directories inside your WordPress installation"
940
  msgstr ""
941
 
952
  msgid "Dismiss this notice."
953
  msgstr ""
954
 
955
+ #: functions/interface.php:153
956
  msgid ""
957
+ "The backups directory can't be created because your %s directory isn't "
958
+ "writable. Please create the folder manually."
959
  msgstr ""
960
 
961
+ #: functions/interface.php:157
962
+ msgid "The backups directory isn't writable. Please fix the permissions."
 
 
963
  msgstr ""
964
 
965
+ #: functions/interface.php:161
966
  msgid ""
967
  "%1$s is running in %2$s, please contact your host and ask them to disable "
968
  "it. BackUpWordPress may not work correctly whilst %3$s is on."
969
  msgstr ""
970
 
971
+ #: functions/interface.php:161
972
  msgid "http://php.net/manual/en/features.safe-mode.php"
973
  msgstr ""
974
 
975
+ #: functions/interface.php:161
976
  msgid "Safe Mode"
977
  msgstr ""
978
 
979
+ #: functions/interface.php:168
980
+ msgid ""
981
+ "Your server has an %1$s restriction in effect and your custom backups "
982
+ "directory (%2$s) is not within the allowed path(s): (%3$s)."
983
  msgstr ""
984
 
985
+ #: functions/interface.php:171
986
+ msgid "Your custom path does not exist"
 
 
987
  msgstr ""
988
 
989
+ #: functions/interface.php:176
990
  msgid ""
991
  "Your custom backups directory %1$s doesn't exist and can't be created, your "
992
  "backups will be saved to %2$s instead."
993
  msgstr ""
994
 
995
+ #: functions/interface.php:180
996
  msgid ""
997
  "Your custom backups directory %1$s isn't writable, new backups will be "
998
  "saved to %2$s instead."
999
  msgstr ""
1000
 
1001
+ #: functions/interface.php:187
1002
  msgid "Your site root path %s isn't readable."
1003
  msgstr ""
1004
 
1005
+ #: functions/interface.php:191
1006
+ msgid ""
1007
+ "Your database cannot be backed up because your server doesn't support %1$s "
1008
+ "or %2$s. Please contact your host and ask them to enable them."
1009
+ msgstr ""
1010
+
1011
+ #: functions/interface.php:232
1012
  msgid "Database and Files"
1013
  msgstr ""
1014
 
1015
+ #: functions/interface.php:236
1016
  msgid "Files"
1017
  msgstr ""
1018
 
1019
+ #: functions/interface.php:240
1020
  msgid "Database"
1021
  msgstr ""
1022
 
1023
+ #: functions/interface.php:247
1024
  msgid "Legacy"
1025
  msgstr ""
1026
 
1027
+ #: functions/interface.php:264
1028
  msgid "Started %s ago"
1029
  msgstr ""
1030
 
1031
+ #: functions/interface.php:266
1032
  msgid "cancel"
1033
  msgstr ""
1034
 
1035
+ #: functions/interface.php:284
1036
  msgid "No backups completed"
1037
  msgstr ""
1038
 
1039
+ #: functions/interface.php:295
1040
  msgid "Complete Hourly"
1041
  msgstr ""
1042
 
1043
+ #: functions/interface.php:296
1044
  msgid "File Hourly"
1045
  msgstr ""
1046
 
1047
+ #: functions/interface.php:297
1048
  msgid "Database Hourly"
1049
  msgstr ""
1050
 
1051
+ #: functions/interface.php:298
1052
  msgid "Complete Twice Daily"
1053
  msgstr ""
1054
 
1055
+ #: functions/interface.php:299
1056
  msgid "File Twice Daily"
1057
  msgstr ""
1058
 
1059
+ #: functions/interface.php:300
1060
  msgid "Database Twice Daily"
1061
  msgstr ""
1062
 
1063
+ #: functions/interface.php:301
1064
  msgid "Complete Daily"
1065
  msgstr ""
1066
 
1067
+ #: functions/interface.php:302
1068
  msgid "File Daily"
1069
  msgstr ""
1070
 
1071
+ #: functions/interface.php:303
1072
  msgid "Database Daily"
1073
  msgstr ""
1074
 
1075
+ #: functions/interface.php:304
1076
  msgid "Complete Weekly"
1077
  msgstr ""
1078
 
1079
+ #: functions/interface.php:305
1080
  msgid "File Weekly"
1081
  msgstr ""
1082
 
1083
+ #: functions/interface.php:306
1084
  msgid "Database Weekly"
1085
  msgstr ""
1086
 
1087
+ #: functions/interface.php:307
1088
  msgid "Complete Every Two Weeks"
1089
  msgstr ""
1090
 
1091
+ #: functions/interface.php:308
1092
  msgid "File Every Two Weeks"
1093
  msgstr ""
1094
 
1095
+ #: functions/interface.php:309
1096
  msgid "Database Every Two Weeks"
1097
  msgstr ""
1098
 
1099
+ #: functions/interface.php:310
1100
  msgid "Complete Monthly"
1101
  msgstr ""
1102
 
1103
+ #: functions/interface.php:311
1104
  msgid "File Monthly"
1105
  msgstr ""
1106
 
1107
+ #: functions/interface.php:312
1108
  msgid "Database Monthly"
1109
  msgstr ""
1110
 
1111
+ #: functions/interface.php:313
1112
  msgid "Complete Manually"
1113
  msgstr ""
1114
 
1115
+ #: functions/interface.php:314
1116
  msgid "File Manually"
1117
  msgstr ""
1118
 
1119
+ #: functions/interface.php:315
1120
  msgid "Database Manually"
1121
  msgstr ""
1122
 
1146
  msgid "Backup my %1$s %2$s %3$s, %4$s."
1147
  msgstr ""
1148
 
1149
+ #: functions/interface.php:286
1150
  msgctxt "backups count"
1151
  msgid "One backup completed"
1152
  msgid_plural "%1$s backups completed"
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: humanmade, willmot, pauldewouters, joehoyle, mattheu, tcrsavage, cuvelier
3
  Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
4
  Requires at least: 3.9
5
- Tested up to: 4.4
6
- Stable tag: 3.4.1
7
 
8
  Simple automated backups of your WordPress-powered website.
9
 
@@ -118,10 +118,6 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
118
 
119
  == Upgrade Notice ==
120
 
121
- = 3.4.1 =
122
-
123
- * Fix a possible `PHP Warning` in the Schedule Sentence.
124
-
125
  = 3.4 =
126
 
127
  * This version introduces a major refactoring of the code responsible for the core backup engine. We made sure to write
@@ -162,53 +158,24 @@ users should see major improvements to reliability.
162
 
163
  == Changelog ==
164
 
165
- ### 3.4 / 2016/01/20
 
 
 
 
 
166
 
167
- * Updated composer packages
168
- * Strip empty services from the schedule sentence.
169
- * Back compat pass
170
- * Ensure row actions always show
171
- * don't hardcode byte sizes in unit tests
172
- * correct namespaced Finder call
173
- * allow for more variance when comparing filesizes
174
- * Add unit tests for Site Size
175
- * fixup the full-backup tests
176
- * Add tests for the Backup Status class
177
- * Unit tests now pass on Windows
178
- * correctly ignore the backup running file when zipping the database.
179
- * Normalize a bunch of paths to fix issues on windows
180
- * Don't declare Service::action() as abstract
181
- * use submit button function
182
- * Close the service settings page when clicking done as long as there are no errors
183
- * Remove the old .backup_errors and .backup_warnings files and associated functions as they are no longer used.
184
- * Fixup the email and webhook services
185
- * Delete the backups class and fix a recursion issue in mysqldump
186
- * Re-organise the tests and fixup the failing ones.
187
- * fix excludes
188
- * Fixup the backup status.
189
- * ensure excludes are correctly passed through the backups director
190
- * Ensure unwritable backup paths are never chosen
191
- * Return methods directly instead of storing in unneeded variables
192
- * Fix several bugs in the site size functionality
193
- * add a test to confirm backups exclude backups, currently failing
194
- * Hook the new Site_Backup class up the scheduled backups
195
- * Introduce `Site_Size`, `Excludes` & `Site_Backup`.
196
- * fix some global state issues in the Path tests
197
- * Fixup excludes functionality
198
- * Fix the backup director unit tests
199
- * More namespacing and renaming.
200
- * Start using namespaces in a lot more places.
201
- * start integrating with main plugin
202
- * Add in tests for unreadable directories and account for how zip uniquely handles them
203
- * Skip dots in hmbkp_rmdirtree
204
- * Introduce `Backup_Utilities` and move the static methods from `Backup_Engine` too it.
205
- * backcompat version of assertNotWPError for when tests run on old versions of WordPress
206
- * More unit test fixes
207
- * Update to the latest version of symfony/Finder
208
- * Fix a fatal error in the tests
209
- * remove uneeded code copy paste
210
- * The major backups refactor of 2015
211
 
 
 
 
 
 
212
 
213
  ### 3.3.4 / 2015-12-10
214
 
@@ -220,11 +187,11 @@ users should see major improvements to reliability.
220
  * Fixes Typos in i18n strings
221
  * Backups finish faster
222
  * Fix an issue that caused the site size to report as twice as large as it should
223
- * Adds PHP mysqldump fallback lib
224
 
225
  ### 3.3.2 / 2015-10-15
226
 
227
- * Mis improvements
228
 
229
  ### 3.3.1 / 2015-10-12
230
 
2
  Contributors: humanmade, willmot, pauldewouters, joehoyle, mattheu, tcrsavage, cuvelier
3
  Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
4
  Requires at least: 3.9
5
+ Tested up to: 4.4.1
6
+ Stable tag: 3.4.2
7
 
8
  Simple automated backups of your WordPress-powered website.
9
 
118
 
119
  == Upgrade Notice ==
120
 
 
 
 
 
121
  = 3.4 =
122
 
123
  * This version introduces a major refactoring of the code responsible for the core backup engine. We made sure to write
158
 
159
  == Changelog ==
160
 
161
+ ### 3.4.2
162
+
163
+ * Remove the usage of `shell_exec` in two of our warning messages, fixes a PHP Warning on systems with it disabled.
164
+ * Improve how we handle `open_basedir` restrictions, fixes a PHP Warning on some systems. Adds unit tests to cover `open_basedir` handling.
165
+ * Show an error message if neither `mysqldump` nor `PDO:mysql` are available. Database backups won't work without at least one of them.
166
+ * Improve our upgrade code for users upgrading from pre version 2.0. Fixes a possible fatal error and ensures backups and backup settings are correctly brought forward.
167
 
168
+ ### 3.4.1
169
+
170
+ * Fix a possible `PHP Warning` in the Schedule Sentence.
171
+
172
+ ### 3.4 / 2016/01/20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
+ * Introduces a major re-factor of the underlying backups engine, many bugs fixed and much improved unit test coverage.
175
+ * Vastly improved Windows Server support.
176
+ * We no longer write errors and warnings to files on disk.
177
+ * Update to the latest version of `symfony/finder`.
178
+ * Update to the latest version of `ifsnop/mysqldump-php`.
179
 
180
  ### 3.3.4 / 2015-12-10
181
 
187
  * Fixes Typos in i18n strings
188
  * Backups finish faster
189
  * Fix an issue that caused the site size to report as twice as large as it should
190
+ * Adds PHP mysqldump fallback lib (`ifsnop/mysqldump-php`)
191
 
192
  ### 3.3.2 / 2015-10-15
193
 
194
+ * Misc improvements
195
 
196
  ### 3.3.1 / 2015-10-12
197
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitffc53c57bb8d99be0f3745ccee4cdfec::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -44,7 +44,7 @@ class ComposerAutoloaderInit017df1173e3135d1ab8d6c301231ee6b
44
  }
45
  }
46
 
47
- function composerRequire017df1173e3135d1ab8d6c301231ee6b($file)
48
  {
49
  require $file;
50
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitffc53c57bb8d99be0f3745ccee4cdfec
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitffc53c57bb8d99be0f3745ccee4cdfec', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitffc53c57bb8d99be0f3745ccee4cdfec', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
44
  }
45
  }
46
 
47
+ function composerRequireffc53c57bb8d99be0f3745ccee4cdfec($file)
48
  {
49
  require $file;
50
  }
vendor/composer/installed.json CHANGED
@@ -1,4 +1,55 @@
1
  [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
  "name": "ifsnop/mysqldump-php",
4
  "version": "v2.1",
@@ -52,56 +103,5 @@
52
  "pdo",
53
  "sqlite"
54
  ]
55
- },
56
- {
57
- "name": "symfony/finder",
58
- "version": "v2.8.2",
59
- "version_normalized": "2.8.2.0",
60
- "source": {
61
- "type": "git",
62
- "url": "https://github.com/symfony/finder.git",
63
- "reference": "c90fabdd97e431ee19b6383999cf35334dff27da"
64
- },
65
- "dist": {
66
- "type": "zip",
67
- "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da",
68
- "reference": "c90fabdd97e431ee19b6383999cf35334dff27da",
69
- "shasum": ""
70
- },
71
- "require": {
72
- "php": ">=5.3.9"
73
- },
74
- "time": "2016-01-14 08:26:52",
75
- "type": "library",
76
- "extra": {
77
- "branch-alias": {
78
- "dev-master": "2.8-dev"
79
- }
80
- },
81
- "installation-source": "dist",
82
- "autoload": {
83
- "psr-4": {
84
- "Symfony\\Component\\Finder\\": ""
85
- },
86
- "exclude-from-classmap": [
87
- "/Tests/"
88
- ]
89
- },
90
- "notification-url": "https://packagist.org/downloads/",
91
- "license": [
92
- "MIT"
93
- ],
94
- "authors": [
95
- {
96
- "name": "Fabien Potencier",
97
- "email": "fabien@symfony.com"
98
- },
99
- {
100
- "name": "Symfony Community",
101
- "homepage": "https://symfony.com/contributors"
102
- }
103
- ],
104
- "description": "Symfony Finder Component",
105
- "homepage": "https://symfony.com"
106
  }
107
  ]
1
  [
2
+ {
3
+ "name": "symfony/finder",
4
+ "version": "v2.8.2",
5
+ "version_normalized": "2.8.2.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/symfony/finder.git",
9
+ "reference": "c90fabdd97e431ee19b6383999cf35334dff27da"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da",
14
+ "reference": "c90fabdd97e431ee19b6383999cf35334dff27da",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "php": ">=5.3.9"
19
+ },
20
+ "time": "2016-01-14 08:26:52",
21
+ "type": "library",
22
+ "extra": {
23
+ "branch-alias": {
24
+ "dev-master": "2.8-dev"
25
+ }
26
+ },
27
+ "installation-source": "dist",
28
+ "autoload": {
29
+ "psr-4": {
30
+ "Symfony\\Component\\Finder\\": ""
31
+ },
32
+ "exclude-from-classmap": [
33
+ "/Tests/"
34
+ ]
35
+ },
36
+ "notification-url": "https://packagist.org/downloads/",
37
+ "license": [
38
+ "MIT"
39
+ ],
40
+ "authors": [
41
+ {
42
+ "name": "Fabien Potencier",
43
+ "email": "fabien@symfony.com"
44
+ },
45
+ {
46
+ "name": "Symfony Community",
47
+ "homepage": "https://symfony.com/contributors"
48
+ }
49
+ ],
50
+ "description": "Symfony Finder Component",
51
+ "homepage": "https://symfony.com"
52
+ },
53
  {
54
  "name": "ifsnop/mysqldump-php",
55
  "version": "v2.1",
103
  "pdo",
104
  "sqlite"
105
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
  ]