Plugin Directory

Changeset 3158127


Ignore:
Timestamp:
09/26/2024 10:33:41 AM (17 months ago)
Author:
databasebackup
Message:

7.3

  • 26-09-2024
  • Improvement: DB Incremental Backup improvements.
  • Fix: Promo Notification dismiss issue #103
Location:
wp-database-backup/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-database-backup/trunk/changelog.txt

    r3155186 r3158127  
     1= 7.3 =
     2* 26-09-2024
     3* Improvement: DB Incremental Backup improvements.
     4* Fix: Promo Notification dismiss issue #103
     5
    16= 7.2 =
    27* 20-09-2024
  • wp-database-backup/trunk/includes/admin/class-wpdb-admin.php

    r3155186 r3158127  
    3939        add_action( 'admin_notices', array($this, 'check_ziparchive_avalable_admin_notice' ));
    4040        add_action( 'admin_notices', array($this, 'wpdbbkp_cloudbackup_notice' ) );
     41        add_action( 'wp_ajax_wpdbbkp_cloudbackup_dismiss_notice', array($this, 'wpdbbkp_cloudbackup_dismiss_notice' ) );
    4142       
    4243    }
     
    33663367
    33673368        public function wpdbbkp_cloudbackup_notice(){
     3369            $user_id = get_current_user_id();
    33683370            $wpdbbkp_cloudbackup_notice = get_option( 'wpdb_clouddrive_token', false );
    3369             if( ! $wpdbbkp_cloudbackup_notice ){
     3371
     3372            if( $wpdbbkp_cloudbackup_notice ){
     3373                return;
     3374            }
     3375            if ( ! current_user_can( 'manage_options' ) ) {
     3376                return;
     3377            }
     3378
     3379            if ( get_user_meta( $user_id, 'wpdbbkp_cloudbackup_notice_dismissed', true ) ) {
     3380                return;
     3381            }
     3382
     3383            $nonce = wp_create_nonce( 'wpdbbkp_cloudbackup_notice_dismissed' )
    33703384                ?>
    3371                 <div class="notice notice-info is-dismissible">
     3385                <div class="notice notice-info is-dismissible" id="wpdbbkp_cloudbackup_dismiss">
    33723386                    <p><?php echo esc_html__('Take a free 14-day trial of BackupforWP Cloud Backup.', 'wpdbbkp').'<a href="'.esc_url('https://backupforwp.com/register?from=plugin_notice').'" target="_blank">'.esc_html__('Get Started in 2 Minutes.', 'wpdbbkp'). '</a>';?></p>
    33733387                </div>
     3388                <script type="text/javascript">
     3389                    jQuery(document).ready(function($) {
     3390                        // Handle dismiss action
     3391                        $(document).on('click', '#wpdbbkp_cloudbackup_dismiss .notice-dismiss', function() {
     3392                            var ajaxurl = "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>";
     3393                            $.post(ajaxurl, {
     3394                                action: 'wpdbbkp_cloudbackup_dismiss_notice',
     3395                                nonce: '<?php echo esc_js( $nonce ); ?>'
     3396                            });
     3397                        });
     3398                    });
     3399                    </script>
    33743400                <?php
    3375             }
     3401        }
     3402        public function wpdbbkp_cloudbackup_dismiss_notice() {
     3403           
     3404
     3405            if ( ! current_user_can( 'manage_options' ) ) {
     3406                wp_die( esc_html__( 'Permission denied', 'wpdbbkp' ), '', [ 'response' => 403 ] );
     3407            }
     3408       
     3409            // Verify the nonce
     3410            if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'wpdbbkp_cloudbackup_notice_dismissed' ) ) {
     3411                wp_die( esc_html__( 'Invalid nonce', 'wpdbbkp' ), '', [ 'response' => 403 ] );
     3412            }
     3413
     3414            $user_id = get_current_user_id();
     3415            update_user_meta( $user_id, 'wpdbbkp_cloudbackup_notice_dismissed', 1 );
     3416            wp_die();
    33763417        }
    33773418
  • wp-database-backup/trunk/includes/admin/cron-create-full-backup-incremental.php

    r3155186 r3158127  
    473473                    while ( $offset < $check_count ) {
    474474                        $sub_result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$table}` LIMIT %d OFFSET %d", $sub_limit, $offset ), ARRAY_A );
     475
     476                        if ( false === $sub_result ) {
     477                            $logMessage .= "\nFailed to fetch data from table: $table";
     478                            break;
     479                        }
     480
    475481                        if ( $sub_result ) {
    476482                            $output = wpdbbkp_create_sql_insert_statements( $table, $sub_result );
     
    480486                                break;
    481487                            }
    482                             $output = ''; // Clear output to free memory
     488                            $output = '';
     489                            $sub_result ='';
    483490
    484491                            $offset += $sub_limit;
     
    497504                        sleep( 1 ); // Optional sleep to reduce server load
    498505                    }
    499 
    500                     wpdbbkp_write_file_contents( $progressFile, json_encode( array(
    501                         'FileName'  => $FileName,
    502                         'logFile'   => $logFile,
    503                         'tableName' => $table,
    504                         'offset'    => 0,
    505                         'tables'    => $tables,
    506                         'progress'  => $progress
    507                     ) ) );
     506                    $args['offset'] = 0;
    508507                }
    509508                $wpdb->flush();
  • wp-database-backup/trunk/readme.txt

    r3155186 r3158127  
    77Tested up to: 6.6
    88Requires PHP: 5.6.20
    9 Stable tag: 7.2
     9Stable tag: 7.3
    1010
    1111Create & Restore Database Backup easily on single click. Manual or automated backups (backup to Dropbox, Google drive, Amazon s3,FTP,Email).
     
    7979== Changelog ==
    8080
     81= 7.3 =
     82* 26-09-2024
     83* Improvement: DB Incremental Backup improvements.
     84* Fix: Promo Notification dismiss issue #103
     85
    8186= 7.2 =
    8287* 20-09-2024
  • wp-database-backup/trunk/wp-database-backup.php

    r3155186 r3158127  
    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.2
     6 * Version: 7.3
    77 * Author: Backup for WP
    88 * Author URI: https://backupforwp.com/
     
    3939     * @class WPDatabaseBackup
    4040     *
    41      * @version 7.1
     41     * @version 7.3
    4242     */
    4343    final class WPDatabaseBackup {
     
    4848         * @var string
    4949         */
    50         public $version = '7.2';
     50        public $version = '7.3';
    5151
    5252        /**
Note: See TracChangeset for help on using the changeset viewer.