Changeset 738641
- Timestamp:
- 07/10/2013 10:08:02 AM (13 years ago)
- Location:
- wponlinebackup/trunk
- Files:
-
- 4 edited
-
include/admin.php (modified) (2 diffs)
-
include/bootstrap.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
wponlinebackup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wponlinebackup/trunk/include/admin.php
r724954 r738641 1404 1404 if ( !is_null( $result ) ) { 1405 1405 1406 if ( !file_exists( WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $result['filename'] ) || false !== @unlink( WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $result['filename'] ) ) { 1406 if ( file_exists( WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $result['filename'] ) ) { 1407 1408 $ret = @unlink( WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $result['filename'] ); 1409 1410 } else { 1411 1412 $ret = true; 1413 1414 } 1415 1416 if ( $ret === true ) { 1407 1417 1408 1418 $wpdb->query( … … 1411 1421 ); 1412 1422 1413 } 1414 1415 $this->Register_Messages( array( array( 1416 'icon' => 'accept', 1417 'text' => __( 'Deleted backup.', 'wponlinebackup' ), 1418 ) ) ); 1423 $this->Register_Messages( array( array( 1424 'icon' => 'accept', 1425 'text' => __( 'Deleted backup.', 'wponlinebackup' ), 1426 ) ) ); 1427 1428 } else { 1429 1430 $ret = OBFW_Tidy_Exception(); 1431 1432 $this->Register_Messages( array( array( 1433 'icon' => 'error', 1434 'text' => sprintf( __( 'Failed to delete the backup: %s', 'wponlinebackup' ), $ret ), 1435 ) ) ); 1436 1437 } 1419 1438 1420 1439 return true; -
wponlinebackup/trunk/include/bootstrap.php
r727856 r738641 2120 2120 } 2121 2121 2122 $ret = true; 2123 2122 2124 // Prevent browsing by dropping in a blank index.html if there isn't one 2123 2125 if ( !@file_exists( WPONLINEBACKUP_LOCALBACKUPDIR . '/index.html' ) ) 2124 @copy( WPONLINEBACKUP_PATH . '/index.html', WPONLINEBACKUP_LOCALBACKUPDIR . '/index.html' ); 2126 $ret = @copy( WPONLINEBACKUP_PATH . '/index.html', WPONLINEBACKUP_LOCALBACKUPDIR . '/index.html' ); 2127 2128 // If we failed to copy, report a write problem - or if we didn't copy because index.html already existed, try to write to it with touch which only touches modification time 2129 if ( false === $ret || false === @touch( WPONLINEBACKUP_LOCALBACKUPDIR . '/index.html' ) ) { 2130 2131 $ret = OBFW_Tidy_Exception(); 2132 2133 $this->Log_Event( 2134 WPONLINEBACKUP_EVENT_ERROR, 2135 sprintf( __( 'The directory (%s) where local backups will be stored cannot be written to.', 'wponlinebackup' ), WPONLINEBACKUP_LOCALBACKUPDIR ) . PHP_EOL . 2136 sprintf( __( 'You may need to login via FTP and "CHMOD" it to "0770" or, as a last resort, "0777". You should also check the temporary processing directory (%s) has the same permissions, also creating the folder if necessary.', 'wponlinebackup' ), $this->status['progress']['cache']['local_tmp_dir'] ) . PHP_EOL . 2137 sprintf( __( 'Error: %s', 'wponlinebackup' ), $ret ) 2138 ); 2139 2140 return __( 'Unable to write to the local backup directory.', 'wponlinebackup' ); 2141 2142 } 2125 2143 2126 2144 return true; … … 2172 2190 WPONLINEBACKUP_EVENT_ERROR, 2173 2191 sprintf( __( 'The temporary data file could not be created in the temporary processing directory (%s).', 'wponlinebackup' ), $this->status['progress']['cache']['local_tmp_dir'] ) . PHP_EOL . 2174 __( 'If the below error is related to permissions, you may need to login to your website via FTP and change the permissions on the temporary processing directory. The permissions required, in numeric form, are normally 0770, but on some servers you may need to use 0777. Your host will be able to assist if you have any doubts.', 'wponlinebackup' ) . PHP_EOL .2175 __( 'Last PHP error: ', 'wponlinebackup' ) . OBFW_Exception()2192 __( 'If the below error is related to permissions, you may need to login to your website via FTP and change the permissions on the temporary processing directory. The permissions required, in numeric form, are normally 0770, but on some servers you may need to use 0777. Your host will be able to assist if you have any doubts.', 'wponlinebackup' ) . PHP_EOL . 2193 sprintf( __( 'Error: %s', 'wponlinebackup' ), OBFW_Exception() ) 2176 2194 ); 2177 2195 … … 2438 2456 // Allocate a file 2439 2457 $wpdb->query( 2440 ' INSERTINTO `' . $this->db_prefix . 'wponlinebackup_local` (filename, filesize, creation_date, compressed, encrypted) ' .2458 'REPLACE INTO `' . $this->db_prefix . 'wponlinebackup_local` (filename, filesize, creation_date, compressed, encrypted) ' . 2441 2459 'VALUES (\'' . $esc_name . '\', ' . $this->status['progress']['file_set']['size'] . ', ' . $this->status['progress']['start_time'] . ', ' . $this->status['progress']['file_set']['compressed'] . ', ' . $this->status['progress']['file_set']['encrypted'] . ')' 2442 2460 ); 2443 2461 2444 2462 // Move it into place 2445 @rename( $this->status['progress']['file_set']['file'], WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $name ); 2463 if ( false === @rename( $this->status['progress']['file_set']['file'], WPONLINEBACKUP_LOCALBACKUPDIR . '/' . $name ) ) { 2464 2465 // Grab the error 2466 $ret = OBFW_Tidy_Exception(); 2467 2468 // Delete it from the database - we add it before moving as the page view can add non-existant entries with NULL data and we don't want to do that 2469 $wpdb->query( 'DELETE FROM `' . $this->db_prefix . 'wponlinebackup_local` WHERE filename = \'' . $esc_name . '\'' ); 2470 2471 // Log the error 2472 $this->Log_Event( 2473 WPONLINEBACKUP_EVENT_ERROR, 2474 sprintf( __( 'An error occurred trying to save the backup to the local backup folder at %s.', 'wponlinebackup' ), WPONLINEBACKUP_LOCALBACKUPDIR ) . PHP_EOL . 2475 sprintf( __( 'Error: %s', 'wponlinebackup' ), $ret ) 2476 ); 2477 2478 return __( 'Failed to save the backup to local storage.', 'wponlinebackup' ); 2479 2480 } 2446 2481 2447 2482 // Store the file name -
wponlinebackup/trunk/readme.txt
r735318 r738641 71 71 72 72 == Changelog == 73 74 = 3.0.1 = 75 * Check permissions to the local backup folder are correct at the start of backup 76 * Do not report successful backup if the backup failed to save to the local backup folder 77 * If a file cannot be deleted from the local backups folder, report an error and the reason why 73 78 74 79 = 3.0.0 = -
wponlinebackup/trunk/wponlinebackup.php
r724954 r738641 5 5 Description: Online Backup for WordPress can automatically backup your WordPress database and filesystem on a configurable schedule and can incrementally send the backup compressed (and optionally encrypted using DES or AES) to our online vault where you can later retrieve it. Backups can also be emailed to you or produced on-demand and downloaded straight to your computer. You can view the current status and change settings at "Online Backup", or by clicking the "View Dashboard" link next to the plugin name in the Plugins list. 6 6 Author: Jason Woods @ Backup Technology 7 Version: 3.0. 07 Version: 3.0.1 8 8 Author URI: http://www.backup-technology.com/ 9 9 Licence: GPLv2 - See LICENCE.txt … … 19 19 20 20 // Version 21 define( 'WPONLINEBACKUP_VERSION', '3.0. 0' );21 define( 'WPONLINEBACKUP_VERSION', '3.0.1' ); 22 22 define( 'WPONLINEBACKUP_DBVERSION', 12 ); 23 23 … … 1250 1250 1251 1251 // Standard site_url call - this is fine in multisite since we now restrict ourselves to run only on the main site 1252 $this->blog_url = site_url( '/' , 'http');1252 $this->blog_url = site_url( '/' ); 1253 1253 1254 1254 }
Note: See TracChangeset
for help on using the changeset viewer.