Version Description
Download this release
Release Info
| Developer | wpdprx |
| Plugin | |
| Version | 0.1.3 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.2 to 0.1.3
- backupwordpress.php +7 -3
- bkpwp-classes/schedule.php +30 -0
- bkpwp-pages/bkpwp_manage_backups.php +12 -10
- bkpwp-pages/bkpwp_schedule.php +7 -7
- functions.php +1 -1
backupwordpress.php
CHANGED
|
@@ -4,7 +4,7 @@ Plugin Name: BackUpWordPress
|
|
| 4 |
Plugin URI: http://wordpress.designpraxis.at
|
| 5 |
Description: Manage <a href="admin.php?page=backupwordpress/backupwordpress.php">WordPress Backups</a>. Beta Release. Please help testing and give me feedback under the comments section of <a href="http://wordpress.designpraxis.at/plugins/backupwordpress/">the Plugin page</a>. Backup DB, Files & Folders, use .tar.gz, .zip, Exclude List, etc.
|
| 6 |
Author: Roland Rust
|
| 7 |
-
Version: 0.1.
|
| 8 |
Author URI: http://wordpress.designpraxis.at
|
| 9 |
*/
|
| 10 |
|
|
@@ -16,6 +16,10 @@ backupwordpress\Archive\Writer\Tar.php has been debugged around line 80 to handl
|
|
| 16 |
/*
|
| 17 |
|
| 18 |
Changelog:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
Changes in 0.1.2:
|
| 21 |
- bug fixed: Backup-Now doesn't call Sajax
|
|
@@ -69,10 +73,10 @@ add_filter('cron_schedules', 'bkpwp_more_reccurences');
|
|
| 69 |
|
| 70 |
add_action('bkpwp_schedule_bkpwp_hook','bkpwp_schedule_bkpwp');
|
| 71 |
|
| 72 |
-
if (eregi("backupwordpress",$_REQUEST['page'])) {
|
| 73 |
add_action('admin_head', 'bkpwp_sajax_js');
|
| 74 |
}
|
| 75 |
-
if (eregi("backupwordpress",$_REQUEST['page']) || $_SERVER['REQUEST_URI'] == "/wp-admin/index.php") {
|
| 76 |
add_action('admin_head', 'bkpwp_load_css_and_js');
|
| 77 |
}
|
| 78 |
|
| 4 |
Plugin URI: http://wordpress.designpraxis.at
|
| 5 |
Description: Manage <a href="admin.php?page=backupwordpress/backupwordpress.php">WordPress Backups</a>. Beta Release. Please help testing and give me feedback under the comments section of <a href="http://wordpress.designpraxis.at/plugins/backupwordpress/">the Plugin page</a>. Backup DB, Files & Folders, use .tar.gz, .zip, Exclude List, etc.
|
| 6 |
Author: Roland Rust
|
| 7 |
+
Version: 0.1.3
|
| 8 |
Author URI: http://wordpress.designpraxis.at
|
| 9 |
*/
|
| 10 |
|
| 16 |
/*
|
| 17 |
|
| 18 |
Changelog:
|
| 19 |
+
|
| 20 |
+
Changes in 0.1.3:
|
| 21 |
+
- ajax problems fixed
|
| 22 |
+
- schedules last run timestamp fixed
|
| 23 |
|
| 24 |
Changes in 0.1.2:
|
| 25 |
- bug fixed: Backup-Now doesn't call Sajax
|
| 73 |
|
| 74 |
add_action('bkpwp_schedule_bkpwp_hook','bkpwp_schedule_bkpwp');
|
| 75 |
|
| 76 |
+
if (eregi("backupwordpress",$_REQUEST['page']) || eregi("bkpwp",$_REQUEST['page'])) {
|
| 77 |
add_action('admin_head', 'bkpwp_sajax_js');
|
| 78 |
}
|
| 79 |
+
if (eregi("backupwordpress",$_REQUEST['page']) || eregi("bkpwp",$_REQUEST['page']) || $_SERVER['REQUEST_URI'] == "/wp-admin/index.php") {
|
| 80 |
add_action('admin_head', 'bkpwp_load_css_and_js');
|
| 81 |
}
|
| 82 |
|
bkpwp-classes/schedule.php
CHANGED
|
@@ -16,6 +16,18 @@ class BKPWP_SCHEDULE {
|
|
| 16 |
}
|
| 17 |
}
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
function bkpwp_delete_schedule_by_created($created) {
|
| 20 |
$schedules = get_option("bkpwp_schedules");
|
| 21 |
$newschedules = array();
|
|
@@ -35,6 +47,24 @@ class BKPWP_SCHEDULE {
|
|
| 35 |
return $ret;
|
| 36 |
}
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
function bkpwp_toggle_schedule($created) {
|
| 39 |
$schedules = get_option("bkpwp_schedules");
|
| 40 |
$newschedules = array();
|
| 16 |
}
|
| 17 |
}
|
| 18 |
|
| 19 |
+
function bkpwp_update_schedule($options) {
|
| 20 |
+
$schedules = get_option("bkpwp_schedules");
|
| 21 |
+
$newschedules = array();
|
| 22 |
+
foreach($schedules as $s) {
|
| 23 |
+
if ($s['created'] == $options['created']) {
|
| 24 |
+
$s = $options;
|
| 25 |
+
}
|
| 26 |
+
$newschedules = $s;
|
| 27 |
+
}
|
| 28 |
+
update_option("bkpwp_schedules",$newschedules);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
function bkpwp_delete_schedule_by_created($created) {
|
| 32 |
$schedules = get_option("bkpwp_schedules");
|
| 33 |
$newschedules = array();
|
| 47 |
return $ret;
|
| 48 |
}
|
| 49 |
|
| 50 |
+
|
| 51 |
+
function bkpwp_unset_schedules() {
|
| 52 |
+
$crons = get_option("cron");
|
| 53 |
+
if (is_array($crons)) {
|
| 54 |
+
foreach($crons as $timestamp => $cron) {
|
| 55 |
+
if (!is_array($cron)) { continue; }
|
| 56 |
+
foreach($cron as $hook => $options) {
|
| 57 |
+
if($hook == "bkpwp_schedule_bkpwp_hook") {
|
| 58 |
+
foreach ($options as $key=>$value) {
|
| 59 |
+
wp_unschedule_event($timestamp,$hook,$value['args']);
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
|
| 68 |
function bkpwp_toggle_schedule($created) {
|
| 69 |
$schedules = get_option("bkpwp_schedules");
|
| 70 |
$newschedules = array();
|
bkpwp-pages/bkpwp_manage_backups.php
CHANGED
|
@@ -347,17 +347,19 @@ if (count($backup_archives) < 1) {
|
|
| 347 |
</tr>
|
| 348 |
<?php
|
| 349 |
$i=0;
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
}
|
| 357 |
-
if ($alternate == "") { $alternate = "alternate"; } else { $alternate = ""; }
|
| 358 |
-
$backup = new BKPWP_BACKUP_ARCHIVE();
|
| 359 |
-
$backup->bkpwp_get_backup_row($f,$alternate);
|
| 360 |
-
$i++;
|
| 361 |
}
|
| 362 |
?>
|
| 363 |
</tbody>
|
| 347 |
</tr>
|
| 348 |
<?php
|
| 349 |
$i=0;
|
| 350 |
+
if (is_array($backup_archives)) {
|
| 351 |
+
foreach ($backup_archives as $f) {
|
| 352 |
+
if (!file_exists($f['file'])) {
|
| 353 |
+
continue;
|
| 354 |
+
}
|
| 355 |
+
if ($i > $backups->bkpwp_max_views()) {
|
| 356 |
+
break;
|
| 357 |
+
}
|
| 358 |
+
if ($alternate == "") { $alternate = "alternate"; } else { $alternate = ""; }
|
| 359 |
+
$backup = new BKPWP_BACKUP_ARCHIVE();
|
| 360 |
+
$backup->bkpwp_get_backup_row($f,$alternate);
|
| 361 |
+
$i++;
|
| 362 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
}
|
| 364 |
?>
|
| 365 |
</tbody>
|
bkpwp-pages/bkpwp_schedule.php
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
function bkpwp_schedulelist($bkpwppath) {
|
| 4 |
//delete_option("cron");
|
| 5 |
echo "<h2>".__("Manage Backup Schedules","bkpwp")."</h2>";
|
|
@@ -12,10 +11,6 @@ function bkpwp_schedulelist($bkpwppath) {
|
|
| 12 |
</fieldset>
|
| 13 |
</form>
|
| 14 |
<?php
|
| 15 |
-
$crons = get_option("cron");
|
| 16 |
-
if (!is_array($crons)) {
|
| 17 |
-
return;
|
| 18 |
-
}
|
| 19 |
$schedules = get_option("bkpwp_schedules");
|
| 20 |
?>
|
| 21 |
<table class="widefat">
|
|
@@ -42,7 +37,7 @@ function bkpwp_schedulelist($bkpwppath) {
|
|
| 42 |
if (!empty($options['lastrun'])) {
|
| 43 |
echo date(get_option('date_format'),strtotime($options['lastrun']))." ".date("H:i",strtotime($options['lastrun']));
|
| 44 |
} else {
|
| 45 |
-
|
| 46 |
}
|
| 47 |
?></th>
|
| 48 |
<td>
|
|
@@ -55,6 +50,7 @@ function bkpwp_schedulelist($bkpwppath) {
|
|
| 55 |
<td>
|
| 56 |
<?php
|
| 57 |
$now = time();
|
|
|
|
| 58 |
$d = $timestamp - $now;
|
| 59 |
if (!empty($timestamp)) { ?>
|
| 60 |
<div id="countdowncontainer<?php echo $timestamp; ?>"></div>
|
|
@@ -169,7 +165,11 @@ function bkpwp_schedulelist($bkpwppath) {
|
|
| 169 |
<?php
|
| 170 |
}
|
| 171 |
if (!empty($_REQUEST['bkpwp_reset_schedules'])) {
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
delete_option("bkpwp_schedules");
|
| 174 |
$options = new BKPWP_OPTIONS();
|
| 175 |
$options->bkpwp_default_schedules();
|
| 1 |
<?php
|
|
|
|
| 2 |
function bkpwp_schedulelist($bkpwppath) {
|
| 3 |
//delete_option("cron");
|
| 4 |
echo "<h2>".__("Manage Backup Schedules","bkpwp")."</h2>";
|
| 11 |
</fieldset>
|
| 12 |
</form>
|
| 13 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
$schedules = get_option("bkpwp_schedules");
|
| 15 |
?>
|
| 16 |
<table class="widefat">
|
| 37 |
if (!empty($options['lastrun'])) {
|
| 38 |
echo date(get_option('date_format'),strtotime($options['lastrun']))." ".date("H:i",strtotime($options['lastrun']));
|
| 39 |
} else {
|
| 40 |
+
_e("Not Yet","bkpwp");
|
| 41 |
}
|
| 42 |
?></th>
|
| 43 |
<td>
|
| 50 |
<td>
|
| 51 |
<?php
|
| 52 |
$now = time();
|
| 53 |
+
echo $now+120;
|
| 54 |
$d = $timestamp - $now;
|
| 55 |
if (!empty($timestamp)) { ?>
|
| 56 |
<div id="countdowncontainer<?php echo $timestamp; ?>"></div>
|
| 165 |
<?php
|
| 166 |
}
|
| 167 |
if (!empty($_REQUEST['bkpwp_reset_schedules'])) {
|
| 168 |
+
// for some reason wp_clear_scheduled_hook("bkpwp_schedule_bkpwp_hook") doesn't work
|
| 169 |
+
//wp_clear_scheduled_hook("bkpwp_schedule_bkpwp_hook");
|
| 170 |
+
$schedule = new BKPWP_SCHEDULE();
|
| 171 |
+
$schedule->bkpwp_unset_schedules();
|
| 172 |
+
|
| 173 |
delete_option("bkpwp_schedules");
|
| 174 |
$options = new BKPWP_OPTIONS();
|
| 175 |
$options->bkpwp_default_schedules();
|
functions.php
CHANGED
|
@@ -250,7 +250,7 @@ function bkpwp_more_reccurences($recc) {
|
|
| 250 |
}
|
| 251 |
|
| 252 |
function bkpwp_schedule_bkpwp($options) {
|
| 253 |
-
|
| 254 |
$backup = new BKPWP_BACKUP();
|
| 255 |
$backup->preset = new BKPWP_MANAGE();
|
| 256 |
$preset = $backup->preset->bkpwp_get_preset($options);
|
| 250 |
}
|
| 251 |
|
| 252 |
function bkpwp_schedule_bkpwp($options) {
|
| 253 |
+
|
| 254 |
$backup = new BKPWP_BACKUP();
|
| 255 |
$backup->preset = new BKPWP_MANAGE();
|
| 256 |
$preset = $backup->preset->bkpwp_get_preset($options);
|
