Version Description
- MultiTable Sync in single callback functionality added.
- Improved host info
- Fixed services data fetch bug
- Fixed account listing bug in wp-admin
Download this release
Release Info
Developer | ritesh.soni36 |
Plugin | WP Engine Automated Migration |
Version | 4.62 |
Comparing to | |
See all releases |
Code changes from version 4.55 to 4.62
- callback/wings/db.php +18 -1
- callback/wings/fs.php +1 -1
- callback/wings/info.php +9 -0
- callback/wings/misc.php +16 -2
- info.php +23 -3
- readme.txt +8 -2
- wp_actions.php +5 -0
- wpengine.php +7 -5
callback/wings/db.php
CHANGED
@@ -40,6 +40,7 @@ class BVDBCallback extends BVCallbackBase {
|
|
40 |
$rows = $this->db->getTableContent($table, '*', $filter, $bsize, $offset);
|
41 |
$srows = sizeof($rows);
|
42 |
$data = array();
|
|
|
43 |
$data["offset"] = $offset;
|
44 |
$data["size"] = $srows;
|
45 |
$serialized_rows = serialize($rows);
|
@@ -213,6 +214,22 @@ class BVDBCallback extends BVCallbackBase {
|
|
213 |
$pkeys = (array_key_exists('pkeys', $params)) ? $params['pkeys'] : array();
|
214 |
$resp = $this->getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, false);
|
215 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
case "uploadrows":
|
217 |
$table = urldecode($params['table']);
|
218 |
$offset = intval(urldecode($params['offset']));
|
@@ -253,4 +270,4 @@ class BVDBCallback extends BVCallbackBase {
|
|
253 |
return $resp;
|
254 |
}
|
255 |
}
|
256 |
-
endif;
|
40 |
$rows = $this->db->getTableContent($table, '*', $filter, $bsize, $offset);
|
41 |
$srows = sizeof($rows);
|
42 |
$data = array();
|
43 |
+
$data["table_name"] = $tname;
|
44 |
$data["offset"] = $offset;
|
45 |
$data["size"] = $srows;
|
46 |
$serialized_rows = serialize($rows);
|
214 |
$pkeys = (array_key_exists('pkeys', $params)) ? $params['pkeys'] : array();
|
215 |
$resp = $this->getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, false);
|
216 |
break;
|
217 |
+
case "getmulttables":
|
218 |
+
$result = array();
|
219 |
+
$tableParams = $params['table_params'];
|
220 |
+
$resp = array();
|
221 |
+
foreach($tableParams as $tableParam) {
|
222 |
+
$table = urldecode($tableParam['table']);
|
223 |
+
$tname = urldecode($tableParam['tname']);
|
224 |
+
$rcount = intval(urldecode($tableParam['rcount']));
|
225 |
+
$filter = (array_key_exists('filter', $tableParam)) ? urldecode($tableParam['filter']) : "";
|
226 |
+
$limit = intval(urldecode($tableParam['limit']));
|
227 |
+
$offset = intval(urldecode($tableParam['offset']));
|
228 |
+
$bsize = intval(urldecode($tableParam['bsize']));
|
229 |
+
$pkeys = (array_key_exists('pkeys', $tableParam)) ? $tableParam['pkeys'] : array();
|
230 |
+
$resp[$tname] = $this->getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, true);
|
231 |
+
}
|
232 |
+
break;
|
233 |
case "uploadrows":
|
234 |
$table = urldecode($params['table']);
|
235 |
$offset = intval(urldecode($params['offset']));
|
270 |
return $resp;
|
271 |
}
|
272 |
}
|
273 |
+
endif;
|
callback/wings/fs.php
CHANGED
@@ -168,7 +168,7 @@ class BVFSCallback extends BVCallbackBase {
|
|
168 |
if (is_dir($absfile) && !is_link($absfile)) {
|
169 |
$fdata['is_dir'] = true;
|
170 |
} else {
|
171 |
-
if (!is_readable($
|
172 |
$fdata['error'] = 'file not readable';
|
173 |
} else {
|
174 |
if ($withContent === true) {
|
168 |
if (is_dir($absfile) && !is_link($absfile)) {
|
169 |
$fdata['is_dir'] = true;
|
170 |
} else {
|
171 |
+
if (!is_readable($absfile)) {
|
172 |
$fdata['error'] = 'file not readable';
|
173 |
} else {
|
174 |
if ($withContent === true) {
|
callback/wings/info.php
CHANGED
@@ -247,6 +247,15 @@ class BVInfoCallback extends BVCallbackBase {
|
|
247 |
if (array_key_exists('IS_PRESSABLE', get_defined_constants())) {
|
248 |
$host_info['IS_PRESSABLE'] = true;
|
249 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
return array('host_info' => $host_info);
|
251 |
}
|
252 |
|
247 |
if (array_key_exists('IS_PRESSABLE', get_defined_constants())) {
|
248 |
$host_info['IS_PRESSABLE'] = true;
|
249 |
}
|
250 |
+
|
251 |
+
if (array_key_exists('GRIDPANE', get_defined_constants())) {
|
252 |
+
$host_info['IS_GRIDPANE'] = true;
|
253 |
+
}
|
254 |
+
|
255 |
+
if (defined('WPE_APIKEY')) {
|
256 |
+
$host_info['WPE_APIKEY'] = WPE_APIKEY;
|
257 |
+
}
|
258 |
+
|
259 |
return array('host_info' => $host_info);
|
260 |
}
|
261 |
|
callback/wings/misc.php
CHANGED
@@ -106,8 +106,22 @@ class BVMiscCallback extends BVCallbackBase {
|
|
106 |
$resp = array("status" => $settings->updateOption('bv_site_settings', $params['bv_site_settings']));
|
107 |
break;
|
108 |
case "stsrvcs":
|
109 |
-
$
|
110 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
break;
|
112 |
default:
|
113 |
$resp = false;
|
106 |
$resp = array("status" => $settings->updateOption('bv_site_settings', $params['bv_site_settings']));
|
107 |
break;
|
108 |
case "stsrvcs":
|
109 |
+
$resp = array();
|
110 |
+
$deleted_configs = array();
|
111 |
+
$updated_configs = array();
|
112 |
+
if (array_key_exists("configs_to_delete", $params)) {
|
113 |
+
foreach($params["configs_to_delete"] as $config_name) {
|
114 |
+
$deleted_configs[$config_name] = $settings->deleteOption($config_name);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
if (array_key_exists("configs_to_update", $params)) {
|
118 |
+
foreach($params["configs_to_update"] as $config_name => $config_value) {
|
119 |
+
$settings->updateOption($config_name, $config_value);
|
120 |
+
$updated_configs[$config_name] = $settings->getOption($config_name);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
$resp["updated_configs"] = $updated_configs;
|
124 |
+
$resp["deleted_configs"] = $deleted_configs;
|
125 |
break;
|
126 |
default:
|
127 |
$resp = false;
|
info.php
CHANGED
@@ -10,7 +10,7 @@ if (!class_exists('WPEInfo')) :
|
|
10 |
public $badgeinfo = 'wpebadge';
|
11 |
public $ip_header_option = 'wpeipheader';
|
12 |
public $brand_option = 'wpebrand';
|
13 |
-
public $version = '4.
|
14 |
public $webpage = 'https://wpengine.com';
|
15 |
public $appurl = 'https://wpengine.blogvault.net';
|
16 |
public $slug = 'wp-site-migrate/wpengine.php';
|
@@ -19,11 +19,32 @@ if (!class_exists('WPEInfo')) :
|
|
19 |
public $brand_icon = '/assets/img/favicon.ico';
|
20 |
public $services_option_name = 'BVSERVICESOPTIONNAME';
|
21 |
|
|
|
|
|
22 |
public function __construct($settings) {
|
23 |
$this->settings = $settings;
|
24 |
$this->config = $this->settings->getOption($this->services_option_name);
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
public function canSetCWBranding() {
|
28 |
if (WPEWPSiteInfo::isCWServer()) {
|
29 |
|
@@ -83,8 +104,7 @@ if (!class_exists('WPEInfo')) :
|
|
83 |
}
|
84 |
|
85 |
public function isProtectModuleEnabled() {
|
86 |
-
return
|
87 |
-
$this->isActivePlugin();
|
88 |
}
|
89 |
|
90 |
public function isDynSyncModuleEnabled() {
|
10 |
public $badgeinfo = 'wpebadge';
|
11 |
public $ip_header_option = 'wpeipheader';
|
12 |
public $brand_option = 'wpebrand';
|
13 |
+
public $version = '4.62';
|
14 |
public $webpage = 'https://wpengine.com';
|
15 |
public $appurl = 'https://wpengine.blogvault.net';
|
16 |
public $slug = 'wp-site-migrate/wpengine.php';
|
19 |
public $brand_icon = '/assets/img/favicon.ico';
|
20 |
public $services_option_name = 'BVSERVICESOPTIONNAME';
|
21 |
|
22 |
+
const DB_VERSION = '3';
|
23 |
+
|
24 |
public function __construct($settings) {
|
25 |
$this->settings = $settings;
|
26 |
$this->config = $this->settings->getOption($this->services_option_name);
|
27 |
}
|
28 |
|
29 |
+
public function getCurrentDBVersion() {
|
30 |
+
$bvconfig = $this->config;
|
31 |
+
if ($bvconfig && array_key_exists('db_version', $bvconfig)) {
|
32 |
+
return $bvconfig['db_version'];
|
33 |
+
}
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function hasValidDBVersion() {
|
38 |
+
return WPEInfo::DB_VERSION === $this->getCurrentDBVersion();
|
39 |
+
}
|
40 |
+
|
41 |
+
public static function getRequestID() {
|
42 |
+
if (!defined("BV_REQUEST_ID")) {
|
43 |
+
define("BV_REQUEST_ID", uniqid(mt_rand()));
|
44 |
+
}
|
45 |
+
return BV_REQUEST_ID;
|
46 |
+
}
|
47 |
+
|
48 |
public function canSetCWBranding() {
|
49 |
if (WPEWPSiteInfo::isCWServer()) {
|
50 |
|
104 |
}
|
105 |
|
106 |
public function isProtectModuleEnabled() {
|
107 |
+
return $this->isServiceActive("protect");
|
|
|
108 |
}
|
109 |
|
110 |
public function isDynSyncModuleEnabled() {
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: wpengine, blogvault, akshatc, taylor4484
|
3 |
Tags: wpe, wpengine, migration
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.4.0
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -79,6 +79,12 @@ That's easy! [Signup here](http://wpengine.com/plans/).
|
|
79 |
2. BlogVault dashboard showing live updates.
|
80 |
|
81 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 4.55 =
|
83 |
* Added Migration Readiness Page
|
84 |
|
2 |
Contributors: wpengine, blogvault, akshatc, taylor4484
|
3 |
Tags: wpe, wpengine, migration
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 5.8
|
6 |
Requires PHP: 5.4.0
|
7 |
+
Stable tag: 4.62
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
79 |
2. BlogVault dashboard showing live updates.
|
80 |
|
81 |
== Changelog ==
|
82 |
+
= 4.62 =
|
83 |
+
* MultiTable Sync in single callback functionality added.
|
84 |
+
* Improved host info
|
85 |
+
* Fixed services data fetch bug
|
86 |
+
* Fixed account listing bug in wp-admin
|
87 |
+
|
88 |
= 4.55 =
|
89 |
* Added Migration Readiness Page
|
90 |
|
wp_actions.php
CHANGED
@@ -39,6 +39,11 @@ if (!class_exists('WPEWPAction')) :
|
|
39 |
##CLEARPTCONFIG##
|
40 |
##CLEARIPSTORE##
|
41 |
##CLEARDYNSYNCCONFIG##
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
public function footerHandler() {
|
39 |
##CLEARPTCONFIG##
|
40 |
##CLEARIPSTORE##
|
41 |
##CLEARDYNSYNCCONFIG##
|
42 |
+
do_action('clear_bv_services_config');
|
43 |
+
}
|
44 |
+
|
45 |
+
public function clear_bv_services_config() {
|
46 |
+
$this->settings->deleteOption($this->bvinfo->services_option_name);
|
47 |
}
|
48 |
|
49 |
public function footerHandler() {
|
wpengine.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://wpengine.com
|
|
5 |
Description: The easiest way to migrate your site to WP Engine
|
6 |
Author: WPEngine
|
7 |
Author URI: https://wpengine.com
|
8 |
-
Version: 4.
|
9 |
Network: True
|
10 |
*/
|
11 |
|
@@ -52,6 +52,7 @@ register_activation_hook(__FILE__, array($wp_action, 'activate'));
|
|
52 |
register_deactivation_hook(__FILE__, array($wp_action, 'deactivate'));
|
53 |
|
54 |
add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
|
|
|
55 |
|
56 |
##WPCLIMODULE##
|
57 |
if (is_admin()) {
|
@@ -69,7 +70,6 @@ if (is_admin()) {
|
|
69 |
add_action('admin_head', array($wpadmin, 'removeAdminNotices'), 3);
|
70 |
##ACTIVATEWARNING##
|
71 |
add_action('admin_enqueue_scripts', array($wpadmin, 'wpesecAdminMenu'));
|
72 |
-
##REMOVEDEACTIVATIONLINK##
|
73 |
}
|
74 |
|
75 |
|
@@ -130,8 +130,10 @@ if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "
|
|
130 |
$response->terminate($resp);
|
131 |
}
|
132 |
} else {
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
136 |
##WPAUTOUPDATEBLOCKMODULE##
|
137 |
}
|
5 |
Description: The easiest way to migrate your site to WP Engine
|
6 |
Author: WPEngine
|
7 |
Author URI: https://wpengine.com
|
8 |
+
Version: 4.62
|
9 |
Network: True
|
10 |
*/
|
11 |
|
52 |
register_deactivation_hook(__FILE__, array($wp_action, 'deactivate'));
|
53 |
|
54 |
add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
|
55 |
+
add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
|
56 |
|
57 |
##WPCLIMODULE##
|
58 |
if (is_admin()) {
|
70 |
add_action('admin_head', array($wpadmin, 'removeAdminNotices'), 3);
|
71 |
##ACTIVATEWARNING##
|
72 |
add_action('admin_enqueue_scripts', array($wpadmin, 'wpesecAdminMenu'));
|
|
|
73 |
}
|
74 |
|
75 |
|
130 |
$response->terminate($resp);
|
131 |
}
|
132 |
} else {
|
133 |
+
if ($bvinfo->hasValidDBVersion()) {
|
134 |
+
##PROTECTMODULE##
|
135 |
+
##DYNSYNCMODULE##
|
136 |
+
##ACTLOGMODULE##
|
137 |
+
}
|
138 |
##WPAUTOUPDATEBLOCKMODULE##
|
139 |
}
|