WP-DB-Backup - Version 2.0.5

Version Description

Download this release

Release Info

Developer filosofo
Plugin Icon 128x128 WP-DB-Backup
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

Files changed (2) hide show
  1. readme.txt +1 -1
  2. wp-db-backup.php +8 -3
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.ilfilosofo.com/blog/wp-db-backup/
4
  Tags: mysql, database, backup, cron
5
  Requires at least: 2.0
6
  Tested up to: 2.2
7
- Stable tag: 2.0.4
8
 
9
  On-demand backup of your WordPress database.
10
 
4
  Tags: mysql, database, backup, cron
5
  Requires at least: 2.0
6
  Tested up to: 2.2
7
+ Stable tag: 2.0.5
8
 
9
  On-demand backup of your WordPress database.
10
 
wp-db-backup.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ilfilosofo.com/blog/wp-db-backup
5
  Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup.php">Manage &rarr; Backup</a> to get started.
6
  Author: Austin Matzko
7
  Author URI: http://www.ilfilosofo.com/blog/
8
- Version: 2.0.4
9
 
10
  Development continued from that done by Skippy (http://www.skippy.net/)
11
 
@@ -48,6 +48,7 @@ class wpdbBackup {
48
  var $backup_dir = WP_BACKUP_DIR;
49
  var $backup_errors = array();
50
  var $basename;
 
51
 
52
  function gzip() {
53
  return function_exists('gzopen');
@@ -630,8 +631,10 @@ class wpdbBackup {
630
  * @return bool
631
  */
632
  function setup_phpmailer(&$phpmailer) {
633
- $phpmailer->AddAttachment($this->diskfile, $this->filename);
634
- $phpmailer->Body = $this->message;
 
 
635
  return true;
636
  }
637
 
@@ -688,7 +691,9 @@ class wpdbBackup {
688
  "--{$boundary}--\n";
689
 
690
  if (function_exists('wp_mail')) {
 
691
  wp_mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
 
692
  } else {
693
  mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
694
  }
5
  Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup.php">Manage &rarr; Backup</a> to get started.
6
  Author: Austin Matzko
7
  Author URI: http://www.ilfilosofo.com/blog/
8
+ Version: 2.0.5
9
 
10
  Development continued from that done by Skippy (http://www.skippy.net/)
11
 
48
  var $backup_dir = WP_BACKUP_DIR;
49
  var $backup_errors = array();
50
  var $basename;
51
+ var $useMailer = false;
52
 
53
  function gzip() {
54
  return function_exists('gzopen');
631
  * @return bool
632
  */
633
  function setup_phpmailer(&$phpmailer) {
634
+ if ( $this->useMailer ) :
635
+ $phpmailer->AddAttachment($this->diskfile, $this->filename);
636
+ $phpmailer->Body = $this->message;
637
+ endif;
638
  return true;
639
  }
640
 
691
  "--{$boundary}--\n";
692
 
693
  if (function_exists('wp_mail')) {
694
+ $this->useMailer = true;
695
  wp_mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
696
+ $this->useMailer = false;
697
  } else {
698
  mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
699
  }