BackUpWordPress - Version 3.0.2

Version Description

  • 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
Download this release

Release Info

Developer pauldewouters
Plugin Icon 128x128 BackUpWordPress
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

History.md CHANGED
@@ -1,4 +1,191 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  n.n.n / 2014-11-20
3
  ==================
4
 
1
 
2
+ n.n.n / 2014-12-02
3
+ ==================
4
+
5
+ * Bump version
6
+ * Merge pull request #600 from humanmade/issue-600
7
+ * Merge pull request #347 from humanmade/issue-347
8
+ * Add parenthesis to require_once
9
+ * Remove disk space info
10
+ * Merge branch 'master' into issue-347
11
+ * Merge pull request #614 from humanmade/remove-custom-webhook
12
+ * Merge branch 'master' into remove-custom-webhook
13
+ * Merge branch 'master' into issue-600
14
+ * Merge pull request #611 from humanmade/fix_unit_tests
15
+ * Attempt to fix build
16
+ * Merge branch 'master' into fix_unit_tests
17
+ * define WP_TESTS_DIR
18
+ * Make sure current_action fnction is loaded
19
+ * Remove extra slashes and semicolons
20
+ * Remove the custom webhook service
21
+ * Better default WP_TESTS_DIR
22
+ * move trailingslash calls out of the loop for performance
23
+ * Minor code cleanup
24
+ * Merge pull request #599 from humanmade/issue-599
25
+ * Correct path for hm-backup so it's tests are run
26
+ * add composer.lock
27
+ * Use scrutinizer code coverage
28
+ * Merge pull request #609 from waffle-iron/master
29
+ * add waffle.io badge
30
+ * Use up to date commands for coverage
31
+ * Add code rating
32
+ * Don't test 5.2
33
+ * Update readme.md
34
+ * excluded_dirs is deprecated
35
+ * Update scrutinizer config
36
+ * Add composer config and dev dependencies
37
+ * Make PHPUnit generate an XML for coveralls
38
+ * Add scrutinizer config
39
+ * Ignore vendor dir
40
+ * Add a link to Help page
41
+ * Move to activation hook
42
+ * Bump up required WP version
43
+ * Escape all the things
44
+ * Save errors to a notices option
45
+ * Reload page on errors
46
+ * Remove script
47
+ * Remove unneeded class
48
+ * Merge branch 'nice-errors' into issue-600
49
+ * Check PHP version on plugins loaded
50
+ * Check PHP version on activate
51
+ * Merge branch 'master' into issue-599
52
+ * Merge pull request #522 from humanmade/issue-522
53
+ * Merge branch 'master' into nice-errors
54
+ * Update readme
55
+ * Set required version to 5.3.2
56
+ * Update tests
57
+ * Merge branch 'master' into issue-522
58
+ * Merge pull request #567 from humanmade/issue-567
59
+ * Merge branch 'master' into issue-522
60
+ * Merge pull request #559 from humanmade/issue-559
61
+ * Merge branch 'master' into issue-522
62
+ * Merge branch 'master' into nice-errors
63
+ * Allow for a 30 second delta in asserting schedule time
64
+ * Merge pull request #603 from joshk/patch-1
65
+ * Use the new build env on Travis
66
+ * Restrict plugin to be network only
67
+ * Fix admin URL logic
68
+ * Merge pull request #571 from humanmade/codesniffs
69
+ * Formatting
70
+ * Merge branch 'master' into codesniffs
71
+ * Merge branch 'master' into nice-errors
72
+ * Update readme changelog
73
+ * Bump version
74
+ * Ignoe history log
75
+ * Merge branch 'master' into nice-errors
76
+ * remove uneeded images
77
+ * latest hm-backup
78
+ * latest hm-backup
79
+ * Latest hm backup
80
+ * Added known errors and nice messages
81
+ * Fix the support button splitting on 2 lines when too many tabs
82
+ * Spaces
83
+ * Merge branch 'master' into nice-errors
84
+ * Typos in v 3.0 changelog
85
+ * Specify POT filename in grunt task
86
+ * Update POT file
87
+ * Markdown readme
88
+ * Regenerate readme
89
+ * Add plugin headers
90
+ * Fix semicolon
91
+ * Merge branch 'master' of github.com:humanmade/backupwordpress
92
+ * Refactor the recursive filesize scanner
93
+ * correct text domain
94
+ * Merge pull request #556 from humanmade/issue-556
95
+ * Merge pull request #580 from humanmade/issue-580
96
+ * Merge pull request #584 from humanmade/update-backdrop
97
+ * See if this fixes tests
98
+ * Remove unneede statements
99
+ * Use correct action hook
100
+ * Fix display notices
101
+ * Set notices
102
+ * Formatting
103
+ * Merge branch 'master' into nice-errors
104
+ * reload the excludes filelist in the correct place when someone excludes a file
105
+ * Latest backdrop
106
+ * Regenerate minified CSS
107
+ * Regenerate minified JS
108
+ * Fix cancel backup action
109
+ * WordPress Coding Standards
110
+ * Exit early if incompatible version of WordPress
111
+ * Update translations
112
+ * Update changelog
113
+ * Merge pull request #573 from humanmade/design
114
+ * Load minified CSS
115
+ * Formatting
116
+ * Biweekly wording
117
+ * More Yoda conditions
118
+ * Spaces
119
+ * Comma after last array element
120
+ * Yoda conditions
121
+ * Add missing period
122
+ * use nonce_url instead of manually adding the nonce query param
123
+ * close the settings form when done
124
+ * Design changes as per ticket
125
+ * Start tracking langauge in server info
126
+ * Right align the primary button in the enable support modal
127
+ * Re-factor the directory filesize code to use a single array instead of thoussands of transients
128
+ * Remove the warning that would show if you were using anything other than the latest stable, it's no longer needed now that the FAQ is local
129
+ * switch to using a single transient to store directory filesize data
130
+ * Merge pull request #552 from humanmade/issue-552
131
+ * Merge pull request #562 from humanmade/enhancement/issue-562
132
+ * Add an anchor link
133
+ * Add error message
134
+ * Rename function
135
+ * Prefix GET params
136
+ * Update exclude rule action
137
+ * Adds function for building admin action urls
138
+ * fix vertical scroll
139
+ * Adds some functions to manage settings form submission errors
140
+ * Rename nonce and action
141
+ * fetch errors to display
142
+ * Form submission handling for BWP and add-ons settings
143
+ * Use a new function that persists form submission errors to a transient
144
+ * None check
145
+ * Pass the nonce around in the ajax request
146
+ * Enable support action links
147
+ * Check nonces
148
+ * Modify action URLs to use the admin_post hook
149
+ * Remove unneeded code
150
+ * New line at end
151
+ * Use admin_post hook
152
+ * Merge pull request #502 from humanmade/stream-integration
153
+ * Merge pull request #554 from humanmade/fix-display-schedule-time
154
+ * Display schedule start time in local timezone
155
+ * Update tests shell script
156
+ * Update tests config
157
+ * Make it clear we want one week
158
+ * Display our notices - still WIP
159
+ * Add a class to track common errors and their nice message
160
+ * Add a notices class.
161
+ * Reload the page to display notices
162
+ * Set our notices option in the database with the backup errors.
163
+ * Handle the dismiss action for backup errors
164
+ * Include the notices and errors classes
165
+ * Add a singleton to handle known errors thrown by backups
166
+ * Add remaining disk space
167
+ * Merge branch 'fix-transients' into nice-errors
168
+ * Merge branch 're-design' into nice-errors
169
+ * Merge branch 'master' into nice-errors
170
+ * Set BWP WPR web hook url to live url
171
+ * BWP webhooks - 2nd iteration
172
+ * Add an action hook that gives access to consumers to the backup progress
173
+ * add fake endpoint
174
+ * Configure WP Remote webhook on instantiation
175
+ * Inject the schedule to the constructor
176
+ * JSON encode body
177
+ * Sanitize URL
178
+ * Encrypt the header with WPR key
179
+ * Fix property name
180
+ * Fix property name
181
+ * Return errors
182
+ * Add the remote post action
183
+ * Start on the remote post
184
+ * Display and validate settings
185
+ * Include webhook class
186
+ * Begin a webhook class
187
+ * Beginnings of a HMBKP_Error class
188
+
189
  n.n.n / 2014-11-20
190
  ==================
191
 
admin/actions.php CHANGED
@@ -72,8 +72,6 @@ function hmbkp_request_do_backup() {
72
  check_admin_referer( 'hmbkp-run-schedule', 'hmbkp-run-schedule' );
73
  }
74
 
75
-
76
-
77
  // Fixes an issue on servers which only allow a single session per client
78
  session_write_close();
79
 
@@ -106,7 +104,7 @@ function hmbkp_request_do_backup() {
106
  }
107
 
108
  if ( $error_message && file_exists( $schedule->get_archive_filepath() ) && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
109
- $error_message .= 'HMBKP_SUCCESS';
110
  }
111
 
