All-in-One WP Migration - Version 6.41

Version Description

  • Support Visual Composer plugin
  • Support Jetpack Photon module
  • Improved Maria DB support
  • Disable WordPress authentication checking during migration
  • Clean any temporary files after migration
Download this release

Release Info

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

Code changes from version 6.40 to 6.41

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.40
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.41
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.40' );
35
 
36
  // ===============
37
  // = Plugin Name =
@@ -208,6 +208,11 @@ define( 'AI1WM_ACTIVE_PLUGINS', 'active_plugins' );
208
  // ===========================
209
  define( 'AI1WM_ACTIVE_SITEWIDE_PLUGINS', 'active_sitewide_plugins' );
210
 
 
 
 
 
 
211
  // ======================
212
  // = MS Files Rewriting =
213
  // ======================
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
+ define( 'AI1WM_VERSION', '6.41' );
35
 
36
  // ===============
37
  // = Plugin Name =
208
  // ===========================
209
  define( 'AI1WM_ACTIVE_SITEWIDE_PLUGINS', 'active_sitewide_plugins' );
210
 
211
+ // ==========================
212
+ // = Jetpack Active Modules =
213
+ // ==========================
214
+ define( 'AI1WM_JETPACK_ACTIVE_MODULES', 'jetpack_active_modules' );
215
+
216
  // ======================
217
  // = MS Files Rewriting =
218
  // ======================
