Plugin Directory

Changeset 3242904


Ignore:
Timestamp:
02/19/2025 12:30:58 AM (12 months ago)
Author:
wpvivid
Message:

Update for backup free 0.9.113 trunk

Location:
wpvivid-backuprestore/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wpvivid-backuprestore/trunk/admin/js/wpvivid-admin.js

    r3225201 r3242904  
    470470        });
    471471    });
     472
     473    jQuery('input:radio[option=setting][name=backup_params]').click(function()
     474    {
     475        if(jQuery(this).prop('checked'))
     476        {
     477            var value = jQuery(this).prop('value');
     478            if(value=='custom')
     479            {
     480                jQuery('#wpvivid_custom_backup_params').show();
     481            }
     482            else
     483            {
     484                jQuery('#wpvivid_custom_backup_params').hide();
     485            }
     486        }
     487    });
    472488}
    473489
  • wpvivid-backuprestore/trunk/admin/partials/wpvivid-settings-page-display.php

    r3205220 r3242904  
    393393                }
    394394                catch(err){
    395                     alert(err);
    396395                    jQuery('#wpvivid_calculate_size').css({'pointer-events': 'auto', 'opacity': '1'});
    397396                    jQuery('#wpvivid_clean_junk_file').css({'pointer-events': 'auto', 'opacity': '1'});
     
    399398                }
    400399            }, function(XMLHttpRequest, textStatus, errorThrown) {
    401                 var error_message = wpvivid_output_ajaxerror('calculating server disk space in use by WPvivid', textStatus, errorThrown);
    402                 alert(error_message);
    403400                jQuery('#wpvivid_calculate_size').css({'pointer-events': 'auto', 'opacity': '1'});
    404401                jQuery('#wpvivid_clean_junk_file').css({'pointer-events': 'auto', 'opacity': '1'});
     
    614611    }
    615612
     613    if(isset($common_setting['backup_params']))
     614    {
     615        if($common_setting['backup_params'] === 'low')
     616        {
     617            $backup_params_low    = 'checked';
     618            $backup_params_mid    = '';
     619            $backup_params_high   = '';
     620            $backup_params_custom = '';
     621            $backup_custom_setting_display = 'display: none;';
     622        }
     623        else if($common_setting['backup_params'] === 'mid')
     624        {
     625            $backup_params_low    = '';
     626            $backup_params_mid    = 'checked';
     627            $backup_params_high   = '';
     628            $backup_params_custom = '';
     629            $backup_custom_setting_display = 'display: none;';
     630        }
     631        else if($common_setting['backup_params'] === 'high')
     632        {
     633            $backup_params_low    = '';
     634            $backup_params_mid    = '';
     635            $backup_params_high   = 'checked';
     636            $backup_params_custom = '';
     637            $backup_custom_setting_display = 'display: none;';
     638        }
     639        else if($common_setting['backup_params'] === 'custom')
     640        {
     641            $backup_params_low    = '';
     642            $backup_params_mid    = '';
     643            $backup_params_high   = '';
     644            $backup_params_custom = 'checked';
     645            $backup_custom_setting_display = '';
     646        }
     647        else
     648        {
     649            $backup_params_low    = 'checked';
     650            $backup_params_mid    = '';
     651            $backup_params_high   = '';
     652            $backup_params_custom = '';
     653            $backup_custom_setting_display = 'display: none;';
     654        }
     655    }
     656    else if(isset($common_setting['compress_file_count']))
     657    {
     658        $backup_params_low    = '';
     659        $backup_params_mid    = '';
     660        $backup_params_high   = '';
     661        $backup_params_custom = 'checked';
     662        $backup_custom_setting_display = '';
     663    }
     664    else
     665    {
     666        $backup_params_low    = 'checked';
     667        $backup_params_mid    = '';
     668        $backup_params_high   = '';
     669        $backup_params_custom = '';
     670        $backup_custom_setting_display = 'display: none;';
     671    }
     672
    616673    ?>
    617674    <div class="postbox schedule-tab-block wpvivid-setting-addon" style="margin-bottom: 10px; padding-bottom: 0;">
     
    651708    <div class="postbox schedule-tab-block setting-page-content">
    652709        <div style="padding-top: 10px;">
    653             <div><strong><?php esc_html_e('Compress Files Every', 'wpvivid-backuprestore'); ?></strong></div>
    654             <div class="setting-tab-block">
    655                 <input type="text" placeholder="200" option="setting" name="max_file_size" id="wpvivid_max_zip" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $max_file_size)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
    656                 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website.  Please try to adjust the value if you are encountering backup errors. When you set a value of 0MB, backups will be split every 4GB.', 'wpvivid-backuprestore' ); ?></div></p>
     710            <div class="wpvivid-element-space-bottom">
     711                <strong><?php esc_html_e('Backup performance mode.', 'wpvivid-backuprestore'); ?></strong>
    657712            </div>
    658             <div><strong><?php esc_html_e('Exclude the files which are larger than', 'wpvivid-backuprestore'); ?></strong></div>
    659             <div class="setting-tab-block">
    660                 <input type="text" placeholder="0" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php echo esc_attr($exclude_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
    661                 <div><p><?php esc_html_e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid-backuprestore' ); ?></p></div>
     713            <div class="wpvivid-element-space-bottom">
     714                <label>
     715                    <input type="radio" option="setting" name="backup_params" value="low" <?php esc_attr_e($backup_params_low); ?> />
     716                    <span class="wpvivid-element-space-right"><strong>Low (Balanced)</strong></span><span><?php esc_html_e('Use this default setting for minimal server resource usage, but expect longer backup times. Best for shared hosting or limited resources. Backups are split into 200MB chunks.', 'wpvivid-backuprestore'); ?></span>
     717                </label>
    662718            </div>
    663             <div><strong><?php esc_html_e('PHP script execution timeout for backup', 'wpvivid-backuprestore'); ?></strong></div>
    664             <div class="setting-tab-block">
    665                 <input type="text" placeholder="900" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php echo esc_attr($max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?>
    666                 <div><p><?php esc_html_e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid-backuprestore' ); ?></p></div>
     719            <div class="wpvivid-element-space-bottom">
     720                <label>
     721                    <input type="radio" option="setting" name="backup_params" value="mid" <?php esc_attr_e($backup_params_mid); ?> />
     722                    <span class="wpvivid-element-space-right"><strong>Mid (Standard)</strong></span><span><?php esc_html_e('This mode offers a good balance between backup speed and resource usage. It\'s suitable for most web hosting environments.', 'wpvivid-backuprestore'); ?></span>
     723                </label>
    667724            </div>
    668             <div><strong><?php esc_html_e('PHP Memory Limit for backup', 'wpvivid-backuprestore'); ?></strong></div>
    669             <div class="setting-tab-block">
    670                 <input type="text" placeholder="256" option="setting" name="memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
    671                 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin to run a backup. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div>
     725            <div class="wpvivid-element-space-bottom">
     726                <label>
     727                    <input type="radio" option="setting" name="backup_params" value="high" <?php esc_attr_e($backup_params_high); ?> />
     728                    <span class="wpvivid-element-space-right"><strong>High (Accelerated)</strong></span><span><?php esc_html_e('This mode uses more server resources to reduce backup time, but is only recommended for dedicated servers. If backups time out or get stuck, consider Mid or Low mode. Backups are split into 4GB chunks.', 'wpvivid-backuprestore'); ?></span>
     729                </label>
    672730            </div>
    673             <div><strong><?php esc_html_e('The number of files compressed to the backup zip each time', 'wpvivid-backuprestore'); ?></strong></div>
    674             <div class="setting-tab-block">
    675                 <input type="text" placeholder="500" option="setting" name="compress_file_count" id="wpvivid_compress_file_count" class="all-options" value="<?php echo esc_attr($compress_file_count); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Files', 'wpvivid-backuprestore'); ?>
    676                 <div><p><?php esc_html_e( 'When taking a backup, the plugin will compress this number of files to the backup zip each time. The default value is 500. The lower the value, the longer time the backup will take, but the higher the backup success rate. If you encounter a backup timeout issue, try to decrease this value.', 'wpvivid-backuprestore' ); ?></p></div>
     731            <div class="wpvivid-element-space-bottom">
     732                <label>
     733                    <input type="radio" option="setting" name="backup_params" value="custom" <?php esc_attr_e($backup_params_custom); ?> />
     734                    <span class="wpvivid-element-space-right"><strong>Custom (Advanced)</strong></span><span><?php esc_html_e('This mode allows fine-tuning of backup parameters. Incorrect configuration can lead to backup failures. It is recommended to use only with specific guidance from our support team.', 'wpvivid-backuprestore'); ?></span>
     735                </label>
    677736            </div>
    678             <div><strong><?php esc_html_e('Split a sql file every this size', 'wpvivid-backuprestore'); ?></strong></div>
    679             <div class="setting-tab-block">
    680                 <input type="text" placeholder="200" option="setting" name="max_sql_file_size" id="wpvivid_max_sql_file_size" class="all-options" value="<?php echo esc_attr($max_sql_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('MB', 'wpvivid-backuprestore'); ?>
    681                 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. If you use a value of 0 MB, any backup files won\'t be split.', 'wpvivid-backuprestore' ); ?></p></div>
    682             </div>
    683             <div><strong><?php esc_html_e('Chunk Size', 'wpvivid-backuprestore'); ?></strong></div>
    684             <div class="setting-tab-block">
    685                 <input type="text" placeholder="2048" option="setting" name="migrate_size" class="all-options" value="<?php echo esc_attr($migrate_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />KB
    686                 <div><p><?php esc_html_e('e.g. if you choose a chunk size of 2MB, a 8MB file will use 4 chunks. Decreasing this value will break the ISP\'s transmission limit, for example:512KB', 'wpvivid-backuprestore'); ?></p></div>
    687             </div>
    688             <div><strong><?php esc_html_e('PHP script execution timeout for restore', 'wpvivid-backuprestore'); ?></strong></div>
    689             <div class="setting-tab-block">
    690                 <input type="text" placeholder="300" option="setting" name="restore_max_execution_time" class="all-options" value="<?php echo esc_attr($restore_max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?>
    691                 <div><p><?php esc_html_e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of restore down. If the progress of restore encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid-backuprestore' ); ?></p></div>
    692             </div>
    693             <div><strong><?php esc_html_e('PHP Memory Limit for restoration', 'wpvivid-backuprestore'); ?></strong></div>
    694             <div class="setting-tab-block">
    695                 <input type="text" placeholder="256" option="setting" name="restore_memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $restore_memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
    696                 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin in restore process. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div>
    697             </div>
    698             <div><strong><?php esc_html_e('Maximum rows of data to be processed per request for restoration', 'wpvivid-backuprestore'); ?></strong></div>
    699             <div class="setting-tab-block">
    700                 <input type="text" placeholder="10000" option="setting" name="replace_rows_pre_request" class="all-options" value="<?php echo esc_attr($replace_rows_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />rows
    701                 <div><p><?php esc_html_e('The smaller it is, the slower the restoration will be, but the lower the chance of a timeout error.', 'wpvivid-backuprestore'); ?></p></div>
    702             </div>
    703             <div><strong><?php esc_html_e('Maximum size of sql file to be imported per request for restoration', 'wpvivid-backuprestore'); ?></strong></div>
    704             <div class="setting-tab-block">
    705                 <input type="text" placeholder="5" option="setting" name="sql_file_buffer_pre_request" class="all-options" value="<?php echo esc_attr($sql_file_buffer_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
    706                 <div><p><?php esc_html_e('Maximum rows of data to be processed per request.', 'wpvivid-backuprestore'); ?></p></div>
    707             </div>
    708             <div>
    709                 <strong>Retrying </strong>
     737            <div id="wpvivid_custom_backup_params" style="<?php esc_attr_e($backup_custom_setting_display); ?>">
     738                <div><strong><?php esc_html_e('Compress Files Every', 'wpvivid-backuprestore'); ?></strong></div>
     739                <div class="setting-tab-block">
     740                    <input type="text" placeholder="200" option="setting" name="max_file_size" id="wpvivid_max_zip" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $max_file_size)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
     741                    <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website.  Please try to adjust the value if you are encountering backup errors. When you set a value of 0MB, backups will be split every 4GB.', 'wpvivid-backuprestore' ); ?></div></p>
     742                </div>
     743                <div><strong><?php esc_html_e('Exclude the files which are larger than', 'wpvivid-backuprestore'); ?></strong></div>
     744                <div class="setting-tab-block">
     745                    <input type="text" placeholder="0" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php echo esc_attr($exclude_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
     746                    <div><p><?php esc_html_e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid-backuprestore' ); ?></p></div>
     747                </div>
     748                <div><strong><?php esc_html_e('PHP script execution timeout for backup', 'wpvivid-backuprestore'); ?></strong></div>
     749                <div class="setting-tab-block">
     750                    <input type="text" placeholder="900" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php echo esc_attr($max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?>
     751                    <div><p><?php esc_html_e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid-backuprestore' ); ?></p></div>
     752                </div>
     753                <div><strong><?php esc_html_e('PHP Memory Limit for backup', 'wpvivid-backuprestore'); ?></strong></div>
     754                <div class="setting-tab-block">
     755                    <input type="text" placeholder="256" option="setting" name="memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
     756                    <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin to run a backup. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div>
     757                </div>
     758                <div><strong><?php esc_html_e('The number of files compressed to the backup zip each time', 'wpvivid-backuprestore'); ?></strong></div>
     759                <div class="setting-tab-block">
     760                    <input type="text" placeholder="500" option="setting" name="compress_file_count" id="wpvivid_compress_file_count" class="all-options" value="<?php echo esc_attr($compress_file_count); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Files', 'wpvivid-backuprestore'); ?>
     761                    <div><p><?php esc_html_e( 'When taking a backup, the plugin will compress this number of files to the backup zip each time. The default value is 500. The lower the value, the longer time the backup will take, but the higher the backup success rate. If you encounter a backup timeout issue, try to decrease this value.', 'wpvivid-backuprestore' ); ?></p></div>
     762                </div>
     763                <div><strong><?php esc_html_e('Split a sql file every this size', 'wpvivid-backuprestore'); ?></strong></div>
     764                <div class="setting-tab-block">
     765                    <input type="text" placeholder="200" option="setting" name="max_sql_file_size" id="wpvivid_max_sql_file_size" class="all-options" value="<?php echo esc_attr($max_sql_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('MB', 'wpvivid-backuprestore'); ?>
     766                    <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. If you use a value of 0 MB, any backup files won\'t be split.', 'wpvivid-backuprestore' ); ?></p></div>
     767                </div>
     768                <div><strong><?php esc_html_e('Chunk Size', 'wpvivid-backuprestore'); ?></strong></div>
     769                <div class="setting-tab-block">
     770                    <input type="text" placeholder="2048" option="setting" name="migrate_size" class="all-options" value="<?php echo esc_attr($migrate_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />KB
     771                    <div><p><?php esc_html_e('e.g. if you choose a chunk size of 2MB, a 8MB file will use 4 chunks. Decreasing this value will break the ISP\'s transmission limit, for example:512KB', 'wpvivid-backuprestore'); ?></p></div>
     772                </div>
     773                <div>
     774                    <strong>Retrying </strong>
    710775                    <select option="setting" name="max_resume_count">
    711                     <?php
    712                     for($resume_count=3; $resume_count<10; $resume_count++){
    713                         if($resume_count === $wpvivid_max_resume_count){
    714                             echo '<option selected="selected" value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>';
     776                        <?php
     777                        for($resume_count=3; $resume_count<10; $resume_count++){
     778                            if($resume_count === $wpvivid_max_resume_count){
     779                                echo '<option selected="selected" value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>';
     780                            }
     781                            else{
     782                                echo '<option value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>';
     783                            }
    715784                        }
    716                         else{
    717                             echo '<option value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>';
    718                         }
    719                     }
    720                     ?>
     785                        ?>
    721786                    </select>
    722                 <strong> times when encountering a time-out error</strong>
     787                    <strong> times when encountering a time-out error</strong>
     788                </div>
    723789            </div>
    724790        </div>
     
    734800        <div class="setting-tab-block">
    735801            <input type="text" placeholder="1000" option="setting" name="unzip_files_pre_request" class="all-options" value="<?php echo esc_attr($unzip_files_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />Files are unzipped every PHP request
     802        </div>
     803        <div><strong><?php esc_html_e('PHP script execution timeout for restore', 'wpvivid-backuprestore'); ?></strong></div>
     804        <div class="setting-tab-block">
     805            <input type="text" placeholder="300" option="setting" name="restore_max_execution_time" class="all-options" value="<?php echo esc_attr($restore_max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?>
     806            <div><p><?php esc_html_e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of restore down. If the progress of restore encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid-backuprestore' ); ?></p></div>
     807        </div>
     808        <div><strong><?php esc_html_e('PHP Memory Limit for restoration', 'wpvivid-backuprestore'); ?></strong></div>
     809        <div class="setting-tab-block">
     810            <input type="text" placeholder="256" option="setting" name="restore_memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $restore_memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
     811            <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin in restore process. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div>
     812        </div>
     813        <div><strong><?php esc_html_e('Maximum rows of data to be processed per request for restoration', 'wpvivid-backuprestore'); ?></strong></div>
     814        <div class="setting-tab-block">
     815            <input type="text" placeholder="10000" option="setting" name="replace_rows_pre_request" class="all-options" value="<?php echo esc_attr($replace_rows_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />rows
     816            <div><p><?php esc_html_e('The smaller it is, the slower the restoration will be, but the lower the chance of a timeout error.', 'wpvivid-backuprestore'); ?></p></div>
     817        </div>
     818        <div><strong><?php esc_html_e('Maximum size of sql file to be imported per request for restoration', 'wpvivid-backuprestore'); ?></strong></div>
     819        <div class="setting-tab-block">
     820            <input type="text" placeholder="5" option="setting" name="sql_file_buffer_pre_request" class="all-options" value="<?php echo esc_attr($sql_file_buffer_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
     821            <div><p><?php esc_html_e('Maximum rows of data to be processed per request.', 'wpvivid-backuprestore'); ?></p></div>
    736822        </div>
    737823    </div>
  • wpvivid-backuprestore/trunk/includes/class-wpvivid-backup-uploader.php

    r3110132 r3242904  
    307307
    308308            $fileName = isset($_REQUEST["name"]) ? sanitize_text_field($_REQUEST["name"]) : $_FILES["file"]["name"];
     309            $validate = wp_check_filetype( $fileName );
     310            if ( $validate['type'] == false )
     311            {
     312                echo wp_json_encode(array('result'=>'failed','error'=>"File type is not allowed."));
     313                die();
     314            }
    309315
    310316            $backupdir=WPvivid_Setting::get_backupdir();
  • wpvivid-backuprestore/trunk/includes/class-wpvivid.php

    r3225201 r3242904  
    55405540    public function wpvivid_set_general_setting($setting_data, $setting, $options)
    55415541    {
    5542         $setting['exclude_file_size'] = intval($setting['exclude_file_size']);
    5543         $setting['max_execution_time'] = intval($setting['max_execution_time']);
     5542        $setting_data['wpvivid_common_setting']['backup_params'] = $setting['backup_params'];
     5543        if($setting_data['wpvivid_common_setting']['backup_params'] === 'low')
     5544        {
     5545            $setting_data['wpvivid_common_setting']['compress_file_count'] = 500;
     5546            $setting_data['wpvivid_common_setting']['max_file_size'] = '200';
     5547            $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 400;
     5548            $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0;
     5549            $setting_data['wpvivid_common_setting']['max_execution_time'] = 300;
     5550            $setting_data['wpvivid_common_setting']['memory_limit'] = '512M';
     5551            $setting_data['wpvivid_common_setting']['migrate_size'] = '2048';
     5552            $setting_data['wpvivid_common_setting']['max_resume_count'] = 6;
     5553        }
     5554        else if($setting_data['wpvivid_common_setting']['backup_params'] === 'mid')
     5555        {
     5556            $setting_data['wpvivid_common_setting']['compress_file_count'] = 2000;
     5557            $setting_data['wpvivid_common_setting']['max_file_size'] = '1024';
     5558            $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 1024;
     5559            $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0;
     5560            $setting_data['wpvivid_common_setting']['max_execution_time'] = 500;
     5561            $setting_data['wpvivid_common_setting']['memory_limit'] = '512M';
     5562            $setting_data['wpvivid_common_setting']['migrate_size'] = '2048';
     5563            $setting_data['wpvivid_common_setting']['max_resume_count'] = 6;
     5564        }
     5565        else if($setting_data['wpvivid_common_setting']['backup_params'] === 'high')
     5566        {
     5567            $setting_data['wpvivid_common_setting']['compress_file_count'] = 10000;
     5568            $setting_data['wpvivid_common_setting']['max_file_size'] = '4080';
     5569            $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 4080;
     5570            $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0;
     5571            $setting_data['wpvivid_common_setting']['max_execution_time'] = 900;
     5572            $setting_data['wpvivid_common_setting']['memory_limit'] = '512M';
     5573            $setting_data['wpvivid_common_setting']['migrate_size'] = '2048';
     5574            $setting_data['wpvivid_common_setting']['max_resume_count'] = 6;
     5575        }
     5576        else if($setting_data['wpvivid_common_setting']['backup_params'] === 'custom')
     5577        {
     5578            $setting_data['wpvivid_common_setting']['compress_file_count'] = intval($setting['compress_file_count']);
     5579            $setting_data['wpvivid_common_setting']['max_file_size'] = $setting['max_file_size'];
     5580            $setting_data['wpvivid_common_setting']['max_sql_file_size'] = intval($setting['max_sql_file_size']);
     5581            $setting_data['wpvivid_common_setting']['exclude_file_size'] = intval($setting['exclude_file_size']);
     5582            $setting_data['wpvivid_common_setting']['max_execution_time'] = intval($setting['max_execution_time']);
     5583            $setting_data['wpvivid_common_setting']['memory_limit'] = $setting['memory_limit'].'M';
     5584            $setting_data['wpvivid_common_setting']['migrate_size'] = $setting['migrate_size'];
     5585            $setting_data['wpvivid_common_setting']['max_resume_count'] = $setting['max_resume_count'];
     5586        }
     5587
     5588
    55445589        $setting['restore_max_execution_time'] = intval($setting['restore_max_execution_time']);
    55455590        $setting['max_backup_count'] = intval($setting['max_backup_count']);
    5546         $setting['max_resume_count'] = intval($setting['max_resume_count']);
    55475591
    55485592        $setting_data['wpvivid_email_setting']['send_to'][] = $setting['send_to'];
     
    55525596        }
    55535597
    5554         $setting_data['wpvivid_common_setting']['max_file_size'] = $setting['max_file_size'];
    5555         $setting_data['wpvivid_common_setting']['exclude_file_size'] = $setting['exclude_file_size'];
    5556 
    55575598        $setting['path']=esc_attr($setting['path']);
    55585599        $setting_data['wpvivid_local_setting']['path'] = $setting['path'];
     
    55685609        $setting_data['wpvivid_local_setting']['save_local'] = $options['options']['wpvivid_local_setting']['save_local'];
    55695610
    5570         $setting_data['wpvivid_common_setting']['max_execution_time'] = $setting['max_execution_time'];
    55715611        $setting_data['wpvivid_common_setting']['restore_max_execution_time'] = $setting['restore_max_execution_time'];
    55725612        $setting_data['wpvivid_common_setting']['log_save_location'] = $setting['path'].'/wpvivid_log';
    55735613        $setting_data['wpvivid_common_setting']['max_backup_count'] = $setting['max_backup_count'];
    55745614        $setting_data['wpvivid_common_setting']['show_admin_bar'] = $setting['show_admin_bar'];
    5575         //$setting_data['wpvivid_common_setting']['show_tab_menu'] = $setting['show_tab_menu'];
    55765615        $setting_data['wpvivid_common_setting']['domain_include'] = $setting['domain_include'];
    55775616        $setting_data['wpvivid_common_setting']['estimate_backup'] = $setting['estimate_backup'];
    5578         $setting_data['wpvivid_common_setting']['max_resume_count'] = $setting['max_resume_count'];
    5579         $setting_data['wpvivid_common_setting']['memory_limit'] = $setting['memory_limit'].'M';
    55805617        $setting_data['wpvivid_common_setting']['restore_memory_limit'] = $setting['restore_memory_limit'].'M';
    5581         $setting_data['wpvivid_common_setting']['migrate_size'] = $setting['migrate_size'];
    55825618        $setting_data['wpvivid_common_setting']['ismerge'] = $setting['ismerge'];
    55835619        $setting_data['wpvivid_common_setting']['db_connect_method'] = $setting['db_connect_method'];
     
    55875623
    55885624        //new
    5589         $setting_data['wpvivid_common_setting']['compress_file_count'] = intval($setting['compress_file_count']);
    5590         $setting_data['wpvivid_common_setting']['max_sql_file_size'] = intval($setting['max_sql_file_size']);
    55915625
    55925626        $setting_data['wpvivid_common_setting']['replace_rows_pre_request'] = intval($setting['replace_rows_pre_request']);
  • wpvivid-backuprestore/trunk/includes/new_backup/class-wpvivid-backup2.php

    r3205220 r3242904  
    233233        $common_setting=get_option('wpvivid_common_setting',array());
    234234        $settings['db_connect_method']=isset($common_setting['db_connect_method'])?$common_setting['db_connect_method']:'wpdb';
    235         $settings['memory_limit']=isset($common_setting['memory_limit'])?$common_setting['memory_limit']:'256M';
     235        $settings['memory_limit']=isset($common_setting['memory_limit'])?$common_setting['memory_limit']:'512M';
    236236        $settings['max_execution_time']=isset($common_setting['max_execution_time'])?$common_setting['max_execution_time']:900;
    237237        $settings['compress_file_use_cache']=isset($common_setting['compress_file_use_cache'])?$common_setting['compress_file_use_cache']:false;
  • wpvivid-backuprestore/trunk/wpvivid-backuprestore.php

    r3225201 r3242904  
    88 * Plugin Name:       WPvivid Backup Plugin
    99 * Description:       Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
    10  * Version:           0.9.112
     10 * Version:           0.9.113
    1111 * Author:            WPvivid Backup & Migration
    1212 * Author URI:        https://wpvivid.com
     
    2222}
    2323
    24 define( 'WPVIVID_PLUGIN_VERSION', '0.9.112' );
     24define( 'WPVIVID_PLUGIN_VERSION', '0.9.113' );
    2525//
    2626define('WPVIVID_RESTORE_INIT','init');
     
    4141define('WPVIVID_MAX_EXECUTION_TIME',300);
    4242define('WPVIVID_RESTORE_MAX_EXECUTION_TIME', 300);
    43 define('WPVIVID_MEMORY_LIMIT','256M');
     43define('WPVIVID_MEMORY_LIMIT','512M');
    4444define('WPVIVID_RESTORE_MEMORY_LIMIT','512M');
    4545define('WPVIVID_MIGRATE_SIZE', '2048');
Note: See TracChangeset for help on using the changeset viewer.