All-in-One WP Migration - Version 7.5

Version Description

Changed

  • Improved i18n support for non-latin filenames
Download this release

Release Info

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

Code changes from version 7.4 to 7.5

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.4
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: 7.5
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', '7.4' );
39
40
// ===============
41
// = Plugin Name =
35
// ==================
36
// = Plugin Version =
37
// ==================
38
+ define( 'AI1WM_VERSION', '7.5' );
39
40
// ===============
41
// = Plugin Name =
functions.php CHANGED
@@ -1478,3 +1478,24 @@ function ai1wm_get_filters( $tag ) {
1478
1479
return $filters;
1480
}
1478
1479
return $filters;
1480
}
1481
+
1482
+ /**
1483
+ * i18n friendly version of basename()
1484
+ *
1485
+ * @param string $path File path
1486
+ * @param string $suffix If the filename ends in suffix this will also be cut off
1487
+ * @return string
1488
+ */
1489
+ function ai1wm_basename( $path, $suffix = '' ) {
1490
+ return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
1491
+ }
1492
+
1493
+ /**
1494
+ * i18n friendly version of dirname()
1495
+ *
1496
+ * @param string $path File path
1497
+ * @return string
1498
+ */
1499
+ function ai1wm_dirname( $path ) {
1500
+ return urldecode( dirname( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ) ) );
1501
+ }
lib/vendor/servmask/archiver/class-ai1wm-compressor.php CHANGED
@@ -162,24 +162,21 @@ class Ai1wm_Compressor extends Ai1wm_Archiver {
162
* @param string $file_name Filename to generate block header for
163
* @param string $new_file_name Write the file with a different name
164
*
165
- * @return mixed
166
*/
167
private function get_file_block( $file_name, $new_file_name = '' ) {
168
- $block = false;
169
170
// Get stats about the file
171
if ( ( $stat = @stat( $file_name ) ) !== false ) {
172
173
- // Get path details
174
if ( empty( $new_file_name ) ) {
175
- $pathinfo = pathinfo( $file_name );
176
} else {
177
- $pathinfo = pathinfo( $new_file_name );
178
}
179
180
- // Filename of the file we are accessing
181
- $name = $pathinfo['basename'];
182
-
183
// Size in bytes of the file
184
$size = $stat['size'];
185
@@ -187,7 +184,11 @@ class Ai1wm_Compressor extends Ai1wm_Archiver {
187
$date = $stat['mtime'];
188
189
// Replace current directory separator with backward slash in file path
190
- $path = $this->replace_directory_separator_with_forward_slash( $pathinfo['dirname'] );
191
192
// Concatenate block format parts
193
$format = implode( '', $this->block_format );
@@ -207,7 +208,7 @@ class Ai1wm_Compressor extends Ai1wm_Archiver {
207
* @return string
208
*/
209
public function get_file_size_block( $file_size ) {
210
- $block = false;
211
212
// Pack file data into binary string
213
if ( isset( $this->block_format[1] ) ) {
162
* @param string $file_name Filename to generate block header for
163
* @param string $new_file_name Write the file with a different name
164
*
165
+ * @return string
166
*/
167
private function get_file_block( $file_name, $new_file_name = '' ) {
168
+ $block = '';
169
170
// Get stats about the file
171
if ( ( $stat = @stat( $file_name ) ) !== false ) {
172
173
+ // Filename of the file we are accessing
174
if ( empty( $new_file_name ) ) {
175
+ $name = ai1wm_basename( $file_name );
176
} else {
177
+ $name = ai1wm_basename( $new_file_name );
178
}
179
180
// Size in bytes of the file
181
$size = $stat['size'];
182
184
$date = $stat['mtime'];
185
186
// Replace current directory separator with backward slash in file path
187
+ if ( empty( $new_file_name ) ) {
188
+ $path = $this->replace_directory_separator_with_forward_slash( ai1wm_dirname( $file_name ) );
189
+ } else {
190
+ $path = $this->replace_directory_separator_with_forward_slash( ai1wm_dirname( $new_file_name ) );
191
+ }
192
193
// Concatenate block format parts
194
$format = implode( '', $this->block_format );
208
* @return string
209
*/
210
public function get_file_size_block( $file_size ) {
211
+ $block = '';
212
213
// Pack file data into binary string
214
if ( isset( $this->block_format[1] ) ) {
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.2
6
Requires PHP: 5.2.17
7
- Stable tag: 7.4
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
= 7.4 =
112
**Fixed**
113
4
Requires at least: 3.3
5
Tested up to: 5.2
6
Requires PHP: 5.2.17
7
+ Stable tag: 7.5
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
+ = 7.5 =
112
+ **Changed**
113
+
114
+ * Improved i18n support for non-latin filenames
115
+
116
= 7.4 =
117
**Fixed**
118