Version Description
Changed
- Remove temporary files on error
Fixed
- Incorrect subsite path replacement on import
Download this release
Release Info
| Developer | bangelov |
| Plugin | |
| Version | 6.52 |
| Comparing to | |
| See all releases | |
Code changes from version 6.51 to 6.52
- all-in-one-wp-migration.php +1 -1
- constants.php +1 -1
- lib/controller/class-ai1wm-export-controller.php +1 -0
- lib/controller/class-ai1wm-import-controller.php +1 -0
- lib/model/export/class-ai1wm-export-clean.php +1 -19
- lib/model/import/class-ai1wm-import-clean.php +1 -19
- lib/vendor/servmask/archiver/class-ai1wm-extractor.php +1 -0
- lib/vendor/servmask/filesystem/class-ai1wm-directory.php +56 -0
- loader.php +8 -0
- readme.txt +10 -1
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.
|
| 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.52
|
| 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.
|
| 35 |
|
| 36 |
// ===============
|
| 37 |
// = Plugin Name =
|
| 31 |
// ==================
|
| 32 |
// = Plugin Version =
|
| 33 |
// ==================
|
| 34 |
+
define( 'AI1WM_VERSION', '6.52' );
|
| 35 |
|
| 36 |
// ===============
|
| 37 |
// = Plugin Name =
|
lib/controller/class-ai1wm-export-controller.php
CHANGED
|
@@ -86,6 +86,7 @@ class Ai1wm_Export_Controller {
|
|
| 86 |
|
| 87 |
} catch ( Exception $e ) {
|
| 88 |
Ai1wm_Status::error( $e->getMessage() );
|
|
|
|
| 89 |
exit;
|
| 90 |
}
|
| 91 |
}
|
| 86 |
|
| 87 |
} catch ( Exception $e ) {
|
| 88 |
Ai1wm_Status::error( $e->getMessage() );
|
| 89 |
+
Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
|
| 90 |
exit;
|
| 91 |
}
|
| 92 |
}
|
lib/controller/class-ai1wm-import-controller.php
CHANGED
|
@@ -90,6 +90,7 @@ class Ai1wm_Import_Controller {
|
|
| 90 |
exit;
|
| 91 |
} catch ( Exception $e ) {
|
| 92 |
Ai1wm_Status::error( $e->getMessage() );
|
|
|
|
| 93 |
exit;
|
| 94 |
}
|
| 95 |
}
|
| 90 |
exit;
|
| 91 |
} catch ( Exception $e ) {
|
| 92 |
Ai1wm_Status::error( $e->getMessage() );
|
| 93 |
+
Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
|
| 94 |
exit;
|
| 95 |
}
|
| 96 |
}
|
lib/model/export/class-ai1wm-export-clean.php
CHANGED
|
@@ -26,25 +26,7 @@
|
|
| 26 |
class Ai1wm_Export_Clean {
|
| 27 |
|
| 28 |
public static function execute( $params ) {
|
| 29 |
-
|
| 30 |
-
// Iterate over storage directory
|
| 31 |
-
$iterator = new Ai1wm_Recursive_Directory_Iterator( ai1wm_storage_path( $params ) );
|
| 32 |
-
|
| 33 |
-
// Recursively iterate over storage directory
|
| 34 |
-
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
|
| 35 |
-
|
| 36 |
-
// Remove files and directories
|
| 37 |
-
foreach ( $iterator as $item ) {
|
| 38 |
-
if ( $item->isDir() ) {
|
| 39 |
-
@rmdir( $item->getPathname() );
|
| 40 |
-
} else {
|
| 41 |
-
@unlink( $item->getPathname() );
|
| 42 |
-
}
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
// Remove storage path
|
| 46 |
-
@rmdir( ai1wm_storage_path( $params ) );
|
| 47 |
-
|
| 48 |
exit;
|
| 49 |
}
|
| 50 |
}
|
| 26 |
class Ai1wm_Export_Clean {
|
| 27 |
|
| 28 |
public static function execute( $params ) {
|
| 29 |
+
Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
exit;
|
| 31 |
}
|
| 32 |
}
|
lib/model/import/class-ai1wm-import-clean.php
CHANGED
|
@@ -26,25 +26,7 @@
|
|
| 26 |
class Ai1wm_Import_Clean {
|
| 27 |
|
| 28 |
public static function execute( $params ) {
|
| 29 |
-
|
| 30 |
-
// Iterate over storage directory
|
| 31 |
-
$iterator = new Ai1wm_Recursive_Directory_Iterator( ai1wm_storage_path( $params ) );
|
| 32 |
-
|
| 33 |
-
// Recursively iterate over storage directory
|
| 34 |
-
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
|
| 35 |
-
|
| 36 |
-
// Remove files and directories
|
| 37 |
-
foreach ( $iterator as $item ) {
|
| 38 |
-
if ( $item->isDir() ) {
|
| 39 |
-
@rmdir( $item->getPathname() );
|
| 40 |
-
} else {
|
| 41 |
-
@unlink( $item->getPathname() );
|
| 42 |
-
}
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
// Remove storage path
|
| 46 |
-
@rmdir( ai1wm_storage_path( $params ) );
|
| 47 |
-
|
| 48 |
exit;
|
| 49 |
}
|
| 50 |
}
|
| 26 |
class Ai1wm_Import_Clean {
|
| 27 |
|
| 28 |
public static function execute( $params ) {
|
| 29 |
+
Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
exit;
|
| 31 |
}
|
| 32 |
}
|
lib/vendor/servmask/archiver/class-ai1wm-extractor.php
CHANGED
|
@@ -220,6 +220,7 @@ class Ai1wm_Extractor extends Ai1wm_Archiver {
|
|
| 220 |
// Replace extract paths
|
| 221 |
for ( $i = 0; $i < count( $old_paths ); $i++ ) {
|
| 222 |
if ( strpos( $file_path . DIRECTORY_SEPARATOR, $old_paths[ $i ] . DIRECTORY_SEPARATOR ) === 0 ) {
|
|
|
|
| 223 |
$file_path = substr_replace( $file_path, $new_paths[ $i ], 0, strlen( $old_paths[ $i ] ) );
|
| 224 |
break;
|
| 225 |
}
|
| 220 |
// Replace extract paths
|
| 221 |
for ( $i = 0; $i < count( $old_paths ); $i++ ) {
|
| 222 |
if ( strpos( $file_path . DIRECTORY_SEPARATOR, $old_paths[ $i ] . DIRECTORY_SEPARATOR ) === 0 ) {
|
| 223 |
+
$file_name = substr_replace( $file_name, $new_paths[ $i ], 0, strlen( $old_paths[ $i ] ) );
|
| 224 |
$file_path = substr_replace( $file_path, $new_paths[ $i ], 0, strlen( $old_paths[ $i ] ) );
|
| 225 |
break;
|
| 226 |
}
|
lib/vendor/servmask/filesystem/class-ai1wm-directory.php
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
| 4 |
+
*
|
| 5 |
+
* This program is free software: you can redistribute it and/or modify
|
| 6 |
+
* it under the terms of the GNU General Public License as published by
|
| 7 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
+
* (at your option) any later version.
|
| 9 |
+
*
|
| 10 |
+
* This program is distributed in the hope that it will be useful,
|
| 11 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
* GNU General Public License for more details.
|
| 14 |
+
*
|
| 15 |
+
* You should have received a copy of the GNU General Public License
|
| 16 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
+
*
|
| 18 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
+
*/
|
| 25 |
+
|
| 26 |
+
class Ai1wm_Directory {
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Delete directory and its contents
|
| 30 |
+
* The method will recursively delete a directory and its contents.
|
| 31 |
+
*
|
| 32 |
+
* @param string $path Path to the directory
|
| 33 |
+
* @return boolean
|
| 34 |
+
*
|
| 35 |
+
* @throws UnexpectedValueException
|
| 36 |
+
*/
|
| 37 |
+
public static function delete( $path ) {
|
| 38 |
+
// Iterate over directory
|
| 39 |
+
$iterator = new Ai1wm_Recursive_Directory_Iterator( $path );
|
| 40 |
+
|
| 41 |
+
// Recursively iterate over directory
|
| 42 |
+
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
|
| 43 |
+
|
| 44 |
+
// Remove files and directories
|
| 45 |
+
foreach ( $iterator as $item ) {
|
| 46 |
+
if ( $item->isDir() ) {
|
| 47 |
+
@rmdir( $item->getPathname() );
|
| 48 |
+
} else {
|
| 49 |
+
@unlink( $item->getPathname() );
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
// Remove path
|
| 54 |
+
return @rmdir( $path );
|
| 55 |
+
}
|
| 56 |
+
}
|
loader.php
CHANGED
|
@@ -34,6 +34,14 @@ require_once AI1WM_VENDOR_PATH .
|
|
| 34 |
DIRECTORY_SEPARATOR .
|
| 35 |
'Bandar.php';
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
require_once AI1WM_VENDOR_PATH .
|
| 38 |
DIRECTORY_SEPARATOR .
|
| 39 |
'servmask' .
|
| 34 |
DIRECTORY_SEPARATOR .
|
| 35 |
'Bandar.php';
|
| 36 |
|
| 37 |
+
require_once AI1WM_VENDOR_PATH .
|
| 38 |
+
DIRECTORY_SEPARATOR .
|
| 39 |
+
'servmask' .
|
| 40 |
+
DIRECTORY_SEPARATOR .
|
| 41 |
+
'filesystem' .
|
| 42 |
+
DIRECTORY_SEPARATOR .
|
| 43 |
+
'class-ai1wm-directory.php';
|
| 44 |
+
|
| 45 |
require_once AI1WM_VENDOR_PATH .
|
| 46 |
DIRECTORY_SEPARATOR .
|
| 47 |
'servmask' .
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
|
|
| 3 |
Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordpress migration, website migration, database export, database import, apoyo, sauvegarde, di riserva, バックアップ
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 4.8
|
| 6 |
-
Stable tag: 6.
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
|
@@ -90,6 +90,15 @@ Alternatively you can download the plugin using the download button on this page
|
|
| 90 |
3. Plugin Menu
|
| 91 |
|
| 92 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
= 6.51 =
|
| 94 |
**Added**
|
| 95 |
|
| 3 |
Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordpress migration, website migration, database export, database import, apoyo, sauvegarde, di riserva, バックアップ
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 4.8
|
| 6 |
+
Stable tag: 6.52
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
| 90 |
3. Plugin Menu
|
| 91 |
|
| 92 |
== Changelog ==
|
| 93 |
+
= 6.52 =
|
| 94 |
+
**Changed**
|
| 95 |
+
|
| 96 |
+
* Remove temporary files on error
|
| 97 |
+
|
| 98 |
+
**Fixed**
|
| 99 |
+
|
| 100 |
+
* Incorrect subsite path replacement on import
|
| 101 |
+
|
| 102 |
= 6.51 =
|
| 103 |
**Added**
|
| 104 |
|
