All-in-One WP Migration - Version 1.8.0

Version Description

  • Added support for dynamically recognizing Site URL and Home URL on the import page
  • Fixed a bug when maximum uploaded size is exceeded
  • Fixed a bug when exporting big database tables
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.8.0

all-in-one-wp-migration.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Migration tool for all your blog data
6
  * Author: ServMask
7
  * Author URI: http://servmask.com/
8
- * Version: 1.7.2
9
  *
10
  * Copyright (C) 2013 ServMask LLC
11
  *
5
  * Description: Migration tool for all your blog data
6
  * Author: ServMask
7
  * Author URI: http://servmask.com/
8
+ * Version: 1.8.0
9
  *
10
  * Copyright (C) 2013 ServMask LLC
11
  *
constants.php CHANGED
@@ -26,7 +26,7 @@
26
  // ==================
27
  // = Plugin VERSION =
28
  // ==================
29
- define( 'AI1WM_VERSION', '1.7.2' );
30
 
31
  // ===============
32
  // = Plugin Name =
26
  // ==================
27
  // = Plugin VERSION =
28
  // ==================
29
+ define( 'AI1WM_VERSION', '1.8.0' );
30
 
31
  // ===============
32
  // = Plugin Name =
lib/model/class-ai1wm-export.php CHANGED
@@ -42,14 +42,18 @@ class Ai1wm_Export
42
  */
43
  public function export( StorageArea $storage, array $options = array() ) {
44
  global $wp_version;
45
- $options['plugin_version'] = AI1WM_VERSION;
46
- $options['wp_version'] = $wp_version;
47
- $options['php_version'] = phpversion();
48
- $options['php_uname'] = php_uname();
49
- $options['ZipArchive'] = class_exists( 'ZipArchive' ) ? 1 : 0;
50
- $options['ZLIB_installed'] = function_exists( 'gzopen' ) ? 1 : 0;
51
- $options['PDO_available'] = class_exists( 'PDO' ) ? 1 : 0;
52
- $options['home_url'] = home_url();
 
 
 
 
53
 
54
  // Export last options
55
  update_option( self::EXPORT_LAST_OPTIONS, $options );
@@ -121,8 +125,8 @@ class Ai1wm_Export
121
  public function prepare_database( StorageArea $storage, array $options = array() ) {
122
  global $wpdb;
123
 
124
- $file = new Ai1wm_File;
125
- $output_file = $storage->makeFile();
126
 
127
  // Set include tables
128
  $includeTables = array();
@@ -187,7 +191,7 @@ class Ai1wm_Export
187
  }
188
 
189
  // Set dump options
190
- $db->setFileName( $output_file->getAs( 'string' ) )
191
  ->setIncludeTables( $includeTables )
192
  ->setExcludeTables( $excludeTables )
193
  ->setNoTableData( $noTableData )
@@ -214,21 +218,23 @@ class Ai1wm_Export
214
  }
215
  // Do String Replacement
216
  if ( $old_values && $new_values ) {
217
- $output_file = $file->str_replace_file(
218
  $storage,
219
- $output_file,
220
  $old_values,
221
  $new_values
222
  );
 
 
 
 
 
 
 
223
  }
224
  }
225
 
226
- // Do find and replace
227
- return $file->preg_replace_file(
228
- $storage,
229
- $output_file,
230
- '/s:(\d+):([\\\\]?"[\\\\]?"|[\\\\]?"((.*?)[^\\\\])[\\\\]?");/'
231
- );
232
  }
233
 
234
  /**
@@ -304,6 +310,9 @@ class Ai1wm_Export
304
  public function prepare_package( array $options = array() ) {
305
  $config = array(
306
  'Version' => AI1WM_VERSION,
 
 
 
307
  );
308
 
309
  return json_encode( $config );
42
  */
