Plugin Directory

Changeset 3420248


Ignore:
Timestamp:
12/15/2025 02:48:26 PM (3 months ago)
Author:
databasebackup
Message:

7.8

  • 15-12-2025
  • New: Support for Generic S3 API connections #48
  • Improvement: Make includes absolute/relative #111
  • Improvement: Performance improvements #131
  • Fix: Setting 'Local Backup Path' has no effect #132
  • Improvement: Tested upto Wordpress 6.9
Location:
wp-database-backup/trunk
Files:
4 added
10 edited

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
    19= 7.7 =
    210* 24-07-2025
  • wp-database-backup/trunk/includes/admin/Destination/CloudDrive/class-wpdatabasebackupcd.php

    r3290514 r3420248  
    5858        return array('success' => false, 'message' => esc_html__('Failed to read file: ', 'wpdbbkp') . $file_path);
    5959    }
     60    // Normalize path by stripping absolute WP root (both backslash and slash styles)
    6061    $root_path_1 = ABSPATH;
    6162    $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);
    6364    $file_path = ltrim($file_path, '/'); // Ensure there is no leading slash
    6465
  • wp-database-backup/trunk/includes/admin/Destination/Local/local-form.php

    r3142223 r3420248  
    3434                            $ischecked = ( isset( $wp_db_local_backup ) && 1 === (int) $wp_db_local_backup ) ? 'checked' : '';
    3535                            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>
    3737                                <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">
    3939                                </div>
    4040                            </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>';
    4343                            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>';
    4444                            echo '<div class="row form-group">';
  • wp-database-backup/trunk/includes/admin/Destination/wp-backup-destination-upload-action.php

    r3142223 r3420248  
    1717    require plugin_dir_path( __FILE__ ) . '/Google/class-wpdbbackupgoogle.php';
    1818    require plugin_dir_path( __FILE__ ) . '/S3/class-wpdatabasebackups3.php';
     19    require plugin_dir_path( __FILE__ ) . '/GenericS3/class-wpdatabasebackupgenerics3.php';
    1920    require plugin_dir_path( __FILE__ ) . '/Dropbox/class-wpdbbackupdropbox.php';
    2021    require plugin_dir_path( __FILE__ ) . '/CloudDrive/class-wpdatabasebackupcd.php';
  • wp-database-backup/trunk/includes/admin/Destination/wp-backup-destination.php

    r3142223 r3420248  
    1717    require plugin_dir_path( __FILE__ ) . '/Google/google-form.php';
    1818    require plugin_dir_path( __FILE__ ) . '/S3/s3-form.php';
     19    require plugin_dir_path( __FILE__ ) . '/GenericS3/generics3-form.php';
    1920    require plugin_dir_path( __FILE__ ) . '/Dropbox/dropbox-form.php';
    2021    require plugin_dir_path( __FILE__ ) . '/Backblaze/bb-form.php';
  • wp-database-backup/trunk/includes/admin/class-wpdb-admin.php

    r3333631 r3420248  
    800800                            'DropBox'    => 'glyphicon glyphicon-inbox',
    801801                            'Backblaze'  => 'glyphicon glyphicon-cloud-upload',
    802                             'CloudDrive'  => 'glyphicon glyphicon-cloud-upload'
     802                            'CloudDrive'  => 'glyphicon glyphicon-cloud-upload',
     803                            'GenericS3'  => 'glyphicon glyphicon-cloud-upload'
    803804                        );
    804805                        if(!empty($options) && is_array($options)){
     
    837838                                if ( ! empty( $option['destination'] ) ) {
    838839                                    $destination = ( explode( ',', $option['destination'] ) );
    839                                     if(!empty($destination) && is_array($destination)){
     840                                    if ( ! empty( $destination ) && is_array( $destination ) ) {
    840841                                        foreach ( $destination as $dest ) {
    841842                                            $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;
    844845                                            }
     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
    845851                                        }
    846852                                    }
    847                                    
    848853                                }
    849854                                echo '</td>';
     
    29702975        do_action_ref_array( 'wp_db_backup_completed', array( &$args ) );
    29712976       
     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
    29722998        $options[]                 = array(
    29732999            'date'           => time(),
     
    29803006            'size'           => $details['size'],
    29813007            'type'           =>'database',
    2982             'destination'    => $args[4]
     3008            'destination'    => $destination_for_table
    29833009        );
    29843010        if ( 1 !== (int) $wp_db_remove_local_backup ) {
  • wp-database-backup/trunk/includes/admin/cron-create-full-backup-incremental.php

    r3333631 r3420248  
    519519                WPDatabaseBackupBB::wp_db_backup_completed( $tmp_args );
    520520                WPDatabaseBackupCD::wp_db_backup_completed( $tmp_args );
     521                WPDatabaseBackupGenericS3::wp_db_backup_completed( $tmp_args );
    521522
    522523                wp_delete_file( $sql_filename );
     
    854855                $Destination .= 'Backblaze,';
    855856            }
     857            $destination_generics3 = get_option( 'wp_db_backup_destination_generics3' );
     858            if ( $destination_generics3 == 1 ) {
     859                $Destination .= 'GenericS3,';
     860            }
    856861            $options[] = array(
    857862                'date' => time(),
  • wp-database-backup/trunk/includes/admin/cron-create-full-backup.php

    r3333631 r3420248  
    887887
    888888            $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        }
    889908            $path_info = wp_upload_dir();
    890909            $filesize = @filesize($path_info['basedir'] . '/' . WPDB_BACKUPS_DIR . '/' . $details['filename']);
     
    909928            WPDBBackupDropbox::wp_db_backup_completed($args2);
    910929            WPDatabaseBackupS3::wp_db_backup_completed($args2);
     930            WPDatabaseBackupGenericS3::wp_db_backup_completed($args2);
    911931            WPDBBackupSFTP::wp_db_backup_completed($args2);
    912932            WPDatabaseBackupBB::wp_db_backup_completed($args2);
  • wp-database-backup/trunk/readme.txt

    r3371060 r3420248  
    55Tags: Database backup, backup, cloud backup, files backup, wordpress backup.
    66Requires at least: 3.1+
    7 Tested up to: 6.8
     7Tested up to: 6.9
    88Requires PHP: 5.6.20
    9 Stable tag: 7.7
     9Stable tag: 7.8
    1010
    1111Create & Restore Database Backup easily on single click. Manual or automated backups (backup to Dropbox, Google drive, Amazon s3,FTP,Email).
     
    7878
    7979== 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
    8088= 7.7 =
    8189* 24-07-2025
     
    186194* Fixed: Dropbox says "Not Configured" but its connected and authenticated. #51
    187195* Added: Data anonymous on the clone website for the GDPR integration. #20
    188 
    189 = 6.4 =
    190 * 03-07-2023
    191 * Fixed: The backup progress bar gets stuck while creating the backup #53
    192 * Fixed: A Fatal error appears after clicking on "Create New Database backup" #52
    193196
    194197Full 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  
    44 * Plugin URI: https://wordpress.org/plugins/wp-database-backup
    55 * Description: This plugin helps you to create/restore Unlimited  WordPress Database & Files backup.
    6  * Version: 7.7
     6 * Version: 7.8
    77 * Author: Backup for WP
    88 * Author URI: https://backupforwp.com/
     
    4848         * @var string
    4949         */
    50         public $version = '7.7';
     50        public $version = '7.8';
    5151
    5252        /**
     
    108108        }
    109109
    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    }
    133165        /**
    134166         * Installation setting at time of activation.
Note: See TracChangeset for help on using the changeset viewer.