Skip to content

Commit

Permalink
merge changes from pro
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuesken committed Apr 21, 2016
1 parent a79c3f3 commit b8e1ad9
Show file tree
Hide file tree
Showing 13 changed files with 399 additions and 336 deletions.
2 changes: 1 addition & 1 deletion 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.3
* Version: 3.3.1-alpha
* Text Domain: backwpup
* Domain Path: /languages/
* Network: true
Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-dropbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function file_delete( $jobdest, $backupfile ) {
BackWPup_Admin::message( 'DROPBOX: ' . $e->getMessage(), true );
}

set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, 3600 * 24 * 7 );
set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -359,7 +359,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {
}
}
}
set_site_transient( 'backwpup_' . $job_object->job['jobid'] . '_dropbox', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . $job_object->job['jobid'] . '_dropbox', $files, YEAR_IN_SECONDS );
} catch ( Exception $e ) {
$job_object->log( E_USER_ERROR, sprintf( __( 'Dropbox API: %s', 'backwpup' ), $e->getMessage() ), $e->getFile(), $e->getLine() );

Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function file_delete( $jobdest, $backupfile ) {
}
}

set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -390,7 +390,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {
$job_object->log( sprintf( _n( 'One file deleted on FTP server', '%d files deleted on FTP server', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
}
}
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_ftp', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_ftp', $files, YEAR_IN_SECONDS );
$job_object->substeps_done++;

ftp_close( $ftp_conn_id );
Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-msazure.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function file_delete( $jobdest, $backupfile ) {
}
}

set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -341,7 +341,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {

}
}
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_msazure', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_msazure', $files, YEAR_IN_SECONDS );
}
catch ( Exception $e ) {
$job_object->log( E_USER_ERROR, sprintf( __( 'Microsoft Azure API: %s', 'backwpup' ), $e->getMessage() ), $e->getFile(), $e->getLine() );
Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-rsc.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function file_delete( $jobdest, $backupfile ) {
}
}

set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -352,7 +352,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {
$job_object->log( sprintf( _n( 'One file deleted on Rackspace cloud container.', '%d files deleted on Rackspace cloud container.', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
}
}
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_rsc', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_rsc', $files, YEAR_IN_SECONDS );
}
catch ( Exception $e ) {
$job_object->log( E_USER_ERROR, sprintf( __( 'Rackspace Cloud API: %s', 'backwpup' ), $e->getMessage() ), $e->getFile(), $e->getLine() );
Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-s3.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function file_delete( $jobdest, $backupfile ) {
}
}

set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -587,7 +587,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {
$job_object->log( sprintf( _n( 'One file deleted on S3 Bucket.', '%d files deleted on S3 Bucket', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
}
}
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_s3', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_s3', $files, YEAR_IN_SECONDS );
}
catch ( Exception $e ) {
$job_object->log( E_USER_ERROR, sprintf( __( 'S3 Service API: %s', 'backwpup' ), $e->getMessage() ), $e->getFile(), $e->getLine() );
Expand Down
4 changes: 2 additions & 2 deletions inc/class-destination-sugarsync.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function file_delete( $jobdest, $backupfile ) {
}
}

set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, YEAR_IN_SECONDS );
}

/**
Expand Down Expand Up @@ -301,7 +301,7 @@ public function job_run_archive( BackWPup_Job $job_object ) {
$job_object->log( sprintf( _n( 'One file deleted on SugarSync folder', '%d files deleted on SugarSync folder', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
}
}
set_site_transient( 'BackWPup_' . $job_object->job[ 'jobid' ] . '_SUGARSYNC', $files, 60 * 60 * 24 * 7 );
set_site_transient( 'BackWPup_' . $job_object->job[ 'jobid' ] . '_SUGARSYNC', $files, YEAR_IN_SECONDS );
}
catch ( Exception $e ) {
$job_object->log( E_USER_ERROR, sprintf( __( 'SugarSync API: %s', 'backwpup' ), $e->getMessage() ), $e->getFile(), $e->getLine() );
Expand Down
2 changes: 1 addition & 1 deletion inc/class-easycron.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static function status( $backwpup_jobid ) {
$message = self::query_api( 'detail', array( 'id' => $id ) );

if ( $message[ 'status' ] == 'success' && ! empty( $message[ 'cron_job' ] ) ) {
set_site_transient( 'backwpup_easycron_' . $id, $message[ 'cron_job' ], 3600 - 30 );
set_site_transient( 'backwpup_easycron_' . $id, $message[ 'cron_job' ], HOUR_IN_SECONDS - 30 );
return $message[ 'cron_job' ];
} else {
if ( $message[ 'error' ][ 'code' ] == 25 ) {
Expand Down
Loading

0 comments on commit b8e1ad9

Please sign in to comment.