diff --git a/wp-content/plugins/wp-db-backup.php b/wp-content/plugins/wp-db-backup.php index a6195ba7b..cf93b2e13 100644 --- a/wp-content/plugins/wp-db-backup.php +++ b/wp-content/plugins/wp-db-backup.php @@ -36,8 +36,7 @@ class wpdbBackup { } function wpdbBackup() { - load_plugin_textdomain('wp-db-backup'); - + add_action('wp_cron_daily', array(&$this, 'wp_cron_daily')); $this->backup_dir = trailingslashit($this->backup_dir); @@ -58,14 +57,14 @@ class wpdbBackup { add_action('init', array(&$this, 'init')); } else { add_action('admin_menu', array(&$this, 'admin_menu')); - } + } } function init() { global $user_level; get_currentuserinfo(); - if ($user_level < 9) die('Need higher user level.'); + if ($user_level < 9) die(__('Need higher user level.')); if (isset($_GET['backup'])) { $via = isset($_GET['via']) ? $_GET['via'] : 'http'; @@ -86,7 +85,7 @@ class wpdbBackup { } } echo ' - alert("' . __('Backup Complete!', 'wp-db-backup') . '"); + alert("' . __('Backup Complete!') . '"); '; break; @@ -112,10 +111,10 @@ class wpdbBackup { echo "
" . print_r($_POST, 1) . ""; - echo '
' . __('Backup Successful', 'wp-db-backup') . '!'; + $feedback = '
' . __('Backup Successful') . '!';
$file = $this->backup_file;
switch($_POST['deliver']) {
case 'http':
- $feedback .= '
' . sprintf(__('Your backup file: %2s should begin downloading shortly.', 'wp-db-backup'), get_settings('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
+ $feedback .= '
' . sprintf(__('Your backup file: %2s should begin downloading shortly.'), get_settings('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
break;
case 'smtp':
if (! is_email($_POST['backup_recipient'])) {
@@ -684,17 +683,17 @@ class wpdbBackup {
} else {
$feedback .= $_POST['backup_recipient'];
}
- $feedback = '
' . sprintf(__('Your backup has been emailed to %s', 'wp-db-backup'), $feedback);
+ $feedback = '
' . sprintf(__('Your backup has been emailed to %s'), $feedback);
break;
case 'none':
- $feedback .= '
' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"', 'wp-db-backup');
- $feedback .= ':
backup_dir}$file\">$file : " . filesize(ABSPATH . $this->backup_dir . $file) . __(' bytes', 'wp-db-backup');
+ $feedback .= '
' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"');
+ $feedback .= ':
backup_dir}$file\">$file : " . filesize(ABSPATH . $this->backup_dir . $file) . __(' bytes');
}
$feedback .= '
"; + $feedback .= '' . __('The following errors were reported') . ":"; foreach($this->backup_errors as $error) { $feedback .= "{$error}\n"; //Errors are already localized } @@ -708,7 +707,7 @@ class wpdbBackup { if (is_email($_POST['cron_backup_recipient'])) { update_option('wp_cron_backup_recipient', $_POST['cron_backup_recipient'], FALSE); } - $feedback .= ''; + $feedback .= '' . __('Scheduled Backup Options Saved!', 'wp-db-backup') . '
'; } // Simple table name storage @@ -739,13 +738,13 @@ class wpdbBackup { if ( @ mkdir( ABSPATH . $this->backup_dir) ) { @ chmod( ABSPATH . $this->backup_dir, $dir_perms); } else { - echo '' . __('Scheduled Backup Options Saved!') . '
"; + echo '' . __('WARNING: Your wp-content directory is NOT writable! We can not create the backup directory.', 'wp-db-backup') . '
' . ABSPATH . $this->backup_dir . ""; $WHOOPS = TRUE; } } if ( !is_writable( ABSPATH . $this->backup_dir) ) { - echo '' . __('WARNING: Your wp-content directory is NOT writable! We can not create the backup directory.') . '
' . ABSPATH . $this->backup_dir . ""; + echo '' . __('WARNING: Your backup directory is NOT writable! We can not create the backup directory.', 'wp-db-backup') . '
' . ABSPATH . ""; } if ( !file_exists( ABSPATH . $this->backup_dir . 'index.php') ) { @@ -753,28 +752,28 @@ class wpdbBackup { } echo "' . __('WARNING: Your backup directory is NOT writable! We can not create the backup directory.') . '
' . ABSPATH . ""; - echo '' . __('Backup', 'wp-db-backup') . '
'; - echo ''; + echo ' ' . __('Backup') . '
'; + echo ''; echo ' '; - echo ''; - echo __('What to do with the backup file', 'wp-db-backup') . ":
"; - echo '"; - echo ''; + echo ''; + echo __('What to do with the backup file') . ": '; echo ''; // this stuff only displays if wp_cron is installed if (function_exists('wp_cron_init')) { - echo '
"; + echo '"; + echo ''; echo ''; - echo sprintf(__(' %s', 'wp-db-backup'), ''); + echo sprintf(__(' %s'), ''); // Check DB dize. $table_status = $wpdb->get_results("SHOW TABLE STATUS FROM " . $this->backquote(DB_NAME)); @@ -792,45 +791,45 @@ class wpdbBackup { if (! $WHOOPS) { echo ''; - echo ''; + echo ''; } else { - echo '' . __('WARNING: Your backup directory is NOT writable!', 'wp-db-backup') . '
'; + echo '' . __('WARNING: Your backup directory is NOT writable!') . '
'; } echo ''; + echo ' '; $datetime = get_settings('date_format') . ' @ ' . get_settings('time_format'); - echo ' '; } // end of wp_cron section' . __('Last WP-Cron Daily Execution', 'wp-db-backup') . ': ' . date($datetime, get_option('wp_cron_daily_lastrun')) . '
'; + echo '
'; - echo __('Next WP-Cron Daily Execution', 'wp-db-backup') . ': ' . date($datetime, (get_option('wp_cron_daily_lastrun') + 86400)) . '' . __('Last WP-Cron Daily Execution') . ': ' . date($datetime, get_option('wp_cron_daily_lastrun')) . '
'; echo ''; + echo '
'; + echo __('Next WP-Cron Daily Execution') . ': ' . date($datetime, (get_option('wp_cron_daily_lastrun') + 86400)) . ''; echo '