Changeset 3420248
- Timestamp:
- 12/15/2025 02:48:26 PM (3 months ago)
- Location:
- wp-database-backup/trunk
- Files:
-
- 4 added
- 10 edited
-
changelog.txt (modified) (1 diff)
-
includes/admin/Destination/CloudDrive/class-wpdatabasebackupcd.php (modified) (1 diff)
-
includes/admin/Destination/GenericS3 (added)
-
includes/admin/Destination/GenericS3/class-wpdatabasebackupgenerics3.php (added)
-
includes/admin/Destination/GenericS3/generics3-form.php (added)
-
includes/admin/Destination/GenericS3/index.php (added)
-
includes/admin/Destination/Local/local-form.php (modified) (1 diff)
-
includes/admin/Destination/wp-backup-destination-upload-action.php (modified) (1 diff)
-
includes/admin/Destination/wp-backup-destination.php (modified) (1 diff)
-
includes/admin/class-wpdb-admin.php (modified) (4 diffs)
-
includes/admin/cron-create-full-backup-incremental.php (modified) (2 diffs)
-
includes/admin/cron-create-full-backup.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
wp-database-backup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-database-backup/trunk/changelog.txt
r3333631 r3420248 1 = 7.8 = 2 * 15-12-2025 3 * New: Support for Generic S3 API connections #48 4 * Improvement: Make includes absolute/relative #111 5 * Improvement: Performance improvements #131 6 * Fix: Setting 'Local Backup Path' has no effect #132 7 * Improvement: Tested upto Wordpress 6.9 8 1 9 = 7.7 = 2 10 * 24-07-2025 -
wp-database-backup/trunk/includes/admin/Destination/CloudDrive/class-wpdatabasebackupcd.php
r3290514 r3420248 58 58 return array('success' => false, 'message' => esc_html__('Failed to read file: ', 'wpdbbkp') . $file_path); 59 59 } 60 // Normalize path by stripping absolute WP root (both backslash and slash styles) 60 61 $root_path_1 = ABSPATH; 61 62 $root_path_2 = str_replace('\\', '/', ABSPATH); 62 $file_path = str_replace(array($root_path ,$root_path_1), array('',''), $file_path);63 $file_path = str_replace(array($root_path_1, $root_path_2), array('', ''), $file_path); 63 64 $file_path = ltrim($file_path, '/'); // Ensure there is no leading slash 64 65 -
wp-database-backup/trunk/includes/admin/Destination/Local/local-form.php
r3142223 r3420248 34 34 $ischecked = ( isset( $wp_db_local_backup ) && 1 === (int) $wp_db_local_backup ) ? 'checked' : ''; 35 35 echo '<div class="row form-group"> 36 <label class="col-sm-2" for="wp_db_local_backup _path">'.esc_html__('Enable Local Backup','wpdbbkp').'</label>36 <label class="col-sm-2" for="wp_db_local_backup">'.esc_html__('Enable Local Backup','wpdbbkp').'</label> 37 37 <div class="col-sm-6"> 38 <input type="checkbox" ' . esc_attr( $ischecked ) . ' id="wp_db_local_backup _path" name="wp_db_local_backup">38 <input type="checkbox" ' . esc_attr( $ischecked ) . ' id="wp_db_local_backup" name="wp_db_local_backup"> 39 39 </div> 40 40 </div>'; 41 echo '<div class="row form-group"><label class="col-sm-2" for="wp_db_ backup_email_id">'.esc_html__('Local Backup Path','wpdbbkp').'</label>';42 echo '<div class="col-sm-6"><input type="text" id="wp_db_ backup_email_id" class="form-control" name="wp_db_local_backup_path" value="' . esc_url( $wp_db_local_backup_path ) . '" placeholder="'.esc_attr__('Directory Path','wpdbbkp').'"></div>';41 echo '<div class="row form-group"><label class="col-sm-2" for="wp_db_local_backup_path">'.esc_html__('Local Backup Path','wpdbbkp').'</label>'; 42 echo '<div class="col-sm-6"><input type="text" id="wp_db_local_backup_path" class="form-control" name="wp_db_local_backup_path" value="' . esc_attr( $wp_db_local_backup_path ) . '" placeholder="'.esc_attr__('Directory Path','wpdbbkp').'"></div>'; 43 43 echo '<div class="col-sm-4">'.esc_html__('Leave blank if you don\'t want use this feature or Disable Local Backup','wpdbbkp').'</div></div>'; 44 44 echo '<div class="row form-group">'; -
wp-database-backup/trunk/includes/admin/Destination/wp-backup-destination-upload-action.php
r3142223 r3420248 17 17 require plugin_dir_path( __FILE__ ) . '/Google/class-wpdbbackupgoogle.php'; 18 18 require plugin_dir_path( __FILE__ ) . '/S3/class-wpdatabasebackups3.php'; 19 require plugin_dir_path( __FILE__ ) . '/GenericS3/class-wpdatabasebackupgenerics3.php'; 19 20 require plugin_dir_path( __FILE__ ) . '/Dropbox/class-wpdbbackupdropbox.php'; 20 21 require plugin_dir_path( __FILE__ ) . '/CloudDrive/class-wpdatabasebackupcd.php'; -
wp-database-backup/trunk/includes/admin/Destination/wp-backup-destination.php
r3142223 r3420248 17 17 require plugin_dir_path( __FILE__ ) . '/Google/google-form.php'; 18 18 require plugin_dir_path( __FILE__ ) . '/S3/s3-form.php'; 19 require plugin_dir_path( __FILE__ ) . '/GenericS3/generics3-form.php'; 19 20 require plugin_dir_path( __FILE__ ) . '/Dropbox/dropbox-form.php'; 20 21 require plugin_dir_path( __FILE__ ) . '/Backblaze/bb-form.php'; -
wp-database-backup/trunk/includes/admin/class-wpdb-admin.php
r3333631 r3420248 800 800 'DropBox' => 'glyphicon glyphicon-inbox', 801 801 'Backblaze' => 'glyphicon glyphicon-cloud-upload', 802 'CloudDrive' => 'glyphicon glyphicon-cloud-upload' 802 'CloudDrive' => 'glyphicon glyphicon-cloud-upload', 803 'GenericS3' => 'glyphicon glyphicon-cloud-upload' 803 804 ); 804 805 if(!empty($options) && is_array($options)){ … … 837 838 if ( ! empty( $option['destination'] ) ) { 838 839 $destination = ( explode( ',', $option['destination'] ) ); 839 if (!empty($destination) && is_array($destination)){840 if ( ! empty( $destination ) && is_array( $destination ) ) { 840 841 foreach ( $destination as $dest ) { 841 842 $key = trim( $dest ); 842 if ( ! empty( $dest ) && array_key_exists( $key, $destination_icon) ) {843 echo '<span class="' . esc_attr( $destination_icon[ $key ] ) . '" title="' . esc_attr( $dest ) . '"></span> ';843 if ( empty( $key ) ) { 844 continue; 844 845 } 846 // Icon 847 if ( array_key_exists( $key, $destination_icon ) ) { 848 echo '<span class="' . esc_attr( $destination_icon[ $key ] ) . '" title="' . esc_attr( $key ) . '"></span> '; 849 } 850 // Do not add any text label; icon-only for all destinations 845 851 } 846 852 } 847 848 853 } 849 854 echo '</td>'; … … 2970 2975 do_action_ref_array( 'wp_db_backup_completed', array( &$args ) ); 2971 2976 2977 // Ensure enabled destinations are reflected in the saved Destination string for table display 2978 $destination_for_table = $args[4]; 2979 if ( get_option( 'wp_db_backup_destination_generics3' ) == 1 ) { 2980 $destination_for_table .= 'GenericS3, '; 2981 } 2982 if ( get_option( 'wp_db_backup_destination_bb' ) == 1 ) { 2983 $destination_for_table .= 'Backblaze, '; 2984 } 2985 if ( get_option( 'wp_db_backup_destination_s3' ) == 1 ) { 2986 $destination_for_table .= 'S3, '; 2987 } 2988 if ( get_option( 'wp_db_backup_destination_SFTP' ) == 1 ) { 2989 $destination_for_table .= 'SFTP, '; 2990 } 2991 if ( get_option( 'wp_db_backup_destination_FTP' ) == 1 ) { 2992 $destination_for_table .= 'FTP, '; 2993 } 2994 if ( get_option( 'wp_db_backup_destination_Email' ) == 1 ) { 2995 $destination_for_table .= 'Email, '; 2996 } 2997 2972 2998 $options[] = array( 2973 2999 'date' => time(), … … 2980 3006 'size' => $details['size'], 2981 3007 'type' =>'database', 2982 'destination' => $ args[4]3008 'destination' => $destination_for_table 2983 3009 ); 2984 3010 if ( 1 !== (int) $wp_db_remove_local_backup ) { -
wp-database-backup/trunk/includes/admin/cron-create-full-backup-incremental.php
r3333631 r3420248 519 519 WPDatabaseBackupBB::wp_db_backup_completed( $tmp_args ); 520 520 WPDatabaseBackupCD::wp_db_backup_completed( $tmp_args ); 521 WPDatabaseBackupGenericS3::wp_db_backup_completed( $tmp_args ); 521 522 522 523 wp_delete_file( $sql_filename ); … … 854 855 $Destination .= 'Backblaze,'; 855 856 } 857 $destination_generics3 = get_option( 'wp_db_backup_destination_generics3' ); 858 if ( $destination_generics3 == 1 ) { 859 $Destination .= 'GenericS3,'; 860 } 856 861 $options[] = array( 857 862 'date' => time(), -
wp-database-backup/trunk/includes/admin/cron-create-full-backup.php
r3333631 r3420248 887 887 888 888 $Destination.="Local, "; 889 // Append enabled remote destinations so the table shows correct icons 890 if ( get_option( 'wp_db_backup_destination_generics3' ) == 1 ) { 891 $Destination .= 'GenericS3, '; 892 } 893 if ( get_option( 'wp_db_backup_destination_bb' ) == 1 ) { 894 $Destination .= 'Backblaze, '; 895 } 896 if ( get_option( 'wp_db_backup_destination_s3' ) == 1 ) { 897 $Destination .= 'S3, '; 898 } 899 if ( get_option( 'wp_db_backup_destination_SFTP' ) == 1 ) { 900 $Destination .= 'SFTP, '; 901 } 902 if ( get_option( 'wp_db_backup_destination_FTP' ) == 1 ) { 903 $Destination .= 'FTP, '; 904 } 905 if ( get_option( 'wp_db_backup_destination_Email' ) == 1 ) { 906 $Destination .= 'Email, '; 907 } 889 908 $path_info = wp_upload_dir(); 890 909 $filesize = @filesize($path_info['basedir'] . '/' . WPDB_BACKUPS_DIR . '/' . $details['filename']); … … 909 928 WPDBBackupDropbox::wp_db_backup_completed($args2); 910 929 WPDatabaseBackupS3::wp_db_backup_completed($args2); 930 WPDatabaseBackupGenericS3::wp_db_backup_completed($args2); 911 931 WPDBBackupSFTP::wp_db_backup_completed($args2); 912 932 WPDatabaseBackupBB::wp_db_backup_completed($args2); -
wp-database-backup/trunk/readme.txt
r3371060 r3420248 5 5 Tags: Database backup, backup, cloud backup, files backup, wordpress backup. 6 6 Requires at least: 3.1+ 7 Tested up to: 6. 87 Tested up to: 6.9 8 8 Requires PHP: 5.6.20 9 Stable tag: 7. 79 Stable tag: 7.8 10 10 11 11 Create & Restore Database Backup easily on single click. Manual or automated backups (backup to Dropbox, Google drive, Amazon s3,FTP,Email). … … 78 78 79 79 == Changelog == 80 = 7.8 = 81 * 15-12-2025 82 * New: Support for Generic S3 API connections #48 83 * Improvement: Make includes absolute/relative #111 84 * Improvement: Performance improvements #131 85 * Fix: Setting 'Local Backup Path' has no effect #132 86 * Test: Tested upto Wordpress 6.9 87 80 88 = 7.7 = 81 89 * 24-07-2025 … … 186 194 * Fixed: Dropbox says "Not Configured" but its connected and authenticated. #51 187 195 * Added: Data anonymous on the clone website for the GDPR integration. #20 188 189 = 6.4 =190 * 03-07-2023191 * Fixed: The backup progress bar gets stuck while creating the backup #53192 * Fixed: A Fatal error appears after clicking on "Create New Database backup" #52193 196 194 197 Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/wp-database-backup/trunk/changelog.txt) -
wp-database-backup/trunk/wp-database-backup.php
r3333631 r3420248 4 4 * Plugin URI: https://wordpress.org/plugins/wp-database-backup 5 5 * Description: This plugin helps you to create/restore Unlimited WordPress Database & Files backup. 6 * Version: 7. 76 * Version: 7.8 7 7 * Author: Backup for WP 8 8 * Author URI: https://backupforwp.com/ … … 48 48 * @var string 49 49 */ 50 public $version = '7. 7';50 public $version = '7.8'; 51 51 52 52 /** … … 108 108 } 109 109 110 /** 111 * Include Requred files and lib. 112 */ 113 private function includes() 114 { 115 include_once 'includes/admin/mb-helper-functions.php'; 116 include_once 'includes/admin/class-wpdb-admin.php'; 117 include_once 'includes/admin/Destination/wp-backup-destination-upload-action.php'; 118 include_once 'includes/class-wpdbbackuplog.php'; 119 include_once 'includes/admin/filter.php'; 120 include_once 'includes/admin/class-wpdbbkp-newsletter.php'; 121 include_once 'includes/features.php'; 122 $wp_db_incremental_backup = get_option('wp_db_incremental_backup'); 123 $wpdb_clouddrive_cd = get_option('wpdb_clouddrive_token', false); 124 $wp_db_backup_destination_bb = get_option('wp_db_backup_destination_bb', false); 125 if (($wp_db_incremental_backup == 1 && $wp_db_backup_destination_bb ==1 )|| ($wpdb_clouddrive_cd && !empty($wpdb_clouddrive_cd))) { 126 include_once 'includes/admin/cron-create-full-backup-incremental.php'; 127 } else { 128 include_once 'includes/admin/cron-create-full-backup.php'; 129 } 130 include_once 'includes/class-wpdbfullbackuplog.php'; 131 132 } 110 /** 111 * Include Requred files and lib. 112 */ 113 private function includes() 114 { 115 // Ensure WPDB_PATH is defined - if not, define it now 116 if ( ! defined( 'WPDB_PATH' ) ) { 117 define( 'WPDB_PATH', plugin_dir_path( __FILE__ ) ); 118 } 119 120 // Use plugin_dir_path directly to ensure we always have a valid absolute path 121 // This prevents issues if WPDB_PATH constant is empty or not set correctly 122 $plugin_path = plugin_dir_path( __FILE__ ); 123 124 $admin_path = $plugin_path . 'includes/admin/'; 125 $includes_path = $plugin_path . 'includes/'; 126 127 if ( file_exists( $admin_path . 'mb-helper-functions.php' ) ) { 128 include_once $admin_path . 'mb-helper-functions.php'; 129 } 130 if ( file_exists( $admin_path . 'class-wpdb-admin.php' ) ) { 131 include_once $admin_path . 'class-wpdb-admin.php'; 132 } 133 if ( file_exists( $admin_path . 'Destination/wp-backup-destination-upload-action.php' ) ) { 134 include_once $admin_path . 'Destination/wp-backup-destination-upload-action.php'; 135 } 136 if ( file_exists( $includes_path . 'class-wpdbbackuplog.php' ) ) { 137 include_once $includes_path . 'class-wpdbbackuplog.php'; 138 } 139 if ( file_exists( $admin_path . 'filter.php' ) ) { 140 include_once $admin_path . 'filter.php'; 141 } 142 if ( file_exists( $admin_path . 'class-wpdbbkp-newsletter.php' ) ) { 143 include_once $admin_path . 'class-wpdbbkp-newsletter.php'; 144 } 145 if ( file_exists( $includes_path . 'features.php' ) ) { 146 include_once $includes_path . 'features.php'; 147 } 148 $wp_db_incremental_backup = get_option('wp_db_incremental_backup'); 149 $wpdb_clouddrive_cd = get_option('wpdb_clouddrive_token', false); 150 $wp_db_backup_destination_bb = get_option('wp_db_backup_destination_bb', false); 151 if (($wp_db_incremental_backup == 1 && $wp_db_backup_destination_bb ==1 )|| ($wpdb_clouddrive_cd && !empty($wpdb_clouddrive_cd))) { 152 if ( file_exists( $admin_path . 'cron-create-full-backup-incremental.php' ) ) { 153 include_once $admin_path . 'cron-create-full-backup-incremental.php'; 154 } 155 } else { 156 if ( file_exists( $admin_path . 'cron-create-full-backup.php' ) ) { 157 include_once $admin_path . 'cron-create-full-backup.php'; 158 } 159 } 160 if ( file_exists( $includes_path . 'class-wpdbfullbackuplog.php' ) ) { 161 include_once $includes_path . 'class-wpdbfullbackuplog.php'; 162 } 163 164 } 133 165 /** 134 166 * Installation setting at time of activation.
Note: See TracChangeset
for help on using the changeset viewer.