Version Description
- Better handling for plugin, theme infos
Download this release
Release Info
| Developer | ritesh.soni36 |
| Plugin | |
| Version | 4.78 |
| Comparing to | |
| See all releases | |
Code changes from version 4.72 to 4.78
- account.php +8 -2
- callback/base.php +4 -4
- callback/wings/db.php +17 -1
- callback/wings/fs.php +34 -1
- callback/wings/info.php +66 -7
- callback/wings/misc.php +14 -1
- info.php +14 -3
- migrateguru.php +4 -1
- readme.txt +5 -2
- wp_actions.php +5 -0
- wp_api.php +3 -3
- wp_db.php +32 -0
account.php
CHANGED
|
@@ -191,7 +191,6 @@ if (!class_exists('MGAccount')) :
|
|
| 191 |
|
| 192 |
public function updateInfo($info) {
|
| 193 |
$accounts = self::allAccounts($this->settings);
|
| 194 |
-
$plugname = $info["plugname"];
|
| 195 |
$account_type = $info["account_type"];
|
| 196 |
$pubkey = $info['pubkey'];
|
| 197 |
if (!array_key_exists($pubkey, $accounts)) {
|
|
@@ -202,7 +201,14 @@ if (!class_exists('MGAccount')) :
|
|
| 202 |
}
|
| 203 |
$accounts[$pubkey]['account_gid'] = $info['account_gid'];
|
| 204 |
$accounts[$pubkey]['lastbackuptime'] = time();
|
| 205 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
$accounts[$pubkey]['account_type'] = $account_type;
|
| 207 |
$accounts[$pubkey]['url'] = $info['url'];
|
| 208 |
$accounts[$pubkey]['email'] = $info['email'];
|
| 191 |
|
| 192 |
public function updateInfo($info) {
|
| 193 |
$accounts = self::allAccounts($this->settings);
|
|
|
|
| 194 |
$account_type = $info["account_type"];
|
| 195 |
$pubkey = $info['pubkey'];
|
| 196 |
if (!array_key_exists($pubkey, $accounts)) {
|
| 201 |
}
|
| 202 |
$accounts[$pubkey]['account_gid'] = $info['account_gid'];
|
| 203 |
$accounts[$pubkey]['lastbackuptime'] = time();
|
| 204 |
+
if (isset($info["speed_plugname"])) {
|
| 205 |
+
$speed_plugname = $info["speed_plugname"];
|
| 206 |
+
$accounts[$pubkey][$speed_plugname] = true;
|
| 207 |
+
}
|
| 208 |
+
if (isset($info["plugname"])) {
|
| 209 |
+
$plugname = $info["plugname"];
|
| 210 |
+
$accounts[$pubkey][$plugname] = true;
|
| 211 |
+
}
|
| 212 |
$accounts[$pubkey]['account_type'] = $account_type;
|
| 213 |
$accounts[$pubkey]['url'] = $info['url'];
|
| 214 |
$accounts[$pubkey]['email'] = $info['email'];
|
callback/base.php
CHANGED
|
@@ -6,11 +6,11 @@ if (!class_exists('BVCallbackBase')) :
|
|
| 6 |
class BVCallbackBase {
|
| 7 |
|
| 8 |
public static $wing_infos = array("BRAND_WING_VERSION" => '1.0',
|
| 9 |
-
"DB_WING_VERSION" => '1.
|
| 10 |
"ACCOUNT_WING_VERSION" => '1.1',
|
| 11 |
-
"MISC_WING_VERSION" => '1.
|
| 12 |
-
"FS_WING_VERSION" => '1.
|
| 13 |
-
"INFO_WING_VERSION" => '1.
|
| 14 |
);
|
| 15 |
|
| 16 |
public function objectToArray($obj) {
|
| 6 |
class BVCallbackBase {
|
| 7 |
|
| 8 |
public static $wing_infos = array("BRAND_WING_VERSION" => '1.0',
|
| 9 |
+
"DB_WING_VERSION" => '1.1',
|
| 10 |
"ACCOUNT_WING_VERSION" => '1.1',
|
| 11 |
+
"MISC_WING_VERSION" => '1.2',
|
| 12 |
+
"FS_WING_VERSION" => '1.2',
|
| 13 |
+
"INFO_WING_VERSION" => '1.5',
|
| 14 |
);
|
| 15 |
|
| 16 |
public function objectToArray($obj) {
|
callback/wings/db.php
CHANGED
|
@@ -11,7 +11,7 @@ class BVDBCallback extends BVCallbackBase {
|
|
| 11 |
|
| 12 |
public static $bvTables = array("fw_requests", "lp_requests", "ip_store");
|
| 13 |
|
| 14 |
-
const DB_WING_VERSION = 1.
|
| 15 |
|
| 16 |
public function __construct($callback_handler) {
|
| 17 |
$this->db = $callback_handler->db;
|
|
@@ -284,6 +284,22 @@ class BVDBCallback extends BVCallbackBase {
|
|
| 284 |
break;
|
| 285 |
case "altrtbl":
|
| 286 |
$resp = array("altrtbl" => $db->alterBVTable($params['query'], $params['query']));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
break;
|
| 288 |
default:
|
| 289 |
$resp = false;
|
| 11 |
|
| 12 |
public static $bvTables = array("fw_requests", "lp_requests", "ip_store");
|
| 13 |
|
| 14 |
+
const DB_WING_VERSION = 1.1;
|
| 15 |
|
| 16 |
public function __construct($callback_handler) {
|
| 17 |
$this->db = $callback_handler->db;
|
| 284 |
break;
|
| 285 |
case "altrtbl":
|
| 286 |
$resp = array("altrtbl" => $db->alterBVTable($params['query'], $params['query']));
|
| 287 |
+
break;
|
| 288 |
+
case "tbls":
|
| 289 |
+
$resp = array();
|
| 290 |
+
|
| 291 |
+
if (array_key_exists('truncate', $params))
|
| 292 |
+
$resp['truncate'] = $db->truncateTables($params['truncate']);
|
| 293 |
+
|
| 294 |
+
if (array_key_exists('drop', $params))
|
| 295 |
+
$resp['drop'] = $db->dropTables($params['drop']);
|
| 296 |
+
|
| 297 |
+
if (array_key_exists('create', $params))
|
| 298 |
+
$resp['create'] = $db->createTables($params['create']);
|
| 299 |
+
|
| 300 |
+
if (array_key_exists('alter', $params))
|
| 301 |
+
$resp['alter'] = $db->alterTables($params['alter']);
|
| 302 |
+
|
| 303 |
break;
|
| 304 |
default:
|
| 305 |
$resp = false;
|
callback/wings/fs.php
CHANGED
|
@@ -9,7 +9,7 @@ class BVFSCallback extends BVCallbackBase {
|
|
| 9 |
public $account;
|
| 10 |
|
| 11 |
public static $cwAllowedFiles = array(".htaccess", ".user.ini", "malcare-waf.php");
|
| 12 |
-
const FS_WING_VERSION = 1.
|
| 13 |
|
| 14 |
public function __construct($callback_handler) {
|
| 15 |
$this->account = $callback_handler->account;
|
|
@@ -357,6 +357,39 @@ class BVFSCallback extends BVCallbackBase {
|
|
| 357 |
$files = $params['files'];
|
| 358 |
$withContent = array_key_exists('withcontent', $params) ? $params['withcontent'] : true;
|
| 359 |
$resp = array("files_content" => $this->getFilesContent($files, $withContent));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
break;
|
| 361 |
default:
|
| 362 |
$resp = false;
|
| 9 |
public $account;
|
| 10 |
|
| 11 |
public static $cwAllowedFiles = array(".htaccess", ".user.ini", "malcare-waf.php");
|
| 12 |
+
const FS_WING_VERSION = 1.2;
|
| 13 |
|
| 14 |
public function __construct($callback_handler) {
|
| 15 |
$this->account = $callback_handler->account;
|
| 357 |
$files = $params['files'];
|
| 358 |
$withContent = array_key_exists('withcontent', $params) ? $params['withcontent'] : true;
|
| 359 |
$resp = array("files_content" => $this->getFilesContent($files, $withContent));
|
| 360 |
+
break;
|
| 361 |
+
case "gtfls":
|
| 362 |
+
$resp = array();
|
| 363 |
+
|
| 364 |
+
if (array_key_exists('get_files_content', $params)) {
|
| 365 |
+
$args = $params['get_files_content'];
|
| 366 |
+
$with_content = array_key_exists('withcontent', $args) ? $args['withcontent'] : true;
|
| 367 |
+
$resp['get_files_content'] = $this->getFilesContent($args['files'], $with_content);
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
if (array_key_exists('get_files_stats', $params)) {
|
| 371 |
+
$args = $params['get_files_stats'];
|
| 372 |
+
$md5 = array_key_exists('md5', $args) ? $args['md5'] : false;
|
| 373 |
+
$stats = $this->getFilesStats(
|
| 374 |
+
$args['files'], $args['offset'], $args['limit'], $args['bsize'], $md5
|
| 375 |
+
);
|
| 376 |
+
|
| 377 |
+
$result = array();
|
| 378 |
+
|
| 379 |
+
if (array_key_exists('stats', $stats)) {
|
| 380 |
+
$result['stats'] = array();
|
| 381 |
+
foreach ($stats['stats'] as $stat) {
|
| 382 |
+
$result['stats'][$stat['filename']] = $stat;
|
| 383 |
+
}
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
if (array_key_exists('missingfiles', $stats)) {
|
| 387 |
+
$result['missingfiles'] = $stats['missingfiles'];
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
$resp['get_files_stats'] = $result;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
break;
|
| 394 |
default:
|
| 395 |
$resp = false;
|
callback/wings/info.php
CHANGED
|
@@ -10,7 +10,7 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 10 |
public $bvinfo;
|
| 11 |
public $bvapi;
|
| 12 |
|
| 13 |
-
const INFO_WING_VERSION = 1.
|
| 14 |
|
| 15 |
public function __construct($callback_handler) {
|
| 16 |
$this->db = $callback_handler->db;
|
|
@@ -260,6 +260,18 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 260 |
return $host_info;
|
| 261 |
}
|
| 262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
function refreshUpdatesInfo() {
|
| 264 |
global $wp_current_filter;
|
| 265 |
$wp_current_filter[] = 'load-update-core.php';
|
|
@@ -322,17 +334,43 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 322 |
return array("transient" => $transient);
|
| 323 |
}
|
| 324 |
|
| 325 |
-
function getPluginsHandler() {
|
| 326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
}
|
| 328 |
|
| 329 |
-
function getThemesHandler() {
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
}
|
| 332 |
|
| 333 |
function getSiteInfo($args) {
|
| 334 |
$result = array();
|
| 335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
if (array_key_exists('refresh', $args))
|
| 337 |
$result['refreshed'] = $this->refreshUpdatesInfo();
|
| 338 |
|
|
@@ -340,10 +378,10 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 340 |
$result['users'] = $this->getUsersHandler($args['users']);
|
| 341 |
|
| 342 |
if (array_key_exists('plugins', $args))
|
| 343 |
-
$result['plugins'] = $this->getPluginsHandler();
|
| 344 |
|
| 345 |
if (array_key_exists('themes', $args))
|
| 346 |
-
$result['themes'] = $this->getThemesHandler();
|
| 347 |
|
| 348 |
if (array_key_exists('core', $args))
|
| 349 |
$result['core'] = $this->getTransient('update_core');
|
|
@@ -351,6 +389,9 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 351 |
if (array_key_exists('sys', $args))
|
| 352 |
$result['sys'] = $this->getSystemInfo();
|
| 353 |
|
|
|
|
|
|
|
|
|
|
| 354 |
return $result;
|
| 355 |
}
|
| 356 |
|
|
@@ -390,6 +431,21 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 390 |
return $result;
|
| 391 |
}
|
| 392 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 393 |
public function process($request) {
|
| 394 |
$db = $this->db;
|
| 395 |
$params = $request->params;
|
|
@@ -459,6 +515,9 @@ class BVInfoCallback extends BVCallbackBase {
|
|
| 459 |
case "gtsteinfo":
|
| 460 |
$resp = $this->getSiteInfo($params);
|
| 461 |
break;
|
|
|
|
|
|
|
|
|
|
| 462 |
default:
|
| 463 |
$resp = false;
|
| 464 |
}
|
| 10 |
public $bvinfo;
|
| 11 |
public $bvapi;
|
| 12 |
|
| 13 |
+
const INFO_WING_VERSION = 1.5;
|
| 14 |
|
| 15 |
public function __construct($callback_handler) {
|
| 16 |
$this->db = $callback_handler->db;
|
| 260 |
return $host_info;
|
| 261 |
}
|
| 262 |
|
| 263 |
+
public function serverConfig() {
|
| 264 |
+
return array(
|
| 265 |
+
'software' => $_SERVER['SERVER_SOFTWARE'],
|
| 266 |
+
'sapi' => (function_exists('php_sapi_name')) ? php_sapi_name() : false,
|
| 267 |
+
'has_apache_get_modules' => function_exists('apache_get_modules'),
|
| 268 |
+
'posix_getuid' => (function_exists('posix_getuid')) ? posix_getuid() : null,
|
| 269 |
+
'uid' => (function_exists('getmyuid')) ? getmyuid() : null,
|
| 270 |
+
'user_ini' => ini_get('user_ini.filename'),
|
| 271 |
+
'php_major_version' => PHP_MAJOR_VERSION
|
| 272 |
+
);
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
function refreshUpdatesInfo() {
|
| 276 |
global $wp_current_filter;
|
| 277 |
$wp_current_filter[] = 'load-update-core.php';
|
| 334 |
return array("transient" => $transient);
|
| 335 |
}
|
| 336 |
|
| 337 |
+
function getPluginsHandler($args = array()) {
|
| 338 |
+
$result = array_merge($this->getPlugins(), $this->getTransient('update_plugins'));
|
| 339 |
+
|
| 340 |
+
if (array_key_exists('clear_filters', $args)) {
|
| 341 |
+
$filters = $args['clear_filters'];
|
| 342 |
+
foreach ($filters as $filter)
|
| 343 |
+
remove_all_filters($filter);
|
| 344 |
+
$transient_without_filters = $this->getTransient('update_plugins');
|
| 345 |
+
$result['transient_without_filters'] = $transient_without_filters['transient'];
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
return $result;
|
| 349 |
}
|
| 350 |
|
| 351 |
+
function getThemesHandler($args = array()) {
|
| 352 |
+
$result = array_merge($this->getThemes(), $this->getTransient('update_themes'));
|
| 353 |
+
|
| 354 |
+
if (array_key_exists('clear_filters', $args)) {
|
| 355 |
+
$filters = $args['clear_filters'];
|
| 356 |
+
foreach ($filters as $filter)
|
| 357 |
+
remove_all_filters($filter);
|
| 358 |
+
$transient_without_filters = $this->getTransient('update_themes');
|
| 359 |
+
$result['transient_without_filters'] = $transient_without_filters['transient'];
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
return $result;
|
| 363 |
}
|
| 364 |
|
| 365 |
function getSiteInfo($args) {
|
| 366 |
$result = array();
|
| 367 |
|
| 368 |
+
if (array_key_exists('pre_refresh_get_options', $args)) {
|
| 369 |
+
$result['pre_refresh_get_options'] = $this->settings->getOptions(
|
| 370 |
+
$args['pre_refresh_get_options']
|
| 371 |
+
);
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
if (array_key_exists('refresh', $args))
|
| 375 |
$result['refreshed'] = $this->refreshUpdatesInfo();
|
| 376 |
|
| 378 |
$result['users'] = $this->getUsersHandler($args['users']);
|
| 379 |
|
| 380 |
if (array_key_exists('plugins', $args))
|
| 381 |
+
$result['plugins'] = $this->getPluginsHandler($args['plugins']);
|
| 382 |
|
| 383 |
if (array_key_exists('themes', $args))
|
| 384 |
+
$result['themes'] = $this->getThemesHandler($args['themes']);
|
| 385 |
|
| 386 |
if (array_key_exists('core', $args))
|
| 387 |
$result['core'] = $this->getTransient('update_core');
|
| 389 |
if (array_key_exists('sys', $args))
|
| 390 |
$result['sys'] = $this->getSystemInfo();
|
| 391 |
|
| 392 |
+
if (array_key_exists('get_options', $args))
|
| 393 |
+
$result['get_options'] = $this->settings->getOptions($args['get_options']);
|
| 394 |
+
|
| 395 |
return $result;
|
| 396 |
}
|
| 397 |
|
| 431 |
return $result;
|
| 432 |
}
|
| 433 |
|
| 434 |
+
function getPluginServicesInfo($args) {
|
| 435 |
+
$result = array();
|
| 436 |
+
|
| 437 |
+
if (array_key_exists('get_options', $args))
|
| 438 |
+
$result['get_options'] = $this->settings->getOptions($args['get_options']);
|
| 439 |
+
|
| 440 |
+
if (array_key_exists('pingbv', $args))
|
| 441 |
+
$result['pingbv'] = array('status' => $this->pingBV());
|
| 442 |
+
|
| 443 |
+
if (array_key_exists('server_config', $args))
|
| 444 |
+
$result['server_config'] = $this->serverConfig();
|
| 445 |
+
|
| 446 |
+
return $result;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
public function process($request) {
|
| 450 |
$db = $this->db;
|
| 451 |
$params = $request->params;
|
| 515 |
case "gtsteinfo":
|
| 516 |
$resp = $this->getSiteInfo($params);
|
| 517 |
break;
|
| 518 |
+
case "psinfo":
|
| 519 |
+
$resp = $this->getPluginServicesInfo($params);
|
| 520 |
+
break;
|
| 521 |
default:
|
| 522 |
$resp = false;
|
| 523 |
}
|
callback/wings/misc.php
CHANGED
|
@@ -11,7 +11,7 @@ class BVMiscCallback extends BVCallbackBase {
|
|
| 11 |
public $bvapi;
|
| 12 |
public $db;
|
| 13 |
|
| 14 |
-
const MISC_WING_VERSION = 1.
|
| 15 |
|
| 16 |
public function __construct($callback_handler) {
|
| 17 |
$this->settings = $callback_handler->settings;
|
|
@@ -154,6 +154,19 @@ class BVMiscCallback extends BVCallbackBase {
|
|
| 154 |
break;
|
| 155 |
case "dlttrsnt":
|
| 156 |
$resp = array("dlttrsnt" => $settings->deleteTransient($params['key']));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
break;
|
| 158 |
case "setbvss":
|
| 159 |
$resp = array("status" => $settings->updateOption('bv_site_settings', $params['bv_site_settings']));
|
| 11 |
public $bvapi;
|
| 12 |
public $db;
|
| 13 |
|
| 14 |
+
const MISC_WING_VERSION = 1.2;
|
| 15 |
|
| 16 |
public function __construct($callback_handler) {
|
| 17 |
$this->settings = $callback_handler->settings;
|
| 154 |
break;
|
| 155 |
case "dlttrsnt":
|
| 156 |
$resp = array("dlttrsnt" => $settings->deleteTransient($params['key']));
|
| 157 |
+
break;
|
| 158 |
+
case "optns":
|
| 159 |
+
$resp = array();
|
| 160 |
+
|
| 161 |
+
if (array_key_exists("get_options", $params))
|
| 162 |
+
$resp["get_options"] = $settings->getOptions($params["get_options"]);
|
| 163 |
+
|
| 164 |
+
if (array_key_exists("update_options", $params))
|
| 165 |
+
$resp["update_options"] = $settings->updateOptions($params["update_options"]);
|
| 166 |
+
|
| 167 |
+
if (array_key_exists("delete_options", $params))
|
| 168 |
+
$resp["delete_options"] = $settings->deleteOptions($params["delete_options"]);
|
| 169 |
+
|
| 170 |
break;
|
| 171 |
case "setbvss":
|
| 172 |
$resp = array("status" => $settings->updateOption('bv_site_settings', $params['bv_site_settings']));
|
info.php
CHANGED
|
@@ -10,7 +10,7 @@ if (!class_exists('MGInfo')) :
|
|
| 10 |
public $badgeinfo = 'bvmgbadge';
|
| 11 |
public $ip_header_option = 'bvmgipheader';
|
| 12 |
public $brand_option = 'bvmgbrand';
|
| 13 |
-
public $version = '4.
|
| 14 |
public $webpage = 'https://www.migrateguru.com';
|
| 15 |
public $appurl = 'https://mg.blogvault.net';
|
| 16 |
public $slug = 'migrate-guru/migrateguru.php';
|
|
@@ -103,8 +103,19 @@ if (!class_exists('MGInfo')) :
|
|
| 103 |
return ($this->getWatchTime() > $expiry_time);
|
| 104 |
}
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
public function isProtectModuleEnabled() {
|
| 107 |
-
return $this->isServiceActive("protect");
|
| 108 |
}
|
| 109 |
|
| 110 |
public function isDynSyncModuleEnabled() {
|
|
@@ -130,7 +141,7 @@ if (!class_exists('MGInfo')) :
|
|
| 130 |
}
|
| 131 |
|
| 132 |
public function isMalcare() {
|
| 133 |
-
return $this->getBrandName() === 'MalCare
|
| 134 |
}
|
| 135 |
|
| 136 |
public function isBlogvault() {
|
| 10 |
public $badgeinfo = 'bvmgbadge';
|
| 11 |
public $ip_header_option = 'bvmgipheader';
|
| 12 |
public $brand_option = 'bvmgbrand';
|
| 13 |
+
public $version = '4.78';
|
| 14 |
public $webpage = 'https://www.migrateguru.com';
|
| 15 |
public $appurl = 'https://mg.blogvault.net';
|
| 16 |
public $slug = 'migrate-guru/migrateguru.php';
|
| 103 |
return ($this->getWatchTime() > $expiry_time);
|
| 104 |
}
|
| 105 |
|
| 106 |
+
public function isValidEnvironment(){
|
| 107 |
+
$bvsiteinfo = new MGWPSiteInfo();
|
| 108 |
+
$siteurl = $bvsiteinfo->siteurl();
|
| 109 |
+
$bvconfig = $this->config;
|
| 110 |
+
if ($bvconfig && array_key_exists("abspath", $bvconfig) &&
|
| 111 |
+
array_key_exists("siteurl", $bvconfig) && !empty($siteurl)) {
|
| 112 |
+
return ($bvconfig["abspath"] == ABSPATH && $bvconfig["siteurl"] == $siteurl);
|
| 113 |
+
}
|
| 114 |
+
return true;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
public function isProtectModuleEnabled() {
|
| 118 |
+
return $this->isServiceActive("protect") && $this->isValidEnvironment();
|
| 119 |
}
|
| 120 |
|
| 121 |
public function isDynSyncModuleEnabled() {
|
| 141 |
}
|
| 142 |
|
| 143 |
public function isMalcare() {
|
| 144 |
+
return $this->getBrandName() === 'MalCare';
|
| 145 |
}
|
| 146 |
|
| 147 |
public function isBlogvault() {
|
migrateguru.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin URI: https://www.migrateguru.com
|
|
| 5 |
Description: Migrating your site(s) to any WordPress Hosting platform has never been so easy.
|
| 6 |
Author: Migrate Guru
|
| 7 |
Author URI: http://www.migrateguru.com
|
| 8 |
-
Version: 4.
|
| 9 |
Network: True
|
| 10 |
*/
|
| 11 |
|
|
@@ -37,6 +37,7 @@ require_once dirname( __FILE__ ) . '/wp_api.php';
|
|
| 37 |
require_once dirname( __FILE__ ) . '/wp_actions.php';
|
| 38 |
require_once dirname( __FILE__ ) . '/info.php';
|
| 39 |
require_once dirname( __FILE__ ) . '/account.php';
|
|
|
|
| 40 |
|
| 41 |
|
| 42 |
$bvsettings = new MGWPSettings();
|
|
@@ -54,6 +55,7 @@ register_deactivation_hook(__FILE__, array($wp_action, 'deactivate'));
|
|
| 54 |
|
| 55 |
add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
|
| 56 |
add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
|
|
|
|
| 57 |
|
| 58 |
##WPCLIMODULE##
|
| 59 |
if (is_admin()) {
|
|
@@ -71,6 +73,7 @@ if (is_admin()) {
|
|
| 71 |
add_action('admin_head', array($wpadmin, 'removeAdminNotices'), 3);
|
| 72 |
##ACTIVATEWARNING##
|
| 73 |
add_action('admin_enqueue_scripts', array($wpadmin, 'mgsecAdminMenu'));
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
|
| 5 |
Description: Migrating your site(s) to any WordPress Hosting platform has never been so easy.
|
| 6 |
Author: Migrate Guru
|
| 7 |
Author URI: http://www.migrateguru.com
|
| 8 |
+
Version: 4.78
|
| 9 |
Network: True
|
| 10 |
*/
|
| 11 |
|
| 37 |
require_once dirname( __FILE__ ) . '/wp_actions.php';
|
| 38 |
require_once dirname( __FILE__ ) . '/info.php';
|
| 39 |
require_once dirname( __FILE__ ) . '/account.php';
|
| 40 |
+
##WPCACHEMODULE##
|
| 41 |
|
| 42 |
|
| 43 |
$bvsettings = new MGWPSettings();
|
| 55 |
|
| 56 |
add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
|
| 57 |
add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
|
| 58 |
+
##SOADDUNINSTALLACTION##
|
| 59 |
|
| 60 |
##WPCLIMODULE##
|
| 61 |
if (is_admin()) {
|
| 73 |
add_action('admin_head', array($wpadmin, 'removeAdminNotices'), 3);
|
| 74 |
##ACTIVATEWARNING##
|
| 75 |
add_action('admin_enqueue_scripts', array($wpadmin, 'mgsecAdminMenu'));
|
| 76 |
+
##SOADMINMENU##
|
| 77 |
}
|
| 78 |
|
| 79 |
|
readme.txt
CHANGED
|
@@ -4,9 +4,9 @@ Tags: migrate, migrate WordPress, WordPress migration, migration, clone, transfe
|
|
| 4 |
Plugin URI: https://www.migrateguru.com/
|
| 5 |
Donate link: https://www.migrateguru.com/
|
| 6 |
Requires at least: 4.0
|
| 7 |
-
Tested up to:
|
| 8 |
Requires PHP: 5.4.0
|
| 9 |
-
Stable tag: 4.
|
| 10 |
License: GPLv2 or later
|
| 11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
| 12 |
|
|
@@ -132,6 +132,9 @@ Yes, we do. You can access it here: https://migrateguru.freshdesk.com/support/ho
|
|
| 132 |
6. Click ‘Migrate’.
|
| 133 |
|
| 134 |
== Changelog =
|
|
|
|
|
|
|
|
|
|
| 135 |
= 4.72 =
|
| 136 |
* Sync Improvements
|
| 137 |
|
| 4 |
Plugin URI: https://www.migrateguru.com/
|
| 5 |
Donate link: https://www.migrateguru.com/
|
| 6 |
Requires at least: 4.0
|
| 7 |
+
Tested up to: 6.1
|
| 8 |
Requires PHP: 5.4.0
|
| 9 |
+
Stable tag: 4.78
|
| 10 |
License: GPLv2 or later
|
| 11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
| 12 |
|
| 132 |
6. Click ‘Migrate’.
|
| 133 |
|
| 134 |
== Changelog =
|
| 135 |
+
= 4.78 =
|
| 136 |
+
* Better handling for plugin, theme infos
|
| 137 |
+
|
| 138 |
= 4.72 =
|
| 139 |
* Sync Improvements
|
| 140 |
|
wp_actions.php
CHANGED
|
@@ -27,11 +27,13 @@ if (!class_exists('MGWPAction')) :
|
|
| 27 |
} else {
|
| 28 |
MGAccount::setup($this->settings);
|
| 29 |
}
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
public function deactivate() {
|
| 33 |
$info = array();
|
| 34 |
$this->siteinfo->basic($info);
|
|
|
|
| 35 |
$this->bvapi->pingbv('/bvapi/deactivate', $info);
|
| 36 |
}
|
| 37 |
|
|
@@ -39,6 +41,7 @@ if (!class_exists('MGWPAction')) :
|
|
| 39 |
##CLEARPTCONFIG##
|
| 40 |
##CLEARIPSTORE##
|
| 41 |
##CLEARDYNSYNCCONFIG##
|
|
|
|
| 42 |
do_action('clear_bv_services_config');
|
| 43 |
}
|
| 44 |
|
|
@@ -46,6 +49,8 @@ if (!class_exists('MGWPAction')) :
|
|
| 46 |
$this->settings->deleteOption($this->bvinfo->services_option_name);
|
| 47 |
}
|
| 48 |
|
|
|
|
|
|
|
| 49 |
public function footerHandler() {
|
| 50 |
$bvfooter = $this->settings->getOption($this->bvinfo->badgeinfo);
|
| 51 |
if ($bvfooter) {
|
| 27 |
} else {
|
| 28 |
MGAccount::setup($this->settings);
|
| 29 |
}
|
| 30 |
+
##ENABLECACHE##
|
| 31 |
}
|
| 32 |
|
| 33 |
public function deactivate() {
|
| 34 |
$info = array();
|
| 35 |
$this->siteinfo->basic($info);
|
| 36 |
+
##DISABLECACHE##
|
| 37 |
$this->bvapi->pingbv('/bvapi/deactivate', $info);
|
| 38 |
}
|
| 39 |
|
| 41 |
##CLEARPTCONFIG##
|
| 42 |
##CLEARIPSTORE##
|
| 43 |
##CLEARDYNSYNCCONFIG##
|
| 44 |
+
##CLEARCACHECONFIG##
|
| 45 |
do_action('clear_bv_services_config');
|
| 46 |
}
|
| 47 |
|
| 49 |
$this->settings->deleteOption($this->bvinfo->services_option_name);
|
| 50 |
}
|
| 51 |
|
| 52 |
+
##SOUNINSTALLFUNCTION##
|
| 53 |
+
|
| 54 |
public function footerHandler() {
|
| 55 |
$bvfooter = $this->settings->getOption($this->bvinfo->badgeinfo);
|
| 56 |
if ($bvfooter) {
|
wp_api.php
CHANGED
|
@@ -11,11 +11,11 @@ if (!class_exists('MGWPAPI')) :
|
|
| 11 |
|
| 12 |
public function pingbv($method, $body, $public = false) {
|
| 13 |
if ($public) {
|
| 14 |
-
$this->do_request($method, $body, $public);
|
| 15 |
} else {
|
| 16 |
$api_public_key = $this->settings->getOption('bvApiPublic');
|
| 17 |
if (!empty($api_public_key) && (strlen($api_public_key) >= 32)) {
|
| 18 |
-
$this->do_request($method, $body, $api_public_key);
|
| 19 |
}
|
| 20 |
}
|
| 21 |
}
|
|
@@ -24,7 +24,7 @@ if (!class_exists('MGWPAPI')) :
|
|
| 24 |
$account = MGAccount::find($this->settings, $pubkey);
|
| 25 |
if (isset($account)) {
|
| 26 |
$url = $account->authenticatedUrl($method);
|
| 27 |
-
$this->http_request($url, $body);
|
| 28 |
}
|
| 29 |
}
|
| 30 |
|
| 11 |
|
| 12 |
public function pingbv($method, $body, $public = false) {
|
| 13 |
if ($public) {
|
| 14 |
+
return $this->do_request($method, $body, $public);
|
| 15 |
} else {
|
| 16 |
$api_public_key = $this->settings->getOption('bvApiPublic');
|
| 17 |
if (!empty($api_public_key) && (strlen($api_public_key) >= 32)) {
|
| 18 |
+
return $this->do_request($method, $body, $api_public_key);
|
| 19 |
}
|
| 20 |
}
|
| 21 |
}
|
| 24 |
$account = MGAccount::find($this->settings, $pubkey);
|
| 25 |
if (isset($account)) {
|
| 26 |
$url = $account->authenticatedUrl($method);
|
| 27 |
+
return $this->http_request($url, $body);
|
| 28 |
}
|
| 29 |
}
|
| 30 |
|
wp_db.php
CHANGED
|
@@ -92,6 +92,14 @@ class MGWPDb {
|
|
| 92 |
return $this->isTablePresent($table);
|
| 93 |
}
|
| 94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
public function alterBVTable($query, $name) {
|
| 96 |
$resp = false;
|
| 97 |
$table = $this->getBVTable($name);
|
|
@@ -101,6 +109,14 @@ class MGWPDb {
|
|
| 101 |
return $resp;
|
| 102 |
}
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
public function getTableContent($table, $fields = '*', $filter = '', $limit = 0, $offset = 0) {
|
| 105 |
$query = "SELECT $fields from $table $filter";
|
| 106 |
if ($limit > 0)
|
|
@@ -154,6 +170,22 @@ class MGWPDb {
|
|
| 154 |
return !$this->isTablePresent($table);
|
| 155 |
}
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
public function deleteRowsFromtable($name, $count = 1) {
|
| 158 |
$table = $this->getBVTable($name);
|
| 159 |
if ($this->isTablePresent($table)) {
|
| 92 |
return $this->isTablePresent($table);
|
| 93 |
}
|
| 94 |
|
| 95 |
+
public function createTables($tables, $usedbdelta = false) {
|
| 96 |
+
$result = array();
|
| 97 |
+
foreach ($tables as $table => $query) {
|
| 98 |
+
$result[$table] = $this->createTable($query, $table, $usedbdelta);
|
| 99 |
+
}
|
| 100 |
+
return $result;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
public function alterBVTable($query, $name) {
|
| 104 |
$resp = false;
|
| 105 |
$table = $this->getBVTable($name);
|
| 109 |
return $resp;
|
| 110 |
}
|
| 111 |
|
| 112 |
+
public function alterTables($tables) {
|
| 113 |
+
$result = array();
|
| 114 |
+
foreach ($tables as $table => $query) {
|
| 115 |
+
$result[$table] = $this->alterBVTable($query, $table);
|
| 116 |
+
}
|
| 117 |
+
return $result;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
public function getTableContent($table, $fields = '*', $filter = '', $limit = 0, $offset = 0) {
|
| 121 |
$query = "SELECT $fields from $table $filter";
|
| 122 |
if ($limit > 0)
|
| 170 |
return !$this->isTablePresent($table);
|
| 171 |
}
|
| 172 |
|
| 173 |
+
public function dropTables($tables) {
|
| 174 |
+
$result = array();
|
| 175 |
+
foreach ($tables as $table) {
|
| 176 |
+
$result[$table] = $this->dropBVTable($table);
|
| 177 |
+
}
|
| 178 |
+
return $result;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
public function truncateTables($tables) {
|
| 182 |
+
$result = array();
|
| 183 |
+
foreach ($tables as $table) {
|
| 184 |
+
$result[$table] = $this->truncateBVTable($table);
|
| 185 |
+
}
|
| 186 |
+
return $result;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
public function deleteRowsFromtable($name, $count = 1) {
|
| 190 |
$table = $this->getBVTable($name);
|
| 191 |
if ($this->isTablePresent($table)) {
|
