All-in-One WP Migration - Version 7.65

Version Description

Added

  • Improved support for single-letter prefixed databases
Download this release

Release Info

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

Code changes from version 7.64 to 7.65

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: 7.64
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
@@ -54,9 +54,6 @@ define( 'AI1WM_URL', plugins_url( '', AI1WM_PLUGIN_BASENAME ) );
54
  // Plugin Storage URL
55
  define( 'AI1WM_STORAGE_URL', plugins_url( 'storage', AI1WM_PLUGIN_BASENAME ) );
56
 
57
- // Plugin Backups URL
58
- define( 'AI1WM_BACKUPS_URL', content_url( 'ai1wm-backups', AI1WM_PLUGIN_BASENAME ) );
59
-
60
  // Include constants
61
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'constants.php';
62
 
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: 7.65
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
54
  // Plugin Storage URL
55
  define( 'AI1WM_STORAGE_URL', plugins_url( 'storage', AI1WM_PLUGIN_BASENAME ) );
56
 
 
 
 
57
  // Include constants
58
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'constants.php';
59
 
constants.php CHANGED
@@ -35,7 +35,7 @@ define( 'AI1WM_DEBUG', false );
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
- define( 'AI1WM_VERSION', '7.64' );
39
 
40
  // ===============
41
  // = Plugin Name =
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
+ define( 'AI1WM_VERSION', '7.65' );
39
 
40
  // ===============
41
  // = Plugin Name =