112
  if ( trim( $error_message ) && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
@@ -193,20 +191,18 @@ add_action( 'admin_post_hmbkp_request_cancel_backup', 'hmbkp_request_cancel_back
193
  */
194
  function hmbkp_dismiss_error() {
195
 
196
- // TODO Should really be nonced
197
-
198
- if ( empty( $_GET['action'] ) || $_GET['action'] !== 'hmbkp_dismiss_error' ) {
199
- return;
200
- }
201
 
202
  hmbkp_cleanup();
203
 
204
- wp_safe_redirect( hmbkp_get_settings_url(), 303 );
 
 
205
 
206
  die;
207
 
208
  }
209
- add_action( 'admin_init', 'hmbkp_dismiss_error' );
210
 
211
  /**
212
  * Catch the schedule service settings form submission
@@ -245,7 +241,6 @@ function hmbkp_edit_schedule_services_submit() {
245
  wp_safe_redirect( wp_get_referer(), '303' );
246
  die;
247
 
248
-
249
  }
250
  add_action( 'admin_post_hmbkp_edit_schedule_services_submit', 'hmbkp_edit_schedule_services_submit' );
251
 
@@ -296,7 +291,7 @@ function hmbkp_edit_schedule_submit() {
296
  $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Schedule cannot be empty', 'hmbkp' );
297
  }
298
 
299
- elseif ( ! in_array( $schedule_recurrence_type, array_keys( hmbkp_get_cron_schedules() ) ) && $schedule_recurrence_type !== 'manually' ) {
300
  $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Invalid schedule', 'hmbkp' );
301
  }
302
 
@@ -326,7 +321,7 @@ function hmbkp_edit_schedule_submit() {
326
 
327
  $options = array(
328
  'min_range' => 1,
329
- 'max_range' => 31
330
  );
331
 
332
  if ( false === filter_var( $day_of_month, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
@@ -364,7 +359,7 @@ function hmbkp_edit_schedule_submit() {
364
 
365
  $options = array(
366
  'min_range' => 0,
367
- 'max_range' => 59
368
  );
369
 
370
  if ( false === filter_var( $minutes, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
@@ -573,30 +568,11 @@ function hmbkp_display_error_and_offer_to_email_it() {
573
  die;
574
  }
575
 
576
- $error = wp_strip_all_tags( stripslashes( $_POST['hmbkp_error'] ) );
577
-
578
- $error = str_replace( 'HMBKP_SUCCESS', '', $error, $succeeded );
579
-
580
- if ( $succeeded ) { ?>
581
-
582
- <h3><?php _e( 'Your backup completed but with the following errors / warnings, it\'s probably ok to ignore these.', 'hmbkp' ); ?></h3>
583
-
584
- <?php } else { ?>
585
-
586
- <h3><?php _e( 'Your backup failed', 'hmbkp' ); ?></h3>
587
-
588
- <?php } ?>
589
-
590
- <p><?php _e( 'Here\'s the response from the server:', 'hmbkp' ); ?></p>
591
-
592
- <pre><?php esc_html_e( $error ); ?></pre>
593
-
594
- <p class="description"><?php printf( __( 'You can email details of this error to %s so they can look into the issue.', 'hmbkp' ), '<a href="http://hmn.md">Human Made Limited</a>' ); ?><br /><br /></p>
595
 
596
- <button class="button hmbkp-colorbox-close"><?php _e( 'Close', 'hmbkp' ); ?></button>
597
- <button class="button-primary hmbkp_send_error_via_email right"><?php _e( 'Email to Support', 'hmbkp' ); ?></button>
598
 
599
- <?php die;
600
 
601
  }
602
  add_action( 'wp_ajax_hmbkp_backup_error', 'hmbkp_display_error_and_offer_to_email_it' );
72
  check_admin_referer( 'hmbkp-run-schedule', 'hmbkp-run-schedule' );
73
  }
74
 
 
 
75
  // Fixes an issue on servers which only allow a single session per client
76
  session_write_close();
77
 
104
  }
105
 
106
  if ( $error_message && file_exists( $schedule->get_archive_filepath() ) && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
107
+ $error_message .= ' HMBKP_SUCCESS';
108
  }
109
 
110
  if ( trim( $error_message ) && defined( 'DOING_AJAX' ) && DOING_AJAX ) {
191
  */
192
  function hmbkp_dismiss_error() {
193
 
194
+ check_admin_referer( 'hmbkp_dismiss_error', 'hmbkp_dismiss_error_nonce' );
 
 
 
 
195
 
196
  hmbkp_cleanup();
197
 
198
+ HMBKP_Notices::get_instance()->clear_all_notices();
199
+
200
+ wp_safe_redirect( wp_get_referer(), 303 );
201
 
202
  die;
203
 
204
  }
205
+ add_action( 'admin_post_hmbkp_dismiss_error', 'hmbkp_dismiss_error' );
206
 
207
  /**
208
  * Catch the schedule service settings form submission
241
  wp_safe_redirect( wp_get_referer(), '303' );
242
  die;
243
 
 
244
  }
245
  add_action( 'admin_post_hmbkp_edit_schedule_services_submit', 'hmbkp_edit_schedule_services_submit' );
246
 
291
  $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Schedule cannot be empty', 'hmbkp' );
292
  }
293
 
294
+ elseif ( ! in_array( $schedule_recurrence_type, array_keys( hmbkp_get_cron_schedules() ) ) && 'manually' !== $schedule_recurrence_type ) {
295
  $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Invalid schedule', 'hmbkp' );
296
  }
297
 
321
 
322
  $options = array(
323
  'min_range' => 1,
324
+ 'max_range' => 31,
325
  );
326
 
327
  if ( false === filter_var( $day_of_month, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
359
 
360
  $options = array(
361
  'min_range' => 0,
362
+ 'max_range' => 59,
363
  );
364
 
365
  if ( false === filter_var( $minutes, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
568
  die;
569
  }
570
 
571
+ $errors = explode( "\n", wp_strip_all_tags( stripslashes( $_POST['hmbkp_error'] ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
+ HMBKP_Notices::get_instance()->set_notices( 'backup_errors', $errors );
 
574
 
575
+ wp_send_json_success( wp_get_referer() );
576
 
577
  }
578
  add_action( 'wp_ajax_hmbkp_backup_error', 'hmbkp_display_error_and_offer_to_email_it' );
admin/backups.php CHANGED
@@ -44,6 +44,6 @@ if ( ! $schedule = $current_schedule ) {
44
 
45
  <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' ); ?>
46
 
47
- <?php require( HMBKP_PLUGIN_PATH . 'admin/backups-table.php'); ?>
48
 
49
  </div>
44
 
45
  <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' ); ?>
46
 
47
+ <?php require( HMBKP_PLUGIN_PATH . 'admin/backups-table.php' ); ?>
48
 
49
  </div>
admin/enable-support.php CHANGED
@@ -6,7 +6,7 @@
6
 
7
  <div class="server-info">
8
 
9
- <?php foreach( HMBKP_Requirements::get_requirement_groups() as $group ) : ?>
10
 
11
  <table class="fixed widefat">
12
 
6
 
7
  <div class="server-info">
8
 
9
+ <?php foreach ( HMBKP_Requirements::get_requirement_groups() as $group ) : ?>
10
 
11
  <table class="fixed widefat">
12
 
admin/schedule-form-excludes.php CHANGED
@@ -252,7 +252,7 @@
252
 
253
  $size = $schedule->filesize( $file );
254
 
255
- if ( $size !== false ) {
256
 
257
  $size = size_format( $size );
258
 
252
 
253
  $size = $schedule->filesize( $file );
254
 
255
+ if ( false !== $size ) {
256
 
257
  $size = size_format( $size );
258
 
admin/schedule-sentence.php CHANGED
@@ -3,7 +3,7 @@
3
  // Calculated filesize
4
  $cached = $schedule->is_site_size_cached();
5
 
6
- if ( $schedule->get_type() === 'database' ) {
7
  $cached = true;
8
  }
9
 
@@ -91,7 +91,7 @@ switch ( $schedule->get_max_backups() ) :
91
 
92
  case 0 :
93
 
94
- $backup_to_keep = sprintf( __( 'don\'t store any backups in on this server', 'hmbkp' ), $server );
95
 
96
  break;
97
 
@@ -125,7 +125,7 @@ if ( ! empty( $services ) && count( $services ) > 1 ) {
125
 
126
  <div class="hmbkp-schedule-sentence<?php if ( $schedule->get_status() ) { ?> hmbkp-running<?php } ?>">
127
 
128
- <?php $sentence = sprintf( __( 'Backup my %1$s %2$s %3$s, %4$s. ', 'hmbkp' ), '<span>' . $type . '</span>', $filesize, $reoccurrence, $backup_to_keep );
129
 
130
  if ( $email_msg ) {
131
  $sentence .= sprintf( __( '%s. ', 'hmbkp' ), $email_msg );
3
  // Calculated filesize
4
  $cached = $schedule->is_site_size_cached();
5
 
6
+ if ( 'database' === $schedule->get_type() ) {
7
  $cached = true;
8
  }
9
 
91
 
92
  case 0 :
93
 
94
+ $backup_to_keep = sprintf( __( 'don\'t store any backups in on this server', 'hmbkp' ), hmbkp_path() );
95
 
96
  break;
97
 
125
 
126
  <div class="hmbkp-schedule-sentence<?php if ( $schedule->get_status() ) { ?> hmbkp-running<?php } ?>">
127
 
128
+ <?php $sentence = sprintf( _x( 'Backup my %1$s %2$s %3$s, %4$s.', '1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to store', 'hmbkp' ), '<span>' . $type . '</span>', $filesize, $reoccurrence, $backup_to_keep );
129
 
130
  if ( $email_msg ) {
131
  $sentence .= sprintf( __( '%s. ', 'hmbkp' ), $email_msg );
admin/schedule-settings.php CHANGED
@@ -6,10 +6,12 @@
6
 
7
  <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings', 'hmbkp_schedule_id' => $schedule->get_id() ), hmbkp_get_settings_url() ), 'hmbkp-edit-schedule' ); ?>"><?php _e( 'Settings', 'hmbkp' ); ?></a> |
8
 
9
- <?php // Only show excludes if we are backing up files
10
- if ( $schedule->get_type() !== 'database' ) { ?>
 
 
11
  <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes', 'hmbkp_schedule_id' => $schedule->get_id() ), hmbkp_get_settings_url() ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a> |
12
- <?php } ?>
13
 
14
  <?php foreach ( HMBKP_Services::get_services( $schedule ) as $service ) :
15
 
@@ -26,7 +28,7 @@
26
 
27
  <?php } ?>
28
 
29
- <?php if ( ! isset( $_GET['action'] ) || $_GET['action'] !== 'hmbkp_edit_schedule' || ! isset( $_GET['hmbkp_panel'] ) ) {
30
  return;
31
  } ?>
32
 
6
 
7
  <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings', 'hmbkp_schedule_id' => $schedule->get_id() ), hmbkp_get_settings_url() ), 'hmbkp-edit-schedule' ); ?>"><?php _e( 'Settings', 'hmbkp' ); ?></a> |
8
 
9
+ <?php
10
+
11
+ // Only show excludes if we are backing up files
12
+ if ( 'database' !== $schedule->get_type() ) : ?>
13
  <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes', 'hmbkp_schedule_id' => $schedule->get_id() ), hmbkp_get_settings_url() ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a> |
14
+ <?php endif; ?>
15
 
16
  <?php foreach ( HMBKP_Services::get_services( $schedule ) as $service ) :
17
 
28
 
29
  <?php } ?>
30
 
31
+ <?php if ( ! isset( $_GET['action'] ) || 'hmbkp_edit_schedule' !== $_GET['action'] || ! isset( $_GET['hmbkp_panel'] ) ) {
32
  return;
33
  } ?>
34
 
admin/server-info.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php foreach( HMBKP_Requirements::get_requirement_groups() as $group ) : ?>
2
 
3
  <h3><?php echo ucwords( $group ); ?></h3>
4
 
1
+ <?php foreach ( HMBKP_Requirements::get_requirement_groups() as $group ) : ?>
2
 
3
  <h3><?php echo ucwords( $group ); ?></h3>
4
 
assets/hmbkp.css CHANGED
@@ -61,7 +61,7 @@ thead td { border-bottom: 1px solid #e1e1e1; }
61
  .server-info { overflow: auto; max-height: 50%; outline: black 1px solid; }
62
  .server-info pre { max-height: 100px; overflow-x:hidden; }
63
 
64
- #intercom-info { background: #0074a2; color:#fff;}
65
  #intercom-info:hover { background: #2ea2cc; color:#fff;}
66
  #intercom-info span.dashicons-admin-users { position: relative; display:inline-block; vertical-align: middle; top:-2px; }
67
 
@@ -69,30 +69,30 @@ pre { background-color: #eee; padding: 10px; white-space: pre; max-height: 320px
69
 
70
  @media screen and (max-width: 768px) {
71
 
72
- .wrap h2 {
73
- padding: 10px 0 0 0;
74
- }
75
-
76
- .hmbkp-schedule-sentence::before { height: 80px; }
77
-
78
- h2 .nav-tab {
79
- display: block;
80
- padding: 10px;
81
- margin: 0;
82
- }
83
-
84
- .hmbkp-schedule-sentence {
85
- margin: 10px 0;
86
- padding: 10px;
87
- }
88
- #intercom-info { display: none; }
89
- .hmbkp-schedule-settings { padding: 0 10px 10px; }
90
- .hmbkp-exclude-settings table { margin: 0 -10px; border-left: none; border-right: none; width: calc(100% + 20px) }
91
- .hmbkp-exclude-settings tr > *:first-child { display: none; }
92
- .hmbkp-schedule-settings tr *:nth-child(4), .hmbkp-schedule-settings tr *:nth-child(5) { display: none; }
93
- .hmbkp-schedule-settings thead tr:nth-child(2) { display: none; }
94
- .hmbkp-schedule-settings { margin-left: -10px; margin-right: -10px; margin-bottom: -10px; }
95
- table.widefat tbody tr:nth-child(even) { background-color: #fff }
96
- table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
97
 
98
  }
61
  .server-info { overflow: auto; max-height: 50%; outline: black 1px solid; }
62
  .server-info pre { max-height: 100px; overflow-x:hidden; }
63
 
64
+ #intercom-info { background: #0074a2; color:#fff; display: inline-block;}
65
  #intercom-info:hover { background: #2ea2cc; color:#fff;}
66
  #intercom-info span.dashicons-admin-users { position: relative; display:inline-block; vertical-align: middle; top:-2px; }
67
 
69
 
70
  @media screen and (max-width: 768px) {
71
 
72
+ .wrap h2 {
73
+ padding: 10px 0 0 0;
74
+ }
75
+
76
+ .hmbkp-schedule-sentence::before { height: 80px; }
77
+
78
+ h2 .nav-tab {
79
+ display: block;
80
+ padding: 10px;
81
+ margin: 0;
82
+ }
83
+
84
+ .hmbkp-schedule-sentence {
85
+ margin: 10px 0;
86
+ padding: 10px;
87
+ }
88
+ #intercom-info { display: none; }
89
+ .hmbkp-schedule-settings { padding: 0 10px 10px; }
90
+ .hmbkp-exclude-settings table { margin: 0 -10px; border-left: none; border-right: none; width: calc(100% + 20px) }
91
+ .hmbkp-exclude-settings tr > *:first-child { display: none; }
92
+ .hmbkp-schedule-settings tr *:nth-child(4), .hmbkp-schedule-settings tr *:nth-child(5) { display: none; }
93
+ .hmbkp-schedule-settings thead tr:nth-child(2) { display: none; }
94
+ .hmbkp-schedule-settings { margin-left: -10px; margin-right: -10px; margin-bottom: -10px; }
95
+ table.widefat tbody tr:nth-child(even) { background-color: #fff }
96
+ table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
97
 
98
  }
assets/hmbkp.js CHANGED
@@ -188,9 +188,11 @@ function hmbkpCatchResponseAndOfferToEmail( data ) {
188
  { 'nonce' : hmbkp.nonce, 'action' : 'hmbkp_backup_error', 'hmbkp_error' : data },
189
  function( data ) {
190
 
191
- if ( ! data || data == 0 )
192
- return;
193
-
 
 
194
  }
195
  );
196
 
188
  { 'nonce' : hmbkp.nonce, 'action' : 'hmbkp_backup_error', 'hmbkp_error' : data },
189
  function( data ) {
190
 
191
+ if ( ! data || data == 0 ) {
192
+ return;
193
+ } else {
194
+ location.reload(true);
195
+ }
196
  }
197
  );
198
 
assets/hmbkp.min.css CHANGED
@@ -1 +1 @@
1
- .hmbkp_active td:first-child>code:before{content:"\00a0 \2713 ";font-size:11px}.hmbkp_active{background:#E5F7E8}div#hmbkp-warning,h2.nav-tab-wrapper+div[id^=hmbkp]{margin:20px 0 15px}h2+div[id^=hmbkp] input{max-width:100%}.nav-tab.hmbkp-running:not(.nav-tab-active):before{width:20px;height:20px;margin:0 10px -4px 0;content:"";background:transparent url(spinner-2x.gif) no-repeat 0 0;background-size:20px;display:inline-block}.hmbkp-upsell{margin-top:40px;padding-top:16px;border-top:1px solid #ccc}.hmbkp-upsell a{color:#57792b}.hmbkp-upsell a:hover{color:#98c063}.hmbkp-upsell-sep{color:#bbb}.hmbkp-upsell ul{overflow:hidden}.hmbkp-upsell li{float:left;margin:0 20px 20px 0}.hmbkp-upsell img{display:block;margin:0 auto;max-width:120px;min-height:60px}.hmbkp-upsell ul a{display:block;margin-bottom:0;width:120px}.hmbkp-upsell .howto{font-weight:400;display:inline}.hmbkp-upsell .hmbkp_hide{float:right}.hmbkp-schedule-sentence{font-size:16px;font-weight:lighter;margin:20px 0;background-color:#FBFBFB;padding:20px;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.hmbkp-schedule-sentence::before{content:"\2714";margin-right:10px;width:16px;height:60px;display:block;float:left}.hmbkp-schedule-sentence.hmbkp-error:before{content:"\2718"}.hmbkp-schedule-sentence.hmbkp-running:before{width:20px;height:80px;margin:-1px 10px 0 0;content:"";background:transparent url(spinner-2x.gif) no-repeat 0 0;background-size:20px;display:inline-block}.hmbkp-schedule-sentence .hmbkp-status{display:none;font-size:12px;color:#666;margin:2px 0 0 30px}.hmbkp-schedule-sentence.hmbkp-running .hmbkp-status{display:block}.hmbkp-schedule-sentence.hmbkp-running .hmbkp-schedule-actions{display:none}.hmbkp-schedule-sentence :not(a)[title]{border-bottom:1px dotted #CCC;cursor:help}.hmbkp-schedule-sentence .hmbkp-status[title]{border-bottom:none}.hmbkp-schedule-sentence .submit{padding:0}.hmbkp-schedule-sentence .hmbkp-schedule-actions{visibility:visible;font-size:12px;font-weight:400;margin:0 0 0 26px}.hmbkp-schedule-actions a{white-space:nowrap}.hmbkp-schedule-settings{border-top:1px solid #e5e5e5;margin:20px -20px -20px;background-color:#f5f5f5;padding:0 20px 20px}.hmbkp-ajax-loading,button.hmbkp-ajax-loading{padding-left:20px;position:relative}.hmbkp-ajax-loading::after{content:"";width:16px;height:16px;background-image:url(spinner-2x.gif);background-size:16px 16px;background-repeat:no-repeat;background-position:0 0;position:absolute;right:-30px;top:5px}.delete-action{color:#a00;-webkit-transition:all 300ms ease;-moz-transition:all 300ms ease;-ms-transition:all 300ms ease;-o-transition:all 300ms ease;transition:all 300ms ease}.delete-action:hover .delete-action:focus{color:red;-webkit-transition:all 300ms ease;-moz-transition:all 300ms ease;-ms-transition:all 300ms ease;-o-transition:all 300ms ease;transition:all 300ms ease}.strikethrough{text-decoration:line-through}table.widefat tbody tr:nth-child(even){background-color:#f9f9f9}.hmbkp-exclude-settings td:first-child,.hmbkp-exclude-settings th:first-child{width:20px;padding-right:0}.hmbkp-exclude-settings thead tr:last-child{background-color:#f9f9f9}.hmbkp-exclude-settings table .button-secondary{line-height:18px;height:20px}thead td{border-bottom:1px solid #e1e1e1}.hmbkp-exclude-settings table .spinner{display:block;float:left;margin:0}.hmbkp-schedule-settings .column-format code{white-space:nowrap}.column-filesize code{position:relative}.column-filesize .dashicons-update{display:none;overflow:hidden;position:absolute;width:100%;left:0;text-align:center;background-color:rgba(255,255,255,.8)}.column-filesize .dashicons-update span{display:none}.column-filesize:hover .dashicons-update{display:inline-block}.hmbkp-exclude-settings td span.reason{color:#CCC}.server-info{overflow:auto;max-height:50%;outline:#000 1px solid}.server-info pre{max-height:100px;overflow-x:hidden}#intercom-info{background:#0074a2;color:#fff}#intercom-info:hover{background:#2ea2cc;color:#fff}#intercom-info span.dashicons-admin-users{position:relative;display:inline-block;vertical-align:middle;top:-2px}pre{background-color:#eee;padding:10px;white-space:pre;max-height:320px;overflow:auto;word-wrap:normal!important}@media screen and (max-width:768px){.wrap h2{padding:10px 0 0}.hmbkp-schedule-sentence::before{height:80px}h2 .nav-tab{display:block;padding:10px;margin:0}.hmbkp-schedule-sentence{margin:10px 0;padding:10px}#intercom-info{display:none}.hmbkp-schedule-settings{padding:0 10px 10px}.hmbkp-exclude-settings table{margin:0 -10px;border-left:none;border-right:none;width:calc(100% + 20px)}.hmbkp-exclude-settings tr>:first-child,.hmbkp-schedule-settings thead tr:nth-child(2),.hmbkp-schedule-settings tr :nth-child(4),.hmbkp-schedule-settings tr :nth-child(5){display:none}.hmbkp-schedule-settings{margin-left:-10px;margin-right:-10px;margin-bottom:-10px}table.widefat tbody tr:nth-child(even){background-color:#fff}table.widefat tbody tr:nth-child(odd){background-color:#f9f9f9}}
1
+ .hmbkp_active td:first-child>code:before{content:"\00a0 \2713 ";font-size:11px}.hmbkp_active{background:#E5F7E8}div#hmbkp-warning,h2.nav-tab-wrapper+div[id^=hmbkp]{margin:20px 0 15px}h2+div[id^=hmbkp] input{max-width:100%}.nav-tab.hmbkp-running:not(.nav-tab-active):before{width:20px;height:20px;margin:0 10px -4px 0;content:"";background:transparent url(spinner-2x.gif) no-repeat 0 0;background-size:20px;display:inline-block}.hmbkp-upsell{margin-top:40px;padding-top:16px;border-top:1px solid #ccc}.hmbkp-upsell a{color:#57792b}.hmbkp-upsell a:hover{color:#98c063}.hmbkp-upsell-sep{color:#bbb}.hmbkp-upsell ul{overflow:hidden}.hmbkp-upsell li{float:left;margin:0 20px 20px 0}.hmbkp-upsell img{display:block;margin:0 auto;max-width:120px;min-height:60px}.hmbkp-upsell ul a{display:block;margin-bottom:0;width:120px}.hmbkp-upsell .howto{font-weight:400;display:inline}.hmbkp-upsell .hmbkp_hide{float:right}.hmbkp-schedule-sentence{font-size:16px;font-weight:lighter;margin:20px 0;background-color:#FBFBFB;padding:20px;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.hmbkp-schedule-sentence::before{content:"\2714";margin-right:10px;width:16px;height:60px;display:block;float:left}.hmbkp-schedule-sentence.hmbkp-error:before{content:"\2718"}.hmbkp-schedule-sentence.hmbkp-running:before{width:20px;height:80px;margin:-1px 10px 0 0;content:"";background:transparent url(spinner-2x.gif) no-repeat 0 0;background-size:20px;display:inline-block}.hmbkp-schedule-sentence .hmbkp-status{display:none;font-size:12px;color:#666;margin:2px 0 0 30px}.hmbkp-schedule-sentence.hmbkp-running .hmbkp-status{display:block}.hmbkp-schedule-sentence.hmbkp-running .hmbkp-schedule-actions{display:none}.hmbkp-schedule-sentence :not(a)[title]{border-bottom:1px dotted #CCC;cursor:help}.hmbkp-schedule-sentence .hmbkp-status[title]{border-bottom:none}.hmbkp-schedule-sentence .submit{padding:0}.hmbkp-schedule-sentence .hmbkp-schedule-actions{visibility:visible;font-size:12px;font-weight:400;margin:0 0 0 26px}.hmbkp-schedule-actions a{white-space:nowrap}.hmbkp-schedule-settings{border-top:1px solid #e5e5e5;margin:20px -20px -20px;background-color:#f5f5f5;padding:0 20px 20px}.hmbkp-ajax-loading,button.hmbkp-ajax-loading{padding-left:20px;position:relative}.hmbkp-ajax-loading::after{content:"";width:16px;height:16px;background-image:url(spinner-2x.gif);background-size:16px 16px;background-repeat:no-repeat;background-position:0 0;position:absolute;right:-30px;top:5px}.delete-action{color:#a00;-webkit-transition:all 300ms ease;-moz-transition:all 300ms ease;-ms-transition:all 300ms ease;-o-transition:all 300ms ease;transition:all 300ms ease}.delete-action:hover .delete-action:focus{color:red;-webkit-transition:all 300ms ease;-moz-transition:all 300ms ease;-ms-transition:all 300ms ease;-o-transition:all 300ms ease;transition:all 300ms ease}.strikethrough{text-decoration:line-through}table.widefat tbody tr:nth-child(even){background-color:#f9f9f9}.hmbkp-exclude-settings td:first-child,.hmbkp-exclude-settings th:first-child{width:20px;padding-right:0}.hmbkp-exclude-settings thead tr:last-child{background-color:#f9f9f9}.hmbkp-exclude-settings table .button-secondary{line-height:18px;height:20px}thead td{border-bottom:1px solid #e1e1e1}.hmbkp-exclude-settings table .spinner{display:block;float:left;margin:0}.hmbkp-schedule-settings .column-format code{white-space:nowrap}.column-filesize code{position:relative}.column-filesize .dashicons-update{display:none;overflow:hidden;position:absolute;width:100%;left:0;text-align:center;background-color:rgba(255,255,255,.8)}.column-filesize .dashicons-update span{display:none}.column-filesize:hover .dashicons-update{display:inline-block}.hmbkp-exclude-settings td span.reason{color:#CCC}.server-info{overflow:auto;max-height:50%;outline:#000 1px solid}.server-info pre{max-height:100px;overflow-x:hidden}#intercom-info{background:#0074a2;color:#fff;display:inline-block}#intercom-info:hover{background:#2ea2cc;color:#fff}#intercom-info span.dashicons-admin-users{position:relative;display:inline-block;vertical-align:middle;top:-2px}pre{background-color:#eee;padding:10px;white-space:pre;max-height:320px;overflow:auto;word-wrap:normal!important}@media screen and (max-width:768px){.wrap h2{padding:10px 0 0}.hmbkp-schedule-sentence::before{height:80px}h2 .nav-tab{display:block;padding:10px;margin:0}.hmbkp-schedule-sentence{margin:10px 0;padding:10px}#intercom-info{display:none}.hmbkp-schedule-settings{padding:0 10px 10px}.hmbkp-exclude-settings table{margin:0 -10px;border-left:none;border-right:none;width:calc(100% + 20px)}.hmbkp-exclude-settings tr>:first-child,.hmbkp-schedule-settings thead tr:nth-child(2),.hmbkp-schedule-settings tr :nth-child(4),.hmbkp-schedule-settings tr :nth-child(5){display:none}.hmbkp-schedule-settings{margin-left:-10px;margin-right:-10px;margin-bottom:-10px}table.widefat tbody tr:nth-child(even){background-color:#fff}table.widefat tbody tr:nth-child(odd){background-color:#f9f9f9}}
assets/hmbkp.min.js CHANGED
@@ -1 +1 @@
1
- function hmbkpToggleScheduleFields(a){a="undefined"!=typeof a?a:"manually";var b=jQuery(".recurring-setting"),c=jQuery("#schedule-start"),d=jQuery("p.twice-js");switch(a){case"manually":b.hide();break;case"hmbkp_hourly":case"hmbkp_daily":b.hide(),c.show(),d.hide();break;case"hmbkp_twicedaily":b.hide(),c.show(),d.show();break;case"hmbkp_weekly":case"hmbkp_fortnightly":b.hide(),jQuery("#start-day").show(),c.show(),d.hide();break;case"hmbkp_monthly":b.hide(),c.show(),jQuery("#start-date").show(),d.hide()}}function hmbkpCatchResponseAndOfferToEmail(a){a&&0!=a?(jQuery(".hmbkp-schedule-sentence.hmbkp-running").removeClass("hmbkp-running").addClass("hmbkp-error"),jQuery.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_backup_error",hmbkp_error:a},function(a){})):location.reload(!0),jQuery(document).one("click",".hmbkp_send_error_via_email",function(b){b.preventDefault(),jQuery(this).addClass("hmbkp-ajax-loading").attr("disabled","disabled"),jQuery.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_email_error",hmbkp_error:a},function(){})})}jQuery(document).ready(function(a){a.ajaxSetup({cache:!1}),a("select#hmbkp_schedule_recurrence_type").size()&&(hmbkpToggleScheduleFields(a("select#hmbkp_schedule_recurrence_type").val()),a(document).on("change","select#hmbkp_schedule_recurrence_type",function(){hmbkpToggleScheduleFields(a(this).val())})),a(document).on("click",".hmbkp-schedule-actions .delete-action",function(a){confirm(hmbkp.delete_schedule)||a.preventDefault()}),a(document).on("click",".hmbkp_manage_backups_row .delete-action",function(a){confirm(hmbkp.delete_backup)||a.preventDefault()}),a(document).on("click",".hmbkp-edit-schedule-excludes-form .delete-action",function(a){confirm(hmbkp.remove_exclude_rule)||a.preventDefault()}),a.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_cron_test"},function(b){1!=b&&a(".wrap > h2").after(b)}),a(".hmbkp-schedule-sentence .calculating").size()&&a.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_calculate",hmbkp_schedule_id:a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id")},function(b){form=a(".hmbkp-schedule-settings").clone(!0),-1!=b.indexOf("title")?(a(".hmbkp-schedule-sentence").replaceWith(b),a(".hmbkp-schedule-sentence").append(form)):a(".calculating").remove()}).error(function(){a(".calculating").remove()}),a(document).on("click",".hmbkp-run",function(b){a(this).closest(".hmbkp-schedule-sentence").addClass("hmbkp-running"),a(".hmbkp-error").removeClass("hmbkp-error"),scheduleId=a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id"),ajaxRequest=a.get(ajaxurl,{hmbkp_run_schedule_nonce:hmbkp.hmbkp_run_schedule_nonce,action:"hmbkp_run_schedule",hmbkp_schedule_id:scheduleId}).done(function(a){hmbkpCatchResponseAndOfferToEmail(a)}).fail(function(a){hmbkpCatchResponseAndOfferToEmail(a.responseText)}),b.preventDefault()}),a(document).on("heartbeat-send",function(b,c){a(".hmbkp-schedule-sentence.hmbkp-running").size()&&(c.hmbkp_is_in_progress=a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id"))}),a(document).on("heartbeat-tick",function(b,c){0!==c.hmbkp_schedule_status||a(".hmbkp-error").size()||location.reload(!0),0!==c.hmbkp_schedule_status&&a(".hmbkp-status").replaceWith(c.hmbkp_schedule_status)})});
1
+ function hmbkpToggleScheduleFields(a){a="undefined"!=typeof a?a:"manually";var b=jQuery(".recurring-setting"),c=jQuery("#schedule-start"),d=jQuery("p.twice-js");switch(a){case"manually":b.hide();break;case"hmbkp_hourly":case"hmbkp_daily":b.hide(),c.show(),d.hide();break;case"hmbkp_twicedaily":b.hide(),c.show(),d.show();break;case"hmbkp_weekly":case"hmbkp_fortnightly":b.hide(),jQuery("#start-day").show(),c.show(),d.hide();break;case"hmbkp_monthly":b.hide(),c.show(),jQuery("#start-date").show(),d.hide()}}function hmbkpCatchResponseAndOfferToEmail(a){a&&0!=a?(jQuery(".hmbkp-schedule-sentence.hmbkp-running").removeClass("hmbkp-running").addClass("hmbkp-error"),jQuery.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_backup_error",hmbkp_error:a},function(a){a&&0!=a&&location.reload(!0)})):location.reload(!0),jQuery(document).one("click",".hmbkp_send_error_via_email",function(b){b.preventDefault(),jQuery(this).addClass("hmbkp-ajax-loading").attr("disabled","disabled"),jQuery.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_email_error",hmbkp_error:a},function(){})})}jQuery(document).ready(function(a){a.ajaxSetup({cache:!1}),a("select#hmbkp_schedule_recurrence_type").size()&&(hmbkpToggleScheduleFields(a("select#hmbkp_schedule_recurrence_type").val()),a(document).on("change","select#hmbkp_schedule_recurrence_type",function(){hmbkpToggleScheduleFields(a(this).val())})),a(document).on("click",".hmbkp-schedule-actions .delete-action",function(a){confirm(hmbkp.delete_schedule)||a.preventDefault()}),a(document).on("click",".hmbkp_manage_backups_row .delete-action",function(a){confirm(hmbkp.delete_backup)||a.preventDefault()}),a(document).on("click",".hmbkp-edit-schedule-excludes-form .delete-action",function(a){confirm(hmbkp.remove_exclude_rule)||a.preventDefault()}),a.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_cron_test"},function(b){1!=b&&a(".wrap > h2").after(b)}),a(".hmbkp-schedule-sentence .calculating").size()&&a.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_calculate",hmbkp_schedule_id:a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id")},function(b){form=a(".hmbkp-schedule-settings").clone(!0),-1!=b.indexOf("title")?(a(".hmbkp-schedule-sentence").replaceWith(b),a(".hmbkp-schedule-sentence").append(form)):a(".calculating").remove()}).error(function(){a(".calculating").remove()}),a(document).on("click",".hmbkp-run",function(b){a(this).closest(".hmbkp-schedule-sentence").addClass("hmbkp-running"),a(".hmbkp-error").removeClass("hmbkp-error"),scheduleId=a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id"),ajaxRequest=a.get(ajaxurl,{hmbkp_run_schedule_nonce:hmbkp.hmbkp_run_schedule_nonce,action:"hmbkp_run_schedule",hmbkp_schedule_id:scheduleId}).done(function(a){hmbkpCatchResponseAndOfferToEmail(a)}).fail(function(a){hmbkpCatchResponseAndOfferToEmail(a.responseText)}),b.preventDefault()}),a(document).on("heartbeat-send",function(b,c){a(".hmbkp-schedule-sentence.hmbkp-running").size()&&(c.hmbkp_is_in_progress=a("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id"))}),a(document).on("heartbeat-tick",function(b,c){0!==c.hmbkp_schedule_status||a(".hmbkp-error").size()||location.reload(!0),0!==c.hmbkp_schedule_status&&a(".hmbkp-status").replaceWith(c.hmbkp_schedule_status)})});
backupwordpress.php CHANGED
@@ -5,12 +5,13 @@ Plugin Name: BackUpWordPress
5
  Plugin URI: http://bwp.hmn.md/
6
  Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>.
7
  Author: Human Made Limited
8
- Version: 3.0.1
9
  Author URI: http://hmn.md/
10
  License: GPL-2.0+
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12
  Text Domain: hmbkp
13
  Domain Path: /languages
 
14
  */
15
 
16
  /*
@@ -31,6 +32,12 @@ along with this program; if not, write to the Free Software
31
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
  */
33
 
 
 
 
 
 
 
34
  if ( ! defined( 'HMBKP_PLUGIN_SLUG' ) ) {
35
  define( 'HMBKP_PLUGIN_SLUG', basename( dirname( __FILE__ ) ) );
36
  }
@@ -71,7 +78,7 @@ shuffle( $key );
71
  define( 'HMBKP_SECURE_KEY', md5( serialize( $key ) ) );
72
 
73
  if ( ! defined( 'HMBKP_REQUIRED_WP_VERSION' ) ) {
74
- define( 'HMBKP_REQUIRED_WP_VERSION', '3.8.4' );
75
  }
76
 
77
  // Max memory limit isn't defined in old versions of WordPress
@@ -90,6 +97,8 @@ if ( ! defined( 'HMBKP_ADMIN_PAGE' ) ) {
90
 
91
  }
92
 
 
 
93
  // Load the admin menu
94
  require_once( HMBKP_PLUGIN_PATH . 'admin/menu.php' );
95
  require_once( HMBKP_PLUGIN_PATH . 'admin/actions.php' );
@@ -115,6 +124,10 @@ require_once( HMBKP_PLUGIN_PATH . 'classes/class-services.php' );
115
  // Load the email service
116
  require_once( HMBKP_PLUGIN_PATH . 'classes/class-email.php' );
117
 
 
 
 
 
118
  // Load the wp cli command
119
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
120
  include( HMBKP_PLUGIN_PATH . 'classes/wp-cli.php' );
@@ -124,20 +137,6 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
124
  register_activation_hook( HMBKP_PLUGIN_SLUG . '/backupwordpress.php', 'hmbkp_activate' );
125
  register_deactivation_hook( HMBKP_PLUGIN_SLUG . '/backupwordpress.php', 'hmbkp_deactivate' );
126
 
127
- // Don't activate on old versions of WordPress
128
- global $wp_version;
129
-
130
- if ( version_compare( $wp_version, HMBKP_REQUIRED_WP_VERSION, '<' ) ) {
131
-
132
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
133
- deactivate_plugins( __FILE__ );
134
-
135
- if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'activate' || $_GET['action'] == 'error_scrape' ) ) {
136
- die( sprintf( __( 'BackUpWordPress requires WordPress version %s or greater.', 'hmbkp' ), HMBKP_REQUIRED_WP_VERSION ) );
137
- }
138
-
139
- }
140
-
141
  // Handle any advanced option changes
