All-in-One WP Migration - Version 6.92

Version Description

Added

  • Workaround for PHP 7.3.2 bug when database export uses more memory https://bugs.php.net/bug.php?id=77597
Download this release

Release Info

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

Code changes from version 6.91 to 6.92

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.91
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.92
9
* Text Domain: all-in-one-wp-migration
10
* Domain Path: /languages
11
* Network: True
constants.php CHANGED
@@ -35,7 +35,7 @@ define( 'AI1WM_DEBUG', false );
35
// ==================
36
// = Plugin Version =
37
// ==================
38
- define( 'AI1WM_VERSION', '6.91' );
39
40
// ===============
41
// = Plugin Name =
@@ -117,11 +117,6 @@ define( 'AI1WM_REPORT_URL', 'https://servmask.com/ai1wm/report/create' );
117
// ==============================
118
define( 'AI1WM_ARCHIVE_TOOLS_URL', 'https://servmask.com/archive/tools' );
119
120
- // ===========================
121
- // = ServMask Activation URL =
122
- // ===========================
123
- define( 'AI1WM_ACTIVATION_URL', 'https://servmask.com/purchase/activations' );
124
-
125
// =========================
126
// = ServMask Table Prefix =
127
// =========================
35
// ==================
36
// = Plugin Version =
37
// ==================
38
+ define( 'AI1WM_VERSION', '6.92' );
39
40
// ===============
41
// = Plugin Name =
117
// ==============================
118
define( 'AI1WM_ARCHIVE_TOOLS_URL', 'https://servmask.com/archive/tools' );
119
120
// =========================
121
// = ServMask Table Prefix =
122
// =========================
functions.php CHANGED
@@ -485,7 +485,7 @@ function ai1wm_archive_share( $blog_id = null ) {
485
// Add domain
486
if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) {
487
foreach ( $domain as $subdomain ) {
488
- if ( $subdomain ) {
489
$name[] = $subdomain;
490
}
491
}
@@ -494,7 +494,7 @@ function ai1wm_archive_share( $blog_id = null ) {
494
// Add path
495
if ( ( $path = explode( '/', parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) ) {
496
foreach ( $path as $directory ) {
497
- if ( $directory ) {
498
$name[] = $directory;
499
}
500
}
485
// Add domain
486
if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) {
487
foreach ( $domain as $subdomain ) {
488
+ if ( $subdomain = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $subdomain ) ) ) {
489
$name[] = $subdomain;
490
}
491
}
494
// Add path
495
if ( ( $path = explode( '/', parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) ) {
496
foreach ( $path as $directory ) {
497
+ if ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) {
498
$name[] = $directory;
499
}
500
}
lib/vendor/servmask/database/class-ai1wm-database-mysql.php CHANGED
@@ -96,16 +96,6 @@ class Ai1wm_Database_Mysql extends Ai1wm_Database {
96
return mysql_fetch_row( $result );
97
}
98
99
- /**
100
- * Return the field from MySQL query as row
101
- *
102
- * @param resource $result MySQL resource
103
- * @return object
104
- */
105
- public function fetch_field( $result ) {
106
- return mysql_fetch_field( $result );
107
- }
108
-
109
/**
110
* Return the number for rows from MySQL results
111
*
96
return mysql_fetch_row( $result );
97
}
98
99
/**
100
* Return the number for rows from MySQL results
101
*
lib/vendor/servmask/database/class-ai1wm-database-mysqli.php CHANGED
@@ -96,16 +96,6 @@ class Ai1wm_Database_Mysqli extends Ai1wm_Database {
96
return mysqli_fetch_row( $result );
97
}
98
99
- /**
100
- * Return the field from MySQL query as row
101
- *
102
- * @param resource $result MySQL resource
103
- * @return object
104
- */
105
- public function fetch_field( $result ) {
106
- return mysqli_fetch_field( $result );
107
- }
108
-
109
/**
110
* Return the number for rows from MySQL results
111
*
96
return mysqli_fetch_row( $result );
97
}
98
99
/**
100
* Return the number for rows from MySQL results
101
*
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -339,12 +339,12 @@ abstract class Ai1wm_Database {
339
/**
340
* Set table where clauses
341
*
342
- * @param string $table Table name
343
- * @param array $clauses Table clauses
344
* @return object
345
*/
346
- public function set_table_where_clauses( $table, $clauses ) {
347
- $this->table_where_clauses[ strtolower( $table ) ] = $clauses;
348
349
return $this;
350
}
@@ -352,12 +352,12 @@ abstract class Ai1wm_Database {
352
/**
353
* Get table where clauses
354
*
355
- * @param string $table Table name
356
* @return array
357
*/
358
- public function get_table_where_clauses( $table ) {
359
- if ( isset( $this->table_where_clauses[ strtolower( $table ) ] ) ) {
360
- return $this->table_where_clauses[ strtolower( $table ) ];
361
}
362
363
return array();
@@ -366,13 +366,13 @@ abstract class Ai1wm_Database {
366
/**
367
* Set table prefix columns
368
*
369
- * @param string $table Table name
370
- * @param array $columns Table columns
371
* @return object
372
*/
373
- public function set_table_prefix_columns( $table, $columns ) {
374
- foreach ( $columns as $column ) {
375
- $this->table_prefix_columns[ strtolower( $table ) ][ strtolower( $column ) ] = true;
376
}
377
378
return $this;
@@ -381,12 +381,12 @@ abstract class Ai1wm_Database {
381
/**
382
* Get table prefix columns
383
*
384
- * @param string $table Table name
385
* @return array
386
*/
387
- public function get_table_prefix_columns( $table ) {
388
- if ( isset( $this->table_prefix_columns[ strtolower( $table ) ] ) ) {
389
- return $this->table_prefix_columns[ strtolower( $table ) ];
390
}
391
392
return array();
@@ -709,8 +709,8 @@ abstract class Ai1wm_Database {
709
$table_columns = array();
710
711
// Loop over table columns
712
- while ( $column = $this->fetch_field( $result ) ) {
713
- $table_columns[ strtolower( $column->name ) ] = $column->type;
714
}
715
716
// Loop over table rows
@@ -1023,6 +1023,29 @@ abstract class Ai1wm_Database {
1023
return $unique_keys;
1024
}
1025
1026
/**
1027
* Replace table prefixes
1028
*
@@ -1294,12 +1317,12 @@ abstract class Ai1wm_Database {
1294
/**
1295
* Check whether input is INSERT INTO query
1296
*
1297
- * @param string $input SQL statement
1298
- * @param string $table Table name (case insensitive)
1299
* @return boolean
1300
*/
1301
- protected function is_insert_into_query( $input, $table ) {
1302
- return stripos( $input, sprintf( 'INSERT INTO `%s`', $table ) ) === 0;
1303
}
1304
1305
/**
@@ -1447,23 +1470,23 @@ abstract class Ai1wm_Database {
1447
protected function prepare_table_values( $input, $column_type ) {
1448
if ( is_null( $input ) ) {
1449
return 'NULL';
1450
- } elseif ( $column_type === 1 ) { // tinyint
1451
return $input;
1452
- } elseif ( $column_type === 2 ) { // smallint
1453
return $input;
1454
- } elseif ( $column_type === 3 ) { // integer
1455
return $input;
1456
- } elseif ( $column_type === 4 ) { // float
1457
return $input;
1458
- } elseif ( $column_type === 5 ) { // double
1459
return $input;
1460
- } elseif ( $column_type === 8 ) { // bigint
1461
return $input;
1462
- } elseif ( $column_type === 9 ) { // mediumint
1463
return $input;
1464
- } elseif ( $column_type === 16 ) { // bit
1465
return $input;
1466
- } elseif ( $column_type === 246 ) { // decimal
1467
return $input;
1468
}
1469
@@ -1523,14 +1546,6 @@ abstract class Ai1wm_Database {
1523
*/
1524
abstract public function fetch_row( $result );
1525
1526
- /**
1527
- * Return the field from MySQL query as row
1528
- *
1529
- * @param resource $result MySQL resource
1530
- * @return object
1531
- */
1532
- abstract public function fetch_field( $result );
1533
-
1534
/**
1535
* Return the number for rows from MySQL results
1536
*
339
/**
340
* Set table where clauses
341
*
342
+ * @param string $table_name Table name
343
+ * @param array $where_clauses Table clauses
344
* @return object
345
*/
346
+ public function set_table_where_clauses( $table_name, $where_clauses ) {
347
+ $this->table_where_clauses[ strtolower( $table_name ) ] = $where_clauses;
348
349
return $this;
350
}
352
/**
353
* Get table where clauses
354
*
355
+ * @param string $table_name Table name
356
* @return array
357
*/
358
+ public function get_table_where_clauses( $table_name ) {
359
+ if ( isset( $this->table_where_clauses[ strtolower( $table_name ) ] ) ) {
360
+ return $this->table_where_clauses[ strtolower( $table_name ) ];
361
}
362
363
return array();
366
/**
367
* Set table prefix columns
368
*
369
+ * @param string $table_name Table name
370
+ * @param array $prefix_columns Table columns
371
* @return object
372
*/
373
+ public function set_table_prefix_columns( $table_name, $prefix_columns ) {
374
+ foreach ( $prefix_columns as $column_name ) {
375
+ $this->table_prefix_columns[ strtolower( $table_name ) ][ strtolower( $column_name ) ] = true;
376
}
377
378
return $this;
381
/**
382
* Get table prefix columns
383
*
384
+ * @param string $table_name Table name
385
* @return array
386
*/
387
+ public function get_table_prefix_columns( $table_name ) {
388
+ if ( isset( $this->table_prefix_columns[ strtolower( $table_name ) ] ) ) {
389
+ return $this->table_prefix_columns[ strtolower( $table_name ) ];
390
}
391
392
return array();
709
$table_columns = array();
710
711
// Loop over table columns
712
+ foreach ( $this->get_column_types( $table_name ) as $column_name => $column_type ) {
713
+ $table_columns[ strtolower( $column_name ) ] = $column_type;
714
}
715
716
// Loop over table rows
1023
return $unique_keys;
1024
}
1025
1026
+ /**
1027
+ * Get MySQL column types
1028
+ *
1029
+ * @param string $table_name Table name
1030
+ * @return array
1031
+ */
1032
+ protected function get_column_types( $table_name ) {
1033
+ $column_types = array();
1034
+
1035
+ // Get column types
1036
+ $result = $this->query( "SHOW COLUMNS FROM `{$table_name}`" );
1037
+ while ( $row = $this->fetch_assoc( $result ) ) {
1038
+ if ( isset( $row['Field'] ) ) {
1039
+ $column_types[ $row['Field'] ] = $row['Type'];
1040
+ }
1041
+ }
1042
+
1043
+ // Close result cursor
1044
+ $this->free_result( $result );
1045
+
1046
+ return $column_types;
1047
+ }
1048
+
1049
/**
1050
* Replace table prefixes
1051
*
1317
/**
1318
* Check whether input is INSERT INTO query
1319
*
1320
+ * @param string $input SQL statement
1321
+ * @param string $table_name Table name (case insensitive)
1322
* @return boolean
1323
*/
1324
+ protected function is_insert_into_query( $input, $table_name ) {
1325
+ return stripos( $input, sprintf( 'INSERT INTO `%s`', $table_name ) ) === 0;
1326
}
1327
1328
/**
1470
protected function prepare_table_values( $input, $column_type ) {
1471
if ( is_null( $input ) ) {
1472
return 'NULL';
1473
+ } elseif ( stripos( $column_type, 'tinyint' ) === 0 ) {
1474
return $input;
1475
+ } elseif ( stripos( $column_type, 'smallint' ) === 0 ) {
1476
return $input;
1477
+ } elseif ( stripos( $column_type, 'mediumint' ) === 0 ) {
1478
return $input;
1479
+ } elseif ( stripos( $column_type, 'int' ) === 0 ) {
1480
return $input;
1481
+ } elseif ( stripos( $column_type, 'bigint' ) === 0 ) {
1482
return $input;
1483
+ } elseif ( stripos( $column_type, 'float' ) === 0 ) {
1484
return $input;
1485
+ } elseif ( stripos( $column_type, 'double' ) === 0 ) {
1486
return $input;
1487
+ } elseif ( stripos( $column_type, 'decimal' ) === 0 ) {
1488
return $input;
1489
+ } elseif ( stripos( $column_type, 'bit' ) === 0 ) {
1490
return $input;
1491
}
1492
1546
*/
1547
abstract public function fetch_row( $result );
1548
1549
/**
1550
* Return the number for rows from MySQL results
1551
*
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: 5.1
6
Requires PHP: 5.2.17
7
- Stable tag: 6.91
8
License: GPLv2 or later
9
10
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -108,6 +108,11 @@ Alternatively you can download the plugin using the download button on this page
108
All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
110
== Changelog ==
111
= 6.91 =
112
**Changed**
113
4
Requires at least: 3.3
5
Tested up to: 5.1
6
Requires PHP: 5.2.17
7
+ Stable tag: 6.92
8
License: GPLv2 or later
9
10
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
108
All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
110
== Changelog ==
111
+ = 6.92 =
112
+ **Added**
113
+
114
+ * Workaround for PHP 7.3.2 bug when database export uses more memory https://bugs.php.net/bug.php?id=77597
115
+
116
= 6.91 =
117
**Changed**
118