Version Description
- cleanup brocken buckupfiels on job start
Download this release
Release Info
Developer | danielhuesken |
Plugin | BackWPup – WordPress Backup Plugin |
Version | 1.7.7 |
Comparing to | |
See all releases |
Code changes from version 1.7.6 to 1.7.7
- app/backwpup_dojob.php +13 -1
- backwpup.php +2 -2
- readme.txt +4 -1
app/backwpup_dojob.php
CHANGED
@@ -29,7 +29,7 @@ class backwpup_dojob {
|
|
29 |
@ini_get('safe_mode','Off'); //disable safe mode
|
30 |
@ini_set('ignore_user_abort','Off'); //Set PHP ini setting
|
31 |
ignore_user_abort(true); //user can't abort script (close windows or so.)
|
32 |
-
@set_time_limit(300);
|
33 |
$this->jobid=$jobid; //set job id
|
34 |
$this->cfg=get_option('backwpup'); //load config
|
35 |
$jobs=get_option('backwpup_jobs'); //load jobdata
|
@@ -109,6 +109,7 @@ class backwpup_dojob {
|
|
109 |
$this->tempdir=trailingslashit($this->cfg['dirtemp']);
|
110 |
if (empty($this->tempdir) or $this->tempdir=='/')
|
111 |
$this->tempdir=backwpup_get_upload_dir();
|
|
|
112 |
//only for jos that makes backups
|
113 |
if (in_array('FILE',$this->todo) or in_array('DB',$this->todo) or in_array('WPEXP',$this->todo)) {
|
114 |
//set Backup File format
|
@@ -124,6 +125,17 @@ class backwpup_dojob {
|
|
124 |
}
|
125 |
//set Backup file Name
|
126 |
$this->backupfile=$this->job['fileprefix'].date_i18n('Y-m-d_H-i-s').$this->backupfileformat;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
//check max script execution tme
|
129 |
if (ini_get('safe_mode') or strtolower(ini_get('safe_mode'))=='on' or ini_get('safe_mode')=='1')
|
29 |
@ini_get('safe_mode','Off'); //disable safe mode
|
30 |
@ini_set('ignore_user_abort','Off'); //Set PHP ini setting
|
31 |
ignore_user_abort(true); //user can't abort script (close windows or so.)
|
32 |
+
@set_time_limit(300); //set script run time limit to 300= Webserver timout
|
33 |
$this->jobid=$jobid; //set job id
|
34 |
$this->cfg=get_option('backwpup'); //load config
|
35 |
$jobs=get_option('backwpup_jobs'); //load jobdata
|
109 |
$this->tempdir=trailingslashit($this->cfg['dirtemp']);
|
110 |
if (empty($this->tempdir) or $this->tempdir=='/')
|
111 |
$this->tempdir=backwpup_get_upload_dir();
|
112 |
+
trigger_error(__('Temp folder is:','backwpup').$this->tempdir,E_USER_NOTICE);
|
113 |
//only for jos that makes backups
|
114 |
if (in_array('FILE',$this->todo) or in_array('DB',$this->todo) or in_array('WPEXP',$this->todo)) {
|
115 |
//set Backup File format
|
125 |
}
|
126 |
//set Backup file Name
|
127 |
$this->backupfile=$this->job['fileprefix'].date_i18n('Y-m-d_H-i-s').$this->backupfileformat;
|
128 |
+
//celanup brocken backupfiles
|
129 |
+
if ($dir = opendir($this->tempdir)) {
|
130 |
+
while (($file = readdir($dir)) !== false) {
|
131 |
+
if (is_readable($this->tempdir.$file) and is_file($this->tempdir.$file)) {
|
132 |
+
if ($file!='.' and $file!='..' and ((!empty($this->job['fileprefix']) and false !== strpos($file,$this->job['fileprefix']) or $file==DB_NAME.'.sql' )or false !== strpos($file,preg_replace( '/[^a-z0-9_\-]/', '', strtolower(get_bloginfo('name')) ).'.wordpress.'))) {
|
133 |
+
unlink($this->tempdir.$file);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
closedir($dir);
|
138 |
+
}
|
139 |
}
|
140 |
//check max script execution tme
|
141 |
if (ini_get('safe_mode') or strtolower(ini_get('safe_mode'))=='on' or ini_get('safe_mode')=='1')
|
backwpup.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: BackWPup
|
|
4 |
Plugin URI: http://danielhuesken.de/portfolio/backwpup/
|
5 |
Description: Backup and more of your WordPress Blog Database and Files.
|
6 |
Author: Daniel Hüsken
|
7 |
-
Version: 1.7.
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
@@ -34,7 +34,7 @@ if ( !defined('ABSPATH') )
|
|
34 |
//Set plugin dirname
|
35 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
36 |
//Set Plugin Version
|
37 |
-
define('BACKWPUP_VERSION', '1.7.
|
38 |
//Set User Capability
|
39 |
define('BACKWPUP_USER_CAPABILITY', '10');
|
40 |
//Set useable destinations
|
4 |
Plugin URI: http://danielhuesken.de/portfolio/backwpup/
|
5 |
Description: Backup and more of your WordPress Blog Database and Files.
|
6 |
Author: Daniel Hüsken
|
7 |
+
Version: 1.7.7
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
34 |
//Set plugin dirname
|
35 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
36 |
//Set Plugin Version
|
37 |
+
define('BACKWPUP_VERSION', '1.7.7');
|
38 |
//Set User Capability
|
39 |
define('BACKWPUP_USER_CAPABILITY', '10');
|
40 |
//Set useable destinations
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=danie
|
|
4 |
Tags: backup, admin, file, Database, mysql, Cron, ftp, S3, export, xml, Rackspace, Cloud, Azure, DropBox, SugarSync
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 3.1.3
|
7 |
-
Stable tag: 1.7.
|
8 |
|
9 |
Backup your WordPress Database and Files, and more!
|
10 |
|
@@ -102,6 +102,9 @@ Destinations are:
|
|
102 |
1. Job Page
|
103 |
|
104 |
== Changelog ==
|
|
|
|
|
|
|
105 |
= 1.7.6 =
|
106 |
* fix problem with a losing sql connection on job end
|
107 |
|
4 |
Tags: backup, admin, file, Database, mysql, Cron, ftp, S3, export, xml, Rackspace, Cloud, Azure, DropBox, SugarSync
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 3.1.3
|
7 |
+
Stable tag: 1.7.7
|
8 |
|
9 |
Backup your WordPress Database and Files, and more!
|
10 |
|
102 |
1. Job Page
|
103 |
|
104 |
== Changelog ==
|
105 |
+
= 1.7.7 =
|
106 |
+
* cleanup brocken buckupfiels on job start
|
107 |
+
|
108 |
= 1.7.6 =
|
109 |
* fix problem with a losing sql connection on job end
|
110 |
|