142
  hmbkp_constant_changes();
143
 
@@ -212,7 +211,7 @@ function hmbkp_load_intercom_script() {
212
 
213
  foreach ( HMBKP_Requirements::get_requirements( $group ) as $requirement ) {
214
 
215
- $info[$requirement->name()] = $requirement->result();
216
 
217
  }
218
 
@@ -224,10 +223,10 @@ function hmbkp_load_intercom_script() {
224
 
225
  $current_user = wp_get_current_user();
226
 
227
- $info['user_hash'] = hash_hmac( "sha256", $current_user->user_email, "fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK" );
228
  $info['email'] = $current_user->user_email;
229
  $info['created_at'] = strtotime( $current_user->user_registered );
230
- $info['app_id'] = "7f1l4qyq";
231
  $info['name'] = $current_user->display_name;
232
  $info['widget'] = array( 'activator' => '#intercom' ); ?>
233
 
@@ -313,7 +312,7 @@ function hmbkp_display_server_info_tab() {
313
  array(
314
  'title' => __( 'Server Info', 'hmbkp' ),
315
  'id' => 'hmbkp_server',
316
- 'content' => $info
317
  )
318
  );
319
 
@@ -343,3 +342,52 @@ function hmbkp_load_first() {
343
 
344
  }
345
  add_action( 'activated_plugin', 'hmbkp_load_first' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  Plugin URI: http://bwp.hmn.md/
6
  Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>.
7
  Author: Human Made Limited
8
+ * Version: 3.0.2
9
  Author URI: http://hmn.md/
10
  License: GPL-2.0+
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12
  Text Domain: hmbkp
13
  Domain Path: /languages
14
+ Network: true
15
  */
16
 
17
  /*
32
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33
  */
34
 
35
+ if ( ! defined( 'HMBKP_REQUIRED_PHP_VERSION' ) ) {
36
+ define( 'HMBKP_REQUIRED_PHP_VERSION', '5.3.2' );
37
+ }
38
+
39
+ hmbkp_maybe_self_deactivate();
40
+
41
  if ( ! defined( 'HMBKP_PLUGIN_SLUG' ) ) {
42
  define( 'HMBKP_PLUGIN_SLUG', basename( dirname( __FILE__ ) ) );
43
  }
78
  define( 'HMBKP_SECURE_KEY', md5( serialize( $key ) ) );
79
 
80
  if ( ! defined( 'HMBKP_REQUIRED_WP_VERSION' ) ) {
81
+ define( 'HMBKP_REQUIRED_WP_VERSION', '3.9.3' );
82
  }
83
 
84
  // Max memory limit isn't defined in old versions of WordPress
97
 
98
  }
99
 
100
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-notices.php' );
101
+
102
  // Load the admin menu
103
  require_once( HMBKP_PLUGIN_PATH . 'admin/menu.php' );
104
  require_once( HMBKP_PLUGIN_PATH . 'admin/actions.php' );
124
  // Load the email service
125
  require_once( HMBKP_PLUGIN_PATH . 'classes/class-email.php' );
126
 
127
+ // Load the webhook services
128
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhooks.php' );
129
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhook-wpremote.php' );
130
+
131
  // Load the wp cli command
132
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
133
  include( HMBKP_PLUGIN_PATH . 'classes/wp-cli.php' );
137
  register_activation_hook( HMBKP_PLUGIN_SLUG . '/backupwordpress.php', 'hmbkp_activate' );
138
  register_deactivation_hook( HMBKP_PLUGIN_SLUG . '/backupwordpress.php', 'hmbkp_deactivate' );
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  // Handle any advanced option changes
141
  hmbkp_constant_changes();
142
 
211
 
212
  foreach ( HMBKP_Requirements::get_requirements( $group ) as $requirement ) {
213
 
214
+ $info[ $requirement->name() ] = $requirement->result();
215
 
216
  }
217
 
223
 
224
  $current_user = wp_get_current_user();
225
 
226
+ $info['user_hash'] = hash_hmac( 'sha256', $current_user->user_email, 'fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK' );
227
  $info['email'] = $current_user->user_email;
228
  $info['created_at'] = strtotime( $current_user->user_registered );
229
+ $info['app_id'] = '7f1l4qyq';
230
  $info['name'] = $current_user->display_name;
231
  $info['widget'] = array( 'activator' => '#intercom' ); ?>
232
 
312
  array(
313
  'title' => __( 'Server Info', 'hmbkp' ),
314
  'id' => 'hmbkp_server',
315
+ 'content' => $info,
316
  )
317
  );
318
 
342
 
343
  }
344
  add_action( 'activated_plugin', 'hmbkp_load_first' );
