Пример #1
0
     $final_write_speed = pb_backupbuddy::$format->file_size($write_speed_sum / $write_speed_samples) . '/sec';
     $final_write_speed_guess = pb_backupbuddy::$format->file_size($write_speed_sum / $write_speed_samples * ini_get('max_execution_time'));
 } else {
     $final_write_speed = '<i>Unknown</i>';
     $final_write_speed_guess = '<i>Unknown</i>';
 }
 $parent_class_test = array('title' => 'Average Write Speed', 'suggestion' => 'n/a', 'value' => $final_write_speed, 'tip' => __('Average ZIP file creation write speed. Backup file sizes divided by the time taken to create each. Samples: `' . $write_speed_samples . '`.', 'it-l10n-backupbuddy'));
 $parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy');
 array_push($tests, $parent_class_test);
 /***** END AVERAGE WRITE SPEED *****/
 // Guess max site size to be able to backup.
 $parent_class_test = array('title' => 'Guesstimate of max ZIP size', 'suggestion' => 'n/a', 'value' => $final_write_speed_guess, 'tip' => __('Calculated estimate of the largest .ZIP backup file that may be created. As ZIP files are compressed the site size that may be backed up should be larger than this.', 'it-l10n-backupbuddy'));
 $parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy');
 array_push($tests, $parent_class_test);
 // Http loopbacks.
 if (($loopback_response = backupbuddy_core::loopback_test()) === true) {
     $loopback_status = 'enabled';
     $status = 'OK';
 } else {
     $loopback_status = 'disabled (enable alternate cron)';
     $status = 'WARNING';
 }
 global $backupbuddy_loopback_details;
 $loopback_status .= ' <span title="' . htmlentities($backupbuddy_loopback_details) . '" style="font-style: italic;">Hover for details</span>';
 $parent_class_test = array('title' => 'Http Loopbacks', 'suggestion' => 'enabled', 'value' => $loopback_status, 'tip' => __('Some servers do are not configured properly to allow WordPress to connect back to itself via the site URL (ie: http://your.com connects back to itself on the same server at http://your.com/ to trigger a simulated cron step). If this is the case you must either ask your hosting provider to fix this or enable WordPres Alternate Cron mode in your wp-config.php file.', 'it-l10n-backupbuddy'));
 $parent_class_test['status'] = __($status, 'it-l10n-backupbuddy');
 array_push($tests, $parent_class_test);
 // wp-cron.php http loopbacks.
 if (($cronback_response = backupbuddy_core::cronback_test()) === true) {
     $cronback_status = 'enabled';
     $status = 'OK';