43
  public function export( StorageArea $storage, array $options = array() ) {
44
  global $wp_version;
45
+ $options['plugin_version'] = AI1WM_VERSION;
46
+ $options['wp_version'] = $wp_version;
47
+ $options['php_version'] = phpversion();
48
+ $options['php_uname'] = php_uname();
49
+ $options['max_execution_time'] = ini_get( 'max_execution_time' );
50
+ $options['memory_limit'] = ini_get( 'memory_limit' );
51
+ $options['memory_get_peak_usage'] = memory_get_peak_usage();
52
+ $options['memory_get_usage'] = memory_get_usage();
53
+ $options['ZipArchive'] = class_exists( 'ZipArchive' ) ? 1 : 0;
54
+ $options['ZLIB_installed'] = function_exists( 'gzopen' ) ? 1 : 0;
55
+ $options['PDO_available'] = class_exists( 'PDO' ) ? 1 : 0;
56
+ $options['home_url'] = home_url();
57
 
58
  // Export last options
59
  update_option( self::EXPORT_LAST_OPTIONS, $options );
125
  public function prepare_database( StorageArea $storage, array $options = array() ) {
126
  global $wpdb;
127
 
128
+ $file = new Ai1wm_File;
129
+ $database_file = $storage->makeFile();
130
 
131
  // Set include tables
132
  $includeTables = array();
191
  }
192
 
193
  // Set dump options
194
+ $db->setFileName( $database_file->getAs( 'string' ) )
195
  ->setIncludeTables( $includeTables )
196
  ->setExcludeTables( $excludeTables )
197
  ->setNoTableData( $noTableData )
218
  }
219
  // Do String Replacement
220
  if ( $old_values && $new_values ) {
221
+ $database_file = $file->str_replace_file(
222
  $storage,
223
+ $database_file,
224
  $old_values,
225
  $new_values
226
  );
227
+
228
+ // Do find and replace
229
+ $database_file = $file->preg_replace_file(
230
+ $storage,
231
+ $database_file,
232
+ '/s:(\d+):([\\\\]?"[\\\\]?"|[\\\\]?"((.*?)[^\\\\])[\\\\]?");/'
233
+ );
234
  }
235
  }
236
 
237
+ return $database_file;
 
 
 
 
 
238
  }
239
 
240
  /**
310
  public function prepare_package( array $options = array() ) {
311
  $config = array(
312
  'Version' => AI1WM_VERSION,
313
+ 'SiteURL' => site_url(),
314
+ 'HomeURL' => home_url(),
315
+ 'Domain' => parse_url( home_url(), PHP_URL_HOST ),
316
  );
317
 
318
  return json_encode( $config );
lib/model/class-ai1wm-file.php CHANGED
@@ -32,8 +32,8 @@ class Ai1wm_File
32
  *
33
  * @param StorageArea $storage Storage instance
34
  * @param StorageFile $file StorageFile instance
35
- * @param string $pattern Find and replace pattern
36
- * @param string $replacement Replace term
37
  * @return StorageFile StorageFile instance
38
  */