345
+
346
+ /**
347
+ * Determine if the installation meets the PHP version requirements.
348
+ */
349
+ function hmbkp_maybe_self_deactivate() {
350
+
351
+ if ( ! function_exists( 'deactivate_plugins' ) || ! function_exists( 'current_action' ) ) {
352
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
353
+ }
354
+
355
+ // Don't activate on anything less than PHP required version
356
+ if ( version_compare( phpversion(), HMBKP_REQUIRED_PHP_VERSION, '<' ) ) {
357
+ deactivate_plugins( plugin_basename( __FILE__ ) );
358
+
359
+ if ( 'plugins_loaded' === current_action() ) {
360
+ add_action( 'admin_notices', 'hmbkp_display_admin_notices' );
361
+ } else {
362
+ wp_die( hmbkp_get_notice_message(), __( 'BackUpWordPress', 'hmbkp' ), array( 'back_link' => true ) );
363
+ }
364
+ }
365
+
366
+ }
367
+ add_action( 'plugins_loaded', 'hmbkp_maybe_self_deactivate' );
368
+
369
+ /**
370
+ * Displays a message as notice in the admin.
371
+ */
372
+ function hmbkp_display_admin_notices() {
373
+
374
+ echo '<div class="error"><p>' . hmbkp_get_notice_message() . '</p></div>';
375
+
376
+ }
377
+
378
+ /**
379
+ * Returns a localized user friendly error message.
380
+ *
381
+ * @return string
382
+ */
383
+ function hmbkp_get_notice_message() {
384
+
385
+ return sprintf(
386
+ __( 'BackUpWordPress requires PHP version %1$s or later. It is not active. %2$s%3$s%4$sLearn more%5$s', 'hmbkp' ),
387
+ HMBKP_REQUIRED_PHP_VERSION,
388
+ '<a href="',
389
+ 'https://bwp.hmn.md/unsupported-php-version-error/',
390
+ '">',
391
+ '</a>'
392
+ );
393
+ }
classes/class-notices.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class HMBKP_Notices
5
+ */
6
+ class HMBKP_Notices {
7
+
8
+ /**
9
+ * @var
10
+ */
11
+ private static $_instance;
12
+
13
+ /**
14
+ *
15
+ */
16
+ private function __construct() {}
17
+
18
+ /**
19
+ * @return HMBKP_Notices
20
+ */
21
+ public static function get_instance() {
22
+
23
+ if ( ! ( self::$_instance instanceof HMBKP_Notices ) ) {
24
+ self::$_instance = new HMBKP_Notices();
25
+ }
26
+ return self::$_instance;
27
+ }
28
+
29
+ /**
30
+ * @param string $context
31
+ * @param array $messages
32
+ *
33
+ * @return mixed|void
34
+ */
35
+ public function set_notices( $context, array $messages ) {
36
+
37
+ $all_notices = get_option( 'hmbkp_notices' );
38
+
39
+ $all_notices[ $context ] = $messages;
40
+
41
+ update_option( 'hmbkp_notices', $all_notices );
42
+
43
+ return get_option( 'hmbkp_notices' );
44
+ }
45
+
46
+ /**
47
+ * Fetch the notices for the context.
48
+ * All notices by default.
49
+ *
50
+ * @param string $context
51
+ *
52
+ * @return array|mixed|void
53
+ */
54
+ public function get_notices( $context = '' ) {
55
+
56
+ if ( $all_notices = get_option( 'hmbkp_notices' ) ) {
57
+
58
+ if ( 0 < trim( strlen( $context ) ) ) {
59
+ return $all_notices[ $context ];
60
+ }
61
+
62
+ return $all_notices;
63
+ }
64
+
65
+ return array();
66
+
67
+ }
68
+
69
+ /**
70
+ * Delete all notices from the DB.
71
+ */
72
+ public function clear_all_notices() {
73
+ return delete_option( 'hmbkp_notices' );
74
+ }
75
+ }
classes/class-requirements.php CHANGED
@@ -23,7 +23,7 @@ class HMBKP_Requirements {
23
  */
24
  public static function get_requirements( $group = false ) {
25
 
26
- $requirements = $group ? self::$requirements[$group] : self::$requirements;
27
 
28
  ksort( $requirements );
29
 
@@ -110,8 +110,8 @@ abstract class HMBKP_Requirement {
110
 
111
  if ( $test ) {
112
  return 'Yes';
113
- }
114
-
115
  return 'No';
116
 
117
  }
@@ -588,7 +588,7 @@ class HMBKP_Requirement_Calculated_Size extends HMBKP_Requirement {
588
 
589
  foreach ( $schedules->get_schedules() as $schedule ) {
590
  if ( $schedule->is_site_size_cached() ) {
591
- $backup_sizes[$schedule->get_id()] = $schedule->get_formatted_site_size();
592
  }
593
  }
594
 
23
  */
24
  public static function get_requirements( $group = false ) {
25
 
26
+ $requirements = $group ? self::$requirements[ $group ] : self::$requirements;
27
 
28
  ksort( $requirements );
29
 
110
 
111
  if ( $test ) {
112
  return 'Yes';
113
+ }
114
+
115
  return 'No';
116
 
117
  }
588
 
589
  foreach ( $schedules->get_schedules() as $schedule ) {
590
  if ( $schedule->is_site_size_cached() ) {
591
+ $backup_sizes[ $schedule->get_id() ] = $schedule->get_formatted_site_size();
592
  }
593
  }
594
 
classes/class-schedule.php CHANGED
@@ -36,6 +36,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
36
  * Loads the options from the database and populates properties
37
  *
38
  * @param string $id
 
39
  * @throws Exception
40
  */
41
 
@@ -60,7 +61,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
60
  $this->set_root( HMBKP_ROOT );
61
  }
62
 
63
- if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ){
64
  $this->set_path( HMBKP_PATH );
65
  }
66
 
@@ -117,8 +118,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
117
  public function get_slug() {
118
 
119
  // We cache slug in $this to save expensive calls to sanitize_title
120
- if ( ! empty( $this->slug ) )
121
  return $this->slug;
 
122
 
123
  return $this->slug = sanitize_title( $this->get_name() );
124
 
@@ -146,8 +148,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
146
  */
147
  public function get_type() {
148
 
149
- if ( empty( $this->options['type'] ) )
150
  $this->set_type( 'complete' );
 
151
 
152
  return $this->options['type'];
153
 
@@ -157,12 +160,14 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
157
  * Set the type of backup
158
  *
159
  * @access public
 
160
  * @param string $type
161
  */
162
  public function set_type( $type ) {
163
 
164
- if ( isset( $this->options['type'] ) && $this->options['type'] === $type )
165
  return;
 
166
 
167
  parent::set_type( $type );
168
 
@@ -178,8 +183,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
178
  */
179
  public function get_excludes() {
180
 
181
- if ( ! empty( $this->options['excludes'] ) )
182
  parent::set_excludes( $this->options['excludes'] );
 
183
 
184
  return parent::get_excludes();
185
 
@@ -189,8 +195,10 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
189
  * Set the exclude rules
190
  *
191
  * @access public
 
192
  * @param mixed $excludes A comma separated list or array of exclude rules
193
- * @param bool $append Whether to replace or append to existing rules
 
194
  * @return string
195
  */
196
  public function set_excludes( $excludes, $append = false ) {
@@ -216,8 +224,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
216
  */
217
  public function get_max_backups() {
218
 
219
- if ( empty( $this->options['max_backups'] ) )
220
  $this->set_max_backups( 3 );
 
221
 
222
  return (int) esc_attr( $this->options['max_backups'] );
223
 
@@ -227,12 +236,14 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
227
  * Set the maximum number of backups to keep
228
  *
229
  * @param int $max
 
230
  * @return bool|WP_Error
231
  */
232
  public function set_max_backups( $max ) {
233
 
234
- if ( empty( $max ) || ! is_int( $max ) )
235
  return new WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid integer', 'hmbkp' ), __METHOD__ ) );
 
236
 
237
  $this->options['max_backups'] = $max;
238
 
@@ -244,21 +255,24 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
244
  *
245
  * @param $service
246
  * @param null $option
 
247
  * @return array
248
  */
249
  public function get_service_options( $service, $option = null ) {
250
 
251
  if ( ! is_null( $option ) ) {
252
 
253
- if ( isset( $this->options[$service][$option] ) )
254
- return $this->options[$service][$option];
 
255
 
256
  return array();
257
 
258
  }
259
 
260
- if ( isset( $this->options[$service] ) )
261
- return $this->options[$service];
 
262
 
263
  return array();
264
 
@@ -271,7 +285,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
271
  */
272
  public function set_service_options( $service, Array $options ) {
273
 
274
- $this->options[$service] = $options;
275
 
276
  }
277
 
@@ -288,7 +302,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
288
  $size = 0;
289
 
290
  // Don't include database if file only
291
- if ( $this->get_type() !== 'file' ) {
292
 
293
  global $wpdb;
294
 
@@ -297,16 +311,15 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
297
  foreach ( $tables as $table ) {
298
  $size += (float) $table['Data_length'];
299
  }
300
-
301
  }
302
 
303
  // Don't include files if database only
304
- if ( $this->get_type() !== 'database' ) {
305
 
306
  $root = new SplFileInfo( $this->get_root() );
307
 
308
  $size += $this->filesize( $root, true );
309
-
310
  }
311
 
312
  return $size;
@@ -317,6 +330,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
317
  * Convenience function to format the file size
318
  *
319
  * @param bool $cached
 
320
  * @return bool|string
321
  */
322
  public function get_formatted_site_size() {
@@ -326,7 +340,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
326
  /**
327
  * Whether the total filesize is being calculated
328
  *
329
- * @return int The total of the file or directory
330
  */
331
  function is_site_size_being_calculated() {
332
  return get_transient( 'hmbkp_directory_filesizes_running' );
@@ -335,7 +349,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
335
  /**
336
  * Whether the total filesize is being calculated
337
  *
338
- * @return int The total of the file or directory
339
  */
340
  function is_site_size_cached() {
341
  return get_transient( 'hmbkp_directory_filesizes' );
@@ -347,7 +361,8 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
347
  * Will schedule background threads to recursively calculate the filesize of subdirectories.
348
  * The total filesize of each directory and subdirectory is cached in a transient for 1 week.
349
  *
350
- * @param string $directory The directory to scan
 
351
  * @return array returns an array of files ordered by filesize
352
  */
353
  public function list_directory_by_total_filesize( $directory ) {
@@ -367,8 +382,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
367
  while ( $file_handle = readdir( $handle ) ) {
368
 
369
  // Ignore current dir and containing dir
370
- if ( $file_handle === '.' || $file_handle === '..' )
371
  continue;
 
372
 
373
  $file = new SplFileInfo( HM_Backup::conform_dir( trailingslashit( $directory ) . $file_handle ) );
374
 
@@ -390,7 +406,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
390
 
391
  $files_with_size[ $filesize ] = $file;
392
 
393
- } elseif ( $filesize === 0 ) {
394
 
395
  $empty_files[] = $file;
396
 
@@ -425,10 +441,10 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
425
 
426
  /**
427
  * Recursively scans a directory to calculate the total filesize
428
- *
429
  * Locks should be set by the caller with `set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );`
430
  *
431
- * @return array $directory_sizes An array of directory paths => filesize sum of all files in directory
432
  */
433
  public function recursive_filesize_scanner() {
434
 
@@ -443,17 +459,17 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
443
  return $directory_sizes;
444
 
445
  }
446
-
447
  $directory_sizes[ $this->get_root() ] = filesize( $this->get_root() );
448
-
449
  $files = $this->get_files();
450
-
451
  foreach ( $files as $file ) {
452
  $directory_sizes[ $file->getPathname() ] = $file->getSize();
453
  }
454
 
455
  set_transient( 'hmbkp_directory_filesizes', $directory_sizes, DAY_IN_SECONDS );
456
-
457
  delete_transient( 'hmbkp_directory_filesizes_running' );
458
 
459
  return $directory_sizes;
@@ -487,28 +503,30 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
487
 
488
  // If we haven't calculated the site size yet then kick it off in a thread
489
  if ( ! $directory_sizes = get_transient( 'hmbkp_directory_filesizes' ) ) {
490
-
491
  if ( ! $this->is_site_size_being_calculated() ) {
492
 
493
  // Mark the filesize as being calculated
494
  set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );
495
-
496
  // Schedule a Backdrop task to trigger a recalculation
497
  $task = new HM_Backdrop_Task( array( $this, 'recursive_filesize_scanner' ) );
498
  $task->schedule();
499
-
500
- }
501
-
502
  return;
503
 
504
  }
505
 
506
  $directory_size = 0;
 
 
507
 
508
  foreach ( $directory_sizes as $path => $size ) {
509
 
510
  // Remove any files that aren't part of the current tree
511
- if ( strpos( $path, trailingslashit( $file->getPathname() ) ) === false ) {
512
  unset( $directory_sizes[ $path ] );
513
  }
514
 
@@ -521,10 +539,10 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
521
  foreach ( $directory_sizes as $path => $size ) {
522
 
523
  // Skip excluded files if we have excludes
524
- if ( $excludes && preg_match( '(' . $excludes . ')', str_ireplace( trailingslashit( $this->get_root() ), '', HM_Backup::conform_dir( $path ) ) ) ) {
525
  unset( $directory_sizes[ $path ] );
526
  }
527
-
528
  }
529
 
530
  }
@@ -544,16 +562,18 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
544
  */
545
  public function get_schedule_start_time( $gmt = true ) {
546
 
547
- if ( $this->get_reoccurrence() === 'manually' )
548
  return 0;
 
549
 
550
- if ( ! $gmt )
551
  $offset = get_option( 'gmt_offset' ) * 3600;
552
- else
553
  $offset = 0;
554
-
555
- if ( ! empty( $this->options['schedule_start_time'] ) )
556
  return $this->options['schedule_start_time'] + $offset;
 
557
 
558
  $this->set_schedule_start_time( time() );
559
 
@@ -599,6 +619,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
599
  * Set the schedule reoccurrence
600
  *
601
  * @param string $reoccurrence
 
602
  * @return bool|WP_Error
603
  */
604
  public function set_reoccurrence( $reoccurrence ) {
@@ -606,20 +627,21 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
606
  $hmbkp_schedules = $this->get_cron_schedules();
607
 
608
  // Check it's valid
609
- if ( ! is_string( $reoccurrence ) || ! trim( $reoccurrence ) || ( ! in_array( $reoccurrence, array_keys( $hmbkp_schedules ) ) ) && $reoccurrence !== 'manually' )
610
  return new WP_Error( 'hmbkp_invalid_argument_error', sprintf( __( 'Argument 1 for %s must be a valid cron reoccurrence or "manually"', 'hmbkp' ), __METHOD__ ) );
 
611
 
612
  // If the recurrence is already set to the same thing then there's no need to continue
613
- if ( isset( $this->options['reoccurrence'] ) && $this->options['reoccurrence'] === $reoccurrence && $this->is_cron_scheduled() )
614
  return;
 
 
615
 
616
  $this->options['reoccurrence'] = $reoccurrence;
617
 
618
- if ( $reoccurrence === 'manually' ) {
619
  $this->unschedule();
620
- }
621
-
622
- else {
623
  $this->schedule();
624
  }
625
 
@@ -637,10 +659,11 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
637
 
638
  $hmbkp_schedules = $this->get_cron_schedules();
639
 
640
- if ( $this->get_reoccurrence() === 'manually' )
641
  return 0;
 
642
 
643
- return $hmbkp_schedules[$this->get_reoccurrence()]['interval'];
644
 
645
  }
646
 
@@ -655,8 +678,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
655
 
656
  // remove any schedule whose key is not prefixed with 'hmbkp_'
657
  foreach ( $schedules as $key => $arr ) {
658
- if ( ! preg_match( '/^hmbkp_/', $key ) )
659
- unset( $schedules[$key] );
 
660
  }
661
 
662
  return $schedules;
@@ -671,11 +695,14 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
671
 
672
  $time = wp_next_scheduled( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
673
 
674
- if ( ! $time )
675
  $time = 0;
 
 
676
 
677
- if ( ! $gmt )
678
  $time += get_option( 'gmt_offset' ) * 3600;
 
679
 
680
  return $time;
681
 
@@ -731,8 +758,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
731
  public function run() {
732
 
733
  // Don't run if this schedule is already running
734
- if ( $this->get_running_backup_filename() )
735
  return;
 
736
 
737
  // Mark the backup as started
738
  $this->set_status( __( 'Starting Backup', 'hmbkp' ) );
@@ -743,8 +771,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
743
  $this->backup();
744
 
745
  // Delete the backup running file
746
- if ( file_exists( $this->get_schedule_running_path() ) )
747
  unlink( $this->get_schedule_running_path() );
 
748
 
749
  // Delete old backups again
750
  $this->delete_old_backups();
@@ -759,13 +788,15 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
759
  */
760
  public function get_running_backup_filename() {
761
 
762
- if ( ! file_exists( $this->get_schedule_running_path() ) )
763
  return '';
 
764
 
765
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
766
 
767
- if ( ! empty( $status->filename ) )
768
  return $status->filename;
 
769
 
770
  return '';
771
 
@@ -779,13 +810,16 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
779
  */
780
  public function get_status() {
781
 
782
- if ( ! file_exists( $this->get_schedule_running_path() ) )
783
  return '';
 
 
784
 
785
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
786
 
787
- if ( ! empty( $status->status ) )
788
  return $status->status;
 
789
 
790
  return '';
791
 
@@ -795,18 +829,21 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
795
  * Set the status of the running backup
796
  *
797
  * @access public
 
798
  * @param string $message
 
799
  * @return void
800
  */
801
  public function set_status( $message ) {
802
 
803
- if ( ! $handle = fopen( $this->get_schedule_running_path(), 'w' ) )
804
  return;
 
805
 
806
  $status = json_encode( (object) array(
807
  'filename' => $this->get_archive_filename(),
808
  'started' => $this->get_schedule_running_start_time(),
809
- 'status' => $message
810
  ) );
811
 
812
  fwrite( $handle, $status );
@@ -823,13 +860,15 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
823
  */
824
  public function get_schedule_running_start_time() {
825
 
826
- if ( ! file_exists( $this->get_schedule_running_path() ) )
827
  return 0;
 
828
 
829
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
830
 
831
- if ( ! empty( $status->started ) && (int) (string) $status->started === $status->started )
832
  return $status->started;
 
833
 
834
  return time();
835
 
@@ -837,6 +876,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
837
 
838
  /**
839
  * Hook into the actions fired in HM Backup and set the status
 
840
  * @param $action
841
  */
842
  protected function do_action( $action ) {
@@ -882,11 +922,13 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
882
 
883
  $file = $this->get_path() . '/.backup_errors';
884
 
885
- if ( file_exists( $file ) )
886
  @unlink( $file );
 
887
 
888
- if ( ! $handle = @fopen( $file, 'w' ) )
889
  return;
 
890
 
891
  fwrite( $handle, json_encode( $this->get_errors() ) );
892
 
@@ -902,11 +944,13 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
902
 
903
  $file = $this->get_path() . '/.backup_warnings';
904
 
905
- if ( file_exists( $file ) )
906
  @unlink( $file );
 
907
 
908
- if ( ! $handle = @fopen( $file, 'w' ) )
909
  return;
 
910
 
911
  fwrite( $handle, json_encode( $this->get_warnings() ) );
912
 
@@ -937,7 +981,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
937
  while ( false !== ( $file = readdir( $handle ) ) ) {
938
 
939
  if ( pathinfo( $file, PATHINFO_EXTENSION ) === 'zip' && strpos( $file, $this->get_id() ) !== false && $this->get_running_backup_filename() !== $file ) {
940
- $files[@filemtime( trailingslashit( $this->get_path() ) . $file )] = trailingslashit( $this->get_path() ) . $file;
941
  }
942
 
943
  }
@@ -959,8 +1003,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
959
  */
960
  public function delete_old_backups() {
961
 
962
- if ( count( $this->get_backups() ) <= $this->get_max_backups() )
963
  return;
 
964
 
965
  array_map( array( $this, 'delete_backup' ), array_slice( $this->get_backups(), $this->get_max_backups() ) );
966
 
@@ -968,22 +1013,27 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
968
 
969
  /**
970
  * Delete a specific back up file created by this schedule
 
971
  * @param string $filepath
 
972
  * @return bool|WP_Error
973
  */
974
  public function delete_backup( $filepath ) {
975
 
976
  // Check that it's a valid filepath
977
- if ( empty( $filepath ) || ! is_string( $filepath ) )
978
  return new WP_Error( 'hmbkp_empty_string_error', sprintf( __( 'Argument 1 for %s must be a non empty string', 'hmbkp' ), __METHOD__ ) );
 
979
 
980
  // Make sure it exists
981
- if ( ! file_exists( $filepath ) )
982
  return new WP_Error( 'hmbkp_file_error', sprintf( __( '%s doesn\'t exist', 'hmbkp' ), $filepath ) );
 
983
 
984
  // Make sure it was created by this schedule
985
- if ( strpos( $filepath, $this->get_id() ) === false )
986
  return new WP_Error( 'hmbkp_backup_error', __( 'That backup wasn\'t created by this schedule', 'hmbkp' ) );
 
987
 
988
  unlink( $filepath );
989
 
@@ -1010,8 +1060,9 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
1010
  public function save() {
1011
 
1012
  // Only save them if they have changed
1013
- if ( $this->options !== get_option( 'hmbkp_schedule_' . $this->get_id() ) )
1014
  update_option( 'hmbkp_schedule_' . $this->get_id(), $this->options );
 
1015
 
1016
  }
1017
 
@@ -1069,13 +1120,13 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
1069
  }
1070
 
1071
  $blacklisted = array(
1072
- 'updraft' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'updraft' ),
1073
- 'wponlinebckp' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'backups' ),
1074
- 'duplicator' => trailingslashit( ABSPATH ) . trailingslashit( 'wp-snapshots' ),
1075
- 'backupbuddy' => trailingslashit( $hmn_upload_dir['path'] ) . trailingslashit( 'backupbuddy_backups' ),
1076
- 'pb_backupbuddy' => trailingslashit( $hmn_upload_dir['path'] ) . trailingslashit( 'pb_backupbuddy' ),
1077
- 'wpdbmanager' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'backup-db' ),
1078
- 'supercache' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'cache' ),
1079
  );
1080
 
1081
  foreach ( $blacklisted as $key => $path ) {
@@ -1097,6 +1148,7 @@ class HMBKP_Scheduled_Backup extends HM_Backup {
1097
  *
1098
  * @param $needle
1099
  * @param $haystack
 
1100
  * @return array
1101
  */
1102
  protected function find_backup_folders( $needle, $haystack ) {
36
  * Loads the options from the database and populates properties
37
  *
38
  * @param string $id
39
+ *
40
  * @throws Exception
41
  */
42
 
61
  $this->set_root( HMBKP_ROOT );
62
  }
63
 
64
+ if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) {
65
  $this->set_path( HMBKP_PATH );
66
  }
67
 
118
  public function get_slug() {
119
 
120
  // We cache slug in $this to save expensive calls to sanitize_title
121
+ if ( ! empty( $this->slug ) ) {
122
  return $this->slug;
123
+ }
124
 
125
  return $this->slug = sanitize_title( $this->get_name() );
126
 
148
  */
149
  public function get_type() {
150
 
151
+ if ( empty( $this->options['type'] ) ) {
152
  $this->set_type( 'complete' );
153
+ }
154
 
155
  return $this->options['type'];
156
 
160
  * Set the type of backup
161
  *
162
  * @access public
163
+ *
164
  * @param string $type
165
  */
166
  public function set_type( $type ) {
167
 
168
+ if ( isset( $this->options['type'] ) && $this->options['type'] === $type ) {
169
  return;
170
+ }
171
 
172
  parent::set_type( $type );
173
 
183
  */
184
  public function get_excludes() {
185
 
186
+ if ( ! empty( $this->options['excludes'] ) ) {
187
  parent::set_excludes( $this->options['excludes'] );
188
+ }
189
 
190
  return parent::get_excludes();
191
 
195
  * Set the exclude rules
196
  *
197
  * @access public
198
+ *
199
  * @param mixed $excludes A comma separated list or array of exclude rules
200
+ * @param bool $append Whether to replace or append to existing rules
201
+ *
202
  * @return string
203
  */
204
  public function set_excludes( $excludes, $append = false ) {
224
  */
225
  public function get_max_backups() {
226
 
227
+ if ( empty( $this->options['max_backups'] ) ) {
228
  $this->set_max_backups( 3 );
229
+ }
230
 
231
  return (int) esc_attr( $this->options['max_backups'] );
232
 
236
  * Set the maximum number of backups to keep
237
  *
238
  * @param int $max
239
+ *
240
  * @return bool|WP_Error
241
  */
242
  public function set_max_backups( $max ) {
243
 
244
+ if ( empty( $max ) || ! is_int( $max ) ) {
245
  return new WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid integer', 'hmbkp' ), __METHOD__ ) );
246
+ }
247
 
248
  $this->options['max_backups'] = $max;
249
 
255
  *
256
  * @param $service
257
  * @param null $option
258
+ *
259
  * @return array
260
  */
261
  public function get_service_options( $service, $option = null ) {
262
 
263
  if ( ! is_null( $option ) ) {
264
 
265
+ if ( isset( $this->options[ $service ][ $option ] ) ) {
266
+ return $this->options[ $service ][ $option ];
267
+ }
268
 
269
  return array();
270
 
271
  }
272
 
273
+ if ( isset( $this->options[ $service ] ) ) {
274
+ return $this->options[ $service ];
275
+ }
276
 
277
  return array();
278
 
285
  */
286
  public function set_service_options( $service, Array $options ) {
287
 
288
+ $this->options[ $service ] = $options;
289
 
290
  }
291
 
302
  $size = 0;
303
 
304
  // Don't include database if file only
305
+ if ( 'file' !== $this->get_type() ) {
306
 
307
  global $wpdb;
308
 
311
  foreach ( $tables as $table ) {
312
  $size += (float) $table['Data_length'];
313
  }
 
314
  }
315
 
316
  // Don't include files if database only
317
+ if ( 'database' !== $this->get_type() ) {
318
 
319
  $root = new SplFileInfo( $this->get_root() );
320
 
321
  $size += $this->filesize( $root, true );
322
+
323
  }
324
 
325
  return $size;
330
  * Convenience function to format the file size
331
  *
332
  * @param bool $cached
333
+ *
334
  * @return bool|string
335
  */
336
  public function get_formatted_site_size() {
340
  /**
341
  * Whether the total filesize is being calculated
342
  *
343
+ * @return int The total of the file or directory
344
  */
345
  function is_site_size_being_calculated() {
346
  return get_transient( 'hmbkp_directory_filesizes_running' );
349
  /**
350
  * Whether the total filesize is being calculated
351
  *
352
+ * @return int The total of the file or directory
353
  */
354
  function is_site_size_cached() {
355
  return get_transient( 'hmbkp_directory_filesizes' );
361
  * Will schedule background threads to recursively calculate the filesize of subdirectories.
362
  * The total filesize of each directory and subdirectory is cached in a transient for 1 week.
363
  *
364
+ * @param string $directory The directory to scan
365
+ *
366
  * @return array returns an array of files ordered by filesize
367
  */
368
  public function list_directory_by_total_filesize( $directory ) {
382
  while ( $file_handle = readdir( $handle ) ) {
383
 
384
  // Ignore current dir and containing dir
385
+ if ( '.' === $file_handle || '..' === $file_handle ) {
386
  continue;
387
+ }
388
 
389
  $file = new SplFileInfo( HM_Backup::conform_dir( trailingslashit( $directory ) . $file_handle ) );
390
 
406
 
407
  $files_with_size[ $filesize ] = $file;
408
 
409
+ } elseif ( 0 === $filesize ) {
410
 
411
  $empty_files[] = $file;
412
 
441
 
442
  /**
443
  * Recursively scans a directory to calculate the total filesize
444
+ *
445
  * Locks should be set by the caller with `set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );`
446
  *
447
+ * @return array $directory_sizes An array of directory paths => filesize sum of all files in directory
448
  */
449
  public function recursive_filesize_scanner() {
450
 
459
  return $directory_sizes;
460
 
461
  }
462
+
463
  $directory_sizes[ $this->get_root() ] = filesize( $this->get_root() );
464
+
465
  $files = $this->get_files();
466
+
467
  foreach ( $files as $file ) {
468
  $directory_sizes[ $file->getPathname() ] = $file->getSize();
469
  }
470
 
471
  set_transient( 'hmbkp_directory_filesizes', $directory_sizes, DAY_IN_SECONDS );
472
+
473
  delete_transient( 'hmbkp_directory_filesizes_running' );
474
 
475
  return $directory_sizes;
503
 
504
  // If we haven't calculated the site size yet then kick it off in a thread
505
  if ( ! $directory_sizes = get_transient( 'hmbkp_directory_filesizes' ) ) {
506
+
507
  if ( ! $this->is_site_size_being_calculated() ) {
508
 
509
  // Mark the filesize as being calculated
510
  set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );
511
+
512
  // Schedule a Backdrop task to trigger a recalculation
513
  $task = new HM_Backdrop_Task( array( $this, 'recursive_filesize_scanner' ) );
514
  $task->schedule();
515
+
516
+ }
517
+
518
  return;
519
 
520
  }
521
 
522
  $directory_size = 0;
523
+ $current_pathname = trailingslashit( $file->getPathname() );
524
+ $root = trailingslashit( $this->get_root() );
525
 
526
  foreach ( $directory_sizes as $path => $size ) {
527
 
528
  // Remove any files that aren't part of the current tree
529
+ if ( false === strpos( $path, $current_pathname ) ) {
530
  unset( $directory_sizes[ $path ] );
531
  }
532
 
539
  foreach ( $directory_sizes as $path => $size ) {
540
 
541
  // Skip excluded files if we have excludes
542
+ if ( $excludes && preg_match( '(' . $excludes . ')', str_ireplace( $root, '', HM_Backup::conform_dir( $path ) ) ) ) {
543
  unset( $directory_sizes[ $path ] );
544
  }
545
+
546
  }
547
 
548
  }
562
  */
563
  public function get_schedule_start_time( $gmt = true ) {
564
 
565
+ if ( 'manually' === $this->get_reoccurrence() ) {
566
  return 0;
567
+ }
568
 
569
+ if ( ! $gmt ) {
570
  $offset = get_option( 'gmt_offset' ) * 3600;
571
+ } else {
572
  $offset = 0;
573
+ }
574
+ if ( ! empty( $this->options['schedule_start_time'] ) ) {
575
  return $this->options['schedule_start_time'] + $offset;
576
+ }
577
 
578
  $this->set_schedule_start_time( time() );
579
 
619
  * Set the schedule reoccurrence
620
  *
621
  * @param string $reoccurrence
622
+ *
623
  * @return bool|WP_Error
624
  */
625
  public function set_reoccurrence( $reoccurrence ) {
627
  $hmbkp_schedules = $this->get_cron_schedules();
628
 
629
  // Check it's valid
630
+ if ( ! is_string( $reoccurrence ) || ! trim( $reoccurrence ) || ( ! in_array( $reoccurrence, array_keys( $hmbkp_schedules ) ) ) && 'manually' !== $reoccurrence ) {
631
  return new WP_Error( 'hmbkp_invalid_argument_error', sprintf( __( 'Argument 1 for %s must be a valid cron reoccurrence or "manually"', 'hmbkp' ), __METHOD__ ) );
632
+ }
633
 
634
  // If the recurrence is already set to the same thing then there's no need to continue
635
+ if ( isset( $this->options['reoccurrence'] ) && $this->options['reoccurrence'] === $reoccurrence && $this->is_cron_scheduled() ) {
636
  return;
637
+ }
638
+
639
 
640
  $this->options['reoccurrence'] = $reoccurrence;
641
 
642
+ if ( 'manually' === $reoccurrence ) {
643
  $this->unschedule();
644
+ } else {
 
 
645
  $this->schedule();
646
  }
647
 
659
 
660
  $hmbkp_schedules = $this->get_cron_schedules();
661
 
662
+ if ( 'manually' === $this->get_reoccurrence() ) {
663
  return 0;
664
+ }
665
 
666
+ return $hmbkp_schedules[ $this->get_reoccurrence() ]['interval'];
667
 
668
  }
669
 
678
 
679
  // remove any schedule whose key is not prefixed with 'hmbkp_'
680
  foreach ( $schedules as $key => $arr ) {
681
+ if ( ! preg_match( '/^hmbkp_/', $key ) ) {
682
+ unset( $schedules[ $key ] );
683
+ }
684
  }
685
 
686
  return $schedules;
695
 
696
  $time = wp_next_scheduled( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
697
 
698
+ if ( ! $time ) {
699
  $time = 0;
700
+ }
701
+
702
 
703
+ if ( ! $gmt ) {
704
  $time += get_option( 'gmt_offset' ) * 3600;
705
+ }
706
 
707
  return $time;
708
 
758
  public function run() {
759
 
760
  // Don't run if this schedule is already running
761
+ if ( $this->get_running_backup_filename() ) {
762
  return;
763
+ }
764
 
765
  // Mark the backup as started
766
  $this->set_status( __( 'Starting Backup', 'hmbkp' ) );
771
  $this->backup();
772
 
773
  // Delete the backup running file
774
+ if ( file_exists( $this->get_schedule_running_path() ) ) {
775
  unlink( $this->get_schedule_running_path() );
776
+ }
777
 
778
  // Delete old backups again
779
  $this->delete_old_backups();
788
  */
789
  public function get_running_backup_filename() {
790
 
791
+ if ( ! file_exists( $this->get_schedule_running_path() ) ) {
792
  return '';
793
+ }
794
 
795
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
796
 
797
+ if ( ! empty( $status->filename ) ) {
798
  return $status->filename;
799
+ }
800
 
801
  return '';
802
 
810
  */
811
  public function get_status() {
812
 
813
+ if ( ! file_exists( $this->get_schedule_running_path() ) ) {
814
  return '';
815
+ }
816
+
817
 
818
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
819
 
820
+ if ( ! empty( $status->status ) ) {
821
  return $status->status;
822
+ }
823
 
824
  return '';
825
 
829
  * Set the status of the running backup
830
  *
831
  * @access public
832
+ *
833
  * @param string $message
834
+ *
835
  * @return void
836
  */
837
  public function set_status( $message ) {
838
 
839
+ if ( ! $handle = fopen( $this->get_schedule_running_path(), 'w' ) ) {
840
  return;
841
+ }
842
 
843
  $status = json_encode( (object) array(
844
  'filename' => $this->get_archive_filename(),
845
  'started' => $this->get_schedule_running_start_time(),
846
+ 'status' => $message,
847
  ) );
848
 
849
  fwrite( $handle, $status );
860
  */
861
  public function get_schedule_running_start_time() {
862
 
863
+ if ( ! file_exists( $this->get_schedule_running_path() ) ) {
864
  return 0;
865
+ }
866
 
867
  $status = json_decode( file_get_contents( $this->get_schedule_running_path() ) );
868
 
869
+ if ( ! empty( $status->started ) && (int) (string) $status->started === $status->started ) {
870
  return $status->started;
871
+ }
872
 
873
  return time();
874
 
876
 
877
  /**
878
  * Hook into the actions fired in HM Backup and set the status
879
+ *
880
  * @param $action
881
  */
882
  protected function do_action( $action ) {
922
 
923
  $file = $this->get_path() . '/.backup_errors';
924
 
925
+ if ( file_exists( $file ) ) {
926
  @unlink( $file );
927
+ }
928
 
929
+ if ( ! $handle = @fopen( $file, 'w' ) ) {
930
  return;
931
+ }
932
 
933
  fwrite( $handle, json_encode( $this->get_errors() ) );
934
 
944
 
945
  $file = $this->get_path() . '/.backup_warnings';
946
 
947
+ if ( file_exists( $file ) ) {
948
  @unlink( $file );
949
+ }
950
 
951
+ if ( ! $handle = @fopen( $file, 'w' ) ) {
952
  return;
953
+ }
954
 
955
  fwrite( $handle, json_encode( $this->get_warnings() ) );
956
 
981
  while ( false !== ( $file = readdir( $handle ) ) ) {
982
 
983
  if ( pathinfo( $file, PATHINFO_EXTENSION ) === 'zip' && strpos( $file, $this->get_id() ) !== false && $this->get_running_backup_filename() !== $file ) {
984
+ $files[ @filemtime( trailingslashit( $this->get_path() ) . $file ) ] = trailingslashit( $this->get_path() ) . $file;
985
  }
986
 
987
  }
1003
  */
1004
  public function delete_old_backups() {
1005
 
1006
+ if ( count( $this->get_backups() ) <= $this->get_max_backups() ) {
1007
  return;
1008
+ }
1009
 
1010
  array_map( array( $this, 'delete_backup' ), array_slice( $this->get_backups(), $this->get_max_backups() ) );
1011
 
1013
 
1014
  /**
1015
  * Delete a specific back up file created by this schedule
1016
+ *
1017
  * @param string $filepath
1018
+ *
1019
  * @return bool|WP_Error
1020
  */
1021
  public function delete_backup( $filepath ) {
1022
 
1023
  // Check that it's a valid filepath
1024
+ if ( empty( $filepath ) || ! is_string( $filepath ) ) {
1025
  return new WP_Error( 'hmbkp_empty_string_error', sprintf( __( 'Argument 1 for %s must be a non empty string', 'hmbkp' ), __METHOD__ ) );
1026
+ }
1027
 
1028
  // Make sure it exists
1029
+ if ( ! file_exists( $filepath ) ) {
1030
  return new WP_Error( 'hmbkp_file_error', sprintf( __( '%s doesn\'t exist', 'hmbkp' ), $filepath ) );
1031
+ }
1032
 
1033
  // Make sure it was created by this schedule
1034
+ if ( strpos( $filepath, $this->get_id() ) === false ) {
1035
  return new WP_Error( 'hmbkp_backup_error', __( 'That backup wasn\'t created by this schedule', 'hmbkp' ) );
1036
+ }
1037
 
1038
  unlink( $filepath );
1039
 
1060
  public function save() {
1061
 
1062
  // Only save them if they have changed
1063
+ if ( $this->options !== get_option( 'hmbkp_schedule_' . $this->get_id() ) ) {
1064
  update_option( 'hmbkp_schedule_' . $this->get_id(), $this->options );
1065
+ }
1066
 
1067
  }
1068
 
1120
  }
1121
 
1122
  $blacklisted = array(
1123
+ 'updraft' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'updraft' ),
1124
+ 'wponlinebckp' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'backups' ),
1125
+ 'duplicator' => trailingslashit( ABSPATH ) . trailingslashit( 'wp-snapshots' ),
1126
+ 'backupbuddy' => trailingslashit( $hmn_upload_dir['path'] ) . trailingslashit( 'backupbuddy_backups' ),
1127
+ 'pb_backupbuddy' => trailingslashit( $hmn_upload_dir['path'] ) . trailingslashit( 'pb_backupbuddy' ),
1128
+ 'wpdbmanager' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'backup-db' ),
1129
+ 'supercache' => trailingslashit( WP_CONTENT_DIR ) . trailingslashit( 'cache' ),
1130
  );
1131
 
1132
  foreach ( $blacklisted as $key => $path ) {
1148
  *
1149
  * @param $needle
1150
  * @param $haystack
1151
+ *
1152
  * @return array
1153
  */
1154
  protected function find_backup_folders( $needle, $haystack ) {
classes/class-schedules.php CHANGED
@@ -20,8 +20,9 @@ class HMBKP_Schedules {
20
 
21
  public static function get_instance() {
22
 
23
- if ( null === self::$instance )
24
  self::$instance = new self;
 
25
 
26
  return self::$instance;
27
 
20
 
21
  public static function get_instance() {
22
 
23
+ if ( ! self::$instance ) {
24
  self::$instance = new self;
25
+ }
26
 
27
  return self::$instance;
28
 
classes/class-services.php CHANGED
@@ -20,6 +20,11 @@ abstract class HMBKP_Service {
20
  */
21
  protected $schedule;
22
 
 
 
 
 
 
23
  /**
24
  * Used to determine if the service is in use or not
25
  */
@@ -272,7 +277,7 @@ class HMBKP_Services {
272
  if ( ! file_exists( $filepath ) )
273
  return new WP_Error( 'hmbkp_invalid_path_error', sprintf( __( 'Argument 1 for %s must be a valid filepath', ' hmbkp' ), __METHOD__ ) );
274
 
275
- self::instance()->services[$filepath] = $classname;
276
 
277
  return true;
278
  }
@@ -284,10 +289,10 @@ class HMBKP_Services {
284
  */
285
  public static function unregister( $filepath ) {
286
 
287
- if ( ! isset( self::instance()->services[$filepath] ) )
288
  return new WP_Error( 'hmbkp_unrecognized_service_error', sprintf( __( 'Argument 1 for %s must be a registered service', ' hmbkp' ), __METHOD__ ) );
289
 
290
- unset( self::instance()->services[$filepath] );
291
 
292
  return true;
293
  }
@@ -307,10 +312,7 @@ class HMBKP_Services {
307
  /**
308
  * @var HMBKP_Service
309
  */
310
- $class = new $classname;
311
-
312
- if ( self::instance()->schedule )
313
- $class->set_schedule( self::instance()->schedule );
314
 
315
  return $class;
316
 
20
  */
21
  protected $schedule;
22
 
23
+ public function __construct( $schedule ) {
24
+
25
+ $this->set_schedule( $schedule );
26
+ }
27
+
28
  /**
29
  * Used to determine if the service is in use or not
30
  */
277
  if ( ! file_exists( $filepath ) )
278
  return new WP_Error( 'hmbkp_invalid_path_error', sprintf( __( 'Argument 1 for %s must be a valid filepath', ' hmbkp' ), __METHOD__ ) );
279
 
280
+ self::instance()->services[ $filepath ] = $classname;
281
 
282
  return true;
283
  }
289
  */
290
  public static function unregister( $filepath ) {
291
 
292
+ if ( ! isset( self::instance()->services[ $filepath ] ) )
293
  return new WP_Error( 'hmbkp_unrecognized_service_error', sprintf( __( 'Argument 1 for %s must be a registered service', ' hmbkp' ), __METHOD__ ) );
294
 
295
+ unset( self::instance()->services[ $filepath ] );
296
 
297
  return true;
298
  }
312
  /**
313
  * @var HMBKP_Service
314
  */
315
+ $class = new $classname( self::instance()->schedule );
 
 
 
316
 
317
  return $class;
318
 
classes/class-webhook-wpremote.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Webhook notifications for backups on WPRemote
5
+ *
6
+ * @extends HMBKP_Service
7
+ */
8
+ class HMBKP_Webhook_WPRemote_Service extends HMBKP_Webhooks_Service {
9
+
10
+ /**
11
+ * Human readable name for this service
12
+ * @var string
13
+ */
14
+ public $name = 'WPRemote Webhook';
15
+
16
+ private $wpremote_webhook_url = 'http://wpremote.com/api/json/backupwordpress/webhook';
17
+
18
+ /**
19
+ * Not in use
20
+ *
21
+ * @see field
22
+ * @return null
23
+ */
24
+ public function form() {}
25
+
26
+ /**
27
+ * Not in use
28
+ *
29
+ * @return null
30
+ */
31
+ public function field() {}
32
+
33
+ /**
34
+ * Not in use
35
+ *
36
+ * @return null
37
+ */
38
+ public function display() {}
39
+
40
+ /**
41
+ * Not in use
42
+ * $return null
43
+ */
44
+ public function update( &$new_data, $old_data ) {}
45
+
46
+ /**
47
+ * Used to determine if the service is in use or not
48
+ */
49
+ public function is_service_active() {
50
+ return strlen( $this->get_url() ) > 0;
51
+ }
52
+
53
+ /**
54
+ * @return string
55
+ */
56
+ protected function get_url() {
57
+
58
+ return ( defined( 'WPRP_PLUGIN_SLUG' ) && get_option( 'wpr_api_key' ) ) ? $this->wpremote_webhook_url : false;
59
+ }
60
+
61
+ /**
62
+ * @return string
63
+ */
64
+ protected function get_secret_key() {
65
+
66
+ return get_option( 'wpr_api_key' );
67
+ }
68
+
69
+ }
70
+
71
+ // Register the service
72
+ HMBKP_Services::register( __FILE__, 'HMBKP_Webhook_WPRemote_Service' );
classes/class-webhooks.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Webhook notifications for backups
5
+ *
6
+ * @extends HMBKP_Service
7
+ */
8
+ abstract class HMBKP_Webhooks_Service extends HMBKP_Service {
9
+
10
+ /**
11
+ * Human readable name for this service
12
+ * @var string
13
+ */
14
+ public $name = 'Webhook';
15
+
16
+ /**
17
+ * Determines whether to show or hide the service tab in destinations form
18
+ * @var boolean
19
+ */
20
+ public $is_tab_visible = false;
21
+
22
+ public function __construct( $schedule ) {
23
+ parent::__construct( $schedule );
24
+ }
25
+
26
+ /**
27
+ * @return string
28
+ */
29
+ abstract protected function get_secret_key();
30
+
31
+ /**
32
+ * @return string
33
+ */
34
+ abstract protected function get_url();
35
+
36
+ /**
37
+ * Fire the webhook notification on the hmbkp_backup_complete
38
+ *
39
+ * @see HM_Backup::do_action
40
+ * @param string $action The action received from the backup
41
+ * @return void
42
+ */
43
+ public function action( $action ) {
44
+
45
+ if ( 'hmbkp_backup_complete' !== $action || ! $this->is_service_active() )
46
+ return;
47
+
48
+ $webhook_url = $this->get_url();
49
+ $file = $this->schedule->get_archive_filepath();
50
+ $download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
51
+ $domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
52
+
53
+ // The backup failed, send a message saying as much
54
+ if ( ! file_exists( $file ) && ( $errors = array_merge( $this->schedule->get_errors(), $this->schedule->get_warnings() ) ) ) {
55
+
56
+ $error_message = '';
57
+
58
+ foreach ( $errors as $error_set )
59
+ $error_message .= implode( "\n - ", $error_set );
60
+
61
+ if ( $error_message )
62
+ $error_message = ' - ' . $error_message;
63
+
64
+ $subject = sprintf( __( 'Backup of %s Failed', 'hmbkp' ), $domain );
65
+
66
+ $body = array (
67
+ 'type' => 'backup.error',
68
+ 'site_url' => site_url(),
69
+ 'backup' => array(
70
+ 'id' => 'backup_' . pathinfo( $file, PATHINFO_FILENAME ),
71
+ 'start' => '0',
72
+ 'end' => '0',
73
+ 'download_url' => '',
74
+ 'type' => $this->schedule->get_type(),
75
+ 'status' => array(
76
+ 'message' => $subject . ' - ' . $error_message,
77
+ 'success' => '0'
78
+ )
79
+ )
80
+ );
81
+
82
+ } else {
83
+
84
+ $body = array (
85
+ 'type' => 'backup.success',
86
+ 'site_url' => site_url(),
87
+ 'backup' => array(
88
+ 'id' => 'backup_' . $this->schedule->get_id(),
89
+ 'start' => '0',
90
+ 'end' => '0',
91
+ 'download_url' => $download,
92
+ 'type' => $this->schedule->get_type(),
93
+ 'status' => array(
94
+ 'message' => 'Backup complete',
95
+ 'success' => '1'
96
+ )
97
+ )
98
+ );
99
+
100
+ }
101
+
102
+ $signature = hash_hmac( 'sha1', serialize( $body ), $this->get_secret_key() );
103
+ $webhook_args = array( 'headers' => array( 'X-BWP-Signature' => $signature ), 'body' => $body );
104
+
105
+ $ret = wp_remote_post( $webhook_url, $webhook_args );
106
+
107
+ if ( is_wp_error( $ret ) )
108
+ $this->schedule->error( 'Webhook', sprintf( __( 'Error: %s', 'hmbkp' ), $ret->get_error_message() ) );
109
+
110
+ }
111
+ }
functions/core.php CHANGED
@@ -8,6 +8,19 @@ function hmbkp_activate() {
8
  // loads the translation files
9
  load_plugin_textdomain( 'hmbkp', false, HMBKP_PLUGIN_LANG_DIR );
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  // Run deactivate on activation in-case it was deactivated manually
12
  hmbkp_deactivate();
13
 
@@ -20,6 +33,8 @@ function hmbkp_activate() {
20
  */
21
  function hmbkp_deactivate() {
22
 
 
 
23
  // Clean up the backups directory
24
  hmbkp_cleanup();
25
 
@@ -48,8 +63,9 @@ function hmbkp_update() {
48
  if ( get_option( 'bkpwp_max_backups' ) ) {
49
 
50
  // Carry over the custom path
51
- if ( $legacy_path = get_option( 'bkpwppath' ) )
52
  update_option( 'hmbkp_path', $legacy_path );
 
53
 
54
  // Options to remove
55
  $legacy_options = array(
@@ -93,43 +109,53 @@ function hmbkp_update() {
93
  $legacy_schedule = new HMBKP_Scheduled_Backup( 'backup' );
94
 
95
  // Backup type
96
- if ( ( defined( 'HMBKP_FILES_ONLY' ) && HMBKP_FILES_ONLY ) || get_option( 'hmbkp_files_only' ) )
97
  $legacy_schedule->set_type( 'file' );
 
98
 
99
- elseif ( ( defined( 'HMBKP_DATABASE_ONLY' ) && HMBKP_DATABASE_ONLY ) || get_option( 'hmbkp_database_only' ) )
100
  $legacy_schedule->set_type( 'database' );
 
101
 
102
- else
103
  $legacy_schedule->set_type( 'complete' );
 
104
 
105
  // Daily schedule time
106
- if ( defined( 'HMBKP_DAILY_SCHEDULE_TIME' ) && HMBKP_DAILY_SCHEDULE_TIME )
107
  $legacy_schedule->set_schedule_start_time( strtotime( HMBKP_DAILY_SCHEDULE_TIME ) );
 
108
 
109
  // Backup schedule
110
  $legacy_schedule->set_reoccurrence( get_option( 'hmbkp_schedule_frequency', 'hmbkp_daily' ) );
111
 
112
  // Automatic backups disabled?
113
- if ( ( defined( 'HMBKP_DISABLE_AUTOMATIC_BACKUP' ) && HMBKP_DISABLE_AUTOMATIC_BACKUP ) || get_option( 'hmbkp_disable_automatic_backup' ) )
114
  $legacy_schedule->set_reoccurrence( 'manually' );
 
115
 
116
  // Max backups
117
- if ( defined( 'HMBKP_MAX_BACKUPS' ) && is_numeric( HMBKP_MAX_BACKUPS ) )
118
  $legacy_schedule->set_max_backups( (int) HMBKP_MAX_BACKUPS );
 
119
 
120
- else
121
  $legacy_schedule->set_max_backups( (int) get_option( 'hmbkp_max_backups', 10 ) );
 
122
 
123
  // Excludes
124
- if ( get_option( 'hmbkp_excludes' ) )
125
  $legacy_schedule->set_excludes( get_option( 'hmbkp_excludes' ) );
 
126
 
127
  // Backup email
128
- if ( defined( 'HMBKP_EMAIL' ) && is_email( HMBKP_EMAIL ) )
129
  $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => HMBKP_EMAIL ) );
 
130
 
131
- elseif ( is_email( get_option( 'hmbkp_email_address' ) ) )
132
  $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => get_option( 'hmbkp_email_address' ) ) );
 
133
 
134
  // Set the archive filename to what it used to be
135
  $legacy_schedule->set_archive_filename( implode( '-', array( get_bloginfo( 'name' ), 'backup', date( 'Y-m-d-H-i-s', current_time( 'timestamp' ) ) ) ) . '.zip' );
@@ -283,7 +309,7 @@ add_filter( 'cron_schedules', 'hmbkp_cron_schedules' );
283
  */
284
  function hmbkp_rmdirtree( $dir ) {
285
 
286
- if ( strpos( HM_Backup::get_home_path(), $dir ) !== false )
287
  return new WP_Error( 'hmbkp_invalid_action_error', sprintf( __( 'You can only delete directories inside your WordPress installation', 'hmbkp' ) ) );
288
 
289
  if ( is_file( $dir ) )
@@ -391,7 +417,7 @@ function hmbkp_path_default() {
391
  $upload_dir = wp_upload_dir();
392
 
393
  // If the backups dir can't be created in WP_CONTENT_DIR then fallback to uploads
394
- if ( ( ( ! is_dir( $path ) && ! wp_is_writable( dirname( $path ) ) ) || ( is_dir( $path ) && ! wp_is_writable( $path ) ) ) && strpos( $path, $upload_dir['basedir'] ) === false ) {
395
 
396
  hmbkp_path_move( $path, $path = HM_Backup::conform_dir( trailingslashit( $upload_dir['basedir'] ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups' ) );
397
 
@@ -437,7 +463,7 @@ function hmbkp_path_move( $from, $to ) {
437
  if ( $handle = opendir( $from ) ) {
438
 
439
  while ( false !== ( $file = readdir( $handle ) ) ) {
440
- if ( pathinfo( $file, PATHINFO_EXTENSION ) === 'zip' )
441
  if ( ! @rename( trailingslashit( $from ) . $file, trailingslashit( $to ) . $file ) )
442
  copy( trailingslashit( $from ) . $file, trailingslashit( $to ) . $file );
443
  }
@@ -447,7 +473,7 @@ function hmbkp_path_move( $from, $to ) {
447
  }
448
 
449
  // Only delete the old directory if it's inside WP_CONTENT_DIR
450
- if ( strpos( $from, WP_CONTENT_DIR ) !== false )
451
  hmbkp_rmdirtree( $from );
452
 
453
  }
@@ -460,8 +486,9 @@ function hmbkp_path_move( $from, $to ) {
460
  */
461
  function hmbkp_possible() {
462
 
463
- if ( ! wp_is_writable( hmbkp_path() ) || ! is_dir( hmbkp_path() ) )
464
  return false;
 
465
 
466
  $test_backup = new HMBKP_Scheduled_Backup( 'test_backup' );
467
 
@@ -489,7 +516,7 @@ function hmbkp_cleanup() {
489
  if ( $handle = opendir( $hmbkp_path ) ) {
490
 
491
  while ( false !== ( $file = readdir( $handle ) ) ) {
492
- if ( ! in_array( $file, array( '.', '..', 'index.html' ) ) && pathinfo( $file, PATHINFO_EXTENSION ) !== 'zip' && strpos( $file, '-running' ) === false )
493
  hmbkp_rmdirtree( trailingslashit( $hmbkp_path ) . $file );
494
  }
495
 
@@ -540,8 +567,8 @@ function hmbkp_get_max_attachment_size() {
540
 
541
  function hmbkp_is_path_accessible( $dir ) {
542
 
 
543
  if ( strpos( $dir, HM_Backup::get_home_path() ) === false ) {
544
- // path is inaccessible
545
  return false;
546
  }
547
 
8
  // loads the translation files
9
  load_plugin_textdomain( 'hmbkp', false, HMBKP_PLUGIN_LANG_DIR );
10
 
11
+ // Don't activate on old versions of WordPress
12
+ global $wp_version;
13
+
14
+ if ( version_compare( $wp_version, HMBKP_REQUIRED_WP_VERSION, '<' ) ) {
15
+
16
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
17
+ deactivate_plugins( __FILE__ );
18
+
19
+ if ( isset( $_GET['action'] ) && ( 'activate' === $_GET['action'] || 'error_scrape' === $_GET['action'] ) ) {
20
+ wp_die( sprintf( __( 'BackUpWordPress requires WordPress version %s or greater.', 'hmbkp' ), HMBKP_REQUIRED_WP_VERSION ), __( 'BackUpWordPress', 'hmbkp' ), array( 'back_link' => true ) );
21
+ }
22
+ }
23
+
24
  // Run deactivate on activation in-case it was deactivated manually
25
  hmbkp_deactivate();
26
 
33
  */
34
  function hmbkp_deactivate() {
35
 
36
+ hmbkp_maybe_self_deactivate();
37
+
38
  // Clean up the backups directory
39
  hmbkp_cleanup();
40
 
63
  if ( get_option( 'bkpwp_max_backups' ) ) {
64
 
65
  // Carry over the custom path
66
+ if ( $legacy_path = get_option( 'bkpwppath' ) ) {
67
  update_option( 'hmbkp_path', $legacy_path );
68
+ }
69
 
70
  // Options to remove
71
  $legacy_options = array(
109
  $legacy_schedule = new HMBKP_Scheduled_Backup( 'backup' );
110
 
111
  // Backup type
112
+ if ( ( defined( 'HMBKP_FILES_ONLY' ) && HMBKP_FILES_ONLY ) || get_option( 'hmbkp_files_only' ) ) {
113
  $legacy_schedule->set_type( 'file' );
114
+ }
115
 
116
+ elseif ( ( defined( 'HMBKP_DATABASE_ONLY' ) && HMBKP_DATABASE_ONLY ) || get_option( 'hmbkp_database_only' ) ) {
117
  $legacy_schedule->set_type( 'database' );
118
+ }
119
 
120
+ else {
121
  $legacy_schedule->set_type( 'complete' );
122
+ }
123
 
124
  // Daily schedule time
125
+ if ( defined( 'HMBKP_DAILY_SCHEDULE_TIME' ) && HMBKP_DAILY_SCHEDULE_TIME ) {
126
  $legacy_schedule->set_schedule_start_time( strtotime( HMBKP_DAILY_SCHEDULE_TIME ) );
127
+ }
128
 
129
  // Backup schedule
130
  $legacy_schedule->set_reoccurrence( get_option( 'hmbkp_schedule_frequency', 'hmbkp_daily' ) );
131
 
132
  // Automatic backups disabled?
133
+ if ( ( defined( 'HMBKP_DISABLE_AUTOMATIC_BACKUP' ) && HMBKP_DISABLE_AUTOMATIC_BACKUP ) || get_option( 'hmbkp_disable_automatic_backup' ) ) {
134
  $legacy_schedule->set_reoccurrence( 'manually' );
135
+ }
136
 
137
  // Max backups
138
+ if ( defined( 'HMBKP_MAX_BACKUPS' ) && is_numeric( HMBKP_MAX_BACKUPS ) ) {
139
  $legacy_schedule->set_max_backups( (int) HMBKP_MAX_BACKUPS );
140
+ }
141
 
142
+ else {
143
  $legacy_schedule->set_max_backups( (int) get_option( 'hmbkp_max_backups', 10 ) );
144
+ }
145
 
146
  // Excludes
147
+ if ( get_option( 'hmbkp_excludes' ) ) {
148
  $legacy_schedule->set_excludes( get_option( 'hmbkp_excludes' ) );
149
+ }
150
 
151
  // Backup email
152
+ if ( defined( 'HMBKP_EMAIL' ) && is_email( HMBKP_EMAIL ) ) {
153
  $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => HMBKP_EMAIL ) );
154
+ }
155
 
156
+ elseif ( is_email( get_option( 'hmbkp_email_address' ) ) ) {
157
  $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => get_option( 'hmbkp_email_address' ) ) );
158
+ }
159
 
160
  // Set the archive filename to what it used to be
161
  $legacy_schedule->set_archive_filename( implode( '-', array( get_bloginfo( 'name' ), 'backup', date( 'Y-m-d-H-i-s', current_time( 'timestamp' ) ) ) ) . '.zip' );
309
  */
310
  function hmbkp_rmdirtree( $dir ) {
311
 
312
+ if ( false !== strpos( HM_Backup::get_home_path(), $dir ) )
313
  return new WP_Error( 'hmbkp_invalid_action_error', sprintf( __( 'You can only delete directories inside your WordPress installation', 'hmbkp' ) ) );
314
 
315
  if ( is_file( $dir ) )
417
  $upload_dir = wp_upload_dir();
418
 
419
  // If the backups dir can't be created in WP_CONTENT_DIR then fallback to uploads
420
+ if ( ( ( ! is_dir( $path ) && ! wp_is_writable( dirname( $path ) ) ) || ( is_dir( $path ) && ! wp_is_writable( $path ) ) ) && false === strpos( $path, $upload_dir['basedir'] ) ) {
421
 
422
  hmbkp_path_move( $path, $path = HM_Backup::conform_dir( trailingslashit( $upload_dir['basedir'] ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups' ) );
423
 
463
  if ( $handle = opendir( $from ) ) {
464
 
465
  while ( false !== ( $file = readdir( $handle ) ) ) {
466
+ if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) )
467
  if ( ! @rename( trailingslashit( $from ) . $file, trailingslashit( $to ) . $file ) )
468
  copy( trailingslashit( $from ) . $file, trailingslashit( $to ) . $file );
469
  }
473
  }
474
 
475
  // Only delete the old directory if it's inside WP_CONTENT_DIR
476
+ if ( false !==strpos( $from, WP_CONTENT_DIR ) )
477
  hmbkp_rmdirtree( $from );
478
 
479
  }
486
  */
487
  function hmbkp_possible() {
488
 
489
+ if ( ! wp_is_writable( hmbkp_path() ) || ! is_dir( hmbkp_path() ) ) {
490
  return false;
491
+ }
492
 
493
  $test_backup = new HMBKP_Scheduled_Backup( 'test_backup' );
494
 
516
  if ( $handle = opendir( $hmbkp_path ) ) {
517
 
518
  while ( false !== ( $file = readdir( $handle ) ) ) {
519
+ if ( ! in_array( $file, array( '.', '..', 'index.html' ) ) && 'zip' !== pathinfo( $file, PATHINFO_EXTENSION ) && false === strpos( $file, '-running' ) )
520
  hmbkp_rmdirtree( trailingslashit( $hmbkp_path ) . $file );
521
  }
522
 
567
 
568
  function hmbkp_is_path_accessible( $dir ) {
569
 
570
+ // Path is inaccessible
571
  if ( strpos( $dir, HM_Backup::get_home_path() ) === false ) {
 
572
  return false;
573
  }
574
 
functions/interface.php CHANGED
@@ -28,7 +28,6 @@ function hmbkp_get_backup_row( $file, HMBKP_Scheduled_Backup $schedule ) {
28
  <td>
29
 
30
  <?php if ( hmbkp_is_path_accessible( hmbkp_path() ) ) : ?>
31
-
32
  <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'hmbkp_backup_archive' => $encoded_file, 'hmbkp_schedule_id' => $schedule->get_id(), 'action' => 'hmbkp_request_download_backup' ), admin_url( 'admin-post.php' ) ), 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' ) ); ?>" class="download-action"><?php _e( 'Download', 'hmbkp' ); ?></a> |
33
  <?php endif; ?>
34
 
@@ -48,92 +47,102 @@ function hmbkp_get_backup_row( $file, HMBKP_Scheduled_Backup $schedule ) {
48
  */
49
  function hmbkp_admin_notices() {
50
 
51
- // If the backups directory doesn't exist and can't be automatically created
52
- if ( ! is_dir( hmbkp_path() ) ) :
53
-
54
- function hmbkp_path_exists_warning() {
55
- $php_user = exec( 'whoami' );
56
- $php_group = reset( explode( ' ', exec( 'groups' ) ) );
57
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress is almost ready.', 'hmbkp' ) . '</strong> ' . 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.', 'hmbkp' ), '<code>wp-content</code>', '<code>chown ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( dirname( hmbkp_path() ) ) . '</code>', '<code>chmod 777 ' . esc_html( dirname( hmbkp_path() ) ) . '</code>' ) . '</p></div>';
58
- }
59
-
60
- add_action( 'admin_notices', 'hmbkp_path_exists_warning' );
61
-
62
- endif;
63
-
64
- // If the backups directory exists but isn't writable
65
- if ( is_dir( hmbkp_path() ) && ! wp_is_writable( hmbkp_path() ) ) :
66
-
67
- function hmbkp_writable_path_warning() {
68
- $php_user = exec( 'whoami' );
69
- $php_group = reset( explode( ' ', exec( 'groups' ) ) );
70
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress is almost ready.', 'hmbkp' ) . '</strong> ' . sprintf( __( 'Your backups directory isn\'t writable, run %1$s or %2$s or set the permissions yourself.', 'hmbkp' ), '<code>chown -R ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( hmbkp_path() ) . '</code>', '<code>chmod -R 777 ' . esc_html( hmbkp_path() ) . '</code>' ) . '</p></div>';
71
- }
72
-
73
- add_action( 'admin_notices', 'hmbkp_writable_path_warning' );
74
-
75
- endif;
76
 
77
- // If safe mode is active
78
- if ( HM_Backup::is_safe_mode_active() ) :
79
 
80
- function hmbkp_safe_mode_warning() {
81
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on.', 'hmbkp' ), '<code>PHP</code>', sprintf( '<a href="%1$s">%2$s</a>', __( 'http://php.net/manual/en/features.safe-mode.php', 'hmbkp' ), __( 'Safe Mode', 'hmbkp' ) ), '<code>' . __( 'Safe Mode', 'hmbkp' ) . '</code>' ) . '</p></div>';
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
- add_action( 'admin_notices', 'hmbkp_safe_mode_warning' );
 
85
 
86
- endif;
87
 
88
- // If a custom backups directory is defined and it doesn't exist and can't be created
89
- if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH && ! is_dir( HMBKP_PATH ) ) :
90
 
91
- function hmbkp_custom_path_exists_warning() {
92
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( 'Your custom backups directory %1$s doesn\'t exist and can\'t be created, your backups will be saved to %2$s instead.', 'hmbkp' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( hmbkp_path() ) . '</code>' ) . '</p></div>';
93
- }
94
 
95
- add_action( 'admin_notices', 'hmbkp_custom_path_exists_warning' );
 
 
96
 
97
- endif;
98
 
99
- // If a custom backups directory is defined and exists but isn't writable
100
- if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH && is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) :
101
 
102
- function hmbkp_custom_path_writable_notice() {
103
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( 'Your custom backups directory %1$s isn\'t writable, new backups will be saved to %2$s instead.', 'hmbkp' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( hmbkp_path() ) . '</code>' ) . '</p></div>';
104
- }
105
 
106
- add_action( 'admin_notices', 'hmbkp_custom_path_writable_notice' );
107
 
108
- endif;
109
 
110
- // If there are any errors reported in the backup
111
- if ( hmbkp_backup_errors_message() ) :
112
 
113
- function hmbkp_backup_errors_notice() {
114
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress detected issues with your last backup.', 'hmbkp' ) . '</strong><a href="' . esc_url( add_query_arg( 'action', 'hmbkp_dismiss_error' ) ) . '" style="float: right;" class="button">Dismiss</a></p>' . hmbkp_backup_errors_message() . '</div>';
115
- }
116
 
117
- add_action( 'admin_notices', 'hmbkp_backup_errors_notice' );
 
 
118
 
119
- endif;
 
 
120
 
121
  $test_backup = new HMBKP_Scheduled_Backup( 'test_backup' );
122
 
123
- if ( ! is_readable( $test_backup->get_root() ) ) :
124
-
125
- function hmbkp_ba§ckup_root_unreadable_notice() {
126
- $test_backup = new HMBKP_Scheduled_Backup( 'test_backup' );
127
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong>' . sprintf( __( 'Your backup root path %s isn\'t readable.', 'hmbkp' ), '<code>' . $test_backup->get_root() . '</code>' ) . '</p></div>';
128
- }
129
-
130
- add_action( 'admin_notices', 'hmbkp_backup_root_unreadable_notice' );
131
 
132
- endif;
 
 
133
 
134
  }
135
-
136
- add_action( 'admin_head', 'hmbkp_admin_notices' );
137
 
138
  /**
139
  * Hook in an change the plugin description when BackUpWordPress is activated
@@ -259,7 +268,7 @@ function hmbkp_backups_number( $schedule, $zero = false, $one = false, $more = f
259
 
260
  if ( $number > 1 )
261
  $output = str_replace( '%', number_format_i18n( $number ), ( false === $more ) ? __( '% Backups Completed', 'hmbkp' ) : $more );
262
- elseif ( $number == 0 )
263
  $output = ( false === $zero ) ? __( 'No Backups Completed', 'hmbkp' ) : $zero;
264
  else // must be one
265
  $output = ( false === $one ) ? __( '1 Backup Completed', 'hmbkp' ) : $one;
@@ -305,10 +314,10 @@ function hmbkp_get_settings_url() {
305
 
306
  if ( is_multisite() ) {
307
  $url = network_admin_url( 'settings.php?page=' . HMBKP_PLUGIN_SLUG );
 
 
308
  }
309
 
310
- $url = admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG );
311
-
312
  HMBKP_schedules::get_instance()->refresh_schedules();
313
 
314
  if ( ! empty( $_REQUEST['hmbkp_schedule_id'] ) && HMBKP_schedules::get_instance()->get_schedule( sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ) ) ) {
@@ -330,9 +339,9 @@ function hmbkp_add_settings_error( $error_message ){
330
 
331
  // If it doesnt exist, create.
332
  if ( ! $hmbkp_settings_errors ) {
333
- set_transient( 'hmbkp_settings_errors', (array)$error_message );
334
  } else {
335
- set_transient( 'hmbkp_settings_errors', array_unique( array_merge( $hmbkp_settings_errors, (array)$error_message ) ) );
336
  }
337
 
338
  }
@@ -349,7 +358,7 @@ function hmbkp_get_settings_errors() {
349
 
350
  /**
351
  * Clear all error messages.
352
- *
353
  * @return bool
354
  */
355
  function hmbkp_clear_settings_errors(){
28
  <td>
29
 
30
  <?php if ( hmbkp_is_path_accessible( hmbkp_path() ) ) : ?>
 
31
  <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'hmbkp_backup_archive' => $encoded_file, 'hmbkp_schedule_id' => $schedule->get_id(), 'action' => 'hmbkp_request_download_backup' ), admin_url( 'admin-post.php' ) ), 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' ) ); ?>" class="download-action"><?php _e( 'Download', 'hmbkp' ); ?></a> |
32
  <?php endif; ?>
33
 
47
  */
48
  function hmbkp_admin_notices() {
49
 
50
+ $notices = HMBKP_Notices::get_instance()->get_notices();
51
+
52
+ if ( empty( $notices ) ) {
53
+ return;
54
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
+ ob_start(); ?>
 
57
 
58
+ <?php if ( ! empty( $notices['backup_errors'] ) ) : ?>
59
+
60
+ <div id="hmbkp-warning" class="error fade">
61
+ <p>
62
+ <strong><?php _e( 'BackUpWordPress detected issues with your last backup.', 'hmbkp' ); ?></strong>
63
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_dismiss_error' ), admin_url( 'admin-post.php' ) ), 'hmbkp_dismiss_error', 'hmbkp_dismiss_error_nonce' ) ); ?>" style="float: right;" class="button">
64
+ <?php _e( 'Dismiss', 'hmbkp' ); ?>
65
+ </a>
66
+ </p>
67
+
68
+ <ul>
69
+ <?php foreach ( $notices['backup_errors'] as $notice ) : ?>
70
+ <li><?php echo esc_html( $notice ); ?></li>
71
+ <?php endforeach; ?>
72
+ </ul>
73
+
74
+ </div>
75
+ <?php endif; ?>
76
+
77
+ <?php if ( ! empty( $notices['server_config'] ) ) : ?>
78
+
79
+ <div id="hmbkp-warning" class="error fade">
80
+ <p>
81
+ <strong><?php _e( 'BackUpWordPress has detected a problem.', 'hmbkp' ); ?></strong>
82
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_dismiss_error' ), admin_url( 'admin-post.php' ) ), 'hmbkp_dismiss_error', 'hmbkp_dismiss_error_nonce' ) ); ?>" style="float: right;" class="button">
83
+ <?php _e( 'Dismiss', 'hmbkp' ); ?>
84
+ </a>
85
+ </p>
86
+ <ul>
87
+ <?php foreach ( $notices['server_config'] as $notice ) : ?>
88
+ <li><?php echo $notice; ?></li>
89
+ <?php endforeach; ?>
90
+ </ul>
91
+ </div>
92
+
93
+ <?php endif; ?>
94
+
95
+ <?php echo ob_get_clean();
96
 
97
+ }
98
+ add_action( 'admin_notices', 'hmbkp_admin_notices' );
99
 
100
+ function hmbkp_set_server_config_notices() {
101
 
102
+ $notices = HMBKP_Notices::get_instance();
 
103
 
104
+ $messages = array();
 
 
105
 
106
+ $php_user = exec( 'whoami' );
107
+ $groups = explode( ' ', exec( 'groups' ) );
108
+ $php_group = reset( $groups );
109
 
110
+ if ( ! is_dir( hmbkp_path() ) ) {
111
 
112
+ $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.', 'hmbkp' ), '<code>wp-content</code>', '<code>chown ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( dirname( hmbkp_path() ) ) . '</code>', '<code>chmod 777 ' . esc_html( dirname( hmbkp_path() ) ) . '</code>' );
 
113
 
114
+ }
 
 
115
 
116
+ if ( is_dir( hmbkp_path() ) && ! wp_is_writable( hmbkp_path() ) ) {
117
 
118
+ $messages[] = sprintf( __( 'Your backups directory isn\'t writable, run %1$s or %2$s or set the permissions yourself.', 'hmbkp' ), '<code>chown -R ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( hmbkp_path() ) . '</code>', '<code>chmod -R 777 ' . esc_html( hmbkp_path() ) . '</code>' );
119
 
120
+ }
 
121
 
122
+ if ( HM_Backup::is_safe_mode_active() ) {
123
+ $messages[] = sprintf( __( '%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on.', 'hmbkp' ), '<code>PHP</code>', sprintf( '<a href="%1$s">%2$s</a>', __( 'http://php.net/manual/en/features.safe-mode.php', 'hmbkp' ), __( 'Safe Mode', 'hmbkp' ) ), '<code>' . __( 'Safe Mode', 'hmbkp' ) . '</code>' );
124
+ }
125
 
126
+ if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH && ! is_dir( HMBKP_PATH ) ) {
127
+ $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.', 'hmbkp' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( hmbkp_path() ) . '</code>' );
128
+ }
129
 
130
+ if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH && is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) {
131
+ $messages[] = sprintf( __( 'Your custom backups directory %1$s isn\'t writable, new backups will be saved to %2$s instead.', 'hmbkp' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>', '<code>' . esc_html( hmbkp_path() ) . '</code>' );
132
+ }
133
 
134
  $test_backup = new HMBKP_Scheduled_Backup( 'test_backup' );
135
 
136
+ if ( ! is_readable( $test_backup->get_root() ) ) {
137
+ $messages[] = sprintf( __( 'Your backup root path %s isn\'t readable.', 'hmbkp' ), '<code>' . $test_backup->get_root() . '</code>' );
138
+ }
 
 
 
 
 
139
 
140
+ if ( count( $messages ) > 0 ) {
141
+ $notices->set_notices( 'server_config', $messages );
142
+ }
143
 
144
  }
145
+ add_action( 'admin_init', 'hmbkp_set_server_config_notices' );
 
146
 
147
  /**
148
  * Hook in an change the plugin description when BackUpWordPress is activated
268
 
269
  if ( $number > 1 )
270
  $output = str_replace( '%', number_format_i18n( $number ), ( false === $more ) ? __( '% Backups Completed', 'hmbkp' ) : $more );
271
+ elseif ( 0 === $number )
272
  $output = ( false === $zero ) ? __( 'No Backups Completed', 'hmbkp' ) : $zero;
273
  else // must be one
274
  $output = ( false === $one ) ? __( '1 Backup Completed', 'hmbkp' ) : $one;
314
 
315
  if ( is_multisite() ) {
316
  $url = network_admin_url( 'settings.php?page=' . HMBKP_PLUGIN_SLUG );
317
+ } else {
318
+ $url = admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG );
319
  }
320
 
 
 
321
  HMBKP_schedules::get_instance()->refresh_schedules();
322
 
323
  if ( ! empty( $_REQUEST['hmbkp_schedule_id'] ) && HMBKP_schedules::get_instance()->get_schedule( sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ) ) ) {
339
 
340
  // If it doesnt exist, create.
341
  if ( ! $hmbkp_settings_errors ) {
342
+ set_transient( 'hmbkp_settings_errors', (array) $error_message );
343
  } else {
344
+ set_transient( 'hmbkp_settings_errors', array_unique( array_merge( $hmbkp_settings_errors, (array) $error_message ) ) );
345
  }
346
 
347
  }
358
 
359
  /**
360
  * Clear all error messages.
361
+ *
362
  * @return bool
363
  */
364
  function hmbkp_clear_settings_errors(){
languages/backupwordpress.pot DELETED
@@ -1,1172 +0,0 @@
1
- # Copyright (C) 2014 Human Made Limited
2
- # This file is distributed under the same license as the BackUpWordPress package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: BackUpWordPress 3.0-beta\n"
6
- "Report-Msgid-Bugs-To: support@humanmade.co.uk\n"
7
- "POT-Creation-Date: 2014-10-15 19:32:59+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: Human Made Limited\n"
13
- "Language-Team: Human Made Limited\n"
14
- "X-Generator: grunt-wp-i18n 0.4.8\n"
15
-
16
- #: admin/actions.php:221
17
- msgid "The schedule ID was not provided. Aborting."
18
- msgstr ""
19
-
20
- #: admin/actions.php:278
21
- msgid "Backup type cannot be empty"
22
- msgstr ""
23
-
24
- #: admin/actions.php:282
25
- msgid "Invalid backup type"
26
- msgstr ""
27
-
28
- #: admin/actions.php:296
29
- msgid "Schedule cannot be empty"
30
- msgstr ""
31
-
32
- #: admin/actions.php:300
33
- msgid "Invalid schedule"
34
- msgstr ""
35
-
36
- #: admin/actions.php:314
37
- msgid "Day of the week must be a valid lowercase day name"
38
- msgstr ""
39
-
40
- #: admin/actions.php:333
41
- msgid "Day of month must be between 1 and 31"
42
- msgstr ""
43
-
44
- #: admin/actions.php:352
45
- msgid "Hours must be between 0 and 23"
46
- msgstr ""
47
-
48
- #: admin/actions.php:371
49
- msgid "Minutes must be between 0 and 59"
50
- msgstr ""
51
-
52
- #: admin/actions.php:385
53
- msgid "Max backups can't be empty"
54
- msgstr ""
55
-
56
- #: admin/actions.php:389
57
- msgid "Max backups must be a number"
58
- msgstr ""
59
-
60
- #: admin/actions.php:393
61
- msgid "Max backups must be greater than 0"
62
- msgstr ""
63
-
64
- #: admin/actions.php:594
65
- msgid ""
66
- "Your backup completed but with the following errors / warnings, it's "
67
- "probably ok to ignore these."
68
- msgstr ""
69
-
70
- #: admin/actions.php:598
71
- msgid "Your backup failed"
72
- msgstr ""
73
-
74
- #: admin/actions.php:602
75
- msgid "Here's the response from the server:"
76
- msgstr ""
77
-
78
- #: admin/actions.php:606
79
- msgid "You can email details of this error to %s so they can look into the issue."
80
- msgstr ""
81
-
82
- #: admin/actions.php:608
83
- msgid "Close"
84
- msgstr ""
85
-
86
- #: admin/actions.php:609
87
- msgid "Email to Support"
88
- msgstr ""
89
-
90
- #: admin/actions.php:717 admin/actions.php:723 functions/interface.php:81
91
- #: functions/interface.php:92 functions/interface.php:103
92
- #: functions/interface.php:127
93
- msgid "BackUpWordPress has detected a problem."
94
- msgstr ""
95
-
96
- #: admin/actions.php:717 admin/actions.php:723
97
- msgid ""
98
- "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
99
- "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
100
- "See the %3$s for more details."
101
- msgstr ""
102
-
103
- #: admin/backups-table.php:8 admin/schedule-form-excludes.php:98
104
- msgid "Size"
105
- msgstr ""
106
-
107
- #: admin/backups-table.php:9 admin/schedule-form-excludes.php:100
108
- msgid "Type"
109
- msgstr ""
110
-
111
- #: admin/backups-table.php:10
112
- msgid "Actions"
113
- msgstr ""
114
-
115
- #: admin/backups-table.php:35
116
- msgid "This is where your backups will appear once you have some."
117
- msgstr ""
118
-
119
- #: admin/backups.php:22
120
- msgid "add schedule"
121
- msgstr ""
122
-
123
- #: admin/backups.php:26
124
- msgid "Support"
125
- msgstr ""
126
-
127
- #: admin/backups.php:32
128
- msgid "Enable Support"
129
- msgstr ""
130
-
131
- #: admin/constants.php:3
132
- msgid ""
133
- "You can %1$s any of the following %2$s in your %3$s to control advanced "
134
- "settings. %4$s. Defined %5$s will be highlighted."
135
- msgstr ""
136
-
137
- #: admin/constants.php:3 admin/menu.php:69
138
- msgid "Constants"
139
- msgstr ""
140
-
141
- #: admin/constants.php:3
142
- msgid "The Codex can help"
143
- msgstr ""
144
-
145
- #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
146
- #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
147
- #: admin/constants.php:110 classes/class-email.php:58
148
- msgid "You've set it to: %s"
149
- msgstr ""
150
-
151
- #: admin/constants.php:17
152
- msgid ""
153
- "The path to folder you would like to store your backup files in, defaults "
154
- "to %s."
155
- msgstr ""
156
-
157
- #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
158
- #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
159
- #: admin/constants.php:113 classes/class-email.php:61
160
- msgid "e.g."
161
- msgstr ""
162
-
163
- #: admin/constants.php:33
164
- msgid ""
165
- "The path to your %1$s executable. Will be used for the %2$s part of the "
166
- "back up if available."
167
- msgstr ""
168
-
169
- #: admin/constants.php:33 admin/constants.php:49
170
- msgid "database"
171
- msgstr ""
172
-
173
- #: admin/constants.php:49
174
- msgid ""
175
- "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s "
176
- "if available."
177
- msgstr ""
178
-
179
- #: admin/constants.php:49
180
- msgid "files"
181
- msgstr ""
182
-
183
- #: admin/constants.php:65
184
- msgid ""
185
- "Comma separated list of files or directories to exclude, the backups "
186
- "directory is automatically excluded."
187
- msgstr ""
188
-
189
- #: admin/constants.php:81
190
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
191
- msgstr ""
192
-
193
- #: admin/constants.php:97
194
- msgid "The root directory that is backed up. Defaults to %s."
195
- msgstr ""
196
-
197
- #: admin/constants.php:113
198
- msgid "The time that your schedules should run. Defaults to %s."
199
- msgstr ""
200
-
201
- #: admin/enable-support.php:3
202
- msgid "Enable BackUpWordPress Support"
203
- msgstr ""
204
-
205
- #: admin/enable-support.php:5
206
- msgid ""
207
- "BackUpWordPress uses %s to provide support. In addition to allowing you to "
208
- "send and receive messages we also send the following server information "
209
- "along with your requests:"
210
- msgstr ""
211
-
212
- #: admin/enable-support.php:58
213
- msgid "You can disable support in the future by deactivating BackUpWordPress."
214
- msgstr ""
215
-
216
- #: admin/enable-support.php:60
217
- msgid "No thanks"
218
- msgstr ""
219
-
220
- #: admin/enable-support.php:61
221
- msgid "Yes I want to enable support"
222
- msgstr ""
223
-
224
- #: admin/faq.php:2
225
- msgid "Where does BackUpWordPress store the backup files?"
226
- msgstr ""
227
-
228
- #: admin/faq.php:4
229
- msgid ""
230
- "Backups are stored on your server in <code>/wp-content/backups</code>, you "
231
- "can change the directory."
232
- msgstr ""
233
-
234
- #: admin/faq.php:6
235
- msgid ""
236
- "Important: By default BackUpWordPress backs up everything in your site root "
237
- "as well as your database, this includes any non WordPress folders that "
238
- "happen to be in your site root. This does mean that your backup directory "
239
- "can get quite large."
240
- msgstr ""
241
-
242
- #: admin/faq.php:8
243
- msgid "What if I want to back up my site to another destination?"
244
- msgstr ""
245
-
246
- #: admin/faq.php:10
247
- msgid ""
248
- "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, "
249
- "Azure, DreamObjects and FTP/SFTP. Check it out here: <a "
250
- "href=\"http://bwp.hmn.md/?utm_source=wordpress-org&utm_medium=plugin-page&"
251
- "utm_campaign=freeplugin\" title=\"BackUpWordPress Homepage\" "
252
- "target=\"_blank\">https://bwp.hmn.md</a>"
253
- msgstr ""
254
-
255
- #: admin/faq.php:12
256
- msgid "How do I restore my site from a backup?"
257
- msgstr ""
258
-
259
- #: admin/faq.php:14
260
- msgid ""
261
- "You need to download the latest backup file either by clicking download on "
262
- "the backups page or via <code>FTP</code>. <code>Unzip</code> the files and "
263
- "upload all the files to your server overwriting your site. You can then "
264
- "import the database using your hosts database management tool (likely "
265
- "<code>phpMyAdmin</code>)."
266
- msgstr ""
267
-
268
- #: admin/faq.php:16
269
- msgid ""
270
- "See this guide for more details - <a "
271
- "href=\"https://bwp.hmn.md/support-center/restore-backup/\" title=\"Go to "
272
- "support center\" target=\"_blank\">How to restore from backup</a>."
273
- msgstr ""
274
-
275
- #: admin/faq.php:18
276
- msgid "Does BackUpWordPress back up the backups directory?"
277
- msgstr ""
278
-
279
- #: admin/faq.php:20
280
- msgid "No."
281
- msgstr ""
282
-
283
- #: admin/faq.php:22
284
- msgid "I'm not receiving my backups by email?"
285
- msgstr ""
286
-
287
- #: admin/faq.php:24
288
- msgid ""
289
- "Most servers have a filesize limit on email attachments, it's generally "
290
- "about 10mb. If your backup file is over that limit it won't be sent "
291
- "attached to the email, instead you should receive an email with a link to "
292
- "download the backup, if you aren't even receiving that then you likely have "
293
- "a mail issue on your server that you'll need to contact your host about."
294
- msgstr ""
295
-
296
- #: admin/faq.php:26
297
- msgid "How many backups are stored by default?"
298
- msgstr ""
299
-
300
- #: admin/faq.php:28
301
- msgid "BackUpWordPress stores the last 10 backups by default."
302
- msgstr ""
303
-
304
- #: admin/faq.php:30
305
- msgid "How long should a backup take?"
306
- msgstr ""
307
-
308
- #: admin/faq.php:32
309
- msgid ""
310
- "Unless your site is very large (many gigabytes) it should only take a few "
311
- "minutes to perform a back up, if your back up has been running for longer "
312
- "than an hour it's safe to assume that something has gone wrong, try "
313
- "de-activating and re-activating the plugin, if it keeps happening, contact "
314
- "support."
315
- msgstr ""
316
-
317
- #: admin/faq.php:34
318
- msgid "What do I do if I get the wp-cron error message?"
319
- msgstr ""
320
-
321
- #: admin/faq.php:36
322
- msgid ""
323
- "The issue is that your <code>wp-cron.php</code> is not returning a "
324
- "<code>200</code> response when hit with a HTTP request originating from "
325
- "your own server, it could be several things, in most cases, it's an issue "
326
- "with the server / site."
327
- msgstr ""
328
-
329
- #: admin/faq.php:38
330
- msgid "There are some things you can test to confirm this is the issue."
331
- msgstr ""
332
-
333
- #: admin/faq.php:40
334
- msgid "Are scheduled posts working? (They use wp-cron as well ). "
335
- msgstr ""
336
-
337
- #: admin/faq.php:42
338
- msgid ""
339
- "Are you hosted on Heart Internet? (wp-cron may not be supported by Heart "
340
- "Internet, see below for work-around)."
341
- msgstr ""
342
-
343
- #: admin/faq.php:44
344
- msgid "If you click manual backup does it work?"
345
- msgstr ""
346
-
347
- #: admin/faq.php:46
348
- msgid ""
349
- "Try adding <code>define( 'ALTERNATE_WP_CRON', true );</code> to your "
350
- "<code>wp-config.php</code>, do automatic backups work?"
351
- msgstr ""
352
-
353
- #: admin/faq.php:48
354
- msgid ""
355
- "Is your site private (I.E. is it behind some kind of authentication, "
356
- "maintenance plugin, .htaccess) if so wp-cron won't work until you remove "
357
- "it, if you are and you temporarily remove the authentication, do backups "
358
- "start working?"
359
- msgstr ""
360
-
361
- #: admin/faq.php:50
362
- msgid ""
363
- "Report the results to our support team for further help. To do this, either "
364
- "enable suport from your Admin Dashboard (recommended), or email "
365
- "support@hmn.md"
366
- msgstr ""
367
-
368
- #: admin/faq.php:52
369
- msgid "How to get BackUpWordPress working in Heart Internet"
370
- msgstr ""
371
-
372
- #: admin/faq.php:54
373
- msgid ""
374
- "The script to be entered into the Heart Internet cPanel is: "
375
- "<code>/usr/bin/php5 "
376
- "/home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the space "
377
- "between php5 and the location of the file). The file "
378
- "<code>wp-cron.php</code> <code>chmod</code> must be set to <code>711</code>."
379
- msgstr ""
380
-
381
- #: admin/faq.php:56
382
- msgid "My backups seem to be failing?"
383
- msgstr ""
384
-
385
- #: admin/faq.php:58
386
- msgid ""
387
- "If your backups are failing - it's commonly caused by lack of available "
388
- "resources on your server. The easiest way to establish this to exclude some "
389
- "[of] or your entire uploades folder, running a backup an if that succeeds. "
390
- "If so, we know it's probably a server issue. If not, report the results to "
391
- "our support team for further help. To do this, either enable suport from "
392
- "your Admin Dashboard (recommended), or email support@hmn.md"
393
- msgstr ""
394
-
395
- #: admin/menu.php:12 admin/menu.php:14
396
- msgid "Manage Backups"
397
- msgstr ""
398
-
399
- #: admin/menu.php:12 admin/menu.php:14 admin/menu.php:39
400
- msgid "Backups"
401
- msgstr ""
402
-
403
- #: admin/menu.php:67
404
- msgid "FAQ"
405
- msgstr ""
406
-
407
- #: admin/menu.php:72
408
- msgid "For more information:"
409
- msgstr ""
410
-
411
- #: admin/menu.php:74
412
- msgid "Support Forums"
413
- msgstr ""
414
-
415
- #: admin/menu.php:75
416
- msgid "Help with translation"
417
- msgstr ""
418
-
419
- #: admin/page.php:7
420
- msgid ""
421
- "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin "
422
- "directory%2$s."
423
- msgstr ""
424
-
425
- #: admin/schedule-form-excludes.php:5
426
- msgid "Currently Excluded"
427
- msgstr ""
428
-
429
- #: admin/schedule-form-excludes.php:40
430
- msgid "Default rule"
431
- msgstr ""
432
-
433
- #: admin/schedule-form-excludes.php:44
434
- msgid "Defined in wp-config.php"
435
- msgstr ""
436
-
437
- #: admin/schedule-form-excludes.php:48
438
- msgid "Remove"
439
- msgstr ""
440
-
441
- #: admin/schedule-form-excludes.php:64
442
- msgid "Directory Listing"
443
- msgstr ""
444
-
445
- #: admin/schedule-form-excludes.php:66
446
- msgid ""
447
- "Here's a directory listing of all files on your site, you can browse "
448
- "through and exclude files or folders that you don't want included in your "
449
- "backup."
450
- msgstr ""
451
-
452
- #: admin/schedule-form-excludes.php:97
453
- msgid "Name"
454
- msgstr ""
455
-
456
- #: admin/schedule-form-excludes.php:99
457
- msgid "Permissions"
458
- msgstr ""
459
-
460
- #: admin/schedule-form-excludes.php:101
461
- msgid "Status"
462
- msgstr ""
463
-
464
- #: admin/schedule-form-excludes.php:158 admin/schedule-form-excludes.php:269
465
- msgid "Refresh"
466
- msgstr ""
467
-
468
- #: admin/schedule-form-excludes.php:175 admin/schedule-form-excludes.php:293
469
- msgid "Symlink"
470
- msgstr ""
471
-
472
- #: admin/schedule-form-excludes.php:179 admin/schedule-form-excludes.php:297
473
- msgid "Folder"
474
- msgstr ""
475
-
476
- #: admin/schedule-form-excludes.php:269
477
- msgid "Recalculate the size of this directory"
478
- msgstr ""
479
-
480
- #: admin/schedule-form-excludes.php:301
481
- msgid "File"
482
- msgstr ""
483
-
484
- #: admin/schedule-form-excludes.php:311
485
- msgid "Unreadable files won't be backed up."
486
- msgstr ""
487
-
488
- #: admin/schedule-form-excludes.php:311
489
- msgid "Unreadable"
490
- msgstr ""
491
-
492
- #: admin/schedule-form-excludes.php:315
493
- msgid "Excluded"
494
- msgstr ""
495
-
496
- #: admin/schedule-form-excludes.php:326
497
- msgid "Exclude &rarr;"
498
- msgstr ""
499
-
500
- #: admin/schedule-form-excludes.php:345 admin/schedule-form.php:185
501
- #: admin/schedule-settings.php:77
502
- msgid "Done"
503
- msgstr ""
504
-
505
- #: admin/schedule-form.php:31
506
- msgid "Backup"
507
- msgstr ""
508
-
509
- #: admin/schedule-form.php:38
510
- msgid "Both Database &amp; files"
511
- msgstr ""
512
-
513
- #: admin/schedule-form.php:40
514
- msgid "Files only"
515
- msgstr ""
516
-
517
- #: admin/schedule-form.php:42
518
- msgid "Database only"
519
- msgstr ""
520
-
521
- #: admin/schedule-form.php:53
522
- msgid "Schedule"
523
- msgstr ""
524
-
525
- #: admin/schedule-form.php:60
526
- msgid "Manual Only"
527
- msgstr ""
528
-
529
- #: admin/schedule-form.php:85
530
- msgid "Start Day"
531
- msgstr ""
532
-
533
- #: admin/schedule-form.php:93
534
- msgid "Monday"
535
- msgstr ""
536
-
537
- #: admin/schedule-form.php:94
538
- msgid "Tuesday"
539
- msgstr ""
540
-
541
- #: admin/schedule-form.php:95
542
- msgid "Wednesday"
543
- msgstr ""
544
-
545
- #: admin/schedule-form.php:96
546
- msgid "Thursday"
547
- msgstr ""
548
-
549
- #: admin/schedule-form.php:97
550
- msgid "Friday"
551
- msgstr ""
552
-
553
- #: admin/schedule-form.php:98
554
- msgid "Saturday"
555
- msgstr ""
556
-
557
- #: admin/schedule-form.php:99
558
- msgid "Sunday"
559
- msgstr ""
560
-
561
- #: admin/schedule-form.php:117
562
- msgid "Start Day of Month"
563
- msgstr ""
564
-
565
- #: admin/schedule-form.php:129
566
- msgid "Start Time"
567
- msgstr ""
568
-
569
- #: admin/schedule-form.php:138
570
- msgid "Hours"
571
- msgstr ""
572
-
573
- #: admin/schedule-form.php:142
574
- msgid "Minutes"
575
- msgstr ""
576
-
577
- #: admin/schedule-form.php:146
578
- msgid "The second backup will run 12 hours after the first"
579
- msgstr ""
580
-
581
- #: admin/schedule-form.php:155
582
- msgid "Number of backups to store on this server"
583
- msgstr ""
584
-
585
- #: admin/schedule-form.php:164
586
- msgid "Past this limit older backups will be deleted automatically."
587
- msgstr ""
588
-
589
- #: admin/schedule-form.php:167
590
- msgid "This schedule will store a maximum of %s of backups."
591
- msgstr ""
592
-
593
- #: admin/schedule-sentence.php:10
594
- msgid "Backups will be compressed and should be smaller than this."
595
- msgstr ""
596
-
597
- #: admin/schedule-sentence.php:10
598
- msgid "this shouldn't take long&hellip;"
599
- msgstr ""
600
-
601
- #: admin/schedule-sentence.php:10
602
- msgid "calculating the size of your backup&hellip;"
603
- msgstr ""
604
-
605
- #: admin/schedule-sentence.php:22
606
- msgid "The next backup will be on %1$s at %2$s %3$s"
607
- msgstr ""
608
-
609
- #: admin/schedule-sentence.php:29
610
- msgid "hourly on the hour"
611
- msgstr ""
612
-
613
- #: admin/schedule-sentence.php:29
614
- msgid "hourly at %s minutes past the hour"
615
- msgstr ""
616
-
617
- #: admin/schedule-sentence.php:35
618
- msgid "daily at %s"
619
- msgstr ""
620
-
621
- #: admin/schedule-sentence.php:46
622
- msgid "every 12 hours at %1$s &amp; %2$s"
623
- msgstr ""
624
-
625
- #: admin/schedule-sentence.php:52
626
- msgid "weekly on %1$s at %2$s"
627
- msgstr ""
628
-
629
- #: admin/schedule-sentence.php:58
630
- msgid "biweekly on %1$s at %2$s"
631
- msgstr ""
632
-
633
- #: admin/schedule-sentence.php:64
634
- msgid "on the %1$s of each month at %2$s"
635
- msgstr ""
636
-
637
- #: admin/schedule-sentence.php:70
638
- msgid "manually"
639
- msgstr ""
640
-
641
- #: admin/schedule-sentence.php:80
642
- msgid "this server"
643
- msgstr ""
644
-
645
- #: admin/schedule-sentence.php:88
646
- msgid "store the most recent backup in %s"
647
- msgstr ""
648
-
649
- #: admin/schedule-sentence.php:94
650
- msgid "don't store any backups in on this server"
651
- msgstr ""
652
-
653
- #: admin/schedule-sentence.php:100
654
- msgid "store the last %1$s backups in %2$s"
655
- msgstr ""
656
-
657
- #: admin/schedule-sentence.php:128
658
- msgid "Backup my %1$s %2$s %3$s, %4$s. "
659
- msgstr ""
660
-
661
- #: admin/schedule-sentence.php:131
662
- msgid "%s. "
663
- msgstr ""
664
-
665
- #: admin/schedule-sentence.php:135
666
- msgid "Send a copy of each backup to %s."
667
- msgstr ""
668
-
669
- #: admin/schedule-settings.php:5
670
- msgid "Run now"
671
- msgstr ""
672
-
673
- #: admin/schedule-settings.php:7
674
- msgid "Settings"
675
- msgstr ""
676
-
677
- #: admin/schedule-settings.php:11
678
- msgid "Excludes"
679
- msgstr ""
680
-
681
- #: admin/schedule-settings.php:23 functions/interface.php:35
682
- msgid "Delete"
683
- msgstr ""
684
-
685
- #: backdrop/server.php:6
686
- msgid "No key supplied"
687
- msgstr ""
688
-
689
- #: backdrop/server.php:11
690
- msgid "Supplied key was not valid"
691
- msgstr ""
692
-
693
- #: backdrop/task.php:22
694
- msgid "Task is already scheduled to run"
695
- msgstr ""
696
-
697
- #: backdrop/task.php:41
698
- msgid "Task is not scheduled to run"
699
- msgstr ""
700
-
701
- #: backupwordpress.php:132
702
- msgid "BackUpWordPress requires WordPress version %s or greater."
703
- msgstr ""
704
-
705
- #: backupwordpress.php:180
706
- msgid "Update"
707
- msgstr ""
708
-
709
- #: backupwordpress.php:181
710
- msgid "Cancel"
711
- msgstr ""
712
-
713
- #: backupwordpress.php:182
714
- msgid ""
715
- "Are you sure you want to delete this schedule? All of it's backups will "
716
- "also be deleted."
717
- msgstr ""
718
-
719
- #: backupwordpress.php:182 backupwordpress.php:183 backupwordpress.php:184
720
- #: backupwordpress.php:185
721
- msgid "'Cancel' to go back, 'OK' to delete."
722
- msgstr ""
723
-
724
- #: backupwordpress.php:183
725
- msgid "Are you sure you want to delete this backup?"
726
- msgstr ""
727
-
728
- #: backupwordpress.php:184
729
- msgid "Are you sure you want to remove this exclude rule?"
730
- msgstr ""
731
-
732
- #: backupwordpress.php:185
733
- msgid ""
734
- "Reducing the number of backups that are stored on this server will cause "
735
- "some of your existing backups to be deleted, are you sure that's what you "
736
- "want?"
737
- msgstr ""
738
-
739
- #: backupwordpress.php:310
740
- msgid "Server Info"
741
- msgstr ""
742
-
743
- #: classes/class-email.php:26
744
- msgid "Email notification"
745
- msgstr ""
746
-
747
- #: classes/class-email.php:32
748
- msgid ""
749
- "Receive a notification email when a backup completes, if the backup is "
750
- "small enough (&lt; %s) then it will be attached to the email. Separate "
751
- "multiple email addresses with a comma."
752
- msgstr ""
753
-
754
- #: classes/class-email.php:61
755
- msgid ""
756
- "The maximum filesize of your backup that will be attached to your "
757
- "notification emails . Defaults to %s."
758
- msgstr ""
759
-
760
- #: classes/class-email.php:80
761
- msgid "Send an email notification to %s"
762
- msgstr ""
763
-
764
- #: classes/class-email.php:115
765
- msgid "%s isn't a valid email"
766
- msgstr ""
767
-
768
- #: classes/class-email.php:175
769
- msgid "Backup of %s Failed"
770
- msgstr ""
771
-
772
- #: classes/class-email.php:177
773
- msgid "BackUpWordPress was unable to backup your site %1$s."
774
- msgstr ""
775
-
776
- #: classes/class-email.php:177
777
- msgid "Here are the errors that we're encountered:"
778
- msgstr ""
779
-
780
- #: classes/class-email.php:177
781
- msgid ""
782
- "If the errors above look like Martian, forward this email to %3$s and we'll "
783
- "take a look"
784
- msgstr ""
785
-
786
- #: classes/class-email.php:177
787
- msgid ""
788
- "Kind Regards,\n"
789
- "The Apologetic BackUpWordPress Backup Emailing Robot"
790
- msgstr ""
791
-
792
- #: classes/class-email.php:185
793
- msgid "Backup of %s"
794
- msgstr ""
795
-
796
- #: classes/class-email.php:190 classes/class-email.php:199
797
- msgid "BackUpWordPress has completed a backup of your site %1$s."
798
- msgstr ""
799
-
800
- #: classes/class-email.php:190
801
- msgid "The backup file should be attached to this email."
802
- msgstr ""
803
-
804
- #: classes/class-email.php:190 classes/class-email.php:199
805
- msgid "You can download the backup file by clicking the link below:"
806
- msgstr ""
807
-
808
- #: classes/class-email.php:190 classes/class-email.php:199
809
- msgid ""
810
- "Kind Regards,\n"
811
- "The Happy BackUpWordPress Backup Emailing Robot"
812
- msgstr ""
813
-
814
- #: classes/class-email.php:199
815
- msgid "Unfortunately the backup file was too large to attach to this email."
816
- msgstr ""
817
-
818
- #: classes/class-schedule.php:235
819
- msgid "Argument 1 for %s must be a valid integer"
820
- msgstr ""
821
-
822
- #: classes/class-schedule.php:589
823
- msgid "Argument 1 for %s must be a valid future timestamp"
824
- msgstr ""
825
-
826
- #: classes/class-schedule.php:626
827
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
828
- msgstr ""
829
-
830
- #: classes/class-schedule.php:754 functions/interface.php:214
831
- msgid "Starting Backup"
832
- msgstr ""
833
-
834
- #: classes/class-schedule.php:872
835
- msgid "Dumping Database %s"
836
- msgstr ""
837
-
838
- #: classes/class-schedule.php:877
839
- msgid "Verifying Database Dump %s"
840
- msgstr ""
841
-
842
- #: classes/class-schedule.php:882
843
- msgid "Creating zip archive %s"
844
- msgstr ""
845
-
846
- #: classes/class-schedule.php:887
847
- msgid "Verifying Zip Archive %s"
848
- msgstr ""
849
-
850
- #: classes/class-schedule.php:892
851
- msgid "Finishing Backup"
852
- msgstr ""
853
-
854
- #: classes/class-schedule.php:994
855
- msgid "Argument 1 for %s must be a non empty string"
856
- msgstr ""
857
-
858
- #: classes/class-schedule.php:998
859
- msgid "%s doesn't exist"
860
- msgstr ""
861
-
862
- #: classes/class-schedule.php:1002
863
- msgid "That backup wasn't created by this schedule"
864
- msgstr ""
865
-
866
- #: classes/class-services.php:273
867
- msgid "Argument 1 for %s must be a valid filepath"
868
- msgstr ""
869
-
870
- #: classes/class-services.php:288
871
- msgid "Argument 1 for %s must be a registered service"
872
- msgstr ""
873
-
874
- #: classes/class-services.php:305
875
- msgid "Argument 1 for %s must be a valid class"
876
- msgstr ""
877
-
878
- #: classes/wp-cli.php:43
879
- msgid "BackUpWordPress may not work when php is running with %s on"
880
- msgstr ""
881
-
882
- #: classes/wp-cli.php:46
883
- msgid "Backup: Dumping database..."
884
- msgstr ""
885
-
886
- #: classes/wp-cli.php:50
887
- msgid "Backup: Zipping everything up..."
888
- msgstr ""
889
-
890
- #: classes/wp-cli.php:65
891
- msgid "Invalid backup path"
892
- msgstr ""
893
-
894
- #: classes/wp-cli.php:70
895
- msgid "Invalid root path"
896
- msgstr ""
897
-
898
- #: classes/wp-cli.php:95
899
- msgid "Backup Complete: "
900
- msgstr ""
901
-
902
- #: classes/wp-cli.php:98
903
- msgid "Backup Failed"
904
- msgstr ""
905
-
906
- #: functions/core.php:247
907
- msgid "BackUpWordPress has setup your default schedules."
908
- msgstr ""
909
-
910
- #: functions/core.php:247
911
- msgid ""
912
- "By default BackUpWordPress performs a daily backup of your database and a "
913
- "weekly backup of your database &amp; files. You can modify these schedules."
914
- msgstr ""
915
-
916
- #: functions/core.php:264
917
- msgid "Once Hourly"
918
- msgstr ""
919
-
920
- #: functions/core.php:265
921
- msgid "Twice Daily"
922
- msgstr ""
923
-
924
- #: functions/core.php:266
925
- msgid "Once Daily"
926
- msgstr ""
927
-
928
- #: functions/core.php:267
929
- msgid "Once Weekly"
930
- msgstr ""
931
-
932
- #: functions/core.php:268
933
- msgid "Once Biweekly"
934
- msgstr ""
935
-
936
- #: functions/core.php:269
937
- msgid "Once Monthly"
938
- msgstr ""
939
-
940
- #: functions/core.php:287
941
- msgid "You can only delete directories inside your WordPress installation"
942
- msgstr ""
943
-
944
- #: functions/core.php:352
945
- msgid "This %s file ensures that other people cannot download your backup files."
946
- msgstr ""
947
-
948
- #: functions/interface.php:32
949
- msgid "Download"
950
- msgstr ""
951
-
952
- #: functions/interface.php:57 functions/interface.php:70
953
- msgid "BackUpWordPress is almost ready."
954
- msgstr ""
955
-
956
- #: functions/interface.php:57
957
- msgid ""
958
- "The backups directory can't be created because your %1$s directory isn't "
959
- "writable, run %2$s or %3$s or create the folder yourself."
960
- msgstr ""
961
-
962
- #: functions/interface.php:70
963
- msgid ""
964
- "Your backups directory isn't writable, run %1$s or %2$s or set the "
965
- "permissions yourself."
966
- msgstr ""
967
-
968
- #: functions/interface.php:81
969
- msgid ""
970
- "%1$s is running in %2$s, please contact your host and ask them to disable "
971
- "it. BackUpWordPress may not work correctly whilst %3$s is on."
972
- msgstr ""
973
-
974
- #: functions/interface.php:81
975
- msgid "http://php.net/manual/en/features.safe-mode.php"
976
- msgstr ""
977
-
978
- #: functions/interface.php:81
979
- msgid "Safe Mode"
980
- msgstr ""
981
-
982
- #: functions/interface.php:92
983
- msgid ""
984
- "Your custom backups directory %1$s doesn't exist and can't be created, your "
985
- "backups will be saved to %2$s instead."
986
- msgstr ""
987
-
988
- #: functions/interface.php:103
989
- msgid ""
990
- "Your custom backups directory %1$s isn't writable, new backups will be "
991
- "saved to %2$s instead."
992
- msgstr ""
993
-
994
- #: functions/interface.php:114
995
- msgid "BackUpWordPress detected issues with your last backup."
996
- msgstr ""
997
-
998
- #: functions/interface.php:127
999
- msgid "Your backup root path %s isn't readable."
1000
- msgstr ""
1001
-
1002
- #: functions/interface.php:187
1003
- msgid "Database and Files"
1004
- msgstr ""
1005
-
1006
- #: functions/interface.php:190
1007
- msgid "Files"
1008
- msgstr ""
1009
-
1010
- #: functions/interface.php:193
1011
- msgid "Database"
1012
- msgstr ""
1013
-
1014
- #: functions/interface.php:198
1015
- msgid "Legacy"
1016
- msgstr ""
1017
-
1018
- #: functions/interface.php:213
1019
- msgid "Started %s ago"
1020
- msgstr ""
1021
-
1022
- #: functions/interface.php:215
1023
- msgid "cancel"
1024
- msgstr ""
1025
-
1026
- #: functions/interface.php:261
1027
- msgid "% Backups Completed"
1028
- msgstr ""
1029
-
1030
- #: functions/interface.php:263
1031
- msgid "No Backups Completed"
1032
- msgstr ""
1033
-
1034
- #: functions/interface.php:265
1035
- msgid "1 Backup Completed"
1036
- msgstr ""
1037
-
1038
- #: functions/interface.php:273
1039
- msgid "Complete Hourly"
1040
- msgstr ""
1041
-
1042
- #: functions/interface.php:274
1043
- msgid "File Hourly"
1044
- msgstr ""
1045
-
1046
- #: functions/interface.php:275
1047
- msgid "Database Hourly"
1048
- msgstr ""
1049
-
1050
- #: functions/interface.php:276
1051
- msgid "Complete Twicedaily"
1052
- msgstr ""
1053
-
1054
- #: functions/interface.php:277
1055
- msgid "File Twicedaily"
1056
- msgstr ""
1057
-
1058
- #: functions/interface.php:278
1059
- msgid "Database Twicedaily"
1060
- msgstr ""
1061
-
1062
- #: functions/interface.php:279
1063
- msgid "Complete Daily"
1064
- msgstr ""
1065
-
1066
- #: functions/interface.php:280
1067
- msgid "File Daily"
1068
- msgstr ""
1069
-
1070
- #: functions/interface.php:281
1071
- msgid "Database Daily"
1072
- msgstr ""
1073
-
1074
- #: functions/interface.php:282
1075
- msgid "Complete Weekly"
1076
- msgstr ""
1077
-
1078
- #: functions/interface.php:283
1079
- msgid "File Weekly"
1080
- msgstr ""
1081
-
1082
- #: functions/interface.php:284
1083
- msgid "Database Weekly"
1084
- msgstr ""
1085
-
1086
- #: functions/interface.php:285
1087
- msgid "Complete Biweekly"
1088
- msgstr ""
1089
-
1090
- #: functions/interface.php:286
1091
- msgid "File Biweekly"
1092
- msgstr ""
1093
-
1094
- #: functions/interface.php:287
1095
- msgid "Database Biweekly"
1096
- msgstr ""
1097
-
1098
- #: functions/interface.php:288
1099
- msgid "Complete Monthly"
1100
- msgstr ""
1101
-
1102
- #: functions/interface.php:289
1103
- msgid "File Monthly"
1104
- msgstr ""
1105
-
1106
- #: functions/interface.php:290
1107
- msgid "Database Monthly"
1108
- msgstr ""
1109
-
1110
- #: functions/interface.php:291
1111
- msgid "Complete Manually"
1112
- msgstr ""
1113
-
1114
- #: functions/interface.php:292
1115
- msgid "File Manually"
1116
- msgstr ""
1117
-
1118
- #: functions/interface.php:293
1119
- msgid "Database Manually"
1120
- msgstr ""
1121
-
1122
- #: hm-backup/hm-backup.php:302
1123
- msgid "archive filename must be a non empty string"
1124
- msgstr ""
1125
-
1126
- #: hm-backup/hm-backup.php:305
1127
- msgid "invalid file extension for archive filename <code>%s</code>"
1128
- msgstr ""
1129
-
1130
- #: hm-backup/hm-backup.php:345
1131
- msgid "database dump filename must be a non empty string"
1132
- msgstr ""
1133
-
1134
- #: hm-backup/hm-backup.php:348
1135
- msgid "invalid file extension for database dump filename <code>%s</code>"
1136
- msgstr ""
1137
-
1138
- #: hm-backup/hm-backup.php:379
1139
- msgid "Invalid root path <code>%s</code> must be a valid directory path"
1140
- msgstr ""
1141
-
1142
- #: hm-backup/hm-backup.php:408
1143
- msgid "Invalid backup path <code>%s</code> must be a non empty (string)"
1144
- msgstr ""
1145
-
1146
- #: hm-backup/hm-backup.php:460
1147
- msgid ""
1148
- "Invalid backup type <code>%s</code> must be one of (string) file, database "
1149
- "or complete"
1150
- msgstr ""
1151
-
1152
- #. Plugin Name of the plugin/theme
1153
- msgid "BackUpWordPress"
1154
- msgstr ""
1155
-
1156
- #. Plugin URI of the plugin/theme
1157
- msgid "http://bwp.hmn.md/"
1158
- msgstr ""
1159
-
1160
- #. Description of the plugin/theme
1161
- msgid ""
1162
- "Simple automated backups of your WordPress powered website. Once activated "
1163
- "you'll find me under <strong>Tools &rarr; Backups</strong>."
1164
- msgstr ""
1165
-
1166
- #. Author of the plugin/theme
1167
- msgid "Human Made Limited"
1168
- msgstr ""
1169
-
1170
- #. Author URI of the plugin/theme
1171
- msgid "http://hmn.md/"
1172
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/hmbkp.pot CHANGED
@@ -1,10 +1,10 @@
1
  # Copyright (C) 2014 Human Made Limited
2
- # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: BackUpWordPress 3.0\n"
6
  "Report-Msgid-Bugs-To: support@humanmade.co.uk\n"
7
- "POT-Creation-Date: 2014-11-14 11:37:15+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -61,39 +61,39 @@ msgstr ""
61
  msgid "Max backups must be greater than 0"
62
  msgstr ""
63
 
64
- #: admin/actions.php:582
65
  msgid ""
66
  "Your backup completed but with the following errors / warnings, it's "
67
  "probably ok to ignore these."
68
  msgstr ""
69
 
70
- #: admin/actions.php:586
71
  msgid "Your backup failed"
72
  msgstr ""
73
 
74
- #: admin/actions.php:590
75
  msgid "Here's the response from the server:"
76
  msgstr ""
77
 
78
- #: admin/actions.php:594
79
  msgid "You can email details of this error to %s so they can look into the issue."
80
  msgstr ""
81
 
82
- #: admin/actions.php:596
83
  msgid "Close"
84
  msgstr ""
85
 
86
- #: admin/actions.php:597
87
  msgid "Email to Support"
88
  msgstr ""
89
 
90
- #: admin/actions.php:705 admin/actions.php:711 functions/interface.php:81
91
  #: functions/interface.php:92 functions/interface.php:103
92
  #: functions/interface.php:127
93
  msgid "BackUpWordPress has detected a problem."
94
  msgstr ""
95
 
96
- #: admin/actions.php:705 admin/actions.php:711
97
  msgid ""
98
  "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
99
  "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
@@ -698,45 +698,45 @@ msgstr ""
698
  msgid "Task is not scheduled to run"
699
  msgstr ""
700
 
701
- #: backupwordpress.php:136
702
  msgid "BackUpWordPress requires WordPress version %s or greater."
703
  msgstr ""
704
 
705
- #: backupwordpress.php:184
706
  msgid "Update"
707
  msgstr ""
708
 
709
- #: backupwordpress.php:185
710
  msgid "Cancel"
711
  msgstr ""
712
 
713
- #: backupwordpress.php:186
714
  msgid ""
715
  "Are you sure you want to delete this schedule? All of it's backups will "
716
  "also be deleted."
717
  msgstr ""
718
 
719
- #: backupwordpress.php:186 backupwordpress.php:187 backupwordpress.php:188
720
- #: backupwordpress.php:189
721
  msgid "'Cancel' to go back, 'OK' to delete."
722
  msgstr ""
723
 
724
- #: backupwordpress.php:187
725
  msgid "Are you sure you want to delete this backup?"
726
  msgstr ""
727
 
728
- #: backupwordpress.php:188
729
  msgid "Are you sure you want to remove this exclude rule?"
730
  msgstr ""
731
 
732
- #: backupwordpress.php:189
733
  msgid ""
734
  "Reducing the number of backups that are stored on this server will cause "
735
  "some of your existing backups to be deleted, are you sure that's what you "
736
  "want?"
737
  msgstr ""
738
 
739
- #: backupwordpress.php:314
740
  msgid "Server Info"
741
  msgstr ""
742
 
@@ -819,47 +819,47 @@ msgstr ""
819
  msgid "Argument 1 for %s must be a valid integer"
820
  msgstr ""
821
 
822
- #: classes/class-schedule.php:573
823
  msgid "Argument 1 for %s must be a valid future timestamp"
824
  msgstr ""
825
 
826
- #: classes/class-schedule.php:610
827
  msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
828
  msgstr ""
829
 
830
- #: classes/class-schedule.php:738 functions/interface.php:214
831
  msgid "Starting Backup"
832
  msgstr ""
833
 
834
- #: classes/class-schedule.php:856
835
  msgid "Dumping Database %s"
836
  msgstr ""
837
 
838
- #: classes/class-schedule.php:861
839
  msgid "Verifying Database Dump %s"
840
  msgstr ""
841
 
842
- #: classes/class-schedule.php:866
843
  msgid "Creating zip archive %s"
844
  msgstr ""
845
 
846
- #: classes/class-schedule.php:871
847
  msgid "Verifying Zip Archive %s"
848
  msgstr ""
849
 
850
- #: classes/class-schedule.php:876
851
  msgid "Finishing Backup"
852
  msgstr ""
853
 
854
- #: classes/class-schedule.php:978
855
  msgid "Argument 1 for %s must be a non empty string"
856
  msgstr ""
857
 
858
- #: classes/class-schedule.php:982
859
  msgid "%s doesn't exist"
860
  msgstr ""
861
 
862
- #: classes/class-schedule.php:986
863
  msgid "That backup wasn't created by this schedule"
864
  msgstr ""
865
 
1
  # Copyright (C) 2014 Human Made Limited
2
+ # This file is distributed under the same license as the BackUpWordPress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: BackUpWordPress 3.0-beta\n"
6
  "Report-Msgid-Bugs-To: support@humanmade.co.uk\n"
7
+ "POT-Creation-Date: 2014-10-15 19:32:59+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
61
  msgid "Max backups must be greater than 0"
62
  msgstr ""
63
 
64
+ #: admin/actions.php:594
65
  msgid ""
66
  "Your backup completed but with the following errors / warnings, it's "
67
  "probably ok to ignore these."
68
  msgstr ""
69
 
70
+ #: admin/actions.php:598
71
  msgid "Your backup failed"
72
  msgstr ""
73
 
74
+ #: admin/actions.php:602
75
  msgid "Here's the response from the server:"
76
  msgstr ""
77
 
78
+ #: admin/actions.php:606
79
  msgid "You can email details of this error to %s so they can look into the issue."
80
  msgstr ""
81
 
82
+ #: admin/actions.php:608
83
  msgid "Close"
84
  msgstr ""
85
 
86
+ #: admin/actions.php:609
87
  msgid "Email to Support"
88
  msgstr ""
89
 
90
+ #: admin/actions.php:717 admin/actions.php:723 functions/interface.php:81
91
  #: functions/interface.php:92 functions/interface.php:103
92
  #: functions/interface.php:127
93
  msgid "BackUpWordPress has detected a problem."
94
  msgstr ""
95
 
96
+ #: admin/actions.php:717 admin/actions.php:723
97
  msgid ""
98
  "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
99
  "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
698
  msgid "Task is not scheduled to run"
699
  msgstr ""
700
 
701
+ #: backupwordpress.php:132
702
  msgid "BackUpWordPress requires WordPress version %s or greater."
703
  msgstr ""
704
 
705
+ #: backupwordpress.php:180
706
  msgid "Update"
707
  msgstr ""
708
 
709
+ #: backupwordpress.php:181
710
  msgid "Cancel"
711
  msgstr ""
712
 
713
+ #: backupwordpress.php:182
714
  msgid ""
715
  "Are you sure you want to delete this schedule? All of it's backups will "
716
  "also be deleted."
717
  msgstr ""
718
 
719
+ #: backupwordpress.php:182 backupwordpress.php:183 backupwordpress.php:184
720
+ #: backupwordpress.php:185
721
  msgid "'Cancel' to go back, 'OK' to delete."
722
  msgstr ""
723
 
724
+ #: backupwordpress.php:183
725
  msgid "Are you sure you want to delete this backup?"
726
  msgstr ""
727
 
728
+ #: backupwordpress.php:184
729
  msgid "Are you sure you want to remove this exclude rule?"
730
  msgstr ""
731
 
732
+ #: backupwordpress.php:185
733
  msgid ""
734
  "Reducing the number of backups that are stored on this server will cause "
735
  "some of your existing backups to be deleted, are you sure that's what you "
736
  "want?"
737
  msgstr ""
738
 
739
+ #: backupwordpress.php:310
740
  msgid "Server Info"
741
  msgstr ""
742
 
819
  msgid "Argument 1 for %s must be a valid integer"
820
  msgstr ""
821
 
822
+ #: classes/class-schedule.php:589
823
  msgid "Argument 1 for %s must be a valid future timestamp"
824
  msgstr ""
825
 
826
+ #: classes/class-schedule.php:626
827
  msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
828
  msgstr ""
829
 
830
+ #: classes/class-schedule.php:754 functions/interface.php:214
831
  msgid "Starting Backup"
832
  msgstr ""
833
 
834
+ #: classes/class-schedule.php:872
835
  msgid "Dumping Database %s"
836
  msgstr ""
837
 
838
+ #: classes/class-schedule.php:877
839
  msgid "Verifying Database Dump %s"
840
  msgstr ""
841
 
842
+ #: classes/class-schedule.php:882
843
  msgid "Creating zip archive %s"
844
  msgstr ""
845
 
846
+ #: classes/class-schedule.php:887
847
  msgid "Verifying Zip Archive %s"
848
  msgstr ""
849
 
850
+ #: classes/class-schedule.php:892
851
  msgid "Finishing Backup"
852
  msgstr ""
853
 
854
+ #: classes/class-schedule.php:994
855
  msgid "Argument 1 for %s must be a non empty string"
856
  msgstr ""
857
 
858
+ #: classes/class-schedule.php:998
859
  msgid "%s doesn't exist"
860
  msgstr ""
861
 
862
+ #: classes/class-schedule.php:1002
863
  msgid "That backup wasn't created by this schedule"
864
  msgstr ""
865
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: humanmade, willmot, pauldewouters, joehoyle, mattheu, tcrsavage, c
3
  Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
4
  Requires at least: 3.8.4
5
  Tested up to: 4.1
6
- Stable tag: 3.0.1
7
 
8
  Simple automated backups of your WordPress powered website.
9
 
@@ -11,6 +11,8 @@ Simple automated backups of your WordPress powered website.
11
 
12
  [BackUpWordPress](https://bwp.hmn.md/?utm_source=wordpress-org&utm_medium=plugin-page&utm_campaign=freeplugin) will back up your entire site including your database and all your files on a schedule that suits you. Try it now to see how easy it is!
13
 
 
 
14
  = Features =
15
 
16
  * Super simple to use, no setup required.
@@ -116,10 +118,63 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
116
 
117
  == Upgrade Notice ==
118
 
 
 
 
 
 
 
119
  * This is a critical update. Fixes a bug in the core backup library. Please update immediately.
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  #### 3.0.1 / 2014-11-20
124
 
125
  * remove uneeded images
@@ -180,8 +235,6 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
180
  * Remove unneeded code
181
  * New line at end
182
  * Use admin_post hook
183
- * Merge pull request #502 from humanmade/stream-integration
184
- * Merge pull request #554 from humanmade/fix-display-schedule-time
185
  * Display schedule start time in local timezone
186
  * Add an action hook that gives access to consumers to the backup progress
187
  * Update translatable strings POT file
3
  Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
4
  Requires at least: 3.8.4
5
  Tested up to: 4.1
6
+ Stable tag: 3.0.2
7
 
8
  Simple automated backups of your WordPress powered website.
9
 
11
 
12
  [BackUpWordPress](https://bwp.hmn.md/?utm_source=wordpress-org&utm_medium=plugin-page&utm_campaign=freeplugin) will back up your entire site including your database and all your files on a schedule that suits you. Try it now to see how easy it is!
13
 
14
+ This plugin requires PHP version 5.3.2 or later
15
+
16
  = Features =
17
 
18
  * Super simple to use, no setup required.
118
 
119
  == Upgrade Notice ==
120
 
121
+ = 3.0.2 =
122
+
123
+ * 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
124
+
125
+ = 3.0.1 =
126
+
127
  * This is a critical update. Fixes a bug in the core backup library. Please update immediately.
128
 
129
  == Changelog ==
130
 
131
+ #### 3.0.2 / 2014-12-02
132
+
133
+ * Bump version
134
+ * Add parenthesis to require_once
135
+ * Remove disk space info
136
+ * Attempt to fix build
137
+ * define WP_TESTS_DIR
138
+ * Make sure current_action fnction is loaded
139
+ * Remove extra slashes and semicolons
140
+ * Remove the custom webhook service
141
+ * Better default WP_TESTS_DIR
142
+ * move trailingslash calls out of the loop for performance
143
+ * Minor code cleanup
144
+ * Correct path for hm-backup so it's tests are run
145
+ * add composer.lock
146
+ * Use scrutinizer code coverage
147
+ * add waffle.io badge
148
+ * Use up to date commands for coverage
149
+ * Add code rating
150
+ * Don't test 5.2
151
+ * Update readme.md
152
+ * excluded_dirs is deprecated
153
+ * Update scrutinizer config
154
+ * Add composer config and dev dependencies
155
+ * Make PHPUnit generate an XML for coveralls
156
+ * Add scrutinizer config
157
+ * Ignore vendor dir
158
+ * Add a link to Help page
159
+ * Move to activation hook
160
+ * Bump up required WP version
161
+ * Escape all the things
162
+ * Save errors to a notices option
163
+ * Reload page on errors
164
+ * Remove script
165
+ * Remove unneeded class
166
+ * Check PHP version on plugins loaded
167
+ * Check PHP version on activate
168
+ * Update readme
169
+ * Set required version to 5.3.2
170
+ * Update tests
171
+ * Allow for a 30 second delta in asserting schedule time
172
+ * Use the new build env on Travis
173
+ * Restrict plugin to be network only
174
+ * Fix admin URL logic
175
+ * Formatting
176
+ * Update readme changelog
177
+
178
  #### 3.0.1 / 2014-11-20
179
 
180
  * remove uneeded images
235
  * Remove unneeded code
236
  * New line at end
237
  * Use admin_post hook
 
 
238
  * Display schedule start time in local timezone
239
  * Add an action hook that gives access to consumers to the backup progress
240
  * Update translatable strings POT file