Changeset 3158127
- Timestamp:
- 09/26/2024 10:33:41 AM (17 months ago)
- Location:
- wp-database-backup/trunk
- Files:
-
- 5 edited
-
changelog.txt (modified) (1 diff)
-
includes/admin/class-wpdb-admin.php (modified) (2 diffs)
-
includes/admin/cron-create-full-backup-incremental.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
wp-database-backup.php (modified) (3 diffs)
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 1 6 = 7.2 = 2 7 * 20-09-2024 -
wp-database-backup/trunk/includes/admin/class-wpdb-admin.php
r3155186 r3158127 39 39 add_action( 'admin_notices', array($this, 'check_ziparchive_avalable_admin_notice' )); 40 40 add_action( 'admin_notices', array($this, 'wpdbbkp_cloudbackup_notice' ) ); 41 add_action( 'wp_ajax_wpdbbkp_cloudbackup_dismiss_notice', array($this, 'wpdbbkp_cloudbackup_dismiss_notice' ) ); 41 42 42 43 } … … 3366 3367 3367 3368 public function wpdbbkp_cloudbackup_notice(){ 3369 $user_id = get_current_user_id(); 3368 3370 $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' ) 3370 3384 ?> 3371 <div class="notice notice-info is-dismissible" >3385 <div class="notice notice-info is-dismissible" id="wpdbbkp_cloudbackup_dismiss"> 3372 3386 <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> 3373 3387 </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> 3374 3400 <?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(); 3376 3417 } 3377 3418 -
wp-database-backup/trunk/includes/admin/cron-create-full-backup-incremental.php
r3155186 r3158127 473 473 while ( $offset < $check_count ) { 474 474 $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 475 481 if ( $sub_result ) { 476 482 $output = wpdbbkp_create_sql_insert_statements( $table, $sub_result ); … … 480 486 break; 481 487 } 482 $output = ''; // Clear output to free memory 488 $output = ''; 489 $sub_result =''; 483 490 484 491 $offset += $sub_limit; … … 497 504 sleep( 1 ); // Optional sleep to reduce server load 498 505 } 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; 508 507 } 509 508 $wpdb->flush(); -
wp-database-backup/trunk/readme.txt
r3155186 r3158127 7 7 Tested up to: 6.6 8 8 Requires PHP: 5.6.20 9 Stable tag: 7. 29 Stable tag: 7.3 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). … … 79 79 == Changelog == 80 80 81 = 7.3 = 82 * 26-09-2024 83 * Improvement: DB Incremental Backup improvements. 84 * Fix: Promo Notification dismiss issue #103 85 81 86 = 7.2 = 82 87 * 20-09-2024 -
wp-database-backup/trunk/wp-database-backup.php
r3155186 r3158127 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. 26 * Version: 7.3 7 7 * Author: Backup for WP 8 8 * Author URI: https://backupforwp.com/ … … 39 39 * @class WPDatabaseBackup 40 40 * 41 * @version 7. 141 * @version 7.3 42 42 */ 43 43 final class WPDatabaseBackup { … … 48 48 * @var string 49 49 */ 50 public $version = '7. 2';50 public $version = '7.3'; 51 51 52 52 /**
Note: See TracChangeset
for help on using the changeset viewer.