All-in-One WP Migration - Version 6.46

Version Description

Fixed * Domain replacement on import * Invalid secret key check on import

Download this release

Release Info

Developer bangelov
Plugin Icon 128x128 All-in-One WP Migration
Version 6.46
Comparing to
See all releases

Code changes from version 6.45 to 6.46

all-in-one-wp-migration.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
- * Version: 6.45
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
+ * Version: 6.46
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
constants.php CHANGED
@@ -31,7 +31,7 @@ define( 'AI1WM_DEBUG', false );
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
- define( 'AI1WM_VERSION', '6.45' );
35
 
36
  // ===============
37
  // = Plugin Name =
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
+ define( 'AI1WM_VERSION', '6.46' );
35
 
36
  // ===============
37
  // = Plugin Name =
functions.php CHANGED
@@ -940,9 +940,7 @@ function ai1wm_disable_jetpack_photon() {
940
  */
941
  function ai1wm_verify_secret_key( $secret_key ) {
942
  if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) {
943
- throw new Ai1wm_Not_Valid_Secret_Key_Exception(
944
- sprintf( __( 'Unable to authenticate your request with secret_key = "%s"', AI1WM_PLUGIN_NAME ), $secret_key )
945
- );
946
  }
947
 
948
  return true;
940
  */
941
  function ai1wm_verify_secret_key( $secret_key ) {
942
  if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) {
943
+ throw new Ai1wm_Not_Valid_Secret_Key_Exception( __( 'Unable to authenticate the secret key.', AI1WM_PLUGIN_NAME ) );
 
 
944
  }
945
 
946
  return true;
lib/controller/class-ai1wm-status-controller.php CHANGED
@@ -42,10 +42,7 @@ class Ai1wm_Status_Controller {
42
  // Ensure that unauthorized people cannot access status action
43
  ai1wm_verify_secret_key( $secret_key );
44
  } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
45
- echo json_encode( array(
46
- 'type' => 'error',
47
- 'message' => $e->getMessage(),
48
- ) );
49
  exit;
50
  }
51
 
42
  // Ensure that unauthorized people cannot access status action
43
  ai1wm_verify_secret_key( $secret_key );
44
  } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
45
+ Ai1wm_Log::error( $e->getMessage() );
 
 
 
46
  exit;
47
  }
48
 
lib/vendor/servmask/database/class-ai1wm-database-utility.php CHANGED
@@ -35,7 +35,11 @@ class Ai1wm_Database_Utility {
35
  * @return mixed The original string with all elements replaced as needed.
36
  */
37
  public static function replace_values( $from = array(), $to = array(), $data = '' ) {
38
- return strtr( $data, array_combine( $from, $to ) );
 
 
 
 
39
  }
40
 
41
  /**
@@ -74,7 +78,9 @@ class Ai1wm_Database_Utility {
74
  unset( $tmp );
75
  } else {
76
  if ( is_string( $data ) ) {
77
- $data = strtr( $data, array_combine( $from, $to ) );
 
 
78
  }
79
  }
80
 
35
  * @return mixed The original string with all elements replaced as needed.
36
  */
37
  public static function replace_values( $from = array(), $to = array(), $data = '' ) {
38
+ if ( ! empty( $from ) && ! empty( $to ) ) {
39
+ return strtr( $data, array_combine( $from, $to ) );
40
+ }
41
+
42
+ return $data;
43
  }
44
 
45
  /**
78
  unset( $tmp );
79
  } else {
80
  if ( is_string( $data ) ) {
81
+ if ( ! empty( $from ) && ! empty( $to ) ) {
82
+ $data = strtr( $data, array_combine( $from, $to ) );
83
+ }
84
  }
85
  }
86
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
3
  Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, migration, wordpress migration, website migration, database export, database import
4
  Requires at least: 3.3
5
  Tested up to: 4.7
6
- Stable tag: 6.45
7
  License: GPLv2 or later
8
 
9
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -78,6 +78,11 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
78
  3. Plugin Menu
79
 
80
  == Changelog ==
 
 
 
 
 
81
  = 6.45 =
82
  **Changed**
83
  * Better mechanism when enumerating files on import
3
  Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, migration, wordpress migration, website migration, database export, database import
4
  Requires at least: 3.3
5
  Tested up to: 4.7
6
+ Stable tag: 6.46
7
  License: GPLv2 or later
8
 
9
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
78
  3. Plugin Menu
79
 
80
  == Changelog ==
81
+ = 6.46 =
82
+ **Fixed**
83
+ * Domain replacement on import
84
+ * Invalid secret key check on import
85
+
86
  = 6.45 =
87
  **Changed**
88
  * Better mechanism when enumerating files on import