| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: WP Database Backup - Unlimited Database & Files Backup by Backup for WP |
| 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.10 | |
| 6 | + * Version: 7.4 | |
| 7 | 7 | * Author: Backup for WP |
| 8 | 8 | * Author URI: https://backupforwp.com/ |
| 9 | 9 | * Text Domain: wpdbbkp |
| 10 | 10 | * Domain Path: /lang |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | * Main WPDatabaseBackup Class. |
| 38 | 38 | * |
| 39 | 39 | * @class WPDatabaseBackup |
| 40 | 40 | * |
| 41 | - * @version 7.10 | |
| 41 | + * @version 7.3 | |
| 42 | 42 | */ |
| 43 | 43 | final class WPDatabaseBackup { |
| 44 | 44 | |
| 45 | 45 | /** |
| @@ -46,9 +46,9 @@ | ||
| 46 | 46 | * Plugin version |
| 47 | 47 | * |
| 48 | 48 | * @var string |
| 49 | 49 | */ |
| 50 | - public $version = '7.10'; | |
| 50 | + public $version = '7.4'; | |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Plugin instance |
| 54 | 54 | * |
| @@ -106,63 +106,31 @@ | ||
| 106 | 106 | define( 'WPDB_BACKUPS_DIR','db-backup'); |
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
| 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'; | |
| 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'; | |
| 154 | 129 | } |
| 155 | - } else { | |
| 156 | - if ( file_exists( $admin_path . 'cron-create-full-backup.php' ) ) { | |
| 157 | - include_once $admin_path . 'cron-create-full-backup.php'; | |
| 158 | - } | |
| 130 | + include_once 'includes/class-wpdbfullbackuplog.php'; | |
| 131 | + | |
| 159 | 132 | } |
| 160 | - if ( file_exists( $includes_path . 'class-wpdbfullbackuplog.php' ) ) { | |
| 161 | - include_once $includes_path . 'class-wpdbfullbackuplog.php'; | |
| 162 | - } | |
| 163 | - | |
| 164 | - } | |
| 165 | 133 | /** |
| 166 | 134 | * Installation setting at time of activation. |
| 167 | 135 | */ |
| 168 | 136 | public function installation($flag=1) { |