WordPress.org

Plugin Directory

Changeset 630240


Ignore:
Timestamp:
11/26/12 18:16:59 (17 months ago)
Author:
willmot
Message:

Release 2.1.2 tag and set to stable

Location:
backupwordpress
Files:
18 deleted
6 edited
34 copied

Legend:

Unmodified
Added
Removed
  • backupwordpress/tags/2.1.2/admin/actions.php

    r629469 r630240  
    4646 
    4747    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    48         return; 
    49  
    50     // We wan't to display any fatal errors in this ajax request so we can catch them on the other side. 
     48        exit; 
     49 
     50    // We want to display any fatal errors in this ajax request so we can catch them on the other side. 
    5151    error_reporting( E_ERROR ); 
    5252    @ini_set( 'display_errors', 'On' ); 
     
    150150 
    151151    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    152         return; 
     152        exit; 
    153153 
    154154    $schedule = new HMBKP_Scheduled_Backup( urldecode( $_POST['hmbkp_schedule_id'] ) ); 
     
    171171 
    172172    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    173         return; 
     173        exit; 
    174174 
    175175    $schedule = new HMBKP_Scheduled_Backup( urldecode( $_POST['hmbkp_schedule_id'] ) ); 
     
    210210function hmbkp_edit_schedule_load() { 
    211211 
     212    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     213        exit; 
     214 
    212215    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
    213216 
     
    223226 */ 
    224227function hmbkp_edit_schedule_excludes_load() { 
     228 
     229    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     230        exit; 
    225231 
    226232    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
     
    256262 
    257263    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
    258         return; 
     264        exit; 
    259265 
    260266    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
     
    328334function hmbkp_add_exclude_rule() { 
    329335 
     336    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     337        exit; 
     338 
    330339    $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
    331340 
     
    350359function hmbkp_delete_exclude_rule() { 
    351360 
     361    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     362        exit; 
     363 
    352364    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
    353365 
     
    374386function hmbkp_preview_exclude_rule() { 
    375387 
    376     if ( ! empty( $_POST['hmbkp_schedule_id'] ) ) 
    377         $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
    378  
    379     if ( ! empty( $_POST['hmbkp_schedule_excludes'] ) ) 
    380         $excludes = explode( ',', $_POST['hmbkp_schedule_excludes'] ); 
     388    if ( empty( $_GET['hmbkp_schedule_id'] ) || empty( $_POST['hmbkp_schedule_excludes'] ) ) 
     389        exit; 
     390 
     391    $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
     392 
     393    $excludes = explode( ',', $_POST['hmbkp_schedule_excludes'] ); 
    381394 
    382395    hmbkp_file_list( $schedule, $excludes, 'get_excluded_files' ); 
     
    404417 
    405418    if ( empty( $_POST['hmbkp_error'] ) ) 
    406         return; 
     419        exit; 
    407420 
    408421    $error = str_replace( HM_Backup::get_home_path(), '', $_POST['hmbkp_error'] ); ?> 
     
    426439 
    427440    if ( empty( $_POST['hmbkp_error'] ) ) 
    428         return; 
     441        exit; 
    429442 
    430443    $error = $_POST['hmbkp_error']; 
  • backupwordpress/tags/2.1.2/assets/hmbkp.js

    r629469 r630240  
    217217 
    218218                // Assume success if no data passed back 
    219                 if ( ! data ) { 
     219                if ( ! data || data == 0 ) { 
    220220 
    221221                    $.fancybox.close(); 
     
    307307 
    308308                // Backup Succeeded 
    309                 if ( ! data ) { 
     309                if ( ! data || data == 0 ) { 
    310310                    location.reload( true ); 
    311311                } 
     
    321321                        function( data ) { 
    322322 
    323                             if ( ! data ) 
     323                            if ( ! data || data == 0 ) 
    324324                                return; 
    325325 
     
    376376        function( data ) { 
    377377 
    378             if ( data === 0 && redirect === true ) { 
    379                     location.reload( true ); 
     378            if ( data == 0 && redirect === true ) { 
     379                location.reload( true ); 
    380380 
    381381            } else { 
  • backupwordpress/tags/2.1.2/functions/core.php

    r629469 r630240  
    288288        file_put_contents( $index, '' ); 
    289289 
     290    $htaccess = $path . '/.htaccess'; 
     291 
    290292    // Protect the directory with a .htaccess file on Apache servers 
    291293    if ( $is_apache && function_exists( 'insert_with_markers' ) && ! file_exists( $htaccess ) && is_writable( $path ) ) { 
    292  
    293         $htaccess = $path . '/.htaccess'; 
    294294 
    295295        $contents[] = '# ' . sprintf( __( 'This %s file ensures that other people cannot download your backup files.', 'hmbkp' ), '.htaccess' ); 
  • backupwordpress/tags/2.1.2/hm-backup/hm-backup.php

    r629469 r630240  
    196196        $home_path = ABSPATH; 
    197197 
    198         if ( $home_url !== $site_url ) 
     198        // If site_url contains home_url and they differ then assume WordPress is installed in a sub directory 
     199        if ( $home_url !== $site_url && strpos( $site_url, $home_url ) === 0 ) 
    199200            $home_path = trailingslashit( substr( ABSPATH, 0, strrpos( ABSPATH, str_replace( $home_url, '', $site_url ) ) ) ); 
    200201 
     
    908909            return true; 
    909910 
    910         if ( ! file_exists( $this->get_database_dump_filepath() ) ) 
     911        // mysqldump can create empty dump files on error so we need to check the filesize 
     912        if ( ! file_exists( $this->get_database_dump_filepath() ) || filesize( $this->get_database_dump_filepath() ) === 0 ) 
    911913            $this->error( $this->get_mysqldump_method(), __( 'The mysqldump file was not created', 'hmbkp' ) ); 
    912914 
  • backupwordpress/tags/2.1.2/plugin.php

    r629469 r630240  
    66Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. 
    77Author: Human Made Limited 
    8 Version: 2.1.1 
     8Version: 2.1.2 
    99Author URI: http://hmn.md/ 
    1010*/ 
  • backupwordpress/tags/2.1.2/readme.txt

    r629465 r630240  
    44Requires at least: 3.3.3 
    55Tested up to: 3.5 
    6 Stable tag: 2.1.1 
     6Stable tag: 2.1.2 
    77 
    88Simple automated back ups of your WordPress powered website. 
     
    103103 
    104104== Changelog == 
     105 
     106#### 2.1.2 
     107 
     108* Fix an issue that could stop the settings panel from closing on save on servers which return `'0'` for ajax requests. 
     109* Fix an issue that could cause the backup root to be set to `/` on sites with `site_url` and `home` set to different domains. 
     110* The mysqldump fallback function will now be used if `mysqldump` produces an empty file. 
     111* Fix a possible PHP `NOTICE` on Apache servers. 
    105112 
    106113#### 2.1.1 
  • backupwordpress/trunk/admin/actions.php

    r629469 r630240  
    4646 
    4747    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    48         return; 
    49  
    50     // We wan't to display any fatal errors in this ajax request so we can catch them on the other side. 
     48        exit; 
     49 
     50    // We want to display any fatal errors in this ajax request so we can catch them on the other side. 
    5151    error_reporting( E_ERROR ); 
    5252    @ini_set( 'display_errors', 'On' ); 
     
    150150 
    151151    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    152         return; 
     152        exit; 
    153153 
    154154    $schedule = new HMBKP_Scheduled_Backup( urldecode( $_POST['hmbkp_schedule_id'] ) ); 
     
    171171 
    172172    if ( empty( $_POST['hmbkp_schedule_id'] ) ) 
    173         return; 
     173        exit; 
    174174 
    175175    $schedule = new HMBKP_Scheduled_Backup( urldecode( $_POST['hmbkp_schedule_id'] ) ); 
     
    210210function hmbkp_edit_schedule_load() { 
    211211 
     212    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     213        exit; 
     214 
    212215    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
    213216 
     
    223226 */ 
    224227function hmbkp_edit_schedule_excludes_load() { 
     228 
     229    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     230        exit; 
    225231 
    226232    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
     
    256262 
    257263    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
    258         return; 
     264        exit; 
    259265 
    260266    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
     
    328334function hmbkp_add_exclude_rule() { 
    329335 
     336    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     337        exit; 
     338 
    330339    $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
    331340 
     
    350359function hmbkp_delete_exclude_rule() { 
    351360 
     361    if ( empty( $_GET['hmbkp_schedule_id'] ) ) 
     362        exit; 
     363 
    352364    $schedule = new HMBKP_Scheduled_Backup( $_GET['hmbkp_schedule_id'] ); 
    353365 
     
    374386function hmbkp_preview_exclude_rule() { 
    375387 
    376     if ( ! empty( $_POST['hmbkp_schedule_id'] ) ) 
    377         $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
    378  
    379     if ( ! empty( $_POST['hmbkp_schedule_excludes'] ) ) 
    380         $excludes = explode( ',', $_POST['hmbkp_schedule_excludes'] ); 
     388    if ( empty( $_GET['hmbkp_schedule_id'] ) || empty( $_POST['hmbkp_schedule_excludes'] ) ) 
     389        exit; 
     390 
     391    $schedule = new HMBKP_Scheduled_Backup( $_POST['hmbkp_schedule_id'] ); 
     392 
     393    $excludes = explode( ',', $_POST['hmbkp_schedule_excludes'] ); 
    381394 
    382395    hmbkp_file_list( $schedule, $excludes, 'get_excluded_files' ); 
     
    404417 
    405418    if ( empty( $_POST['hmbkp_error'] ) ) 
    406         return; 
     419        exit; 
    407420 
    408421    $error = str_replace( HM_Backup::get_home_path(), '', $_POST['hmbkp_error'] ); ?> 
     
    426439 
    427440    if ( empty( $_POST['hmbkp_error'] ) ) 
    428         return; 
     441        exit; 
    429442 
    430443    $error = $_POST['hmbkp_error']; 
  • backupwordpress/trunk/assets/hmbkp.js

    r629469 r630240  
    217217 
    218218                // Assume success if no data passed back 
    219                 if ( ! data ) { 
     219                if ( ! data || data == 0 ) { 
    220220 
    221221                    $.fancybox.close(); 
     
    307307 
    308308                // Backup Succeeded 
    309                 if ( ! data ) { 
     309                if ( ! data || data == 0 ) { 
    310310                    location.reload( true ); 
    311311                } 
     
    321321                        function( data ) { 
    322322 
    323                             if ( ! data ) 
     323                            if ( ! data || data == 0 ) 
    324324                                return; 
    325325 
     
    376376        function( data ) { 
    377377 
    378             if ( data === 0 && redirect === true ) { 
    379                     location.reload( true ); 
     378            if ( data == 0 && redirect === true ) { 
     379                location.reload( true ); 
    380380 
    381381            } else { 
  • backupwordpress/trunk/functions/core.php

    r629469 r630240  
    288288        file_put_contents( $index, '' ); 
    289289 
     290    $htaccess = $path . '/.htaccess'; 
     291 
    290292    // Protect the directory with a .htaccess file on Apache servers 
    291293    if ( $is_apache && function_exists( 'insert_with_markers' ) && ! file_exists( $htaccess ) && is_writable( $path ) ) { 
    292  
    293         $htaccess = $path . '/.htaccess'; 
    294294 
    295295        $contents[] = '# ' . sprintf( __( 'This %s file ensures that other people cannot download your backup files.', 'hmbkp' ), '.htaccess' ); 
  • backupwordpress/trunk/hm-backup/hm-backup.php

    r629469 r630240  
    196196        $home_path = ABSPATH; 
    197197 
    198         if ( $home_url !== $site_url ) 
     198        // If site_url contains home_url and they differ then assume WordPress is installed in a sub directory 
     199        if ( $home_url !== $site_url && strpos( $site_url, $home_url ) === 0 ) 
    199200            $home_path = trailingslashit( substr( ABSPATH, 0, strrpos( ABSPATH, str_replace( $home_url, '', $site_url ) ) ) ); 
    200201 
     
    908909            return true; 
    909910 
    910         if ( ! file_exists( $this->get_database_dump_filepath() ) ) 
     911        // mysqldump can create empty dump files on error so we need to check the filesize 
     912        if ( ! file_exists( $this->get_database_dump_filepath() ) || filesize( $this->get_database_dump_filepath() ) === 0 ) 
    911913            $this->error( $this->get_mysqldump_method(), __( 'The mysqldump file was not created', 'hmbkp' ) ); 
    912914 
  • backupwordpress/trunk/plugin.php

    r629469 r630240  
    66Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. 
    77Author: Human Made Limited 
    8 Version: 2.1.1 
     8Version: 2.1.2 
    99Author URI: http://hmn.md/ 
    1010*/ 
  • backupwordpress/trunk/readme.txt

    r629465 r630240  
    44Requires at least: 3.3.3 
    55Tested up to: 3.5 
    6 Stable tag: 2.1.1 
     6Stable tag: 2.1.2 
    77 
    88Simple automated back ups of your WordPress powered website. 
     
    103103 
    104104== Changelog == 
     105 
     106#### 2.1.2 
     107 
     108* Fix an issue that could stop the settings panel from closing on save on servers which return `'0'` for ajax requests. 
     109* Fix an issue that could cause the backup root to be set to `/` on sites with `site_url` and `home` set to different domains. 
     110* The mysqldump fallback function will now be used if `mysqldump` produces an empty file. 
     111* Fix a possible PHP `NOTICE` on Apache servers. 
    105112 
    106113#### 2.1.1 
Note: See TracChangeset for help on using the changeset viewer.