Skip to content

Commit f58dcdb

Browse files
committed
Version 3.2.1
1 parent e9d62f5 commit f58dcdb

File tree

68 files changed

+2091
-41172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2091
-41172
lines changed

assets/css/backwpup.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@
167167
padding: 15px;
168168
position: relative;
169169
}
170+
#backwpup-page .backwpup-floated-postbox h3 a {
171+
font-size: 14px;
172+
text-decoration: none;
173+
font-weight: 600;
174+
}
170175
#backwpup-page .backwpup-cleared-postbox {
171176
clear: both;
172177
margin: 25px 0 0;

assets/css/backwpup.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backwpup.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: WordPress Backup Plugin
66
* Author: Inpsyde GmbH
77
* Author URI: http://inpsyde.com
8-
* Version: 3.2.0
8+
* Version: 3.2.1
99
* Text Domain: backwpup
1010
* Domain Path: /languages/
1111
* Network: true
@@ -240,25 +240,16 @@ private function autoloader( $class ) {
240240

241241
/**
242242
* Load Plugin Translation
243+
*
244+
* @return bool Text domain loaded
243245
*/
244246
public static function load_text_domain() {
245247

246-
$domain = 'backwpup';
247-
248-
if ( is_textdomain_loaded( $domain ) ) {
249-
return;
250-
}
251-
252-
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
253-
$mofile = $domain . '-' . $locale . '.mo';
254-
255-
// load translation from WordPress plugins language folder
256-
if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
257-
return;
248+
if ( is_textdomain_loaded( 'backwpup' ) ) {
249+
return TRUE;
258250
}
259251

260-
// load translation from plugin folder
261-
load_textdomain( $domain, dirname( __FILE__ ) . '/languages/' . $mofile );
252+
return load_plugin_textdomain( 'backwpup', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
262253
}
263254

264255
/**

inc/class-create-archive.php

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -326,49 +326,41 @@ public function add_file( $file_name, $name_in_archive = '' ) {
326326
return TRUE;
327327
}
328328
}
329-
if ( version_compare( PHP_VERSION, '5.3.3', '>=') ) { //php > 5.3.3
330-
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
329+
//close and reopen, all added files are open on fs
330+
if ( $this->file_count > 20 ) { //35 works with PHP 5.2.4 on win
331+
if ( ! $this->ziparchive->close() ) {
331332
$this->ziparchive_status();
332-
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
333+
trigger_error(__( 'ZIP archive cannot be closed correctly', 'backwpup' ), E_USER_ERROR );
334+
sleep( 1 );
335+
}
336+
$this->ziparchive = NULL;
337+
if ( ! $this->check_archive_filesize() ) {
333338
return FALSE;
334339
}
335-
} else { //php < 5.3
336-
//close and reopen, all added files are open on fs
337-
if ( $this->file_count > 20 ) { //35 works with PHP 5.2.4 on win
338-
if ( ! $this->ziparchive->close() ) {
339-
$this->ziparchive_status();
340-
trigger_error(__( 'ZIP archive cannot be closed correctly', 'backwpup' ), E_USER_ERROR );
341-
sleep( 1 );
342-
}
343-
$this->ziparchive = NULL;
344-
if ( ! $this->check_archive_filesize() ) {
345-
return FALSE;
346-
}
347-
$this->ziparchive = new ZipArchive();
348-
$ziparchive_open = $this->ziparchive->open( $this->file, ZipArchive::CREATE );
349-
if ( $ziparchive_open !== TRUE ) {
350-
$this->ziparchive_status();
351-
return FALSE;
352-
}
353-
$this->file_count = 0;
340+
$this->ziparchive = new ZipArchive();
341+
$ziparchive_open = $this->ziparchive->open( $this->file, ZipArchive::CREATE );
342+
if ( $ziparchive_open !== TRUE ) {
343+
$this->ziparchive_status();
344+
return FALSE;
354345
}
355-
if ( $file_size < ( 1024 * 1024 * 2 ) ) {
356-
if ( ! $this->ziparchive->addFromString( $name_in_archive, file_get_contents( $file_name ) ) ) {
357-
$this->ziparchive_status();
358-
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
359-
return FALSE;
360-
} else {
361-
$file_factor = round( $file_size / ( 1024 * 1024 ), 4 ) * 2;
362-
$this->file_count = $this->file_count + $file_factor;
363-
}
346+
$this->file_count = 0;
347+
}
348+
if ( $file_size < ( 1024 * 1024 * 2 ) ) {
349+
if ( ! $this->ziparchive->addFromString( $name_in_archive, file_get_contents( $file_name ) ) ) {
350+
$this->ziparchive_status();
351+
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
352+
return FALSE;
353+
} else {
354+
$file_factor = round( $file_size / ( 1024 * 1024 ), 4 ) * 2;
355+
$this->file_count = $this->file_count + $file_factor;
356+
}
357+
} else {
358+
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
359+
$this->ziparchive_status();
360+
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
361+
return FALSE;
364362
} else {
365-
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
366-
$this->ziparchive_status();
367-
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
368-
return FALSE;
369-
} else {
370-
$this->file_count++;
371-
}
363+
$this->file_count++;
372364
}
373365
}
374366
break;

inc/class-destination-dropbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function file_download( $jobid, $get_file ) {
210210
* @return mixed
211211
*/
212212
public function file_get_list( $jobdest ) {
213-
return get_site_transient( 'BackWPup_' . $jobdest );
213+
return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
214214
}
215215

216216
/**

inc/class-destination-s3-v1.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ public function edit_tab( $jobid ) {
175175
<th scope="row"><label for="ids3storageclass"><?php _e( 'Amazon: Storage Class', 'backwpup' ); ?></label></th>
176176
<td>
177177
<select name="s3storageclass" id="ids3storageclass" title="<?php _e( 'Amazon: Storage Class', 'backwpup' ); ?>">
178-
<option value="" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'none', 'backwpup' ); ?></option>
178+
<option value="" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Standard', 'backwpup' ); ?></option>
179+
<option value="STANDARD_IA" <?php selected( 'STANDARD_IA', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Standard-Infrequent Access', 'backwpup' ); ?></option>
179180
<option value="REDUCED_REDUNDANCY" <?php selected( 'REDUCED_REDUNDANCY', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Reduced Redundancy', 'backwpup' ); ?></option>
180-
</select>
181+
</select>
181182
</td>
182183
</tr>
183184
<tr>

0 commit comments

Comments
 (0)