Skip to content

Commit

Permalink
Version 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuesken committed Oct 7, 2015
1 parent e9d62f5 commit f58dcdb
Show file tree
Hide file tree
Showing 68 changed files with 2,091 additions and 41,172 deletions.
5 changes: 5 additions & 0 deletions assets/css/backwpup.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@
padding: 15px;
position: relative;
}
#backwpup-page .backwpup-floated-postbox h3 a {
font-size: 14px;
text-decoration: none;
font-weight: 600;
}
#backwpup-page .backwpup-cleared-postbox {
clear: both;
margin: 25px 0 0;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/backwpup.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 6 additions & 15 deletions backwpup.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: WordPress Backup Plugin
* Author: Inpsyde GmbH
* Author URI: http://inpsyde.com
* Version: 3.2.0
* Version: 3.2.1
* Text Domain: backwpup
* Domain Path: /languages/
* Network: true
Expand Down Expand Up @@ -240,25 +240,16 @@ private function autoloader( $class ) {

/**
* Load Plugin Translation
*
* @return bool Text domain loaded
*/
public static function load_text_domain() {

$domain = 'backwpup';

if ( is_textdomain_loaded( $domain ) ) {
return;
}

$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
$mofile = $domain . '-' . $locale . '.mo';

// load translation from WordPress plugins language folder
if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
return;
if ( is_textdomain_loaded( 'backwpup' ) ) {
return TRUE;
}

// load translation from plugin folder
load_textdomain( $domain, dirname( __FILE__ ) . '/languages/' . $mofile );
return load_plugin_textdomain( 'backwpup', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}

/**
Expand Down
68 changes: 30 additions & 38 deletions inc/class-create-archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,49 +326,41 @@ public function add_file( $file_name, $name_in_archive = '' ) {
return TRUE;
}
}
if ( version_compare( PHP_VERSION, '5.3.3', '>=') ) { //php > 5.3.3
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
//close and reopen, all added files are open on fs
if ( $this->file_count > 20 ) { //35 works with PHP 5.2.4 on win
if ( ! $this->ziparchive->close() ) {
$this->ziparchive_status();
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
trigger_error(__( 'ZIP archive cannot be closed correctly', 'backwpup' ), E_USER_ERROR );
sleep( 1 );
}
$this->ziparchive = NULL;
if ( ! $this->check_archive_filesize() ) {
return FALSE;
}
} else { //php < 5.3
//close and reopen, all added files are open on fs
if ( $this->file_count > 20 ) { //35 works with PHP 5.2.4 on win
if ( ! $this->ziparchive->close() ) {
$this->ziparchive_status();
trigger_error(__( 'ZIP archive cannot be closed correctly', 'backwpup' ), E_USER_ERROR );
sleep( 1 );
}
$this->ziparchive = NULL;
if ( ! $this->check_archive_filesize() ) {
return FALSE;
}
$this->ziparchive = new ZipArchive();
$ziparchive_open = $this->ziparchive->open( $this->file, ZipArchive::CREATE );
if ( $ziparchive_open !== TRUE ) {
$this->ziparchive_status();
return FALSE;
}
$this->file_count = 0;
$this->ziparchive = new ZipArchive();
$ziparchive_open = $this->ziparchive->open( $this->file, ZipArchive::CREATE );
if ( $ziparchive_open !== TRUE ) {
$this->ziparchive_status();
return FALSE;
}
if ( $file_size < ( 1024 * 1024 * 2 ) ) {
if ( ! $this->ziparchive->addFromString( $name_in_archive, file_get_contents( $file_name ) ) ) {
$this->ziparchive_status();
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
return FALSE;
} else {
$file_factor = round( $file_size / ( 1024 * 1024 ), 4 ) * 2;
$this->file_count = $this->file_count + $file_factor;
}
$this->file_count = 0;
}
if ( $file_size < ( 1024 * 1024 * 2 ) ) {
if ( ! $this->ziparchive->addFromString( $name_in_archive, file_get_contents( $file_name ) ) ) {
$this->ziparchive_status();
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
return FALSE;
} else {
$file_factor = round( $file_size / ( 1024 * 1024 ), 4 ) * 2;
$this->file_count = $this->file_count + $file_factor;
}
} else {
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
$this->ziparchive_status();
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
return FALSE;
} else {
if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
$this->ziparchive_status();
trigger_error( sprintf( __( 'Cannot add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
return FALSE;
} else {
$this->file_count++;
}
$this->file_count++;
}
}
break;
Expand Down
2 changes: 1 addition & 1 deletion inc/class-destination-dropbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function file_download( $jobid, $get_file ) {
* @return mixed
*/
public function file_get_list( $jobdest ) {
return get_site_transient( 'BackWPup_' . $jobdest );
return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
}

/**
Expand Down
5 changes: 3 additions & 2 deletions inc/class-destination-s3-v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ public function edit_tab( $jobid ) {
<th scope="row"><label for="ids3storageclass"><?php _e( 'Amazon: Storage Class', 'backwpup' ); ?></label></th>
<td>
<select name="s3storageclass" id="ids3storageclass" title="<?php _e( 'Amazon: Storage Class', 'backwpup' ); ?>">
<option value="" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'none', 'backwpup' ); ?></option>
<option value="" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Standard', 'backwpup' ); ?></option>
<option value="STANDARD_IA" <?php selected( 'STANDARD_IA', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Standard-Infrequent Access', 'backwpup' ); ?></option>
<option value="REDUCED_REDUNDANCY" <?php selected( 'REDUCED_REDUNDANCY', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Reduced Redundancy', 'backwpup' ); ?></option>
</select>
</select>
</td>
</tr>
<tr>
Expand Down
Loading

0 comments on commit f58dcdb

Please sign in to comment.