Version Description
- Added: Once a backup is created, the plugin will check whether the zip is good and will prompt you if it is corrupted.
- Fixed some bugs in the plugin code.
- Successfully tested with WordPress 5.7.
Download this release
Release Info
Developer | wpvivid |
Plugin | Migration, Backup, Staging – WPvivid |
Version | 0.9.51 |
Comparing to | |
See all releases |
Code changes from version 0.9.50 to 0.9.51
- includes/class-wpvivid.php +49 -0
- readme.txt +7 -2
- wpvivid-backuprestore.php +2 -2
includes/class-wpvivid.php
CHANGED
@@ -130,6 +130,7 @@ class WPvivid {
|
|
130 |
add_filter('wpvivid_set_mail_body', array($this, 'set_mail_body'), 10, 2);
|
131 |
|
132 |
add_filter('wpvivid_get_oldest_backup_ids', array($this, 'get_oldest_backup_ids'), 10, 2);
|
|
|
133 |
|
134 |
//
|
135 |
//Initialisation schedule hook
|
@@ -1041,6 +1042,54 @@ class WPvivid {
|
|
1041 |
}
|
1042 |
}
|
1043 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1044 |
/**
|
1045 |
* Initialization backup task.
|
1046 |
*
|
130 |
add_filter('wpvivid_set_mail_body', array($this, 'set_mail_body'), 10, 2);
|
131 |
|
132 |
add_filter('wpvivid_get_oldest_backup_ids', array($this, 'get_oldest_backup_ids'), 10, 2);
|
133 |
+
add_filter('wpvivid_check_backup_completeness', array($this, 'check_backup_completeness'), 10, 2);
|
134 |
|
135 |
//
|
136 |
//Initialisation schedule hook
|
1042 |
}
|
1043 |
}
|
1044 |
|
1045 |
+
public function check_backup_completeness($check_res, $task_id){
|
1046 |
+
$task=WPvivid_taskmanager::get_task($task_id);
|
1047 |
+
if(isset($task['options']['backup_options']['ismerge'])){
|
1048 |
+
if($task['options']['backup_options']['ismerge'] == '1'){
|
1049 |
+
foreach ($task['options']['backup_options']['backup']['backup_merge']['result']['files'] as $file_info){
|
1050 |
+
$file_name = $file_info['file_name'];
|
1051 |
+
if(!$this->check_backup_file_json($file_name)){
|
1052 |
+
$check_res = false;
|
1053 |
+
}
|
1054 |
+
}
|
1055 |
+
}
|
1056 |
+
else{
|
1057 |
+
foreach ($task['options']['backup_options']['backup'] as $key => $value){
|
1058 |
+
foreach ($value['result']['files'] as $file_info){
|
1059 |
+
$file_name = $file_info['file_name'];
|
1060 |
+
if(!$this->check_backup_file_json($file_name)){
|
1061 |
+
$check_res = false;
|
1062 |
+
}
|
1063 |
+
}
|
1064 |
+
}
|
1065 |
+
}
|
1066 |
+
}
|
1067 |
+
return $check_res;
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
public function check_backup_file_json($file_name){
|
1071 |
+
$zip=new WPvivid_ZipClass();
|
1072 |
+
|
1073 |
+
$general_setting=WPvivid_Setting::get_setting(true, "");
|
1074 |
+
$backup_folder = $general_setting['options']['wpvivid_local_setting']['path'];
|
1075 |
+
$backup_path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$backup_folder.DIRECTORY_SEPARATOR;
|
1076 |
+
$file_path=$backup_path.$file_name;
|
1077 |
+
|
1078 |
+
$ret=$zip->get_json_data($file_path);
|
1079 |
+
if($ret['result'] === WPVIVID_SUCCESS) {
|
1080 |
+
$json=$ret['json_data'];
|
1081 |
+
$json = json_decode($json, 1);
|
1082 |
+
if (is_null($json)) {
|
1083 |
+
return false;
|
1084 |
+
} else {
|
1085 |
+
return $json;
|
1086 |
+
}
|
1087 |
+
}
|
1088 |
+
elseif($ret['result'] === WPVIVID_FAILED){
|
1089 |
+
return false;
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
|
1093 |
/**
|
1094 |
* Initialization backup task.
|
1095 |
*
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: wpvivid
|
3 |
Tags: move, clone, migrate, cleaner, backup, restore, auto backup, cloud backup
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 0.9.
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
@@ -109,6 +109,7 @@ The pro version also supports Wasabi, pCloud and more are coming soon.
|
|
109 |
* PHP version 5.3
|
110 |
* MySQL version 4.1
|
111 |
* WordPress 4.5
|
|
|
112 |
|
113 |
== Support ==
|
114 |
We offer free support in 3 channels:
|
@@ -186,6 +187,10 @@ Thank you for translating WPvivid Backup Plugin to your languages!
|
|
186 |
* [Daniel Wilczkowiak](https://profiles.wordpress.org/virtual03/) (German)
|
187 |
|
188 |
== Changelog ==
|
|
|
|
|
|
|
|
|
189 |
= 0.9.50 =
|
190 |
- Fixed some bugs in the plugin code.
|
191 |
- Optimized the plugin code.
|
2 |
Contributors: wpvivid
|
3 |
Tags: move, clone, migrate, cleaner, backup, restore, auto backup, cloud backup
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 5.7
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 0.9.51
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
109 |
* PHP version 5.3
|
110 |
* MySQL version 4.1
|
111 |
* WordPress 4.5
|
112 |
+
= Note = Please note that the plugin is currently not compatible with PHP 8. We are going to fix it in the near future.
|
113 |
|
114 |
== Support ==
|
115 |
We offer free support in 3 channels:
|
187 |
* [Daniel Wilczkowiak](https://profiles.wordpress.org/virtual03/) (German)
|
188 |
|
189 |
== Changelog ==
|
190 |
+
= 0.9.51 =
|
191 |
+
- Added: Once a backup is created, the plugin will check whether the zip is good and will prompt you if it is corrupted.
|
192 |
+
- Fixed some bugs in the plugin code.
|
193 |
+
- Successfully tested with WordPress 5.7.
|
194 |
= 0.9.50 =
|
195 |
- Fixed some bugs in the plugin code.
|
196 |
- Optimized the plugin code.
|
wpvivid-backuprestore.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @wordpress-plugin
|
8 |
* Plugin Name: WPvivid Backup Plugin
|
9 |
* Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
|
10 |
-
* Version: 0.9.
|
11 |
* Author: WPvivid Team
|
12 |
* Author URI: https://wpvivid.com
|
13 |
* License: GPL-3.0+
|
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
21 |
die;
|
22 |
}
|
23 |
|
24 |
-
define( 'WPVIVID_PLUGIN_VERSION', '0.9.
|
25 |
//
|
26 |
define('WPVIVID_RESTORE_INIT','init');
|
27 |
define('WPVIVID_RESTORE_READY','ready');
|
7 |
* @wordpress-plugin
|
8 |
* Plugin Name: WPvivid Backup Plugin
|
9 |
* Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
|
10 |
+
* Version: 0.9.51
|
11 |
* Author: WPvivid Team
|
12 |
* Author URI: https://wpvivid.com
|
13 |
* License: GPL-3.0+
|
21 |
die;
|
22 |
}
|
23 |
|
24 |
+
define( 'WPVIVID_PLUGIN_VERSION', '0.9.51' );
|
25 |
//
|
26 |
define('WPVIVID_RESTORE_INIT','init');
|
27 |
define('WPVIVID_RESTORE_READY','ready');
|