Version Description
- fix problems in cron calculation
Download this release
Release Info
Developer | danielhuesken |
Plugin | BackWPup – WordPress Backup Plugin |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.7.5
- app/backwpup_dojob.php +0 -1
- app/css/backup-icon.gif +0 -0
- app/php-functions.php +10 -8
- backwpup.php +2 -2
- readme.txt +4 -1
app/backwpup_dojob.php
CHANGED
@@ -98,7 +98,6 @@ class backwpup_dojob {
|
|
98 |
//Set job start settings
|
99 |
$jobs[$this->jobid]['starttime']=current_time('timestamp'); //set start time for job
|
100 |
$jobs[$this->jobid]['logfile']=$this->logdir.$this->logfile; //Set current logfile
|
101 |
-
$jobs[$this->jobid]['cronnextrun']=backwpup_cron_next($jobs[$this->jobid]['cron']); //set next run
|
102 |
$jobs[$this->jobid]['lastbackupdownloadurl']='';
|
103 |
$jobs[$this->jobid]['lastlogfile']=$this->logdir.$this->logfile;
|
104 |
$jobs[$this->jobid]['cronnextrun']=backwpup_cron_next($jobs[$this->jobid]['cron']); //set next run
|
98 |
//Set job start settings
|
99 |
$jobs[$this->jobid]['starttime']=current_time('timestamp'); //set start time for job
|
100 |
$jobs[$this->jobid]['logfile']=$this->logdir.$this->logfile; //Set current logfile
|
|
|
101 |
$jobs[$this->jobid]['lastbackupdownloadurl']='';
|
102 |
$jobs[$this->jobid]['lastlogfile']=$this->logdir.$this->logfile;
|
103 |
$jobs[$this->jobid]['cronnextrun']=backwpup_cron_next($jobs[$this->jobid]['cron']); //set next run
|
app/css/backup-icon.gif
DELETED
Binary file
|
app/php-functions.php
CHANGED
@@ -280,7 +280,6 @@ function backwpup_cron() {
|
|
280 |
if (!$jobvalue['activated'])
|
281 |
continue;
|
282 |
if ($jobvalue['cronnextrun']<=current_time('timestamp')) {
|
283 |
-
|
284 |
define('DONOTCACHEPAGE', true);
|
285 |
define('DONOTCACHEDB', true);
|
286 |
define('DONOTMINIFY', true);
|
@@ -700,7 +699,7 @@ function backwpup_cron_next($cronstring) {
|
|
700 |
if (strstr($value,'-')) {
|
701 |
list($first,$last)=explode('-',$value,2);
|
702 |
if (!is_numeric($first) or !is_numeric($last) or $last>60 or $first>60) //check
|
703 |
-
return
|
704 |
if ($cronarraykey=='minutes' and $step<5) //set step ninmum to 5 min.
|
705 |
$step=5;
|
706 |
$range=array();
|
@@ -774,29 +773,32 @@ function backwpup_cron_next($cronstring) {
|
|
774 |
if (strtolower($value)=='fri')
|
775 |
$value=5;
|
776 |
if (!is_numeric($value) or $value>60) //check
|
777 |
-
return
|
778 |
$cron[$cronarraykey]=array_merge($cron[$cronarraykey],array(0=>$value));
|
779 |
}
|
780 |
}
|
781 |
}
|
782 |
-
|
|
|
|
|
|
|
783 |
//calc next timestamp
|
784 |
$currenttime=current_time('timestamp');
|
785 |
-
foreach (
|
786 |
foreach ($cron['mon'] as $mon) {
|
787 |
foreach ($cron['mday'] as $mday) {
|
788 |
foreach ($cron['hours'] as $hours) {
|
789 |
foreach ($cron['minutes'] as $minutes) {
|
790 |
$timestamp=mktime($hours,$minutes,0,$mon,$mday,$year);
|
791 |
-
if (in_array(date('w',$timestamp),$cron['wday']) and $timestamp>$currenttime) {
|
792 |
-
|
793 |
}
|
794 |
}
|
795 |
}
|
796 |
}
|
797 |
}
|
798 |
}
|
799 |
-
return
|
800 |
}
|
801 |
|
802 |
function backwpup_env_checks() {
|
280 |
if (!$jobvalue['activated'])
|
281 |
continue;
|
282 |
if ($jobvalue['cronnextrun']<=current_time('timestamp')) {
|
|
|
283 |
define('DONOTCACHEPAGE', true);
|
284 |
define('DONOTCACHEDB', true);
|
285 |
define('DONOTMINIFY', true);
|
699 |
if (strstr($value,'-')) {
|
700 |
list($first,$last)=explode('-',$value,2);
|
701 |
if (!is_numeric($first) or !is_numeric($last) or $last>60 or $first>60) //check
|
702 |
+
return 2147483647;
|
703 |
if ($cronarraykey=='minutes' and $step<5) //set step ninmum to 5 min.
|
704 |
$step=5;
|
705 |
$range=array();
|
773 |
if (strtolower($value)=='fri')
|
774 |
$value=5;
|
775 |
if (!is_numeric($value) or $value>60) //check
|
776 |
+
return 2147483647;
|
777 |
$cron[$cronarraykey]=array_merge($cron[$cronarraykey],array(0=>$value));
|
778 |
}
|
779 |
}
|
780 |
}
|
781 |
+
//generate next 10 years
|
782 |
+
for ($i=date('Y');$i<2038;$i++)
|
783 |
+
$cron['year'][]=$i;
|
784 |
+
|
785 |
//calc next timestamp
|
786 |
$currenttime=current_time('timestamp');
|
787 |
+
foreach ($cron['year'] as $year) {
|
788 |
foreach ($cron['mon'] as $mon) {
|
789 |
foreach ($cron['mday'] as $mday) {
|
790 |
foreach ($cron['hours'] as $hours) {
|
791 |
foreach ($cron['minutes'] as $minutes) {
|
792 |
$timestamp=mktime($hours,$minutes,0,$mon,$mday,$year);
|
793 |
+
if ($timestamp and in_array(date('j',$timestamp),$cron['mday']) and in_array(date('w',$timestamp),$cron['wday']) and $timestamp>$currenttime) {
|
794 |
+
return $timestamp;
|
795 |
}
|
796 |
}
|
797 |
}
|
798 |
}
|
799 |
}
|
800 |
}
|
801 |
+
return 2147483647;
|
802 |
}
|
803 |
|
804 |
function backwpup_env_checks() {
|
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.5
|
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.5');
|
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.4 =
|
106 |
* jobs not longer work ever... max. time is 5 min.
|
107 |
* hopfuly fix for dropbox upload
|
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.5
|
8 |
|
9 |
Backup your WordPress Database and Files, and more!
|
10 |
|
102 |
1. Job Page
|
103 |
|
104 |
== Changelog ==
|
105 |
+
= 1.7.5 =
|
106 |
+
* fix problems in cron calculation
|
107 |
+
|
108 |
= 1.7.4 =
|
109 |
* jobs not longer work ever... max. time is 5 min.
|
110 |
* hopfuly fix for dropbox upload
|