Changeset 662741
- Timestamp:
- 02/03/2013 09:30:59 AM (13 years ago)
- Location:
- 6scan-backup/trunk
- Files:
-
- 4 edited
-
6scan.php (modified) (1 diff)
-
admin/includes/common.php (modified) (1 diff)
-
modules/signatures/notice.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
6scan-backup/trunk/6scan.php
r652989 r662741 5 5 Description: 6Scan Backup goes beyond existing backup plugins, easily and automatically creating backups of your site and securely storing them in the cloud. 6 6 Author: 6Scan 7 Version: 3.0. 17 Version: 3.0.2 8 8 Author URI: http://www.6scan.com 9 9 */ -
6scan-backup/trunk/admin/includes/common.php
r652989 r662741 4 4 die( 'No direct access allowed' ); 5 5 6 define ( 'SIXSCAN_VERSION' , '3.0. 1.0' );6 define ( 'SIXSCAN_VERSION' , '3.0.2.0' ); 7 7 define ( 'SIXSCAN_HTACCESS_VERSION' , '1' ); 8 8 -
6scan-backup/trunk/modules/signatures/notice.php
r570559 r662741 1 1 <?php 2 3 define('SIXSCAN_LOCK_EXPIRATION_SECONDS' , 60 ); 4 define('SIXSCAN_LOCK_FILE_NAME' , sys_get_temp_dir() . '/__6scan_lock__.dat' ); 5 6 function sixscan_get_lock() { 7 if ( file_exists( SIXSCAN_LOCK_FILE_NAME ) ){ 8 $lock_creation_date = @filemtime( SIXSCAN_LOCK_FILE_NAME ); 9 if ( @time() - SIXSCAN_LOCK_EXPIRATION_SECONDS > $lock_creation_date ){ 10 unlink( SIXSCAN_LOCK_FILE_NAME ); 11 } 12 else{ 13 return FALSE; /* Lock is not yet open */ 14 } 15 } 16 17 /* Sleep 2-10 ms and then check if file does not exist. If other proccess has created the file during this sleep - fail */ 18 usleep ( rand( 2,30 ) * 1000 ); 19 20 if ( file_exists( SIXSCAN_LOCK_FILE_NAME ) ){ 21 return FALSE; 22 } 23 else{ 24 file_put_contents( SIXSCAN_LOCK_FILE_NAME , '__lock__'); 25 } 26 return TRUE; 27 } 28 29 function sixscan_release_lock(){ 30 unlink( SIXSCAN_LOCK_FILE_NAME ); 31 } 2 32 3 33 $wp_load_location = sixscan_notice_find_wp_load_location(); … … 151 181 /* Update signatures, if needed */ 152 182 if ( isset( $_REQUEST[ SIXSCAN_NOTICE_UPDATE_NAME ] ) && ( $_REQUEST[ SIXSCAN_NOTICE_UPDATE_NAME ] == 1 ) ){ 153 $error_list .= sixscan_signatures_update_request_total( $site_id , $api_token ); 183 if ( sixscan_get_lock() ){ 184 $error_list .= sixscan_signatures_update_request_total( $site_id , $api_token ); 185 sixscan_release_lock(); 186 } 187 else{ 188 $error_list .= 'Failed getting lock. Try later'; 189 } 154 190 } 155 191 -
6scan-backup/trunk/readme.txt
r659703 r662741 1 1 === 6Scan Backup === 2 2 Contributors: 6Scan 3 Version: 3.0. 13 Version: 3.0.2 4 4 Tags: backup, automatic backup, cloud, online, secured, restore, recovery 5 5 Requires at least: 3.0.0
Note: See TracChangeset
for help on using the changeset viewer.