functions.php CHANGED
@@ -795,8 +795,8 @@ function ai1wm_unlink( $file ) {
795
  /**
796
  * Copies one file's contents to another
797
  *
798
- * @param string $source_file File to copy the contents from
799
- * @param string $destination_file File to copy the contents to
800
  */
801
  function ai1wm_copy( $source_file, $destination_file ) {
802
  $source_handle = ai1wm_open( $source_file, 'rb' );
@@ -808,37 +808,6 @@ function ai1wm_copy( $source_file, $destination_file ) {
808
  ai1wm_close( $destination_handle );
809
  }
810
 
811
- /**
812
- * Sanitize path
813
- *
814
- * @param string $path Path string
815
- * @param boolean $leading_slash Add leading slash
816
- * @param boolean $trailing_slash Add trailing slash
817
- * @return string
818
- */
819
- function ai1wm_sanitize_path( $path, $leading_slash = false, $trailing_slash = false ) {
820
- // Strip leadning and trailing whitespaces
821
- $path = trim( $path );
822
-
823
- // Strip leading backward and forward slashes
824
- $path = ltrim( $path, '/\\' );
825
-
826
- // Strip trailing backward and forward slashes
827
- $path = rtrim( $path, '/\\' );
828
-
829
- // Add forward leading slash
830
- if ( $leading_slash ) {
831
- $path = sprintf( '/%s', $path );
832
- }
833
-
834
- // Add forward trailing slash
835
- if ( $trailing_slash ) {
836
- $path = sprintf( '%s/', $path );
837
- }
838
-
839
- return preg_replace( '/[\\\\\/]+/', '/', $path );
840
- }
841
-
842
  /**
843
  * Get the size of file in bytes
844
  *
@@ -901,3 +870,14 @@ function ai1wm_fseek( $file_handle, Math_BigInteger $offset ) {
901
  $chunk_size = ai1wm_find_smaller_number( $chunk_size, $offset );
902
  }
903
  }
 
 
 
 
 
 
 
 
 
 
 
795
  /**
796
  * Copies one file's contents to another
797
  *
798
+ * @param string $source_file File to copy the contents from
799
+ * @param string $destination_file File to copy the contents to
800
  */
801
  function ai1wm_copy( $source_file, $destination_file ) {
802
  $source_handle = ai1wm_open( $source_file, 'rb' );
808
  ai1wm_close( $destination_handle );
809
  }
810
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
  /**
812
  * Get the size of file in bytes
813
  *
870
  $chunk_size = ai1wm_find_smaller_number( $chunk_size, $offset );
871
  }
872
  }
873
+
874
+ /**
875
+ * Disable Jetpack Photon module
876
+ *
877
+ * @return void
878
+ */
879
+ function ai1wm_disable_jetpack_photon() {
880
+ if ( ( $jetpack = get_option( AI1WM_JETPACK_ACTIVE_MODULES, array() ) ) ) {
881
+ update_option( AI1WM_JETPACK_ACTIVE_MODULES, array_values( array_diff( $jetpack, array( 'photon' ) ) ) );
882
+ }
883
+ }
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -87,16 +87,16 @@ class Ai1wm_Main_Controller {
87
  add_action( 'plugins_loaded', array( $this, 'ai1wm_buttons' ), 10 );
88
 
89
  // Add export scripts and styles
90
- add_action( 'admin_enqueue_scripts', array( $this, 'register_export_scripts_and_styles' ), 10 );
91
 
92
  // Add import scripts and styles
93
- add_action( 'admin_enqueue_scripts', array( $this, 'register_import_scripts_and_styles' ), 10 );
94
 
95
  // Add backups scripts and styles
96
- add_action( 'admin_enqueue_scripts', array( $this, 'register_backups_scripts_and_styles' ), 10 );
97
 
98
  // Add updater scripts and styles
99
- add_action( 'admin_enqueue_scripts', array( $this, 'register_updater_scripts_and_styles' ), 10 );
100
 
101
  return $this;
102
  }
@@ -368,6 +368,9 @@ class Ai1wm_Main_Controller {
368
  // we don't want heartbeat to occur when exporting
369
  wp_deregister_script( 'heartbeat' );
370
 
 
 
 
371
  wp_enqueue_style(
372
  'ai1wm-css-export',
373
  Ai1wm_Template::asset_link( 'css/export.min.css' )
@@ -413,6 +416,9 @@ class Ai1wm_Main_Controller {
413
  // we don't want heartbeat to occur when importing
414
  wp_deregister_script( 'heartbeat' );
415
 
 
 
 
416
  wp_enqueue_style(
417
  'ai1wm-css-import',
418
  Ai1wm_Template::asset_link( 'css/import.min.css' )
@@ -490,6 +496,12 @@ class Ai1wm_Main_Controller {
490
 
491
  do_action( 'ai1mw_register_backups_scripts_and_styles' );
492
 
 
 
 
 
 
 
493
  wp_enqueue_style(
494
  'ai1wm-css-backups',
495
  Ai1wm_Template::asset_link( 'css/backups.min.css' )
87
  add_action( 'plugins_loaded', array( $this, 'ai1wm_buttons' ), 10 );
88
 
89
  // Add export scripts and styles
90
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_export_scripts_and_styles' ), 5 );
91
 
92
  // Add import scripts and styles
93
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_import_scripts_and_styles' ), 5 );
94
 
95
  // Add backups scripts and styles
96
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_backups_scripts_and_styles' ), 5 );
97
 
98
  // Add updater scripts and styles
99
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_updater_scripts_and_styles' ), 5 );
100
 
101
  return $this;
102
  }
368
  // we don't want heartbeat to occur when exporting
369
  wp_deregister_script( 'heartbeat' );
370
 
371
+ // we don't want auth check for monitoring whether the user is still logged in
372
+ remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
373
+
374
  wp_enqueue_style(
375
  'ai1wm-css-export',
376
  Ai1wm_Template::asset_link( 'css/export.min.css' )
416
  // we don't want heartbeat to occur when importing
417
  wp_deregister_script( 'heartbeat' );
418
 
419
+ // we don't want auth check for monitoring whether the user is still logged in
420
+ remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
421
+
422
  wp_enqueue_style(
423
  'ai1wm-css-import',
424
  Ai1wm_Template::asset_link( 'css/import.min.css' )
496
 
497
  do_action( 'ai1mw_register_backups_scripts_and_styles' );
498
 
499
+ // we don't want heartbeat to occur when restoring
500
+ wp_deregister_script( 'heartbeat' );
501
+
502
+ // we don't want auth check for monitoring whether the user is still logged in
503
+ remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
504
+
505
  wp_enqueue_style(
506
  'ai1wm-css-backups',
507
  Ai1wm_Template::asset_link( 'css/backups.min.css' )
lib/model/export/class-ai1wm-export-clean.php CHANGED
@@ -27,26 +27,23 @@ class Ai1wm_Export_Clean {
27
 
28
  public static function execute( $params ) {
29
 
30
- // Remove export log file
31
- unlink( ai1wm_export_path( $params ) );
32
 
33
- // Get storage iterator
34
- $iterator = new RecursiveIteratorIterator(
35
- new Ai1wm_Recursive_Directory_Iterator( ai1wm_storage_path( $params ) ),
36
- RecursiveIteratorIterator::CHILD_FIRST
37
- );
38
 
39
  // Remove files and directories
40
  foreach ( $iterator as $item ) {
41
  if ( $item->isDir() ) {
42
- rmdir( $item->getPathname() );
43
  } else {
44
- unlink( $item->getPathname() );
45
  }
46
  }
47
 
48
  // Remove storage path
49
- rmdir( ai1wm_storage_path( $params ) );
50
 
51
  exit;
52
  }
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
  }
lib/model/export/class-ai1wm-export-database.php CHANGED
@@ -114,6 +114,9 @@ class Ai1wm_Export_Database {
114
  // Exclude active plugins and status options
115
  $client->set_table_query_clauses( ai1wm_table_prefix() . 'options', sprintf( " WHERE option_name NOT IN ('%s', '%s') ", AI1WM_ACTIVE_PLUGINS, AI1WM_STATUS ) );
116
 
 
 
 
117
  // Set current table index
118
  if ( isset( $params['current_table_index'] ) ) {
119
  $current_table_index = (int) $params['current_table_index'];
114
  // Exclude active plugins and status options
115
  $client->set_table_query_clauses( ai1wm_table_prefix() . 'options', sprintf( " WHERE option_name NOT IN ('%s', '%s') ", AI1WM_ACTIVE_PLUGINS, AI1WM_STATUS ) );
116
 
117
+ // Set Visual Composer
118
+ $client->set_visual_composer( ! is_wp_error( validate_plugin( 'js_composer/js_composer.php' ) ) );
119
+
120
  // Set current table index
121
  if ( isset( $params['current_table_index'] ) ) {
122
  $current_table_index = (int) $params['current_table_index'];
lib/model/import/class-ai1wm-import-clean.php CHANGED
@@ -27,26 +27,23 @@ class Ai1wm_Import_Clean {
27
 
28
  public static function execute( $params ) {
29
 
30
- // Remove import log file
31
- unlink( ai1wm_import_path( $params ) );
32
 
33
- // Get storage iterator
34
- $iterator = new RecursiveIteratorIterator(
35
- new Ai1wm_Recursive_Directory_Iterator( ai1wm_storage_path( $params ) ),
36
- RecursiveIteratorIterator::CHILD_FIRST
37
- );
38
 
39
  // Remove files and directories
40
  foreach ( $iterator as $item ) {
41
  if ( $item->isDir() ) {
42
- rmdir( $item->getPathname() );
43
  } else {
44
- unlink( $item->getPathname() );
45
  }
46
  }
47
 
48
  // Remove storage path
49
- rmdir( ai1wm_storage_path( $params ) );
50
 
51
  exit;
52
  }
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
  }
lib/model/import/class-ai1wm-import-database.php CHANGED
@@ -433,6 +433,9 @@ class Ai1wm_Import_Database {
433
  }
434
  }
435
 
 
 
 
436
  // Import database
437
  $client->import( ai1wm_database_path( $params ) );
438
 
433
  }
434
  }
435
 
436
+ // Set Visual Composer
437
+ $client->set_visual_composer( ! is_wp_error( validate_plugin( 'js_composer/js_composer.php' ) ) );
438
+
439
  // Import database
440
  $client->import( ai1wm_database_path( $params ) );
441
 
lib/model/import/class-ai1wm-import-done.php CHANGED
@@ -45,7 +45,11 @@ class Ai1wm_Import_Done {
45
 
46
  // Activate sitewide plugins
47
  if ( isset( $multisite['Plugins'] ) && ( $plugins = $multisite['Plugins'] ) ) {
 
48
  ai1wm_activate_plugins( $plugins );
 
 
 
49
  }
50
  } else {
51
 
@@ -64,7 +68,11 @@ class Ai1wm_Import_Done {
64
 
65
  // Activate plugins
66
  if ( isset( $package['Plugins'] ) && ( $plugins = $package['Plugins'] ) ) {
 
67
  ai1wm_activate_plugins( $plugins );
 
 
 
68
  }
69
  }
70
  }
@@ -85,7 +93,11 @@ class Ai1wm_Import_Done {
85
  // Activate plugins
86
  foreach ( $blogs as $blog ) {
87
  if ( isset( $blog['New']['Plugins'] ) && ( $plugins = $blog['New']['Plugins'] ) ) {
 
88
  ai1wm_activate_plugins( $plugins );
 
 
 
89
  }
90
  }
91
  }
45
 
46
  // Activate sitewide plugins
47
  if ( isset( $multisite['Plugins'] ) && ( $plugins = $multisite['Plugins'] ) ) {
48
+ // Activate sitewide plugins
49
  ai1wm_activate_plugins( $plugins );
50
+
51
+ // Disable Jetpack Photon module
52
+ ai1wm_disable_jetpack_photon();
53
  }
54
  } else {
55
 
68
 
69
  // Activate plugins
70
  if ( isset( $package['Plugins'] ) && ( $plugins = $package['Plugins'] ) ) {
71
+ // Activate plugins
72
  ai1wm_activate_plugins( $plugins );
73
+
74
+ // Disable Jetpack Photon module
75
+ ai1wm_disable_jetpack_photon();
76
  }
77
  }
78
  }
93
  // Activate plugins
94
  foreach ( $blogs as $blog ) {
95
  if ( isset( $blog['New']['Plugins'] ) && ( $plugins = $blog['New']['Plugins'] ) ) {
96
+ // Activate plugins
97
  ai1wm_activate_plugins( $plugins );
98
+
99
+ // Disable Jetpack Photon module
100
+ ai1wm_disable_jetpack_photon();
101
  }
102
  }
103
  }
lib/vendor/servmask/database/class-ai1wm-database-mysql.php CHANGED
@@ -41,8 +41,8 @@ class Ai1wm_Database_Mysql extends Ai1wm_Database {
41
  * @param string $input String to escape
42
  * @return string
43
  */
44
- public function quote( $input ) {
45
- return "'" . mysql_real_escape_string( $input, $this->wpdb->dbh ) . "'";
46
  }
47
 
48
  /**
41
  * @param string $input String to escape
42
  * @return string
43
  */
44
+ public function escape( $input ) {
45
+ return mysql_real_escape_string( $input, $this->wpdb->dbh );
46
  }
47
 
48
  /**
lib/vendor/servmask/database/class-ai1wm-database-mysqli.php CHANGED
@@ -41,8 +41,8 @@ class Ai1wm_Database_Mysqli extends Ai1wm_Database {
41
  * @param string $input String to escape
42
  * @return string
43
  */
44
- public function quote( $input ) {
45
- return "'" . mysqli_real_escape_string( $this->wpdb->dbh, $input ) . "'";
46
  }
47
 
48
  /**
41
  * @param string $input String to escape
42
  * @return string
43
  */
44
+ public function escape( $input ) {
45
+ return mysqli_real_escape_string( $this->wpdb->dbh, $input );
46
  }
47
 
48
  /**
lib/vendor/servmask/database/class-ai1wm-database-utility.php CHANGED
@@ -89,6 +89,20 @@ class Ai1wm_Database_Utility {
89
  return $data;
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  /**
93
  * Unescape MySQL special characters
94
  *
89
  return $data;
90
  }
91
 
92
+ /**
93
+ * Escape MySQL special characters
94
+ *
95
+ * @param string $data Data to replace.
96
+ * @return string
97
+ */
98
+ public static function escape_mysql( $data ) {
99
+ return str_ireplace(
100
+ array( '\\', '\0', "\n", "\r", "\x1a", "'", '"', "\0" ),
101
+ array( '\\\\', '\\0', "\\n", "\\r", '\Z', "\'", '\"', '\0' ),
102
+ $data
103
+ );
104
+ }
105
+
106
  /**
107
  * Unescape MySQL special characters
108
  *
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -112,6 +112,14 @@ abstract class Ai1wm_Database {
112
  */
113
  protected $number_of_replaces = 0;
114
 
 
 
 
 
 
 
 
 
115
  /**
116
  * Constructor
117
  *
@@ -314,6 +322,27 @@ abstract class Ai1wm_Database {
314
  return $this->exclude_table_prefixes;
315
  }
316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  /**
318
  * Get tables
319
  *
@@ -382,11 +411,6 @@ abstract class Ai1wm_Database {
382
  * @return bool
383
  */
384
  public function export( $file_name, &$current_table_index = 0, $timeout = 0 ) {
385
- // Add support for MariaDB
386
- if ( stripos( $this->version(), 'mariadb' ) !== false ) {
387
- $this->query( "SET SESSION sql_mode = 'NO_TABLE_OPTIONS'" );
388
- }
389
-
390
  // Set file handler
391
  $file_handler = ai1wm_open( $file_name, 'ab' );
392
 
@@ -432,8 +456,11 @@ abstract class Ai1wm_Database {
432
  // Replace create table prefixes
433
  $create_table = $this->replace_table_prefixes( $table['Create Table'], 14 );
434
 
435
- // Strip table constraints
436
- $create_table = $this->strip_table_constraints( $create_table );
 
 
 
437
 
438
  // Write table structure
439
  ai1wm_write( $file_handler, $create_table );
@@ -468,7 +495,7 @@ abstract class Ai1wm_Database {
468
  }
469
 
470
  // Replace table values
471
- $items[] = is_null( $value ) ? 'NULL' : $this->quote( $this->replace_table_values( $value ) );
472
  }
473
 
474
  // Set table values
@@ -520,11 +547,6 @@ abstract class Ai1wm_Database {
520
  * @return bool
521
  */
522
  public function import( $file_name ) {
523
- // Add support for MariaDB
524
- if ( stripos( $this->version(), 'mariadb' ) !== false ) {
525
- $this->query( "SET SESSION sql_mode = 'IGNORE_BAD_TABLE_OPTIONS'" );
526
- }
527
-
528
  // Set max allowed packet
529
  $max_allowed_packet = $this->get_max_allowed_packet();
530
 
@@ -548,12 +570,12 @@ abstract class Ai1wm_Database {
548
  // Replace table prefixes
549
  $query = $this->replace_table_prefixes( $query );
550
 
551
- // Replace table values
552
- $query = $this->replace_table_values( $query, true );
553
-
554
  // Replace table collations
555
  $query = $this->replace_table_collations( $query );
556
 
 
 
 
557
  try {
558
 
559
  // Run SQL query
@@ -669,7 +691,7 @@ abstract class Ai1wm_Database {
669
  * Replace table prefixes
670
  *
671
  * @param string $input Table value
672
- * @param boolean $position Replace first occurrence at a specified position
673
  * @return string
674
  */
675
  protected function replace_table_prefixes( $input, $position = false ) {
@@ -694,75 +716,93 @@ abstract class Ai1wm_Database {
694
  }
695
 
696
  /**
697
- * Replace table values
698
  *
699
  * @param string $input Table value
700
- * @param boolean $parse Parse value
701
  * @return string
702
  */
703
- protected function replace_table_values( $input, $parse = false ) {
704
- // Get replace values
705
- $old = $this->get_old_replace_values();
706
- $new = $this->get_new_replace_values();
707
 
708
- $old_values = array();
709
- $new_values = array();
 
 
710
 
711
- // Prepare replace values
712
- for ( $i = 0; $i < count( $old ); $i++ ) {
713
- if ( stripos( $input, $old[$i] ) !== false ) {
714
- $old_values[] = $old[$i];
715
- $new_values[] = $new[$i];
716
- }
717
  }
718
 
719
- // Do replace values
720
- if ( $old_values ) {
721
- if ( $parse ) {
722
- return $this->parse_serialized_values( $old_values, $new_values, $input );
723
- }
724
 
725
- return Ai1wm_Database_Utility::replace_serialized_values( $old_values, $new_values, $input );
 
 
726
  }
727
 
728
  return $input;
729
  }
730
 
731
  /**
732
- * Parse serialized values
733
  *
734
- * @param array $old_values Old replace values
735
- * @param array $new_values New replace values
736
- * @param string $input Table value
737
  * @return string
738
  */
739
- protected function parse_serialized_values( $old_values, $new_values, $input ) {
 
 
740
  // Serialization format
741
- $array = '(a:\d+:{.*?})';
742
- $string = '(s:\d+:".*?")';
743
- $object = '(O:\d+:".+":\d+:{.*})';
744
 
745
- // Number of serialized replaces
746
- $this->number_of_replaces = 0;
 
 
747
 
748
  // Replace serialized values
749
- $input = preg_replace_callback( "/'($array|$string|$object)'/", array( $this, 'replace_serialized_values' ), $input );
750
 
751
  // Replace values
752
  if ( $this->number_of_replaces === 0 ) {
753
- $input = Ai1wm_Database_Utility::replace_values( $old_values, $new_values, $input );
754
  }
755
 
756
  return $input;
757
  }
758
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  /**
760
  * Replace serialized values (callback)
761
  *
762
  * @param array $matches List of matches
763
  * @return string
764
  */
765
- protected function replace_serialized_values( $matches ) {
766
  $this->number_of_replaces++;
767
 
768
  // Unescape MySQL special characters
@@ -771,8 +811,10 @@ abstract class Ai1wm_Database {
771
  // Replace serialized values
772
  $input = Ai1wm_Database_Utility::replace_serialized_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $input );
773
 
774
- // Prepare query values
775
- return $this->quote( $input );
 
 
776
  }
777
 
778
  /**
@@ -789,10 +831,10 @@ abstract class Ai1wm_Database {
789
  if ( empty( $search ) || empty( $replace ) ) {
790
  if ( ! $this->wpdb->has_cap( 'utf8mb4_520' ) ) {
791
  if ( ! $this->wpdb->has_cap( 'utf8mb4' ) ) {
792
- $search = array( 'utf8mb4_unicode_520_ci', 'utf8mb4' );
793
  $replace = array( 'utf8_unicode_ci', 'utf8' );
794
  } else {
795
- $search = array( 'utf8mb4_unicode_520_ci' );
796
  $replace = array( 'utf8mb4_unicode_ci' );
797
  }
798
  }
@@ -802,12 +844,12 @@ abstract class Ai1wm_Database {
802
  }
803
 
804
  /**
805
- * Strip table constraints
806
  *
807
  * @param string $input SQL statement
808
  * @return string
809
  */
810
- protected function strip_table_constraints( $input ) {
811
  $pattern = array(
812
  '/\s+CONSTRAINT(.+)REFERENCES(.+),/i',
813
  '/,\s+CONSTRAINT(.+)REFERENCES(.+)/i',
@@ -816,6 +858,43 @@ abstract class Ai1wm_Database {
816
  return preg_replace( $pattern, '', $input );
817
  }
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  /**
820
  * Returns header for dump file
821
  *
@@ -853,7 +932,7 @@ abstract class Ai1wm_Database {
853
  * @param string $input String to escape
854
  * @return string
855
  */
856
- abstract public function quote( $input );
857
 
858
  /**
859
  * Return the error code for the most recent function call
112
  */
113
  protected $number_of_replaces = 0;
114
 
115
+ /**
116
+ * Visual Composer
117
+ *
118
+ * @access protected
119
+ * @var bool
120
+ */
121
+ protected $visual_composer = false;
122
+
123
  /**
124
  * Constructor
125
  *
322
  return $this->exclude_table_prefixes;
323
  }
324
 
325
+ /**
326
+ * Set Visual Composer
327
+ *
328
+ * @param bool $active Is Visual Composer Active?
329
+ * @return Ai1wm_Database
330
+ */
331
+ public function set_visual_composer( $active ) {
332
+ $this->visual_composer = $active;
333
+
334
+ return $this;
335
+ }
336
+
337
+ /**
338
+ * Get Visual Composer
339
+ *
340
+ * @return bool
341
+ */
342
+ public function get_visual_composer() {
343
+ return $this->visual_composer;
344
+ }
345
+
346
  /**
347
  * Get tables
348
  *
411
  * @return bool
412
  */
413
  public function export( $file_name, &$current_table_index = 0, $timeout = 0 ) {
 
 
 
 
 
414
  // Set file handler
415
  $file_handler = ai1wm_open( $file_name, 'ab' );
416
 
456
  // Replace create table prefixes
457
  $create_table = $this->replace_table_prefixes( $table['Create Table'], 14 );
458
 
459
+ // Replace table constraints
460
+ $create_table = $this->replace_table_constraints( $create_table );
461
+
462
+ // Replace create table options
463
+ $create_table = $this->replace_table_options( $create_table );
464
 
465
  // Write table structure
466
  ai1wm_write( $file_handler, $create_table );
495
  }
496
 
497
  // Replace table values
498
+ $items[] = is_null( $value ) ? 'NULL' : "'" . $this->replace_table_export_values( $this->escape( $value ) ) . "'";
499
  }
500
 
501
  // Set table values
547
  * @return bool
548
  */
549
  public function import( $file_name ) {
 
 
 
 
 
550
  // Set max allowed packet
551
  $max_allowed_packet = $this->get_max_allowed_packet();
552
 
570
  // Replace table prefixes
571
  $query = $this->replace_table_prefixes( $query );
572
 
 
 
 
573
  // Replace table collations
574
  $query = $this->replace_table_collations( $query );
575
 
576
+ // Replace table values
577
+ $query = $this->replace_table_import_values( $query );
578
+
579
  try {
580
 
581
  // Run SQL query
691
  * Replace table prefixes
692
  *
693
  * @param string $input Table value
694
+ * @param bool $position Replace first occurrence at a specified position
695
  * @return string
696
  */
697
  protected function replace_table_prefixes( $input, $position = false ) {
716
  }
717
 
718
  /**
719
+ * Replace table export values
720
  *
721
  * @param string $input Table value
 
722
  * @return string
723
  */
724
+ protected function replace_table_export_values( $input ) {
725
+ $this->number_of_replaces = 0;
 
 
726
 
727
+ // Serialization format
728
+ $array = '(a:\d+:{.+?})';
729
+ $string = '(s:\d+:\\\\?"(.+?)\\\\?";)';
730
+ $object = '(O:\d+:\\\\?"(.+?)\\\\?":\d+:{.*?})';
731
 
732
+ // Replace base64 encoded values (Visual Composer)
733
+ if ( $this->get_visual_composer() ) {
734
+ $input = preg_replace_callback( "/(?<=\[vc_raw_html\])(.+?)(?=\[\/vc_raw_html\])/S", array( $this, 'replace_base64_values_callback' ), $input );
 
 
 
735
  }
736
 
737
+ // Replace serialized values
738
+ $input = preg_replace_callback( "/(?<=\A)($array|$string|$object)(?=\z)/S", array( $this, 'replace_serialized_values_callback' ), $input );
 
 
 
739
 
740
+ // Replace values
741
+ if ( $this->number_of_replaces === 0 ) {
742
+ $input = Ai1wm_Database_Utility::replace_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $input );
743
  }
744
 
745
  return $input;
746
  }
747
 
748
  /**
749
+ * Replace table import values
750
  *
751
+ * @param string $input Table value
 
 
752
  * @return string
753
  */
754
+ protected function replace_table_import_values( $input ) {
755
+ $this->number_of_replaces = 0;
756
+
757
  // Serialization format
758
+ $array = '(a:\d+:{.+?})';
759
+ $string = '(s:\d+:\\\\?"(.+?)\\\\?";)';
760
+ $object = '(O:\d+:\\\\?"(.+?)\\\\?":\d+:{.*?})';
761
 
762
+ // Replace base64 encoded values (Visual Composer)
763
+ if ( $this->get_visual_composer() ) {
764
+ $input = preg_replace_callback( "/(?<=\[vc_raw_html\])(.+?)(?=\[\/vc_raw_html\])/S", array( $this, 'replace_base64_values_callback' ), $input );
765
+ }
766
 
767
  // Replace serialized values
768
+ $input = preg_replace_callback( "/(?<=')($array|$string|$object)(?=')/S", array( $this, 'replace_serialized_values_callback' ), $input );
769
 
770
  // Replace values
771
  if ( $this->number_of_replaces === 0 ) {
772
+ $input = Ai1wm_Database_Utility::replace_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $input );
773
  }
774
 
775
  return $input;
776
  }
777
 
778
+ /**
779
+ * Replace base64 values (callback)
780
+ *
781
+ * @param array $matches List of matches
782
+ * @return string
783
+ */
784
+ protected function replace_base64_values_callback( $matches ) {
785
+ $this->number_of_replaces++;
786
+
787
+ // Decode base64 characters
788
+ $input = rawurldecode( base64_decode( strip_tags( $matches[1] ) ) );
789
+
790
+ // Replace serialized values
791
+ $input = Ai1wm_Database_Utility::replace_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $input );
792
+
793
+ // Encode base64 characters
794
+ $input = base64_encode( rawurlencode( $input ) );
795
+
796
+ return $input;
797
+ }
798
+
799
  /**
800
  * Replace serialized values (callback)
801
  *
802
  * @param array $matches List of matches
803
  * @return string
804
  */
805
+ protected function replace_serialized_values_callback( $matches ) {
806
  $this->number_of_replaces++;
807
 
808
  // Unescape MySQL special characters
811
  // Replace serialized values
812
  $input = Ai1wm_Database_Utility::replace_serialized_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $input );
813
 
814
+ // Escape MySQL special characters
815
+ $input = Ai1wm_Database_Utility::escape_mysql( $input );
816
+
817
+ return $input;
818
  }
819
 
820
  /**
831
  if ( empty( $search ) || empty( $replace ) ) {
832
  if ( ! $this->wpdb->has_cap( 'utf8mb4_520' ) ) {
833
  if ( ! $this->wpdb->has_cap( 'utf8mb4' ) ) {
834
+ $search = array( 'utf8mb4_unicode_520_ci', 'utf8mb4' );
835
  $replace = array( 'utf8_unicode_ci', 'utf8' );
836
  } else {
837
+ $search = array( 'utf8mb4_unicode_520_ci' );
838
  $replace = array( 'utf8mb4_unicode_ci' );
839
  }
840
  }
844
  }
845
 
846
  /**
847
+ * Replace table constraints
848
  *
849
  * @param string $input SQL statement
850
  * @return string
851
  */
852
+ protected function replace_table_constraints( $input ) {
853
  $pattern = array(
854
  '/\s+CONSTRAINT(.+)REFERENCES(.+),/i',
855
  '/,\s+CONSTRAINT(.+)REFERENCES(.+)/i',
858
  return preg_replace( $pattern, '', $input );
859
  }
860
 
861
+ /**
862
+ * Replace table options
863
+ *
864
+ * @param string $input SQL statement
865
+ * @return string
866
+ */
867
+ protected function replace_table_options( $input ) {
868
+ // Set table replace options
869
+ $search = array(
870
+ 'ENGINE=Aria',
871
+ 'TRANSACTIONAL=0',
872
+ 'TRANSACTIONAL=1',
873
+ 'PAGE_CHECKSUM=0',
874
+ 'PAGE_CHECKSUM=1',
875
+ 'TABLE_CHECKSUM=0',
876
+ 'TABLE_CHECKSUM=1',
877
+ 'ROW_FORMAT=PAGE',
878
+ 'ROW_FORMAT=FIXED',
879
+ 'ROW_FORMAT=DYNAMIC',
880
+
881
+ );
882
+ $replace = array(
883
+ 'ENGINE=MyISAM',
884
+ '',
885
+ '',
886
+ '',
887
+ '',
888
+ '',
889
+ '',
890
+ '',
891
+ '',
892
+ '',
893
+ );
894
+
895
+ return str_ireplace( $search, $replace, $input );
896
+ }
897
+
898
  /**
899
  * Returns header for dump file
900
  *
932
  * @param string $input String to escape
933
  * @return string
934
  */
935
+ abstract public function escape( $input );
936
 
937
  /**
938
  * Return the error code for the most recent function call
lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php CHANGED
@@ -34,7 +34,14 @@ class Ai1wm_File_Htaccess {
34
  * @return boolean|null
35
  */
36
  public static function create( $path ) {
37
- $contents = "<IfModule mod_mime.c>\nAddType application/octet-stream .wpress\n</IfModule>";
 
 
 
 
 
 
 
38
  return Ai1wm_File::create( $path, $contents );
39
  }
40
  }
34
  * @return boolean|null
35
  */
36
  public static function create( $path ) {
37
+ $contents = "<IfModule mod_mime.c>\n" .
38
+ "AddType application/octet-stream .wpress\n" .
39
+ "</IfModule>\n" .
40
+ "<IfModule mod_dir.c>\n" .
41
+ "DirectoryIndex index.php\n" .
42
+ "</IfModule>\n" .
43
+ "Options -Indexes\n";
44
+
45
  return Ai1wm_File::create( $path, $contents );
46
  }
47
  }
lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php CHANGED
@@ -35,12 +35,18 @@ class Ai1wm_File_Webconfig {
35
  */
36
  public static function create( $path ) {
37
  $contents = "<configuration>\n" .
38
- "<system.webServer>\n" .
39
- "<staticContent>\n" .
40
- "<mimeMap fileExtension=\".wpress\" mimeType=\"application/octet-stream\" />\n" .
41
- "</staticContent>\n" .
42
- "</system.webServer>\n" .
43
- "</configuration>";
 
 
 
 
 
 
44
 
45
  return Ai1wm_File::create( $path, $contents );
46
  }
35
  */
36
  public static function create( $path ) {
37
  $contents = "<configuration>\n" .
38
+ "<system.webServer>\n" .
39
+ "<staticContent>\n" .
40
+ "<mimeMap fileExtension=\".wpress\" mimeType=\"application/octet-stream\" />\n" .
41
+ "</staticContent>\n" .
42
+ "<defaultDocument>\n" .
43
+ "<files>\n" .
44
+ "<add value=\"index.php\" />\n" .
45
+ "</files>\n" .
46
+ "</defaultDocument>\n" .
47
+ "<directoryBrowse enabled=\"false\" />\n" .
48
+ "</system.webServer>\n" .
49
+ "</configuration>\n";
50
 
51
  return Ai1wm_File::create( $path, $contents );
52
  }
lib/view/assets/javascript/backups.min.js CHANGED
@@ -71,8 +71,8 @@
71
  */
72
 
73
  var Report = __webpack_require__(1),
74
- Feedback = __webpack_require__(2),
75
- Util = __webpack_require__(3),
76
  Import = __webpack_require__(4);
77
 
78
  jQuery(document).ready(function ($) {
@@ -91,11 +91,15 @@
91
  // Delete file
92
  if (confirm('Are you sure you want to delete this file?')) {
93
  $.ajax({
94
- type: 'POST',
95
  url: ai1wm_backups.ajax.url,
 
 
96
  data: { 'archive': self.data('archive') },
97
- success: function success(result) {
98
- var errors = result.errors;
 
 
 
99
  if (errors.length === 0) {
100
  self.closest('tr').remove();
101
  if ($('.ai1wm-backups tbody tr').length === 0) {
@@ -103,8 +107,7 @@
103
  $('.ai1wm-backups-empty').removeClass('ai1wm-hide');
104
  }
105
  }
106
- },
107
- dataType: 'json'
108
  });
109
  }
110
 
@@ -130,7 +133,7 @@
130
 
131
  /***/ },
132
  /* 1 */
133
- /***/ function(module, exports) {
134
 
135
  'use strict';
136
 
@@ -158,6 +161,8 @@
158
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
159
  */
160
 
 
 
161
  jQuery(document).ready(function ($) {
162
  'use strict';
163
 
@@ -179,33 +184,36 @@
179
  var terms = $('.ai1wm-report-terms').is(':checked');
180
 
181
  $.ajax({
182
- type: 'POST',
183
  url: ai1wm_report.ajax.url,
 
 
 
184
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
185
  success: function success(data) {
186
  var errors = data.errors;
187
  if (errors.length > 0) {
188
  // Reset previous messages
189
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
190
 
191
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
192
  $.each(errors, function (key, value) {
193
- content.append('<p>' + value + '</p>');
194
  });
195
 
196
- $('.ai1wm-report-problem-dialog').prepend(content);
197
  } else {
198
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
199
- $('.ai1wm-report-problem-dialog').html(_content);
200
 
201
  // Hide message
202
  setTimeout(function () {
203
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
204
  }, 2000);
205
  }
206
- },
207
- dataType: 'json',
208
- async: false
209
  });
210
  });
211
  });
@@ -240,6 +248,84 @@
240
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
241
  */
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  jQuery(document).ready(function ($) {
244
  'use strict';
245
 
@@ -298,102 +384,35 @@
298
  var terms = $('.ai1wm-feedback-terms').is(':checked');
299
 
300
  $.ajax({
301
- type: 'POST',
302
  url: ai1wm_feedback.ajax.url,
 
 
 
303
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
304
  success: function success(data) {
305
  var errors = data.errors;
306
  if (errors.length > 0) {
307
  // Reset previous messages
308
  $('.ai1wm-feedback .ai1wm-message').remove();
309
 
310
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
311
  $.each(errors, function (key, value) {
312
- content.append('<p>' + value + '</p>');
313
  });
314
 
315
- $('.ai1wm-feedback').prepend(content);
316
  } else {
317
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
318
- $('.ai1wm-feedback').html(_content);
319
  }
320
- },
321
- dataType: 'json',
322
- async: false
323
  });
324
  });
325
  });
326
 
327
- /***/ },
328
- /* 3 */
329
- /***/ function(module, exports) {
330
-
331
- 'use strict';
332
-
333
- /**
334
- * Copyright (C) 2014-2017 ServMask Inc.
335
- *
336
- * This program is free software: you can redistribute it and/or modify
337
- * it under the terms of the GNU General Public License as published by
338
- * the Free Software Foundation, either version 3 of the License, or
339
- * (at your option) any later version.
340
- *
341
- * This program is distributed in the hope that it will be useful,
342
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
343
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
344
- * GNU General Public License for more details.
345
- *
346
- * You should have received a copy of the GNU General Public License
347
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
348
- *
349
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
350
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
351
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
352
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
353
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
354
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
355
- */
356
-
357
- var $ = jQuery;
358
-
359
- module.exports = {
360
- random: function random(len) {
361
- var text = '';
362
- var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
363
-
364
- for (var i = 0; i < len; i++) {
365
- text += possible.charAt(Math.floor(Math.random() * possible.length));
366
- }
367
-
368
- return text;
369
- },
370
- form: function form(id) {
371
- return $(id).serializeArray();
372
- },
373
- ucfirst: function ucfirst(text) {
374
- return text.charAt(0).toUpperCase() + text.slice(1);
375
- },
376
- list: function list(input) {
377
- // Convert object to list
378
- if ($.isPlainObject(input)) {
379
- var result = [];
380
- var params = decodeURIComponent($.param(input)).split('&');
381
-
382
- // Loop over params
383
- $.each(params, function (index, item) {
384
- var value = item.split('=');
385
-
386
- // Add item
387
- result.push({ name: value[0], value: value[1] });
388
- });
389
-
390
- return result;
391
- }
392
-
393
- return input;
394
- }
395
- };
396
-
397
  /***/ },
398
  /* 4 */
399
  /***/ function(module, exports, __webpack_require__) {
@@ -424,7 +443,7 @@
424
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
425
  */
426
 
427
- var Util = __webpack_require__(3),
428
  Modal = __webpack_require__(5),
429
  $ = jQuery;
430
 
@@ -491,7 +510,15 @@
491
  }
492
 
493
  // Import
494
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
495
  self.getStatus();
496
  }).done(function (params) {
497
  if (params) {
@@ -522,7 +549,15 @@
522
  }
523
 
524
  // Import
525
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function (params) {
 
 
 
 
 
 
 
 
526
  if (params) {
527
  self.run(params);
528
  }
@@ -553,7 +588,15 @@
553
  }
554
 
555
  // Confirm
556
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
557
  self.getStatus();
558
  }).done(function (params) {
559
  if (params) {
@@ -592,7 +635,15 @@
592
  }
593
 
594
  // Blogs
595
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
596
  self.getStatus();
597
  }).done(function (params) {
598
  if (params) {
@@ -632,7 +683,15 @@
632
  }
633
 
634
  // Clean
635
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
636
  // Unbinding the beforeunload event when we stop importing
637
  $(window).unbind('beforeunload');
638
 
@@ -662,9 +721,13 @@
662
  }
663
 
664
  $.ajax({
665
- cache: false,
666
  url: ai1wm_import.status.url,
667
- dataType: 'json'
 
 
 
 
 
668
  }).done(function (params) {
669
  if (params) {
670
  self.setStatus(params);
71
  */
72
 
73
  var Report = __webpack_require__(1),
74
+ Feedback = __webpack_require__(3),
75
+ Util = __webpack_require__(2),
76
  Import = __webpack_require__(4);
77
 
78
  jQuery(document).ready(function ($) {
91
  // Delete file
92
  if (confirm('Are you sure you want to delete this file?')) {
93
  $.ajax({
 
94
  url: ai1wm_backups.ajax.url,
95
+ type: 'POST',
96
+ dataType: 'json',
97
  data: { 'archive': self.data('archive') },
98
+ dataFilter: function dataFilter(data, type) {
99
+ return Util.json(data);
100
+ },
101
+ success: function success(data) {
102
+ var errors = data.errors;
103
  if (errors.length === 0) {
104
  self.closest('tr').remove();
105
  if ($('.ai1wm-backups tbody tr').length === 0) {
107
  $('.ai1wm-backups-empty').removeClass('ai1wm-hide');
108
  }
109
  }
110
+ }
 
111
  });
112
  }
113
 
133
 
134
  /***/ },
135
  /* 1 */
136
+ /***/ function(module, exports, __webpack_require__) {
137
 
138
  'use strict';
139
 
161
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
162
  */
163
 
164
+ var Util = __webpack_require__(2);
165
+
166
  jQuery(document).ready(function ($) {
167
  'use strict';
168
 
184
  var terms = $('.ai1wm-report-terms').is(':checked');
185
 
186
  $.ajax({
 
187
  url: ai1wm_report.ajax.url,
188
+ type: 'POST',
189
+ dataType: 'json',
190
+ async: false,
191
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
192
+ dataFilter: function dataFilter(data, type) {
193
+ return Util.json(data);
194
+ },
195
  success: function success(data) {
196
  var errors = data.errors;
197
  if (errors.length > 0) {
198
  // Reset previous messages
199
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
200
 
201
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
202
  $.each(errors, function (key, value) {
203
+ errorMessage.append('<p>' + value + '</p>');
204
  });
205
 
206
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
207
  } else {
208
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
209
+ $('.ai1wm-report-problem-dialog').html(successMessage);
210
 
211
  // Hide message
212
  setTimeout(function () {
213
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
214
  }, 2000);
215
  }
216
+ }
 
 
217
  });
218
  });
219
  });
248
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
249
  */
250
 
251
+ var $ = jQuery;
252
+
253
+ module.exports = {
254
+ random: function random(len) {
255
+ var text = '';
256
+ var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
257
+
258
+ for (var i = 0; i < len; i++) {
259
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
260
+ }
261
+
262
+ return text;
263
+ },
264
+ form: function form(id) {
265
+ return $(id).serializeArray();
266
+ },
267
+ ucfirst: function ucfirst(text) {
268
+ return text.charAt(0).toUpperCase() + text.slice(1);
269
+ },
270
+ list: function list(input) {
271
+ // Convert object to list
272
+ if ($.isPlainObject(input)) {
273
+ var result = [];
274
+ var params = decodeURIComponent($.param(input)).split('&');
275
+
276
+ // Loop over params
277
+ $.each(params, function (index, item) {
278
+ var value = item.split('=');
279
+
280
+ // Add item
281
+ result.push({ name: value[0], value: value[1] });
282
+ });
283
+
284
+ return result;
285
+ }
286
+
287
+ return input;
288
+ },
289
+ json: function json(input) {
290
+ var result = input.match(/{[\s\S]+}/);
291
+ if (result !== null) {
292
+ return result[0];
293
+ }
294
+ }
295
+ };
296
+
297
+ /***/ },
298
+ /* 3 */
299
+ /***/ function(module, exports, __webpack_require__) {
300
+
301
+ 'use strict';
302
+
303
+ /**
304
+ * Copyright (C) 2014-2017 ServMask Inc.
305
+ *
306
+ * This program is free software: you can redistribute it and/or modify
307
+ * it under the terms of the GNU General Public License as published by
308
+ * the Free Software Foundation, either version 3 of the License, or
309
+ * (at your option) any later version.
310
+ *
311
+ * This program is distributed in the hope that it will be useful,
312
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
313
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
314
+ * GNU General Public License for more details.
315
+ *
316
+ * You should have received a copy of the GNU General Public License
317
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
318
+ *
319
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
320
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
321
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
322
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
323
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
324
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
325
+ */
326
+
327
+ var Util = __webpack_require__(2);
328
+
329
  jQuery(document).ready(function ($) {
330
  'use strict';
331
 
384
  var terms = $('.ai1wm-feedback-terms').is(':checked');
385
 
386
  $.ajax({
 
387
  url: ai1wm_feedback.ajax.url,
388
+ type: 'POST',
389
+ dataType: 'json',
390
+ async: false,
391
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
392
+ dataFilter: function dataFilter(data, type) {
393
+ return Util.json(data);
394
+ },
395
  success: function success(data) {
396
  var errors = data.errors;
397
  if (errors.length > 0) {
398
  // Reset previous messages
399
  $('.ai1wm-feedback .ai1wm-message').remove();
400
 
401
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
402
  $.each(errors, function (key, value) {
403
+ errorMessage.append('<p>' + value + '</p>');
404
  });
405
 
406
+ $('.ai1wm-feedback').prepend(errorMessage);
407
  } else {
408
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
409
+ $('.ai1wm-feedback').html(successMessage);
410
  }
411
+ }
 
 
412
  });
413
  });
414
  });
415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  /***/ },
417
  /* 4 */
418
  /***/ function(module, exports, __webpack_require__) {
443
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
444
  */
445
 
446
+ var Util = __webpack_require__(2),
447
  Modal = __webpack_require__(5),
448
  $ = jQuery;
449
 
510
  }
511
 
512
  // Import
513
+ $.ajax({
514
+ url: ai1wm_import.ajax.url,
515
+ type: 'POST',
516
+ dataType: 'json',
517
+ data: params,
518
+ dataFilter: function dataFilter(data, type) {
519
+ return Util.json(data);
520
+ }
521
+ }).done(function () {
522
  self.getStatus();
523
  }).done(function (params) {
524
  if (params) {
549
  }
550
 
551
  // Import
552
+ $.ajax({
553
+ url: ai1wm_import.ajax.url,
554
+ type: 'POST',
555
+ dataType: 'json',
556
+ data: params,
557
+ dataFilter: function dataFilter(data, type) {
558
+ return Util.json(data);
559
+ }
560
+ }).done(function (params) {
561
  if (params) {
562
  self.run(params);
563
  }
588
  }
589
 
590
  // Confirm
591
+ $.ajax({
592
+ url: ai1wm_import.ajax.url,
593
+ type: 'POST',
594
+ dataType: 'json',
595
+ data: params,
596
+ dataFilter: function dataFilter(data, type) {
597
+ return Util.json(data);
598
+ }
599
+ }).done(function () {
600
  self.getStatus();
601
  }).done(function (params) {
602
  if (params) {
635
  }
636
 
637
  // Blogs
638
+ $.ajax({
639
+ url: ai1wm_import.ajax.url,
640
+ type: 'POST',
641
+ dataType: 'json',
642
+ data: params,
643
+ dataFilter: function dataFilter(data, type) {
644
+ return Util.json(data);
645
+ }
646
+ }).done(function () {
647
  self.getStatus();
648
  }).done(function (params) {
649
  if (params) {
683
  }
684
 
685
  // Clean
686
+ $.ajax({
687
+ url: ai1wm_import.ajax.url,
688
+ type: 'POST',
689
+ dataType: 'json',
690
+ data: params,
691
+ dataFilter: function dataFilter(data, type) {
692
+ return Util.json(data);
693
+ }
694
+ }).done(function () {
695
  // Unbinding the beforeunload event when we stop importing
696
  $(window).unbind('beforeunload');
697
 
721
  }
722
 
723
  $.ajax({
 
724
  url: ai1wm_import.status.url,
725
+ type: 'GET',
726
+ dataType: 'json',
727
+ cache: false,
728
+ dataFilter: function dataFilter(data, type) {
729
+ return Util.json(data);
730
+ }
731
  }).done(function (params) {
732
  if (params) {
733
  self.setStatus(params);
lib/view/assets/javascript/export.min.js CHANGED
@@ -73,8 +73,8 @@
73
  var Query = __webpack_require__(6),
74
  FindReplace = __webpack_require__(7),
75
  Report = __webpack_require__(1),
76
- Feedback = __webpack_require__(2),
77
- Util = __webpack_require__(3),
78
  Deprecated = __webpack_require__(8),
79
  Export = __webpack_require__(10);
80
 
@@ -115,7 +115,7 @@
115
 
116
  /***/ },
117
  /* 1 */
118
- /***/ function(module, exports) {
119
 
120
  'use strict';
121
 
@@ -143,6 +143,8 @@
143
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
144
  */
145
 
 
 
146
  jQuery(document).ready(function ($) {
147
  'use strict';
148
 
@@ -164,33 +166,36 @@
164
  var terms = $('.ai1wm-report-terms').is(':checked');
165
 
166
  $.ajax({
167
- type: 'POST',
168
  url: ai1wm_report.ajax.url,
 
 
 
169
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
170
  success: function success(data) {
171
  var errors = data.errors;
172
  if (errors.length > 0) {
173
  // Reset previous messages
174
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
175
 
176
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
177
  $.each(errors, function (key, value) {
178
- content.append('<p>' + value + '</p>');
179
  });
180
 
181
- $('.ai1wm-report-problem-dialog').prepend(content);
182
  } else {
183
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
184
- $('.ai1wm-report-problem-dialog').html(_content);
185
 
186
  // Hide message
187
  setTimeout(function () {
188
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
189
  }, 2000);
190
  }
191
- },
192
- dataType: 'json',
193
- async: false
194
  });
195
  });
196
  });
@@ -225,6 +230,84 @@
225
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
226
  */
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  jQuery(document).ready(function ($) {
229
  'use strict';
230
 
@@ -283,102 +366,35 @@
283
  var terms = $('.ai1wm-feedback-terms').is(':checked');
284
 
285
  $.ajax({
286
- type: 'POST',
287
  url: ai1wm_feedback.ajax.url,
 
 
 
288
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
289
  success: function success(data) {
290
  var errors = data.errors;
291
  if (errors.length > 0) {
292
  // Reset previous messages
293
  $('.ai1wm-feedback .ai1wm-message').remove();
294
 
295
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
296
  $.each(errors, function (key, value) {
297
- content.append('<p>' + value + '</p>');
298
  });
299
 
300
- $('.ai1wm-feedback').prepend(content);
301
  } else {
302
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
303
- $('.ai1wm-feedback').html(_content);
304
  }
305
- },
306
- dataType: 'json',
307
- async: false
308
  });
309
  });
310
  });
311
 
312
- /***/ },
313
- /* 3 */
314
- /***/ function(module, exports) {
315
-
316
- 'use strict';
317
-
318
- /**
319
- * Copyright (C) 2014-2017 ServMask Inc.
320
- *
321
- * This program is free software: you can redistribute it and/or modify
322
- * it under the terms of the GNU General Public License as published by
323
- * the Free Software Foundation, either version 3 of the License, or
324
- * (at your option) any later version.
325
- *
326
- * This program is distributed in the hope that it will be useful,
327
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
328
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
329
- * GNU General Public License for more details.
330
- *
331
- * You should have received a copy of the GNU General Public License
332
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
333
- *
334
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
335
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
336
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
337
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
338
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
339
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
340
- */
341
-
342
- var $ = jQuery;
343
-
344
- module.exports = {
345
- random: function random(len) {
346
- var text = '';
347
- var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
348
-
349
- for (var i = 0; i < len; i++) {
350
- text += possible.charAt(Math.floor(Math.random() * possible.length));
351
- }
352
-
353
- return text;
354
- },
355
- form: function form(id) {
356
- return $(id).serializeArray();
357
- },
358
- ucfirst: function ucfirst(text) {
359
- return text.charAt(0).toUpperCase() + text.slice(1);
360
- },
361
- list: function list(input) {
362
- // Convert object to list
363
- if ($.isPlainObject(input)) {
364
- var result = [];
365
- var params = decodeURIComponent($.param(input)).split('&');
366
-
367
- // Loop over params
368
- $.each(params, function (index, item) {
369
- var value = item.split('=');
370
-
371
- // Add item
372
- result.push({ name: value[0], value: value[1] });
373
- });
374
-
375
- return result;
376
- }
377
-
378
- return input;
379
- }
380
- };
381
-
382
  /***/ },
383
  /* 4 */,
384
  /* 5 */,
@@ -525,7 +541,7 @@
525
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
526
  */
527
 
528
- var Util = __webpack_require__(3),
529
  Dialog = __webpack_require__(9);
530
 
531
  var Extensions = {
@@ -696,7 +712,7 @@
696
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
697
  */
698
 
699
- var Util = __webpack_require__(3),
700
  Modal = __webpack_require__(11),
701
  $ = jQuery;
702
 
@@ -753,7 +769,15 @@
753
  }
754
 
755
  // Export
756
- $.post(ai1wm_export.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
757
  self.getStatus();
758
  }).done(function (params) {
759
  if (params) {
@@ -784,7 +808,15 @@
784
  }
785
 
786
  // Export
787
- $.post(ai1wm_export.ajax.url, params, null, 'json').done(function (params) {
 
 
 
 
 
 
 
 
788
  if (params) {
789
  self.run(params);
790
  }
@@ -822,7 +854,15 @@
822
  }
823
 
824
  // Clean
825
- $.post(ai1wm_export.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
826
  // Unbinding the beforeunload event when we stop exporting
827
  $(window).unbind('beforeunload');
828
 
@@ -852,9 +892,13 @@
852
  }
853
 
854
  $.ajax({
855
- cache: false,
856
  url: ai1wm_export.status.url,
857
- dataType: 'json'
 
 
 
 
 
858
  }).done(function (params) {
859
  if (params) {
860
  self.setStatus(params);
73
  var Query = __webpack_require__(6),
74
  FindReplace = __webpack_require__(7),
75
  Report = __webpack_require__(1),
76
+ Feedback = __webpack_require__(3),
77
+ Util = __webpack_require__(2),
78
  Deprecated = __webpack_require__(8),
79
  Export = __webpack_require__(10);
80
 
115
 
116
  /***/ },
117
  /* 1 */
118
+ /***/ function(module, exports, __webpack_require__) {
119
 
120
  'use strict';
121
 
143
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
144
  */
145
 
146
+ var Util = __webpack_require__(2);
147
+
148
  jQuery(document).ready(function ($) {
149
  'use strict';
150
 
166
  var terms = $('.ai1wm-report-terms').is(':checked');
167
 
168
  $.ajax({
 
169
  url: ai1wm_report.ajax.url,
170
+ type: 'POST',
171
+ dataType: 'json',
172
+ async: false,
173
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
174
+ dataFilter: function dataFilter(data, type) {
175
+ return Util.json(data);
176
+ },
177
  success: function success(data) {
178
  var errors = data.errors;
179
  if (errors.length > 0) {
180
  // Reset previous messages
181
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
182
 
183
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
184
  $.each(errors, function (key, value) {
185
+ errorMessage.append('<p>' + value + '</p>');
186
  });
187
 
188
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
189
  } else {
190
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
191
+ $('.ai1wm-report-problem-dialog').html(successMessage);
192
 
193
  // Hide message
194
  setTimeout(function () {
195
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
196
  }, 2000);
197
  }
198
+ }
 
 
199
  });
200
  });
201
  });
230
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
231
  */
232
 
233
+ var $ = jQuery;
234
+
235
+ module.exports = {
236
+ random: function random(len) {
237
+ var text = '';
238
+ var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
239
+
240
+ for (var i = 0; i < len; i++) {
241
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
242
+ }
243
+
244
+ return text;
245
+ },
246
+ form: function form(id) {
247
+ return $(id).serializeArray();
248
+ },
249
+ ucfirst: function ucfirst(text) {
250
+ return text.charAt(0).toUpperCase() + text.slice(1);
251
+ },
252
+ list: function list(input) {
253
+ // Convert object to list
254
+ if ($.isPlainObject(input)) {
255
+ var result = [];
256
+ var params = decodeURIComponent($.param(input)).split('&');
257
+
258
+ // Loop over params
259
+ $.each(params, function (index, item) {
260
+ var value = item.split('=');
261
+
262
+ // Add item
263
+ result.push({ name: value[0], value: value[1] });
264
+ });
265
+
266
+ return result;
267
+ }
268
+
269
+ return input;
270
+ },
271
+ json: function json(input) {
272
+ var result = input.match(/{[\s\S]+}/);
273
+ if (result !== null) {
274
+ return result[0];
275
+ }
276
+ }
277
+ };
278
+
279
+ /***/ },
280
+ /* 3 */
281
+ /***/ function(module, exports, __webpack_require__) {
282
+
283
+ 'use strict';
284
+
285
+ /**
286
+ * Copyright (C) 2014-2017 ServMask Inc.
287
+ *
288
+ * This program is free software: you can redistribute it and/or modify
289
+ * it under the terms of the GNU General Public License as published by
290
+ * the Free Software Foundation, either version 3 of the License, or
291
+ * (at your option) any later version.
292
+ *
293
+ * This program is distributed in the hope that it will be useful,
294
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
295
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
296
+ * GNU General Public License for more details.
297
+ *
298
+ * You should have received a copy of the GNU General Public License
299
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
300
+ *
301
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
302
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
303
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
304
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
305
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
306
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
307
+ */
308
+
309
+ var Util = __webpack_require__(2);
310
+
311
  jQuery(document).ready(function ($) {
312
  'use strict';
313
 
366
  var terms = $('.ai1wm-feedback-terms').is(':checked');
367
 
368
  $.ajax({
 
369
  url: ai1wm_feedback.ajax.url,
370
+ type: 'POST',
371
+ dataType: 'json',
372
+ async: false,
373
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
374
+ dataFilter: function dataFilter(data, type) {
375
+ return Util.json(data);
376
+ },
377
  success: function success(data) {
378
  var errors = data.errors;
379
  if (errors.length > 0) {
380
  // Reset previous messages
381
  $('.ai1wm-feedback .ai1wm-message').remove();
382
 
383
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
384
  $.each(errors, function (key, value) {
385
+ errorMessage.append('<p>' + value + '</p>');
386
  });
387
 
388
+ $('.ai1wm-feedback').prepend(errorMessage);
389
  } else {
390
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
391
+ $('.ai1wm-feedback').html(successMessage);
392
  }
393
+ }
 
 
394
  });
395
  });
396
  });
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  /***/ },
399
  /* 4 */,
400
  /* 5 */,
541
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
542
  */
543
 
544
+ var Util = __webpack_require__(2),
545
  Dialog = __webpack_require__(9);
546
 
547
  var Extensions = {
712
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
713
  */
714
 
715
+ var Util = __webpack_require__(2),
716
  Modal = __webpack_require__(11),
717
  $ = jQuery;
718
 
769
  }
770
 
771
  // Export
772
+ $.ajax({
773
+ url: ai1wm_export.ajax.url,
774
+ type: 'POST',
775
+ dataType: 'json',
776
+ data: params,
777
+ dataFilter: function dataFilter(data, type) {
778
+ return Util.json(data);
779
+ }
780
+ }).done(function () {
781
  self.getStatus();
782
  }).done(function (params) {
783
  if (params) {
808
  }
809
 
810
  // Export
811
+ $.ajax({
812
+ url: ai1wm_export.ajax.url,
813
+ type: 'POST',
814
+ dataType: 'json',
815
+ data: params,
816
+ dataFilter: function dataFilter(data, type) {
817
+ return Util.json(data);
818
+ }
819
+ }).done(function (params) {
820
  if (params) {
821
  self.run(params);
822
  }
854
  }
855
 
856
  // Clean
857
+ $.ajax({
858
+ url: ai1wm_export.ajax.url,
859
+ type: 'POST',
860
+ dataType: 'json',
861
+ data: params,
862
+ dataFilter: function dataFilter(data, type) {
863
+ return Util.json(data);
864
+ }
865
+ }).done(function () {
866
  // Unbinding the beforeunload event when we stop exporting
867
  $(window).unbind('beforeunload');
868
 
892
  }
893
 
894
  $.ajax({
 
895
  url: ai1wm_export.status.url,
896
+ type: 'GET',
897
+ dataType: 'json',
898
+ cache: false,
899
+ dataFilter: function dataFilter(data, type) {
900
+ return Util.json(data);
901
+ }
902
  }).done(function (params) {
903
  if (params) {
904
  self.setStatus(params);
lib/view/assets/javascript/import.min.js CHANGED
@@ -71,7 +71,7 @@
71
  */
72
 
73
  var Report = __webpack_require__(1),
74
- Feedback = __webpack_require__(2),
75
  Deprecated = __webpack_require__(8),
76
  FileUploader = __webpack_require__(12);
77
 
@@ -89,7 +89,7 @@
89
 
90
  /***/ },
91
  /* 1 */
92
- /***/ function(module, exports) {
93
 
94
  'use strict';
95
 
@@ -117,6 +117,8 @@
117
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
118
  */
119
 
 
 
120
  jQuery(document).ready(function ($) {
121
  'use strict';
122
 
@@ -138,33 +140,36 @@
138
  var terms = $('.ai1wm-report-terms').is(':checked');
139
 
140
  $.ajax({
141
- type: 'POST',
142
  url: ai1wm_report.ajax.url,
 
 
 
143
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
144
  success: function success(data) {
145
  var errors = data.errors;
146
  if (errors.length > 0) {
147
  // Reset previous messages
148
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
149
 
150
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
151
  $.each(errors, function (key, value) {
152
- content.append('<p>' + value + '</p>');
153
  });
154
 
155
- $('.ai1wm-report-problem-dialog').prepend(content);
156
  } else {
157
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
158
- $('.ai1wm-report-problem-dialog').html(_content);
159
 
160
  // Hide message
161
  setTimeout(function () {
162
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
163
  }, 2000);
164
  }
165
- },
166
- dataType: 'json',
167
- async: false
168
  });
169
  });
170
  });
@@ -199,6 +204,84 @@
199
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
200
  */
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  jQuery(document).ready(function ($) {
203
  'use strict';
204
 
@@ -257,102 +340,35 @@
257
  var terms = $('.ai1wm-feedback-terms').is(':checked');
258
 
259
  $.ajax({
260
- type: 'POST',
261
  url: ai1wm_feedback.ajax.url,
 
 
 
262
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
 
 
 
263
  success: function success(data) {
264
  var errors = data.errors;
265
  if (errors.length > 0) {
266
  // Reset previous messages
267
  $('.ai1wm-feedback .ai1wm-message').remove();
268
 
269
- var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
270
  $.each(errors, function (key, value) {
271
- content.append('<p>' + value + '</p>');
272
  });
273
 
274
- $('.ai1wm-feedback').prepend(content);
275
  } else {
276
- var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
277
- $('.ai1wm-feedback').html(_content);
278
  }
279
- },
280
- dataType: 'json',
281
- async: false
282
  });
283
  });
284
  });
285
 
286
- /***/ },
287
- /* 3 */
288
- /***/ function(module, exports) {
289
-
290
- 'use strict';
291
-
292
- /**
293
- * Copyright (C) 2014-2017 ServMask Inc.
294
- *
295
- * This program is free software: you can redistribute it and/or modify
296
- * it under the terms of the GNU General Public License as published by
297
- * the Free Software Foundation, either version 3 of the License, or
298
- * (at your option) any later version.
299
- *
300
- * This program is distributed in the hope that it will be useful,
301
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
302
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303
- * GNU General Public License for more details.
304
- *
305
- * You should have received a copy of the GNU General Public License
306
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
307
- *
308
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
309
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
310
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
311
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
312
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
313
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
314
- */
315
-
316
- var $ = jQuery;
317
-
318
- module.exports = {
319
- random: function random(len) {
320
- var text = '';
321
- var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
322
-
323
- for (var i = 0; i < len; i++) {
324
- text += possible.charAt(Math.floor(Math.random() * possible.length));
325
- }
326
-
327
- return text;
328
- },
329
- form: function form(id) {
330
- return $(id).serializeArray();
331
- },
332
- ucfirst: function ucfirst(text) {
333
- return text.charAt(0).toUpperCase() + text.slice(1);
334
- },
335
- list: function list(input) {
336
- // Convert object to list
337
- if ($.isPlainObject(input)) {
338
- var result = [];
339
- var params = decodeURIComponent($.param(input)).split('&');
340
-
341
- // Loop over params
342
- $.each(params, function (index, item) {
343
- var value = item.split('=');
344
-
345
- // Add item
346
- result.push({ name: value[0], value: value[1] });
347
- });
348
-
349
- return result;
350
- }
351
-
352
- return input;
353
- }
354
- };
355
-
356
  /***/ },
357
  /* 4 */
358
  /***/ function(module, exports, __webpack_require__) {
@@ -383,7 +399,7 @@
383
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
384
  */
385
 
386
- var Util = __webpack_require__(3),
387
  Modal = __webpack_require__(5),
388
  $ = jQuery;
389
 
@@ -450,7 +466,15 @@
450
  }
451
 
452
  // Import
453
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
454
  self.getStatus();
455
  }).done(function (params) {
456
  if (params) {
@@ -481,7 +505,15 @@
481
  }
482
 
483
  // Import
484
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function (params) {
 
 
 
 
 
 
 
 
485
  if (params) {
486
  self.run(params);
487
  }
@@ -512,7 +544,15 @@
512
  }
513
 
514
  // Confirm
515
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
516
  self.getStatus();
517
  }).done(function (params) {
518
  if (params) {
@@ -551,7 +591,15 @@
551
  }
552
 
553
  // Blogs
554
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
555
  self.getStatus();
556
  }).done(function (params) {
557
  if (params) {
@@ -591,7 +639,15 @@
591
  }
592
 
593
  // Clean
594
- $.post(ai1wm_import.ajax.url, params, null, 'json').done(function () {
 
 
 
 
 
 
 
 
595
  // Unbinding the beforeunload event when we stop importing
596
  $(window).unbind('beforeunload');
597
 
@@ -621,9 +677,13 @@
621
  }
622
 
623
  $.ajax({
624
- cache: false,
625
  url: ai1wm_import.status.url,
626
- dataType: 'json'
 
 
 
 
 
627
  }).done(function (params) {
628
  if (params) {
629
  self.setStatus(params);
@@ -1062,7 +1122,7 @@
1062
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1063
  */
1064
 
1065
- var Util = __webpack_require__(3),
1066
  Dialog = __webpack_require__(9);
1067
 
1068
  var Extensions = {
@@ -1235,7 +1295,7 @@
1235
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1236
  */
1237
 
1238
- var Util = __webpack_require__(3),
1239
  Import = __webpack_require__(4),
1240
  $ = jQuery;
1241
 
71
  */
72
 
73
  var Report = __webpack_require__(1),
74
+ Feedback = __webpack_require__(3),
75
  Deprecated = __webpack_require__(8),
76
  FileUploader = __webpack_require__(12);
77
 
89
 
90
  /***/ },
91
  /* 1 */
92
+ /***/ function(module, exports, __webpack_require__) {
93
 
94
  'use strict';
95
 
117
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
118
  */
119
 
120
+ var Util = __webpack_require__(2);
121
+
122
  jQuery(document).ready(function ($) {
123
  'use strict';
124
 
140
  var terms = $('.ai1wm-report-terms').is(':checked');
141
 
142
  $.ajax({
 
143
  url: ai1wm_report.ajax.url,
144
+ type: 'POST',
145
+ dataType: 'json',
146
+ async: false,
147
  data: { 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
148
+ dataFilter: function dataFilter(data, type) {
149
+ return Util.json(data);
150
+ },
151
  success: function success(data) {
152
  var errors = data.errors;
153
  if (errors.length > 0) {
154
  // Reset previous messages
155
  $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
156
 
157
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
158
  $.each(errors, function (key, value) {
159
+ errorMessage.append('<p>' + value + '</p>');
160
  });
161
 
162
+ $('.ai1wm-report-problem-dialog').prepend(errorMessage);
163
  } else {
164
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
165
+ $('.ai1wm-report-problem-dialog').html(successMessage);
166
 
167
  // Hide message
168
  setTimeout(function () {
169
  $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
170
  }, 2000);
171
  }
172
+ }
 
 
173
  });
174
  });
175
  });
204
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
205
  */
206
 
207
+ var $ = jQuery;
208
+
209
+ module.exports = {
210
+ random: function random(len) {
211
+ var text = '';
212
+ var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
213
+
214
+ for (var i = 0; i < len; i++) {
215
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
216
+ }
217
+
218
+ return text;
219
+ },
220
+ form: function form(id) {
221
+ return $(id).serializeArray();
222
+ },
223
+ ucfirst: function ucfirst(text) {
224
+ return text.charAt(0).toUpperCase() + text.slice(1);
225
+ },
226
+ list: function list(input) {
227
+ // Convert object to list
228
+ if ($.isPlainObject(input)) {
229
+ var result = [];
230
+ var params = decodeURIComponent($.param(input)).split('&');
231
+
232
+ // Loop over params
233
+ $.each(params, function (index, item) {
234
+ var value = item.split('=');
235
+
236
+ // Add item
237
+ result.push({ name: value[0], value: value[1] });
238
+ });
239
+
240
+ return result;
241
+ }
242
+
243
+ return input;
244
+ },
245
+ json: function json(input) {
246
+ var result = input.match(/{[\s\S]+}/);
247
+ if (result !== null) {
248
+ return result[0];
249
+ }
250
+ }
251
+ };
252
+
253
+ /***/ },
254
+ /* 3 */
255
+ /***/ function(module, exports, __webpack_require__) {
256
+
257
+ 'use strict';
258
+
259
+ /**
260
+ * Copyright (C) 2014-2017 ServMask Inc.
261
+ *
262
+ * This program is free software: you can redistribute it and/or modify
263
+ * it under the terms of the GNU General Public License as published by
264
+ * the Free Software Foundation, either version 3 of the License, or
265
+ * (at your option) any later version.
266
+ *
267
+ * This program is distributed in the hope that it will be useful,
268
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
269
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
270
+ * GNU General Public License for more details.
271
+ *
272
+ * You should have received a copy of the GNU General Public License
273
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
274
+ *
275
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
276
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
277
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
278
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
279
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
280
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
281
+ */
282
+
283
+ var Util = __webpack_require__(2);
284
+
285
  jQuery(document).ready(function ($) {
286
  'use strict';
287
 
340
  var terms = $('.ai1wm-feedback-terms').is(':checked');
341
 
342
  $.ajax({
 
343
  url: ai1wm_feedback.ajax.url,
344
+ type: 'POST',
345
+ dataType: 'json',
346
+ async: false,
347
  data: { 'ai1wm_type': type, 'ai1wm_email': email, 'ai1wm_message': message, 'ai1wm_terms': +terms },
348
+ dataFilter: function dataFilter(data, type) {
349
+ return Util.json(data);
350
+ },
351
  success: function success(data) {
352
  var errors = data.errors;
353
  if (errors.length > 0) {
354
  // Reset previous messages
355
  $('.ai1wm-feedback .ai1wm-message').remove();
356
 
357
+ var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
358
  $.each(errors, function (key, value) {
359
+ errorMessage.append('<p>' + value + '</p>');
360
  });
361
 
362
+ $('.ai1wm-feedback').prepend(errorMessage);
363
  } else {
364
+ var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
365
+ $('.ai1wm-feedback').html(successMessage);
366
  }
367
+ }
 
 
368
  });
369
  });
370
  });
371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  /***/ },
373
  /* 4 */
374
  /***/ function(module, exports, __webpack_require__) {
399
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
400
  */
401
 
402
+ var Util = __webpack_require__(2),
403
  Modal = __webpack_require__(5),
404
  $ = jQuery;
405
 
466
  }
467
 
468
  // Import
469
+ $.ajax({
470
+ url: ai1wm_import.ajax.url,
471
+ type: 'POST',
472
+ dataType: 'json',
473
+ data: params,
474
+ dataFilter: function dataFilter(data, type) {
475
+ return Util.json(data);
476
+ }
477
+ }).done(function () {
478
  self.getStatus();
479
  }).done(function (params) {
480
  if (params) {
505
  }
506
 
507
  // Import
508
+ $.ajax({
509
+ url: ai1wm_import.ajax.url,
510
+ type: 'POST',
511
+ dataType: 'json',
512
+ data: params,
513
+ dataFilter: function dataFilter(data, type) {
514
+ return Util.json(data);
515
+ }
516
+ }).done(function (params) {
517
  if (params) {
518
  self.run(params);
519
  }
544
  }
545
 
546
  // Confirm
547
+ $.ajax({
548
+ url: ai1wm_import.ajax.url,
549
+ type: 'POST',
550
+ dataType: 'json',
551
+ data: params,
552
+ dataFilter: function dataFilter(data, type) {
553
+ return Util.json(data);
554
+ }
555
+ }).done(function () {
556
  self.getStatus();
557
  }).done(function (params) {
558
  if (params) {
591
  }
592
 
593
  // Blogs
594
+ $.ajax({
595
+ url: ai1wm_import.ajax.url,
596
+ type: 'POST',
597
+ dataType: 'json',
598
+ data: params,
599
+ dataFilter: function dataFilter(data, type) {
600
+ return Util.json(data);
601
+ }
602
+ }).done(function () {
603
  self.getStatus();
604
  }).done(function (params) {
605
  if (params) {
639
  }
640
 
641
  // Clean
642
+ $.ajax({
643
+ url: ai1wm_import.ajax.url,
644
+ type: 'POST',
645
+ dataType: 'json',
646
+ data: params,
647
+ dataFilter: function dataFilter(data, type) {
648
+ return Util.json(data);
649
+ }
650
+ }).done(function () {
651
  // Unbinding the beforeunload event when we stop importing
652
  $(window).unbind('beforeunload');
653
 
677
  }
678
 
679
  $.ajax({
 
680
  url: ai1wm_import.status.url,
681
+ type: 'GET',
682
+ dataType: 'json',
683
+ cache: false,
684
+ dataFilter: function dataFilter(data, type) {
685
+ return Util.json(data);
686
+ }
687
  }).done(function (params) {
688
  if (params) {
689
  self.setStatus(params);
1122
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1123
  */
1124
 
1125
+ var Util = __webpack_require__(2),
1126
  Dialog = __webpack_require__(9);
1127
 
1128
  var Extensions = {
1295
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
1296
  */
1297
 
1298
+ var Util = __webpack_require__(2),
1299
  Import = __webpack_require__(4),
1300
  $ = jQuery;
1301
 
lib/view/assets/javascript/updater.min.js CHANGED
@@ -84,8 +84,18 @@
84
  var updateLink = dialog.find('.ai1wm-update-link').val();
85
 
86
  // Check Purchase ID
87
- $.getJSON('https://servmask.com/purchase/' + purchaseId + '/check', function (product) {
88
- $.post(ai1wm_updater.ajax.url, { 'ai1wm_uuid': product.uuid, 'ai1wm_extension': product.extension }, function () {
 
 
 
 
 
 
 
 
 
 
89
  window.location.hash = '';
90
 
91
  // Update plugin row
84
  var updateLink = dialog.find('.ai1wm-update-link').val();
85
 
86
  // Check Purchase ID
87
+ $.ajax({
88
+ url: 'https://servmask.com/purchase/' + purchaseId + '/check',
89
+ type: 'GET',
90
+ dataType: 'json'
91
+ }).done(function (product) {
92
+ // Update Purchase ID
93
+ $.ajax({
94
+ url: ai1wm_updater.ajax.url,
95
+ type: 'POST',
96
+ dataType: 'json',
97
+ data: { 'ai1wm_uuid': product.uuid, 'ai1wm_extension': product.extension }
98
+ }).done(function () {
99
  window.location.hash = '';
100
 
101
  // Update plugin row
lib/view/common/leave-feedback.php CHANGED
@@ -31,8 +31,10 @@
31
  <textarea rows="3" id="ai1wm-feedback-message" class="ai1wm-feedback-message" placeholder="<?php _e( 'Leave plugin developers any feedback here..', AI1WM_PLUGIN_NAME ); ?>"></textarea>
32
  </div>
33
  <div class="ai1wm-field ai1wm-feedback-terms-segment">
34
- <input type="checkbox" class="ai1wm-feedback-terms" id="ai1wm-feedback-terms" />
35
- <label for="ai1wm-feedback-terms"><?php _e( 'I agree that by clicking the send button below my email address and comments will be send to a ServMask server.', AI1WM_PLUGIN_NAME ); ?></label>
 
 
36
  </div>
37
  <div class="ai1wm-field">
38
  <div class="ai1wm-buttons">
31
  <textarea rows="3" id="ai1wm-feedback-message" class="ai1wm-feedback-message" placeholder="<?php _e( 'Leave plugin developers any feedback here..', AI1WM_PLUGIN_NAME ); ?>"></textarea>
32
  </div>
33
  <div class="ai1wm-field ai1wm-feedback-terms-segment">
34
+ <label for="ai1wm-feedback-terms">
35
+ <input type="checkbox" class="ai1wm-feedback-terms" id="ai1wm-feedback-terms" />
36
+ <?php _e( 'I agree that by clicking the send button below my email address and comments will be send to a ServMask server.', AI1WM_PLUGIN_NAME ); ?>
37
+ </label>
38
  </div>
39
  <div class="ai1wm-field">
40
  <div class="ai1wm-buttons">
lib/view/common/report-problem.php CHANGED
@@ -10,8 +10,10 @@
10
  <textarea rows="3" id="ai1wm-report-message" class="ai1wm-report-message" placeholder="<?php _e( 'Please describe your problem here..', AI1WM_PLUGIN_NAME ); ?>"></textarea>
11
  </div>
12
  <div class="ai1wm-field ai1wm-report-terms-segment">
13
- <input type="checkbox" class="ai1wm-report-terms" id="ai1wm-report-terms" />
14
- <label for="ai1wm-report-terms"><?php _e( 'I agree to send my email address, comments and error logs to a ServMask server.', AI1WM_PLUGIN_NAME ); ?></label>
 
 
15
  </div>
16
  <div class="ai1wm-field">
17
  <div class="ai1wm-buttons">
10
  <textarea rows="3" id="ai1wm-report-message" class="ai1wm-report-message" placeholder="<?php _e( 'Please describe your problem here..', AI1WM_PLUGIN_NAME ); ?>"></textarea>
11
  </div>
12
  <div class="ai1wm-field ai1wm-report-terms-segment">
13
+ <label for="ai1wm-report-terms">
14
+ <input type="checkbox" class="ai1wm-report-terms" id="ai1wm-report-terms" />
15
+ <?php _e( 'I agree to send my email address, comments and error logs to a ServMask server.', AI1WM_PLUGIN_NAME ); ?>
16
+ </label>
17
  </div>
18
  <div class="ai1wm-field">
19
  <div class="ai1wm-buttons">
lib/view/export/advanced-settings.php CHANGED
@@ -7,61 +7,83 @@
7
  </h4>
8
  <ul>
9
  <li>
10
- <input type="checkbox" id="ai1wm-no-spam-comments" name="options[no_spam_comments]" />
11
- <label for="ai1wm-no-spam-comments"><?php _e( 'Do <strong>not</strong> export spam comments', AI1WM_PLUGIN_NAME ); ?></label>
 
 
12
  </li>
13
  <li>
14
- <input type="checkbox" id="ai1wm-no-revisions" name="options[no_revisions]" />
15
- <label for="ai1wm-no-revisions"><?php _e( 'Do <strong>not</strong> export post revisions', AI1WM_PLUGIN_NAME ); ?></label>
 
 
16
  </li>
17
  <li>
18
- <input type="checkbox" id="ai1wm-no-media" name="options[no_media]" />
19
- <label for="ai1wm-no-media"><?php _e( 'Do <strong>not</strong> export media library (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
20
  </li>
21
  <li>
22
- <input type="checkbox" id="ai1wm-no-themes" name="options[no_themes]" />
23
- <label for="ai1wm-no-themes"><?php _e( 'Do <strong>not</strong> export themes (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
24
  </li>
25
 
26
  <?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ) : ?>
27
  <li>
28
- <input type="checkbox" id="ai1wm-no-inactive-themes" name="options[no_inactive_themes]" />
29
- <label for="ai1wm-no-inactive-themes"><?php _e( 'Do <strong>not</strong> export inactive themes (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
30
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
31
  </li>
32
  <?php endif; ?>
33
 
34
  <li>
35
- <input type="checkbox" id="ai1wm-no-muplugins" name="options[no_muplugins]" />
36
- <label for="ai1wm-no-muplugins"><?php _e( 'Do <strong>not</strong> export must-use plugins (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
37
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
38
  </li>
39
 
40
  <li>
41
- <input type="checkbox" id="ai1wm-no-plugins" name="options[no_plugins]" />
42
- <label for="ai1wm-no-plugins"><?php _e( 'Do <strong>not</strong> export plugins (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
43
  </li>
44
 
45
  <?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ) : ?>
46
  <li>
47
- <input type="checkbox" id="ai1wm-no-inactive-plugins" name="options[no_inactive_plugins]" />
48
- <label for="ai1wm-no-inactive-plugins"><?php _e( 'Do <strong>not</strong> export inactive plugins (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
49
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
50
  </li>
51
  <li>
52
- <input type="checkbox" id="ai1wm-no-cache" name="options[no_cache]" />
53
- <label for="ai1wm-no-cache"><?php _e( 'Do <strong>not</strong> export cache (files)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
54
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
55
  </li>
56
  <?php endif; ?>
57
 
58
  <li>
59
- <input type="checkbox" id="ai1wm-no-database" name="options[no_database]" />
60
- <label for="ai1wm-no-database"><?php _e( 'Do <strong>not</strong> export database (sql)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
61
  </li>
62
  <li>
63
- <input type="checkbox" id="ai1wm-no-email-replace" name="options[no_email_replace]" />
64
- <label for="ai1wm-no-email-replace"><?php _e( 'Do <strong>not</strong> replace email domain (sql)', AI1WM_PLUGIN_NAME ); ?></label>
 
 
65
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
66
  </li>
67
 
7
  </h4>
8
  <ul>
9
  <li>
10
+ <label for="ai1wm-no-spam-comments">
11
+ <input type="checkbox" id="ai1wm-no-spam-comments" name="options[no_spam_comments]" />
12
+ <?php _e( 'Do <strong>not</strong> export spam comments', AI1WM_PLUGIN_NAME ); ?>
13
+ </label>
14
  </li>
15
  <li>
16
+ <label for="ai1wm-no-revisions">
17
+ <input type="checkbox" id="ai1wm-no-revisions" name="options[no_revisions]" />
18
+ <?php _e( 'Do <strong>not</strong> export post revisions', AI1WM_PLUGIN_NAME ); ?>
19
+ </label>
20
  </li>
21
  <li>
22
+ <label for="ai1wm-no-media">
23
+ <input type="checkbox" id="ai1wm-no-media" name="options[no_media]" />
24
+ <?php _e( 'Do <strong>not</strong> export media library (files)', AI1WM_PLUGIN_NAME ); ?>
25
+ </label>
26
  </li>
27
  <li>
28
+ <label for="ai1wm-no-themes">
29
+ <input type="checkbox" id="ai1wm-no-themes" name="options[no_themes]" />
30
+ <?php _e( 'Do <strong>not</strong> export themes (files)', AI1WM_PLUGIN_NAME ); ?>
31
+ </label>
32
  </li>
33
 
34
  <?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ) : ?>
35
  <li>
36
+ <label for="ai1wm-no-inactive-themes">
37
+ <input type="checkbox" id="ai1wm-no-inactive-themes" name="options[no_inactive_themes]" />
38
+ <?php _e( 'Do <strong>not</strong> export inactive themes (files)', AI1WM_PLUGIN_NAME ); ?>
39
+ </label>
40
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
41
  </li>
42
  <?php endif; ?>
43
 
44
  <li>
45
+ <label for="ai1wm-no-muplugins">
46
+ <input type="checkbox" id="ai1wm-no-muplugins" name="options[no_muplugins]" />
47
+ <?php _e( 'Do <strong>not</strong> export must-use plugins (files)', AI1WM_PLUGIN_NAME ); ?>
48
+ </label>
49
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
50
  </li>
51
 
52
  <li>
53
+ <label for="ai1wm-no-plugins">
54
+ <input type="checkbox" id="ai1wm-no-plugins" name="options[no_plugins]" />
55
+ <?php _e( 'Do <strong>not</strong> export plugins (files)', AI1WM_PLUGIN_NAME ); ?>
56
+ </label>
57
  </li>
58
 
59
  <?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ) : ?>
60
  <li>
61
+ <label for="ai1wm-no-inactive-plugins">
62
+ <input type="checkbox" id="ai1wm-no-inactive-plugins" name="options[no_inactive_plugins]" />
63
+ <?php _e( 'Do <strong>not</strong> export inactive plugins (files)', AI1WM_PLUGIN_NAME ); ?>
64
+ </label>
65
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
66
  </li>
67
  <li>
68
+ <label for="ai1wm-no-cache">
69
+ <input type="checkbox" id="ai1wm-no-cache" name="options[no_cache]" />
70
+ <?php _e( 'Do <strong>not</strong> export cache (files)', AI1WM_PLUGIN_NAME ); ?>
71
+ </label>
72
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
73
  </li>
74
  <?php endif; ?>
75
 
76
  <li>
77
+ <label for="ai1wm-no-database">
78
+ <input type="checkbox" id="ai1wm-no-database" name="options[no_database]" />
79
+ <?php _e( 'Do <strong>not</strong> export database (sql)', AI1WM_PLUGIN_NAME ); ?>
80
+ </label>
81
  </li>
82
  <li>
83
+ <label for="ai1wm-no-email-replace">
84
+ <input type="checkbox" id="ai1wm-no-email-replace" name="options[no_email_replace]" />
85
+ <?php _e( 'Do <strong>not</strong> replace email domain (sql)', AI1WM_PLUGIN_NAME ); ?>
86
+ </label>
87
  <small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
88
  </li>
89
 
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.7
6
- Stable tag: 6.40
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.
@@ -20,7 +20,7 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
20
  * We have tested the plugin on the major Linux distributions, Mac OS X, and Microsoft Windows.
21
 
22
  = Bypass all upload size restriction =
23
- * We use chunks to import your data and that way we bypass any webserver upload size restrictions up to **512MB** - commercial version supports up to **5GB**.
24
 
25
  = 0 Dependencies =
26
  * The plugin does not require any php extensions and can work with PHP v5.2.
@@ -78,6 +78,13 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
78
  3. Plugin Menu
79
 
80
  == Changelog ==
 
 
 
 
 
 
 
81
  = 6.40 =
82
  * Do not extract dropins files on import
83
  * Fix an issue with large files on import
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.7
6
+ Stable tag: 6.41
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.
20
  * We have tested the plugin on the major Linux distributions, Mac OS X, and Microsoft Windows.
21
 
22
  = Bypass all upload size restriction =
23
+ * We use chunks to import your data and that way we bypass any webserver upload size restrictions.
24
 
25
  = 0 Dependencies =
26
  * The plugin does not require any php extensions and can work with PHP v5.2.
78
  3. Plugin Menu
79
 
80
  == Changelog ==
81
+ = 6.41 =
82
+ * Support Visual Composer plugin
83
+ * Support Jetpack Photon module
84
+ * Improved Maria DB support
85
+ * Disable WordPress authentication checking during migration
86
+ * Clean any temporary files after migration
87
+
88
  = 6.40 =
89
  * Do not extract dropins files on import
90
  * Fix an issue with large files on import