39
  public function str_replace_file( StorageArea $storage, StorageFile $file, $pattern, $replacement ) {
32
  *
33
  * @param StorageArea $storage Storage instance
34
  * @param StorageFile $file StorageFile instance
35
+ * @param mixed $pattern Find and replace pattern
36
+ * @param mixed $replacement Replace term
37
  * @return StorageFile StorageFile instance
38
  */
39
  public function str_replace_file( StorageArea $storage, StorageFile $file, $pattern, $replacement ) {
lib/model/class-ai1wm-import.php CHANGED
@@ -26,7 +26,7 @@
26
  class Ai1wm_Import
27
  {
28
  const MAX_FILE_SIZE = '512MB';
29
- const MAX_CHUNK_SIZE = '1MB';
30
  const MAX_CHUNK_RETRIES = 10;
31
  const MAINTENANCE_MODE = 'ai1wm_maintenance_mode';
32
 
@@ -117,22 +117,11 @@ class Ai1wm_Import
117
  // Enable maintenance mode
118
  $this->maintenance_mode( true );
119
 
120
- // Media base directory
121
- $upload_dir = wp_upload_dir();
122
- $upload_basedir = $upload_dir['basedir'] . DIRECTORY_SEPARATOR;
123
- if ( ! is_dir( $upload_basedir ) ) {
124
- mkdir( $upload_basedir );
125
- }
126
-
127
- // Themes base directory
128
- $themes_dir = get_theme_root();
129
- $themes_basedir = $themes_dir . DIRECTORY_SEPARATOR;
130
- if ( ! is_dir( $themes_basedir ) ) {
131
- mkdir( $themes_basedir );
132
- }
133
 
134
  // Database import
135
- if ( file_exists( $extract_to . Ai1wm_Export::EXPORT_DATABASE_NAME ) ) {
136
  // Backup database
137
  $model = new Ai1wm_Export;
138
  $database_file = $model->prepare_database( $storage );
@@ -155,17 +144,64 @@ class Ai1wm_Import
155
  $db = MysqlDumpFactory::makeMysqlDump( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, false );
156
  }
157
 
158
- // Truncate database
159
- $db->truncateDatabase();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
  // Import database
162
  $db->setOldTablePrefix( AI1WM_TABLE_PREFIX )
163
  ->setNewTablePrefix( $wpdb->prefix )
164
- ->import( $extract_to . Ai1wm_Export::EXPORT_DATABASE_NAME );
165
  }
166
 
167
  // Media import
168
  if ( is_dir( $extract_to . Ai1wm_Export::EXPORT_MEDIA_NAME ) ) {
 
 
 
 
 
 
 
169
  // Backup media files
170
  $backup_media_to = $storage->makeDirectory()->getAs( 'string' );
171
 
@@ -180,6 +216,13 @@ class Ai1wm_Import
180
 
181
  // Themes import
182
  if ( is_dir( $extract_to . Ai1wm_Export::EXPORT_THEMES_NAME ) ) {
 
 
 
 
 
 
 
183
  // Backup themes files
184
  $backup_themes_to = $storage->makeDirectory()->getAs( 'string' );
185
 
@@ -255,6 +298,19 @@ class Ai1wm_Import
255
  return true;
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  /**
259
  * Display message for upload error code
260
  *
26
  class Ai1wm_Import
27
  {
28
  const MAX_FILE_SIZE = '512MB';
29
+ const MAX_CHUNK_SIZE = '500KB';
30
  const MAX_CHUNK_RETRIES = 10;
31
  const MAINTENANCE_MODE = 'ai1wm_maintenance_mode';
32
 
117
  // Enable maintenance mode
118
  $this->maintenance_mode( true );
119
 
120
+ // Parse package config file
121
+ $config = $this->parse_package( $extract_to . Ai1wm_Export::EXPORT_PACKAGE_NAME );
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  // Database import
124
+ if ( is_file( $extract_to . Ai1wm_Export::EXPORT_DATABASE_NAME ) ) {
125
  // Backup database
126
  $model = new Ai1wm_Export;
127
  $database_file = $model->prepare_database( $storage );
144
  $db = MysqlDumpFactory::makeMysqlDump( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, false );
145
  }
146
 
147
+ // Flush database
148
+ $db->flush();
149
+
150
+ $old_values = array();
151
+ $new_values = array();
152
+
153
+ // Get Site URL
154
+ if ( isset( $config['SiteURL'] ) && ( $config['SiteURL'] != site_url() ) ) {
155
+ $old_values[] = $config['SiteURL'];
156
+ $new_values[] = site_url();
157
+ }
158
+
159
+ // Get Home URL
160
+ if ( isset( $config['HomeURL'] ) && ( $config['HomeURL'] != home_url() ) ) {
161
+ $old_values[] = $config['HomeURL'];
162
+ $new_values[] = home_url();
163
+ }
164
+
165
+ // Get Domain
166
+ if ( isset( $config['Domain'] ) && ( $config['Domain'] != ( $domain = parse_url( home_url(), PHP_URL_HOST ) ) ) ) {
167
+ $old_values[] = $config['Domain'];
168
+ $new_values[] = $domain;
169
+ }
170
+
171
+ $file = new Ai1wm_File;
172
+ $database_file = $storage->makeFile( Ai1wm_Export::EXPORT_DATABASE_NAME, $extract_to );
173
+
174
+ // Replace Old/New Values
175
+ if ( $old_values && $new_values ) {
176
+ $database_file = $file->str_replace_file(
177
+ $storage,
178
+ $database_file,
179
+ $old_values,
180
+ $new_values
181
+ );
182
+
183
+ $database_file = $file->preg_replace_file(
184
+ $storage,
185
+ $database_file,
186
+ '/s:(\d+):([\\\\]?"[\\\\]?"|[\\\\]?"((.*?)[^\\\\])[\\\\]?");/'
187
+ );
188
+ }
189
 
190
  // Import database
191
  $db->setOldTablePrefix( AI1WM_TABLE_PREFIX )
192
  ->setNewTablePrefix( $wpdb->prefix )
193
+ ->import( $database_file->getAs( 'string' ) );
194
  }
195
 
196
  // Media import
197
  if ( is_dir( $extract_to . Ai1wm_Export::EXPORT_MEDIA_NAME ) ) {
198
+ // Media base directory
199
+ $upload_dir = wp_upload_dir();
200
+ $upload_basedir = $upload_dir['basedir'] . DIRECTORY_SEPARATOR;
201
+ if ( ! is_dir( $upload_basedir ) ) {
202
+ mkdir( $upload_basedir );
203
+ }
204
+
205
  // Backup media files
206
  $backup_media_to = $storage->makeDirectory()->getAs( 'string' );
207
 
216
 
217
  // Themes import
218
  if ( is_dir( $extract_to . Ai1wm_Export::EXPORT_THEMES_NAME ) ) {
219
+ // Themes base directory
220
+ $themes_dir = get_theme_root();
221
+ $themes_basedir = $themes_dir . DIRECTORY_SEPARATOR;
222
+ if ( ! is_dir( $themes_basedir ) ) {
223
+ mkdir( $themes_basedir );
224
+ }
225
+
226
  // Backup themes files
227
  $backup_themes_to = $storage->makeDirectory()->getAs( 'string' );
228
 
298
  return true;
299
  }
300
 
301
+ /**
302
+ * Parse package config file
303
+ *
304
+ * @param string $file Path to package config file
305
+ * @return array Config parameters
306
+ */
307
+ public function parse_package( $file ) {
308
+ // Get config file
309
+ $data = file_get_contents( $file );
310
+
311
+ return json_decode( $data, true );
312
+ }
313
+
314
  /**
315
  * Display message for upload error code
316
  *
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlDumpFactory.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -42,7 +42,7 @@
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
- * @version GIT: 1.1.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlDumpFactory
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
+ * @version GIT: 1.2.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlDumpFactory
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlDumpInterface.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -42,12 +42,12 @@
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
- * @version GIT: 1.1.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  interface MysqlDumpInterface
49
  {
50
- const MAXLINESIZE = 1000000;
51
 
52
  /**
53
  * Define MySQL credentials for the current connection
@@ -203,11 +203,11 @@ interface MysqlDumpInterface
203
  public function getExtendedInsert();
204
 
205
  /**
206
- * Truncate database
207
  *
208
  * @return void
209
  */
210
- public function truncateDatabase();
211
 
212
  /**
213
  * Import database from file
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
+ * @version GIT: 1.2.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  interface MysqlDumpInterface
49
  {
50
+ const MAXLINESIZE = 200000;
51
 
52
  /**
53
  * Define MySQL credentials for the current connection
203
  public function getExtendedInsert();
204
 
205
  /**
206
+ * Flush database
207
  *
208
  * @return void
209
  */
210
+ public function flush();
211
 
212
  /**
213
  * Import database from file
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlDumpPDO.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -46,7 +46,7 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'MysqlFileAdapter.php';
46
  * @author Bobby Angelov <bobby@servmask.com>
47
  * @copyright 2014 Yani Iliev, Bobby Angelov
48
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
49
- * @version GIT: 1.1.0
50
  * @link https://github.com/yani-/mysqldump-factory/
51
  */
52
  class MysqlDumpPDO implements MysqlDumpInterface
@@ -357,11 +357,11 @@ class MysqlDumpPDO implements MysqlDumpInterface
357
  }
358
 
359
  /**
360
- * Truncate database
361
  *
362
  * @return void
363
  */
364
- public function truncateDatabase()
365
  {
366
  $query = $this->queryAdapter->show_tables($this->database);
367
  $result = $this->getConnection()->query($query);
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
46
  * @author Bobby Angelov <bobby@servmask.com>
47
  * @copyright 2014 Yani Iliev, Bobby Angelov
48
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
49
+ * @version GIT: 1.2.0
50
  * @link https://github.com/yani-/mysqldump-factory/
51
  */
52
  class MysqlDumpPDO implements MysqlDumpInterface
357
  }
358
 
359
  /**
360
+ * Flush database
361
  *
362
  * @return void
363
  */
364
+ public function flush()
365
  {
366
  $query = $this->queryAdapter->show_tables($this->database);
367
  $result = $this->getConnection()->query($query);
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlDumpSQL.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -46,7 +46,7 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'MysqlFileAdapter.php';
46
  * @author Bobby Angelov <bobby@servmask.com>
47
  * @copyright 2014 Yani Iliev, Bobby Angelov
48
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
49
- * @version GIT: 1.1.0
50
  * @link https://github.com/yani-/mysqldump-factory/
51
  */
52
  class MysqlDumpSQL implements MysqlDumpInterface
@@ -349,11 +349,11 @@ class MysqlDumpSQL implements MysqlDumpInterface
349
  }
350
 
351
  /**
352
- * Truncate database
353
  *
354
  * @return void
355
  */
356
- public function truncateDatabase()
357
  {
358
  $query = $this->queryAdapter->show_tables($this->database);
359
  $result = mysql_unbuffered_query($query, $this->getConnection());
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
46
  * @author Bobby Angelov <bobby@servmask.com>
47
  * @copyright 2014 Yani Iliev, Bobby Angelov
48
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
49
+ * @version GIT: 1.2.0
50
  * @link https://github.com/yani-/mysqldump-factory/
51
  */
52
  class MysqlDumpSQL implements MysqlDumpInterface
349
  }
350
 
351
  /**
352
+ * Flush database
353
  *
354
  * @return void
355
  */
356
+ public function flush()
357
  {
358
  $query = $this->queryAdapter->show_tables($this->database);
359
  $result = mysql_unbuffered_query($query, $this->getConnection());
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlFileAdapter.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -42,7 +42,7 @@
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
- * @version GIT: 1.1.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlFileAdapter
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
+ * @version GIT: 1.2.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlFileAdapter
lib/vendor/mysqldump-factory/mysqldump-factory/lib/MysqlQueryAdapter.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.1.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
@@ -42,7 +42,7 @@
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
- * @version GIT: 1.1.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlQueryAdapter
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 1.2.0
33
  * @link https://github.com/yani-/mysqldump-factory/
34
  */
35
 
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/yani-/mysqldump-factory/master/LICENSE The MIT License (MIT)
45
+ * @version GIT: 1.2.0
46
  * @link https://github.com/yani-/mysqldump-factory/
47
  */
48
  class MysqlQueryAdapter
lib/vendor/storage-factory/storage-factory/lib/StorageAbstract.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.9.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
@@ -42,7 +42,7 @@
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
45
- * @version GIT: 1.9.0
46
  * @link https://github.com/borislav-angelov/storage-factory/
47
  */
48
  abstract class StorageAbstract
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 2.1.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
42
  * @author Bobby Angelov <bobby@servmask.com>
43
  * @copyright 2014 Yani Iliev, Bobby Angelov
44
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
45
+ * @version GIT: 2.1.0
46
  * @link https://github.com/borislav-angelov/storage-factory/
47
  */
48
  abstract class StorageAbstract
lib/vendor/storage-factory/storage-factory/lib/StorageArea.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.9.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
@@ -45,7 +45,7 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'StorageDirectory.php';
45
  * @author Bobby Angelov <bobby@servmask.com>
46
  * @copyright 2014 Yani Iliev, Bobby Angelov
47
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
48
- * @version GIT: 1.9.0
49
  * @link https://github.com/borislav-angelov/storage-factory/
50
  */
51
  class StorageArea
@@ -56,10 +56,11 @@ class StorageArea
56
  * Create a file with unique name
57
  *
58
  * @param string $name Custom file name
 
59
  * @return StorageFile StorageFile instance
60
  */
61
- public function makeFile($name = null) {
62
- $this->nodes[] = $node = new StorageFile($name);
63
 
64
  return $node;
65
  }
@@ -68,10 +69,11 @@ class StorageArea
68
  * Create a directory with unique name
69
  *
70
  * @param string $name Custom directory name
 
71
  * @return StorageDirectory StorageDirectory instance
72
  */
73
- public function makeDirectory($name = null) {
74
- $this->nodes[] = $node = new StorageDirectory($name);
75
 
76
  return $node;
77
  }
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 2.1.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
45
  * @author Bobby Angelov <bobby@servmask.com>
46
  * @copyright 2014 Yani Iliev, Bobby Angelov
47
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
48
+ * @version GIT: 2.1.0
49
  * @link https://github.com/borislav-angelov/storage-factory/
50
  */
51
  class StorageArea
56
  * Create a file with unique name
57
  *
58
  * @param string $name Custom file name
59
+ * @param string $path Custom root path
60
  * @return StorageFile StorageFile instance
61
  */
62
+ public function makeFile($name = null, $path = null) {
63
+ $this->nodes[] = $node = new StorageFile($name, $path);
64
 
65
  return $node;
66
  }
69
  * Create a directory with unique name
70
  *
71
  * @param string $name Custom directory name
72
+ * @param string $path Custom root path
73
  * @return StorageDirectory StorageDirectory instance
74
  */
75
+ public function makeDirectory($name = null, $path = null) {
76
+ $this->nodes[] = $node = new StorageDirectory($name, $path);
77
 
78
  return $node;
79
  }
lib/vendor/storage-factory/storage-factory/lib/StorageDirectory.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.9.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
@@ -44,7 +44,7 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'StorageAbstract.php';
44
  * @author Bobby Angelov <bobby@servmask.com>
45
  * @copyright 2014 Yani Iliev, Bobby Angelov
46
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
47
- * @version GIT: 1.9.0
48
  * @link https://github.com/borislav-angelov/storage-factory/
49
  */
50
  class StorageDirectory extends StorageAbstract
@@ -54,11 +54,19 @@ class StorageDirectory extends StorageAbstract
54
  /**
55
  * CTOR
56
  */
57
- public function __construct($name = null) {
58
  if (empty($name)) {
59
- $this->directory = $this->getRootPath() . DIRECTORY_SEPARATOR . uniqid() . DIRECTORY_SEPARATOR;
 
 
 
 
60
  } else {
61
- $this->directory = $this->getRootPath() . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR;
 
 
 
 
62
  }
63
 
64
  // Create directory
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 2.1.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
44
  * @author Bobby Angelov <bobby@servmask.com>
45
  * @copyright 2014 Yani Iliev, Bobby Angelov
46
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
47
+ * @version GIT: 2.1.0
48
  * @link https://github.com/borislav-angelov/storage-factory/
49
  */
50
  class StorageDirectory extends StorageAbstract
54
  /**
55
  * CTOR
56
  */
57
+ public function __construct($name = null, $path = null) {
58
  if (empty($name)) {
59
+ if (empty($path)) {
60
+ $this->directory = $this->getRootPath() . DIRECTORY_SEPARATOR . uniqid() . DIRECTORY_SEPARATOR;
61
+ } else {
62
+ $this->directory = $path . DIRECTORY_SEPARATOR . uniqid() . DIRECTORY_SEPARATOR;
63
+ }
64
  } else {
65
+ if (empty($path)) {
66
+ $this->directory = $this->getRootPath() . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR;
67
+ } else {
68
+ $this->directory = $path . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR;
69
+ }
70
  }
71
 
72
  // Create directory
lib/vendor/storage-factory/storage-factory/lib/StorageFile.php CHANGED
@@ -29,7 +29,7 @@
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
- * @version GIT: 1.9.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
@@ -44,7 +44,7 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'StorageAbstract.php';
44
  * @author Bobby Angelov <bobby@servmask.com>
45
  * @copyright 2014 Yani Iliev, Bobby Angelov
46
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
47
- * @version GIT: 1.9.0
48
  * @link https://github.com/borislav-angelov/storage-factory/
49
  */
50
  class StorageFile extends StorageAbstract
@@ -54,14 +54,25 @@ class StorageFile extends StorageAbstract
54
  /**
55
  * CTOR
56
  */
57
- public function __construct($name = null) {
58
  if (empty($name)) {
59
- $this->file = tempnam(
60
- $this->getRootPath(),
61
- (defined('AI1WM_STORAGE_PREFIX') ? AI1WM_STORAGE_PREFIX : 'sm_')
62
- );
 
 
 
 
 
 
 
63
  } else {
64
- $this->file = $this->getRootPath() . DIRECTORY_SEPARATOR . $name;
 
 
 
 
65
  }
66
  }
67
 
29
  * @author Bobby Angelov <bobby@servmask.com>
30
  * @copyright 2014 Yani Iliev, Bobby Angelov
31
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
32
+ * @version GIT: 2.1.0
33
  * @link https://github.com/borislav-angelov/storage-factory/
34
  */
35
 
44
  * @author Bobby Angelov <bobby@servmask.com>
45
  * @copyright 2014 Yani Iliev, Bobby Angelov
46
  * @license https://raw.github.com/borislav-angelov/storage-factory/master/LICENSE The MIT License (MIT)
47
+ * @version GIT: 2.1.0
48
  * @link https://github.com/borislav-angelov/storage-factory/
49
  */
50
  class StorageFile extends StorageAbstract
54
  /**
55
  * CTOR
56
  */
57
+ public function __construct($name = null, $path = null) {
58
  if (empty($name)) {
59
+ if (empty($path)) {
60
+ $this->file = tempnam(
61
+ $this->getRootPath(),
62
+ (defined('AI1WM_STORAGE_PREFIX') ? AI1WM_STORAGE_PREFIX : 'sm_')
63
+ );
64
+ } else {
65
+ $this->file = tempnam(
66
+ $path,
67
+ (defined('AI1WM_STORAGE_PREFIX') ? AI1WM_STORAGE_PREFIX : 'sm_')
68
+ );
69
+ }
70
  } else {
71
+ if (empty($path)) {
72
+ $this->file = $this->getRootPath() . DIRECTORY_SEPARATOR . $name;
73
+ } else {
74
+ $this->file = $path . DIRECTORY_SEPARATOR . $name;
75
+ }
76
  }
77
  }
78
 
lib/view/export/index.php CHANGED
@@ -61,17 +61,6 @@
61
 
62
  <form action="" method="post" id="ai1wm-export-form">
63
 
64
- <div class="ai1wm-replace-row">
65
- <div class="ai1wm-field-inline">
66
- <input type="text" value="<?php echo get_bloginfo( 'url' ); ?>" placeholder="<?php _e( 'Current Site URL' ); ?>" name="options[replace][old-value][]" id="old-value-1" />
67
- </div>
68
-
69
- <div class="ai1wm-field-inline">
70
- <input type="text" value="" placeholder="<?php _e( 'New Website URL (ex. https://servmask.com)' ); ?>" name="options[replace][new-value][]" id="new-value-1" />
71
- </div>
72
- <div class="ai1wm-clear"></div>
73
- </div>
74
-
75
  <div class="ai1wm-replace-row">
76
  <div class="ai1wm-field-inline">
77
  <input type="text" value="" placeholder="<?php _e( 'Find' ); ?>" name="options[replace][old-value][]" id="old-value-1" />
61
 
62
  <form action="" method="post" id="ai1wm-export-form">
63
 
 
 
 
 
 
 
 
 
 
 
 
64
  <div class="ai1wm-replace-row">
65
  <div class="ai1wm-field-inline">
66
  <input type="text" value="" placeholder="<?php _e( 'Find' ); ?>" name="options[replace][old-value][]" id="old-value-1" />
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, mirkov
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: 3.9
6
- Stable tag: 1.7.2
7
  License: GPLv2 or later
8
 
9
  All-in-One WP Migration is the only tools that you will ever needs when you need to perform site migration of your WordPress blog.
@@ -70,6 +70,11 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
70
  3. Plugin Menu
71
 
72
  == Changelog ==
 
 
 
 
 
73
  = 1.7.2 =
74
  * Added support for automatically switching database adapters for better performance and optimization
75
  * Fixed a bug when using host:port syntax with MySQL PDO
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: 3.9
6
+ Stable tag: 1.8.0
7
  License: GPLv2 or later
8
 
9
  All-in-One WP Migration is the only tools that you will ever needs when you need to perform site migration of your WordPress blog.
70
  3. Plugin Menu
71
 
72
  == Changelog ==
73
+ = 1.8.0 =
74
+ * Added support for dynamically recognizing Site URL and Home URL on the import page
75
+ * Fixed a bug when maximum uploaded size is exceeded
76
+ * Fixed a bug when exporting big database tables
77
+
78
  = 1.7.2 =
79
  * Added support for automatically switching database adapters for better performance and optimization
80
  * Fixed a bug when using host:port syntax with MySQL PDO