BackUpWordPress - Version 1.0.4

Version Description

Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

admin.page.php CHANGED
@@ -64,26 +64,35 @@
64
 
65
  <h4><?php _e( 'Compatibility', 'hmbkp' ); ?></h4>
66
 
67
- <?php if ( !hmbkp_zip_path() || !hmbkp_mysqldump_path() ) : ?>
68
  <p><?php _e( 'You can increase the speed and reliability of your backups by resolving the items below. Your backups will still work fine if you don\'t.', 'hmnkp' ); ?></p>
69
  <?php endif; ?>
70
 
71
- <?php if ( !hmbkp_zip_path() ) : ?>
 
 
72
 
73
- <p>&#10007; <?php printf( __( 'We couldn\'t find the %s command on your server.', 'hmbkp' ), '<code>zip</code>' ); ?></p>
74
 
75
- <p><?php printf( __( 'You can fix this by adding %s to your %s file. run %s on your server to find the path or ask your server administrator.', 'hmbkp' ), '<code>' . define( 'HMBKP_ZIP_PATH', __( 'path to the zip command', 'hmbkp' ) ) . '</code>', '<code>wp-config.php</code>', '<code>which zip</code>' ); ?></p>
76
 
77
- <?php else : ?>
 
 
 
78
  <p>&#10003; <?php printf( __( 'Your files are being backed up using the %s command.', 'hmbkp' ), '<code>' . hmbkp_zip_path() . '</code>' ); ?></p>
79
 
80
- <?php endif; ?>
81
 
82
- <?php if ( !hmbkp_mysqldump_path() ) : ?>
83
  <p>&#10007; <?php printf( __( 'We couldn\'t find the %s command on your server.', 'hmbkp' ), '<code>mysqldump</code>' ); ?></p>
84
- <p><?php printf( __( 'You can fix this by adding %s to your %s file. run %s on your server to find the path or ask your server administrator.', 'hmbkp' ), '<code>' . define( 'HMBKP_MYSQLDUMP_PATH', __( 'path to the mysqldump command' ) ) . '</code>', '<code>wp-config.php</code>', '<code>which mysqldump</code>' ); ?></p>
85
- <?php else : ?>
 
86
  <p>&#10003; <?php printf( __( 'Your database is being backed up using the %s command.', 'hmbkp' ), '<code>' . hmbkp_mysqldump_path() . '</code>' ); ?></p>
 
 
 
87
  <?php endif; ?>
88
 
89
  <?php if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) :
64
 
65
  <h4><?php _e( 'Compatibility', 'hmbkp' ); ?></h4>
66
 
67
+ <?php if ( !hmbkp_zip_path() || !hmbkp_mysqldump_path() || !hmbkp_shell_exec_available() ) : ?>
68
  <p><?php _e( 'You can increase the speed and reliability of your backups by resolving the items below. Your backups will still work fine if you don\'t.', 'hmnkp' ); ?></p>
69
  <?php endif; ?>
70
 
71
+ <?php if ( !hmbkp_shell_exec_available() ) : ?>
72
+ <p>&#10007; <?php printf( __( '%s is disabled which means we have to use the slower PHP fallbacks, you could try contacting yout host and asking them to enable it.', 'hmbkp' ), '<code>shell_exec</code>' ); ?>
73
+ <?php endif; ?>
74
 
75
+ <?php if ( hmbkp_shell_exec_available() ) : ?>
76
 
77
+ <?php if ( !hmbkp_zip_path() ) : ?>
78
 
79
+ <p>&#10007; <?php printf( __( 'We couldn\'t find the %s command on your server.', 'hmbkp' ), '<code>zip</code>' ); ?></p>
80
+ <p><?php printf( __( 'You can fix this by adding %s to your %s file. run %s on your server to find the path or ask your server administrator.', 'hmbkp' ), '<code>define( "HMBKP_ZIP_PATH", ' . __( 'path to the zip command', 'hmbkp' ) . ' )</code>', '<code>wp-config.php</code>', '<code>which zip</code>' ); ?></p>
81
+
82
+ <?php else : ?>
83
  <p>&#10003; <?php printf( __( 'Your files are being backed up using the %s command.', 'hmbkp' ), '<code>' . hmbkp_zip_path() . '</code>' ); ?></p>
84
 
85
+ <?php endif; ?>
86
 
87
+ <?php if ( !hmbkp_mysqldump_path() ) : ?>
88
  <p>&#10007; <?php printf( __( 'We couldn\'t find the %s command on your server.', 'hmbkp' ), '<code>mysqldump</code>' ); ?></p>
89
+ <p><?php printf( __( 'You can fix this by adding %s to your %s file. run %s on your server to find the path or ask your server administrator.', 'hmbkp' ), '<code>define( "HMBKP_MYSQLDUMP_PATH", ' . __( 'path to the mysqldump command' ) . ' )</code>', '<code>wp-config.php</code>', '<code>which mysqldump</code>' ); ?></p>
90
+
91
+ <?php else : ?>
92
  <p>&#10003; <?php printf( __( 'Your database is being backed up using the %s command.', 'hmbkp' ), '<code>' . hmbkp_mysqldump_path() . '</code>' ); ?></p>
93
+
94
+ <?php endif; ?>
95
+
96
  <?php endif; ?>
97
 
