Version Description
- Fix an issue with incorrect file size on export
Download this release
Release Info
Developer | bangelov |
Plugin | All-in-One WP Migration |
Version | 5.47 |
Comparing to | |
See all releases |
Code changes from version 5.46 to 5.47
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: 5.
|
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: 5.47
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
constants.php
CHANGED
@@ -39,7 +39,7 @@ if ( function_exists( 'gethostname' ) && in_array( gethostname(), $local ) ) {
|
|
39 |
// ==================
|
40 |
// = Plugin Version =
|
41 |
// ==================
|
42 |
-
define( 'AI1WM_VERSION', '5.
|
43 |
|
44 |
// ===============
|
45 |
// = Plugin Name =
|
39 |
// ==================
|
40 |
// = Plugin Version =
|
41 |
// ==================
|
42 |
+
define( 'AI1WM_VERSION', '5.47' );
|
43 |
|
44 |
// ===============
|
45 |
// = Plugin Name =
|
lib/model/export/class-ai1wm-export-content.php
CHANGED
@@ -27,12 +27,20 @@ class Ai1wm_Export_Content {
|
|
27 |
|
28 |
public static function execute( $params ) {
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
// Set content offset
|
31 |
if ( isset( $params['content_offset'] ) ) {
|
32 |
$content_offset = (int) $params['content_offset'];
|
33 |
} else {
|
34 |
$content_offset = 0;
|
35 |
}
|
|
|
36 |
// Set filemap offset
|
37 |
if ( isset( $params['filemap_offset'] ) ) {
|
38 |
$filemap_offset = (int) $params['filemap_offset'];
|
@@ -88,7 +96,7 @@ class Ai1wm_Export_Content {
|
|
88 |
try {
|
89 |
|
90 |
// Add file to archive
|
91 |
-
if ( ( $content_offset = $archive->add_file( WP_CONTENT_DIR . DIRECTORY_SEPARATOR . $path, $path, $content_offset, 10 ) ) ) {
|
92 |
|
93 |
// Set progress
|
94 |
if ( ( $processed += $content_offset ) ) {
|
@@ -98,6 +106,9 @@ class Ai1wm_Export_Content {
|
|
98 |
// Set progress
|
99 |
Ai1wm_Status::info( sprintf( __( 'Archiving %d files...<br />%d%% complete', AI1WM_PLUGIN_NAME ), $total_files, $progress ) );
|
100 |
|
|
|
|
|
|
|
101 |
// Set content offset
|
102 |
$params['content_offset'] = $content_offset;
|
103 |
|
@@ -113,6 +124,9 @@ class Ai1wm_Export_Content {
|
|
113 |
return $params;
|
114 |
}
|
115 |
|
|
|
|
|
|
|
116 |
// Set content offset
|
117 |
$content_offset = 0;
|
118 |
|
@@ -136,6 +150,9 @@ class Ai1wm_Export_Content {
|
|
136 |
$archive->close();
|
137 |
}
|
138 |
|
|
|
|
|
|
|
139 |
// Set content offset
|
140 |
$params['content_offset'] = $content_offset;
|
141 |
|
27 |
|
28 |
public static function execute( $params ) {
|
29 |
|
30 |
+
// Set current filesize
|
31 |
+
if ( isset( $params['current_filesize'] ) ) {
|
32 |
+
$current_filesize = (int) $params['current_filesize'];
|
33 |
+
} else {
|
34 |
+
$current_filesize = 0;
|
35 |
+
}
|
36 |
+
|
37 |
// Set content offset
|
38 |
if ( isset( $params['content_offset'] ) ) {
|
39 |
$content_offset = (int) $params['content_offset'];
|
40 |
} else {
|
41 |
$content_offset = 0;
|
42 |
}
|
43 |
+
|
44 |
// Set filemap offset
|
45 |
if ( isset( $params['filemap_offset'] ) ) {
|
46 |
$filemap_offset = (int) $params['filemap_offset'];
|
96 |
try {
|
97 |
|
98 |
// Add file to archive
|
99 |
+
if ( ( $content_offset = $archive->add_file( WP_CONTENT_DIR . DIRECTORY_SEPARATOR . $path, $path, $current_filesize, $content_offset, 10 ) ) ) {
|
100 |
|
101 |
// Set progress
|
102 |
if ( ( $processed += $content_offset ) ) {
|
106 |
// Set progress
|
107 |
Ai1wm_Status::info( sprintf( __( 'Archiving %d files...<br />%d%% complete', AI1WM_PLUGIN_NAME ), $total_files, $progress ) );
|
108 |
|
109 |
+
// Set current filesize
|
110 |
+
$params['current_filesize'] = $archive->get_current_filesize();
|
111 |
+
|
112 |
// Set content offset
|
113 |
$params['content_offset'] = $content_offset;
|
114 |
|
124 |
return $params;
|
125 |
}
|
126 |
|
127 |
+
// Set current filesize
|
128 |
+
$current_filesize = 0;
|
129 |
+
|
130 |
// Set content offset
|
131 |
$content_offset = 0;
|
132 |
|
150 |
$archive->close();
|
151 |
}
|
152 |
|
153 |
+
// Set current filesize
|
154 |
+
$params['current_filesize'] = $current_filesize;
|
155 |
+
|
156 |
// Set content offset
|
157 |
$params['content_offset'] = $content_offset;
|
158 |
|
lib/vendor/servmask/archiver/class-ai1wm-compressor.php
CHANGED
@@ -38,27 +38,31 @@ class Ai1wm_Compressor extends Ai1wm_Archiver {
|
|
38 |
/**
|
39 |
* Add a file to the archive
|
40 |
*
|
41 |
-
* @param string $file
|
42 |
-
* @param string $new_filename
|
43 |
-
* @param int $
|
44 |
-
* @param int $
|
|
|
45 |
*
|
46 |
* @throws \Ai1wm_Not_Accesible_Exception
|
47 |
* @throws \Ai1wm_Not_Readable_Exception
|
48 |
* @throws \Ai1wm_Not_Writable_Exception
|
49 |
*/
|
50 |
-
public function add_file( $file, $new_filename = '', $offset = 0, $timeout = 0 ) {
|
51 |
// open the file for reading in binary mode
|
52 |
$handle = $this->open_file_for_reading( $file );
|
53 |
|
54 |
-
// get file block header of the file we are trying to archive
|
55 |
-
$block = $this->get_file_block( $file, $new_filename );
|
56 |
-
|
57 |
// set file offset or set file header
|
58 |
if ( $offset ) {
|
59 |
// set file offset
|
60 |
fseek( $handle, $offset, SEEK_SET );
|
|
|
|
|
|
|
61 |
} else {
|
|
|
|
|
|
|
62 |
// write file block header to our archive file
|
63 |
$this->write_to_handle( $this->file_handle, $block, $this->filename );
|
64 |
}
|
38 |
/**
|
39 |
* Add a file to the archive
|
40 |
*
|
41 |
+
* @param string $file File to add to the archive
|
42 |
+
* @param string $new_filename Write the file with a different name
|
43 |
+
* @param int $current_filesize File size
|
44 |
+
* @param int $offset File offset
|
45 |
+
* @param int $timeout Process timeout
|
46 |
*
|
47 |
* @throws \Ai1wm_Not_Accesible_Exception
|
48 |
* @throws \Ai1wm_Not_Readable_Exception
|
49 |
* @throws \Ai1wm_Not_Writable_Exception
|
50 |
*/
|
51 |
+
public function add_file( $file, $new_filename = '', $current_filesize = 0, $offset = 0, $timeout = 0 ) {
|
52 |
// open the file for reading in binary mode
|
53 |
$handle = $this->open_file_for_reading( $file );
|
54 |
|
|
|
|
|
|
|
55 |
// set file offset or set file header
|
56 |
if ( $offset ) {
|
57 |
// set file offset
|
58 |
fseek( $handle, $offset, SEEK_SET );
|
59 |
+
|
60 |
+
// set file size
|
61 |
+
$this->current_filesize = $current_filesize;
|
62 |
} else {
|
63 |
+
// get file block header of the file we are trying to archive
|
64 |
+
$block = $this->get_file_block( $file, $new_filename );
|
65 |
+
|
66 |
// write file block header to our archive file
|
67 |
$this->write_to_handle( $this->file_handle, $block, $this->filename );
|
68 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
|
|
3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.5
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
@@ -77,6 +77,9 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
|
|
77 |
3. Plugin Menu
|
78 |
|
79 |
== Changelog ==
|
|
|
|
|
|
|
80 |
= 5.46 =
|
81 |
* Add "Restore from Backups" video in readme file
|
82 |
* Display message if backups are inaccessible
|
3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.5
|
6 |
+
Stable tag: 5.47
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
77 |
3. Plugin Menu
|
78 |
|
79 |
== Changelog ==
|
80 |
+
= 5.47 =
|
81 |
+
* Fix an issue with incorrect file size on export
|
82 |
+
|
83 |
= 5.46 =
|
84 |
* Add "Restore from Backups" video in readme file
|
85 |
* Display message if backups are inaccessible
|