← All changes
|
includes/admin/Destination/S3/class-wpdatabasebackups3.php
+4
-4
6.10
→
7.4
View file →
| @@ -24,9 +24,9 @@ | ||
| 24 | 24 | * @param array $args - backup details. |
| 25 | 25 | */ |
| 26 | 26 | public static function wp_db_backup_completed( &$args ) { |
| 27 | 27 | $destination_s3 = get_option( 'wp_db_backup_destination_s3' ); |
| 28 | - if ( isset( $destination_s3 ) && 1 === $destination_s3 && get_option( 'wpdb_dest_amazon_s3_bucket' ) && get_option( 'wpdb_dest_amazon_s3_bucket_key' ) && get_option( 'wpdb_dest_amazon_s3_bucket_secret' ) ) { | |
| 28 | + if ( isset( $destination_s3 ) && 1 == $destination_s3 && get_option( 'wpdb_dest_amazon_s3_bucket' ) && get_option( 'wpdb_dest_amazon_s3_bucket_key' ) && get_option( 'wpdb_dest_amazon_s3_bucket_secret' ) ) { | |
| 29 | 29 | update_option('wpdbbkp_backupcron_current','Processing Amazon S3 Backup', false); |
| 30 | 30 | try { |
| 31 | 31 | if ( ! class_exists( 'S3' ) ) { |
| 32 | 32 | require_once 'S3.php'; |
| @@ -49,14 +49,14 @@ | ||
| 49 | 49 | $result = $s3->listBuckets(); |
| 50 | 50 | if ( get_option( 'wpdb_dest_amazon_s3_bucket' ) ) { |
| 51 | 51 | if ( true === in_array( get_option( 'wpdb_dest_amazon_s3_bucket' ), $result ) ) { // phpcs:ignore |
| 52 | 52 | if ( $s3->putObjectFile( $args[1], $bucket_name, baseName( $args[1] ), S3::ACL_PUBLIC_READ ) ) { |
| 53 | - $args[2] = $args[2] . '<br> Upload Database Backup on s3 bucket ' . $bucket_name; | |
| 53 | + $args[2] = $args[2] . '<br> '.esc_html__('Upload Database Backup on s3 bucket','wpdbbkp') . $bucket_name; | |
| 54 | 54 | } else { |
| 55 | - $args[2] = $args[2] . '<br>Failed to upload Database Backup on s3 bucket ' . $bucket_name; | |
| 55 | + $args[2] = $args[2] . '<br>'.esc_html__('Failed to upload Database Backup on s3 bucket','wpdbbkp') . $bucket_name; | |
| 56 | 56 | } |
| 57 | 57 | } else { |
| 58 | - $args[2] = $args[2] . '<br>Invalid bucket name or AWS details'; | |
| 58 | + $args[2] = $args[2] . '<br>'.esc_html__('Invalid bucket name or AWS details','wpdbbkp'); | |
| 59 | 59 | $args[4] = $args[4] .= 'S3, '; |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } catch ( Exception $e ) { |