98
  <?php if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) :
functions/backup.files.functions.php CHANGED
@@ -113,6 +113,9 @@ function hmbkp_archive_files( $backup_tmp_dir, $backup_filepath ) {
113
  */
114
  function hmbkp_zip_path() {
115
 
 
 
 
116
  $path = '';
117
 
118
  // List of possible zip locations
113
  */
114
  function hmbkp_zip_path() {
115
 
116
+ if ( !hmbkp_shell_exec_available() )
117
+ return false;
118
+
119
  $path = '';
120
 
121
  // List of possible zip locations
functions/backup.mysql.functions.php CHANGED
@@ -40,6 +40,9 @@ function hmbkp_backup_mysql( $backup_tmp_dir, $log ) {
40
  */
41
  function hmbkp_mysqldump_path() {
42
 
 
 
 
43
  $path = '';
44
 
45
  // List of possible mysqldump locations
40
  */
41
  function hmbkp_mysqldump_path() {
42
 
43
+ if ( !hmbkp_shell_exec_available() )
44
+ return false;
45
+
46
  $path = '';
47
 
48
  // List of possible mysqldump locations
functions/core.functions.php CHANGED
@@ -6,6 +6,7 @@
6
  * @return void
7
  */
8
  function hmbkp_activate() {
 
9
  hmbkp_set_defaults();
10
  }
11
 
@@ -348,4 +349,20 @@ function hmbkp_calculate() {
348
 
349
  return hmbkp_size_readable( $filesize );
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  }
6
  * @return void
7
  */
8
  function hmbkp_activate() {
9
+
10
  hmbkp_set_defaults();
11
  }
12
 
349
 
350
  return hmbkp_size_readable( $filesize );
351
 
352
+ }
353
+
354
+ /**
355
+ * Check whether shell_exec has been disabled.
356
+ *
357
+ * @return bool
358
+ */
359
+ function hmbkp_shell_exec_available() {
360
+
361
+ $disable_functions = ini_get( 'disable_functions' );
362
+
363
+ if ( strpos( $disable_functions, 'shell_exec' ) !== false )
364
+ return false;
365
+
366
+ return true;
367
+
368
  }
plugin.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: BackUpWordPress
5
  Plugin URI: http://humanmade.co.uk/
6
  Description: Simple automated backups of your WordPress powered website.
7
  Author: Human Made Limited
8
- Version: 1.0.3
9
  Author URI: http://humanmade.co.uk/
10
  */
11
 
5
  Plugin URI: http://humanmade.co.uk/
6
  Description: Simple automated backups of your WordPress powered website.
7
  Author: Human Made Limited
8
+ Version: 1.0.4
9
  Author URI: http://humanmade.co.uk/
10
  */
11
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: willmot, humanmade
3
  Tags: back up, backup, backups
4
  Requires at least: 3.0
5
  Tested up to: 3.1
6
- Stable tag: 1.0.3
7
 
8
  Simple automated backups of your WordPress powered website.
9
 
@@ -17,7 +17,7 @@ BackUpWordPress will back up your entire site including your database and all yo
17
 
18
  The plugin will try to use the `mysqldump` and `zip` commands via shell if they are available, using these will greatly improve the time it takes to back up your site. You can point the plugin in the right direction by defining `HMBKP_ZIP_PATH` and `HMBKP_MYSQLDUMP_PATH` in your `wp-config.php`.
19
 
20
- == FAQ ==
21
 
22
  Contact hello@humanmade.co.uk for help and support
23
 
@@ -27,11 +27,15 @@ Contact hello@humanmade.co.uk for help and support
27
 
28
  == Changelog ==
29
 
 
 
 
 
30
  #### 1.0.3
31
 
32
  Minor bug fix release.
33
 
34
- * Suppress `filesize()` warnings when calculating backup size.
35
  * Plugin should now work when symlinked.
36
  * Remove all options on deactivate, you should now be able to deactivate then activate to fix issues with settings etc. becoming corrupt.
37
  * Call setup_defaults for users who update from backupwordpress 0.4.5 so they get new settings.
3
  Tags: back up, backup, backups
4
  Requires at least: 3.0
5
  Tested up to: 3.1
6
+ Stable tag: 1.0.4
7
 
8
  Simple automated backups of your WordPress powered website.
9
 
17
 
18
  The plugin will try to use the `mysqldump` and `zip` commands via shell if they are available, using these will greatly improve the time it takes to back up your site. You can point the plugin in the right direction by defining `HMBKP_ZIP_PATH` and `HMBKP_MYSQLDUMP_PATH` in your `wp-config.php`.
19
 
20
+ == Frequently Asked Questions ==
21
 
22
  Contact hello@humanmade.co.uk for help and support
23
 
27
 
28
  == Changelog ==
29
 
30
+ #### 1.0.4
31
+
32
+ Don't throw PHP Warnings when `shell_exec` is disabled
33
+
34
  #### 1.0.3
35
 
36
  Minor bug fix release.
37
 
38
+ * Suppress filesize() warnings when calculating backup size.
39
  * Plugin should now work when symlinked.
40
  * Remove all options on deactivate, you should now be able to deactivate then activate to fix issues with settings etc. becoming corrupt.
41
  * Call setup_defaults for users who update from backupwordpress 0.4.5 so they get new settings.