functions.php CHANGED
@@ -314,7 +314,15 @@ function ai1wm_archive_name( $params ) {
314
  * @return string
315
  */
316
  function ai1wm_backup_url( $params ) {
317
- return AI1WM_BACKUPS_URL . '/' . ai1wm_replace_directory_separator_with_forward_slash( $params['archive'] );
 
 
 
 
 
 
 
 
318
  }
319
 
320
  /**
314
  * @return string
315
  */
316
  function ai1wm_backup_url( $params ) {
317
+ static $backups_base_url = '';
318
+ if ( empty( $backups_base_url ) ) {
319
+ $backups_base_url = str_replace( untrailingslashit( ABSPATH ), '', AI1WM_BACKUPS_PATH );
320
+ $backups_base_url = site_url(
321
+ ai1wm_replace_directory_separator_with_forward_slash( $backups_base_url )
322
+ );
323
+ }
324
+
325
+ return $backups_base_url . '/' . ai1wm_replace_directory_separator_with_forward_slash( $params['archive'] );
326
  }
327
 
328
  /**
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -929,7 +929,7 @@ class Ai1wm_Main_Controller {
929
  AI1WM_PLUGIN_NAME
930
  ),
931
  __(
932
- '<a href="https://import.wp-migration.com" target="_blank">Get unlimited</a>',
933
  AI1WM_PLUGIN_NAME
934
  )
935
  ),
929
  AI1WM_PLUGIN_NAME
930
  ),
931
  __(
932
+ '<a href="https://servmask.com/products/unlimited-extension" target="_blank">Get unlimited</a>',
933
  AI1WM_PLUGIN_NAME
934
  )
935
  ),
lib/model/export/class-ai1wm-export-database.php CHANGED
@@ -111,20 +111,24 @@ class Ai1wm_Export_Database {
111
  $old_table_prefixes = $old_column_prefixes = array();
112
  $new_table_prefixes = $new_column_prefixes = array();
113
 
114
- // Set table and column prefixes
115
  if ( ai1wm_table_prefix() ) {
116
- $old_table_prefixes[] = $old_column_prefixes[] = ai1wm_table_prefix();
117
- $new_table_prefixes[] = $new_column_prefixes[] = ai1wm_servmask_prefix();
118
  } else {
119
- // Set table prefixes based on table name
120
  foreach ( $tables as $table_name ) {
121
  $old_table_prefixes[] = $table_name;
122
  $new_table_prefixes[] = ai1wm_servmask_prefix() . $table_name;
123
  }
 
124
 
125
- // Set table prefixes based on column name
 
 
 
 
126
  foreach ( array( 'user_roles', 'capabilities', 'user_level', 'dashboard_quick_press_last_post_id', 'user-settings', 'user-settings-time' ) as $column_prefix ) {
127
- $old_column_prefixes[] = $column_prefix;
128
  $new_column_prefixes[] = ai1wm_servmask_prefix() . $column_prefix;
129
  }
130
  }
111
  $old_table_prefixes = $old_column_prefixes = array();
112
  $new_table_prefixes = $new_column_prefixes = array();
113
 
114
+ // Set table prefixes
115
  if ( ai1wm_table_prefix() ) {
116
+ $old_table_prefixes[] = ai1wm_table_prefix();
117
+ $new_table_prefixes[] = ai1wm_servmask_prefix();
118
  } else {
 
119
  foreach ( $tables as $table_name ) {
120
  $old_table_prefixes[] = $table_name;
121
  $new_table_prefixes[] = ai1wm_servmask_prefix() . $table_name;
122
  }
123
+ }
124
 
125
+ // Set column prefixes
126
+ if ( strlen( ai1wm_table_prefix() ) > 1 ) {
127
+ $old_column_prefixes[] = ai1wm_table_prefix();
128
+ $new_column_prefixes[] = ai1wm_servmask_prefix();
129
+ } else {
130
  foreach ( array( 'user_roles', 'capabilities', 'user_level', 'dashboard_quick_press_last_post_id', 'user-settings', 'user-settings-time' ) as $column_prefix ) {
131
+ $old_column_prefixes[] = ai1wm_table_prefix() . $column_prefix;
132
  $new_column_prefixes[] = ai1wm_servmask_prefix() . $column_prefix;
133
  }
134
  }
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -1477,7 +1477,7 @@ abstract class Ai1wm_Database {
1477
  $search = $this->get_old_table_prefixes();
1478
  $replace = $this->get_new_table_prefixes();
1479
 
1480
- // Replace first occurance at a specified position
1481
  if ( $position !== false ) {
1482
  for ( $i = 0; $i < count( $search ); $i++ ) {
1483
  $current = stripos( $input, $search[ $i ], $position );
@@ -1503,7 +1503,7 @@ abstract class Ai1wm_Database {
1503
  $search = $this->get_old_column_prefixes();
1504
  $replace = $this->get_new_column_prefixes();
1505
 
1506
- // Replace first occurance at a specified position
1507
  if ( $position !== false ) {
1508
  for ( $i = 0; $i < count( $search ); $i++ ) {
1509
  $current = stripos( $input, $search[ $i ], $position );
1477
  $search = $this->get_old_table_prefixes();
1478
  $replace = $this->get_new_table_prefixes();
1479
 
1480
+ // Replace first occurrence at a specified position
1481
  if ( $position !== false ) {
1482
  for ( $i = 0; $i < count( $search ); $i++ ) {
1483
  $current = stripos( $input, $search[ $i ], $position );
1503
  $search = $this->get_old_column_prefixes();
1504
  $replace = $this->get_new_column_prefixes();
1505
 
1506
+ // Replace first occurrence at a specified position
1507
  if ( $position !== false ) {
1508
  for ( $i = 0; $i < count( $search ); $i++ ) {
1509
  $current = stripos( $input, $search[ $i ], $position );
lib/view/import/pro.php CHANGED
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  <p>
35
  <a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank"><?php _e( 'How-to: Increase maximum upload file size', AI1WM_PLUGIN_NAME ); ?></a>
36
  <?php _e( 'or', AI1WM_PLUGIN_NAME ); ?>
37
- <a href="https://import.wp-migration.com" target="_blank" class="ai1wm-label">
38
  <i class="ai1wm-icon-notification"></i>
39
  <?php _e( 'Get unlimited', AI1WM_PLUGIN_NAME ); ?>
40
  </a>
34
  <p>
35
  <a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank"><?php _e( 'How-to: Increase maximum upload file size', AI1WM_PLUGIN_NAME ); ?></a>
36
  <?php _e( 'or', AI1WM_PLUGIN_NAME ); ?>
37
+ <a href="https://servmask.com/products/unlimited-extension" target="_blank" class="ai1wm-label">
38
  <i class="ai1wm-icon-notification"></i>
39
  <?php _e( 'Get unlimited', AI1WM_PLUGIN_NAME ); ?>
40
  </a>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordp
4
  Requires at least: 3.3
5
  Tested up to: 6.0
6
  Requires PHP: 5.2.17
7
- Stable tag: 7.64
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -89,6 +89,11 @@ All-in-One WP Migration is in full compliance with General Data Protection Regul
89
  See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
90
 
91
  == Changelog ==
 
 
 
 
 
92
  = 7.64 =
93
  **Added**
94
 
4
  Requires at least: 3.3
5
  Tested up to: 6.0
6
  Requires PHP: 5.2.17
7
+ Stable tag: 7.65
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
89
  See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
90
 
91
  == Changelog ==
92
+ = 7.65 =
93
+ **Added**
94
+
95
+ * Improved support for single-letter prefixed databases
96
+
97
  = 7.64 =
98
  **Added**
99