All-in-One WP Migration - Version 6.74

Version Description

Added

  • Support for LiteSpeed web server
  • Fully localized the export, import, and restore processes

Fixed

  • Table prefix replacement on import in limited corner cases
  • URL replacement in Bitnami
Download this release

Release Info

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

Code changes from version 6.73 to 6.74

Files changed (40) hide show
  1. all-in-one-wp-migration.php +1 -1
  2. constants.php +32 -32
  3. functions.php +14 -12
  4. lib/controller/class-ai1wm-export-controller.php +18 -1
  5. lib/controller/class-ai1wm-import-controller.php +18 -1
  6. lib/controller/class-ai1wm-main-controller.php +258 -116
  7. lib/controller/class-ai1wm-resolve-controller.php +0 -62
  8. lib/model/class-ai1wm-backups.php +4 -4
  9. lib/model/class-ai1wm-extensions.php +13 -13
  10. lib/model/class-ai1wm-http.php +0 -154
  11. lib/model/export/class-ai1wm-export-database.php +20 -12
  12. lib/model/export/class-ai1wm-export-enumerate.php +15 -22
  13. lib/model/export/class-ai1wm-export-resolve.php +0 -41
  14. lib/model/http/class-ai1wm-http-abstract.php +0 -54
  15. lib/model/http/class-ai1wm-http-curl.php +0 -77
  16. lib/model/http/class-ai1wm-http-stream.php +0 -110
  17. lib/model/import/class-ai1wm-import-database.php +190 -183
  18. lib/vendor/servmask/command/class-ai1wm-wp-cli-command.php +1 -3
  19. lib/vendor/servmask/database/class-ai1wm-database.php +87 -3
  20. lib/vendor/servmask/filesystem/class-ai1wm-directory.php +12 -6
  21. lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php +27 -12
  22. lib/vendor/servmask/filesystem/class-ai1wm-file-index.php +3 -8
  23. lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php +15 -18
  24. lib/vendor/servmask/filesystem/class-ai1wm-file.php +29 -6
  25. lib/vendor/servmask/filter/{class-ai1wm-extension-filter.php → class-ai1wm-recursive-extension-filter.php} +11 -5
  26. lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php +0 -2
  27. lib/{model/http/class-ai1wm-http-factory.php → vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php} +1 -9
  28. lib/view/assets/css/backups.min.css +1 -1
  29. lib/view/assets/css/backups.min.rtl.css +1 -1
  30. lib/view/assets/javascript/backups.min.js +65 -41
  31. lib/view/assets/javascript/export.min.js +35 -23
  32. lib/view/assets/javascript/feedback.min.js +4 -4
  33. lib/view/assets/javascript/import.min.js +69 -45
  34. lib/view/assets/javascript/report.min.js +2 -2
  35. lib/view/assets/javascript/updater.min.js +2 -2
  36. lib/view/backups/index.php +1 -1
  37. lib/{model/import/class-ai1wm-import-resolve.php → view/main/wordpress-htaccess-notice.php} +16 -16
  38. loader.php +9 -34
  39. readme.txt +12 -1
  40. uninstall.php +1 -3
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.73
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.74
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
constants.php CHANGED
@@ -31,16 +31,16 @@ define( 'AI1WM_DEBUG', false );
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
- define( 'AI1WM_VERSION', '6.73' );
35
 
36
  // ===============
37
  // = Plugin Name =
38
  // ===============
39
  define( 'AI1WM_PLUGIN_NAME', 'all-in-one-wp-migration' );
40
 
41
- // ===================
42
- // = Directory Index =
43
- // ===================
44
  define( 'AI1WM_DIRECTORY_INDEX', 'index.php' );
45
 
46
  // ================
@@ -83,11 +83,6 @@ define( 'AI1WM_EXPORT_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'export' )
83
  // ===============
84
  define( 'AI1WM_IMPORT_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'import' );
85
 
86
- // =============
87
- // = Http Path =
88
- // =============
89
- define( 'AI1WM_HTTP_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'http' );
90
-
91
  // =============
92
  // = View Path =
93
  // =============
@@ -159,7 +154,7 @@ define( 'AI1WM_SETTINGS_NAME', 'settings.json' );
159
  define( 'AI1WM_MULTIPART_NAME', 'multipart.list' );
160
 
161
  // ========================
162
- // = Archive FileMap Name =
163
  // ========================
164
  define( 'AI1WM_FILEMAP_NAME', 'filemap.list' );
165
 
@@ -203,16 +198,6 @@ define( 'AI1WM_IMPORT_NAME', 'import.log' );
203
  // ==================
204
  define( 'AI1WM_ERROR_NAME', 'error.log' );
205
 
206
- // ==========
207
- // = URL IP =
208
- // ==========
209
- define( 'AI1WM_URL_IP', 'ai1wm_url_ip' );
210
-
211
- // ===============
212
- // = URL Adapter =
213
- // ===============
214
- define( 'AI1WM_URL_ADAPTER', 'ai1wm_url_adapter' );
215
-
216
  // ==============
217
  // = Secret Key =
218
  // ==============
@@ -228,6 +213,16 @@ define( 'AI1WM_AUTH_USER', 'ai1wm_auth_user' );
228
  // =================
229
  define( 'AI1WM_AUTH_PASSWORD', 'ai1wm_auth_password' );
230
 
 
 
 
 
 
 
 
 
 
 
231
  // ==================
232
  // = Active Plugins =
233
  // ==================
@@ -325,26 +320,31 @@ define( 'AI1WM_SITES_PATH', AI1WM_UPLOADS_PATH . DIRECTORY_SEPARATOR . 'sites' )
325
  // ================
326
  define( 'AI1WM_BACKUPS_PATH', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'ai1wm-backups' );
327
 
328
- // ======================
329
- // = Storage Index File =
330
- // ======================
331
  define( 'AI1WM_STORAGE_INDEX', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'index.php' );
332
 
333
- // ======================
334
- // = Backups Index File =
335
- // ======================
336
  define( 'AI1WM_BACKUPS_INDEX', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'index.php' );
337
 
338
- // =========================
339
- // = Backups Htaccess File =
340
- // =========================
341
- define( 'AI1WM_BACKUPS_HTACCESS', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . '.htaccess' );
342
-
343
  // ==========================
344
- // = Backups Webconfig File =
345
  // ==========================
 
 
 
 
 
346
  define( 'AI1WM_BACKUPS_WEBCONFIG', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'web.config' );
347
 
 
 
 
 
 
348
  // ================================
349
  // = WP Migration Plugin Base Dir =
350
  // ================================
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
+ define( 'AI1WM_VERSION', '6.74' );
35
 
36
  // ===============
37
  // = Plugin Name =
38
  // ===============
39
  define( 'AI1WM_PLUGIN_NAME', 'all-in-one-wp-migration' );
40
 
41
+ // ============================
42
+ // = Directory index.php File =
43
+ // ============================
44
  define( 'AI1WM_DIRECTORY_INDEX', 'index.php' );
45
 
46
  // ================
83
  // ===============
84
  define( 'AI1WM_IMPORT_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'import' );
85
 
 
 
 
 
 
86
  // =============
87
  // = View Path =
88
  // =============
154
  define( 'AI1WM_MULTIPART_NAME', 'multipart.list' );
155
 
156
  // ========================
157
+ // = Archive Filemap Name =
158
  // ========================
159
  define( 'AI1WM_FILEMAP_NAME', 'filemap.list' );
160
 
198
  // ==================
199
  define( 'AI1WM_ERROR_NAME', 'error.log' );
200
 
 
 
 
 
 
 
 
 
 
 
201
  // ==============
202
  // = Secret Key =
203
  // ==============
213
  // =================
214
  define( 'AI1WM_AUTH_PASSWORD', 'ai1wm_auth_password' );
215
 
216
+ // ============
217
+ // = Site URL =
218
+ // ============
219
+ define( 'AI1WM_SITE_URL', 'siteurl' );
220
+
221
+ // ============
222
+ // = Home URL =
223
+ // ============
224
+ define( 'AI1WM_HOME_URL', 'home' );
225
+
226
  // ==================
227
  // = Active Plugins =
228
  // ==================
320
  // ================
321
  define( 'AI1WM_BACKUPS_PATH', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'ai1wm-backups' );
322
 
323
+ // ==========================
324
+ // = Storage index.php File =
325
+ // ==========================
326
  define( 'AI1WM_STORAGE_INDEX', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'index.php' );
327
 
328
+ // ==========================
329
+ // = Backups index.php File =
330
+ // ==========================
331
  define( 'AI1WM_BACKUPS_INDEX', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'index.php' );
332
 
 
 
 
 
 
333
  // ==========================
334
+ // = Backups .htaccess File =
335
  // ==========================
336
+ define( 'AI1WM_BACKUPS_HTACCESS', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . '.htaccess' );
337
+
338
+ // ===========================
339
+ // = Backups web.config File =
340
+ // ===========================
341
  define( 'AI1WM_BACKUPS_WEBCONFIG', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'web.config' );
342
 
343
+ // ============================
344
+ // = WordPress .htaccess File =
345
+ // ============================
346
+ define( 'AI1WM_WORDPRESS_HTACCESS', ABSPATH . DIRECTORY_SEPARATOR . '.htaccess' );
347
+
348
  // ================================
349
  // = WP Migration Plugin Base Dir =
350
  // ================================
functions.php CHANGED
@@ -31,7 +31,7 @@
31
  */
32
  function ai1wm_storage_path( $params ) {
33
  if ( empty( $params['storage'] ) ) {
34
- throw new Ai1wm_Storage_Exception( __( 'Unable to locate storage path', AI1WM_PLUGIN_NAME ) );
35
  }
36
 
37
  // Get storage path
@@ -51,12 +51,12 @@ function ai1wm_storage_path( $params ) {
51
  */
52
  function ai1wm_backup_path( $params ) {
53
  if ( empty( $params['archive'] ) ) {
54
- throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path', AI1WM_PLUGIN_NAME ) );
55
  }
56
 
57
  // Validate archive path
58
  if ( validate_file( $params['archive'] ) !== 0 ) {
59
- throw new Ai1wm_Archive_Exception( __( 'Invalid archive path', AI1WM_PLUGIN_NAME ) );
60
  }
61
 
62
  return AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . $params['archive'];
@@ -70,12 +70,12 @@ function ai1wm_backup_path( $params ) {
70
  */
71
  function ai1wm_archive_path( $params ) {
72
  if ( empty( $params['archive'] ) ) {
73
- throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path', AI1WM_PLUGIN_NAME ) );
74
  }
75
 
76
  // Validate archive path
77
  if ( validate_file( $params['archive'] ) !== 0 ) {
78
- throw new Ai1wm_Archive_Exception( __( 'Invalid archive path', AI1WM_PLUGIN_NAME ) );
79
  }
80
 
81
  // Get archive path
@@ -1061,7 +1061,7 @@ function ai1wm_urlscheme( $url, $scheme = '' ) {
1061
  function ai1wm_open( $file, $mode ) {
1062
  $file_handle = @fopen( $file, $mode );
1063
  if ( false === $file_handle ) {
1064
- throw new Ai1wm_Not_Accessible_Exception( sprintf( __( 'Unable to open %s with mode %s', AI1WM_PLUGIN_NAME ), $file, $mode ) );
1065
  }
1066
 
1067
  return $file_handle;
@@ -1080,10 +1080,12 @@ function ai1wm_write( $handle, $content ) {
1080
  $write_result = @fwrite( $handle, $content );
1081
  if ( false === $write_result ) {
1082
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1083
- throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write to: %s', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1084
  }
1085
  } elseif ( strlen( $content ) !== $write_result ) {
1086
- throw new Ai1wm_Quota_Exceeded_Exception( __( 'Out of disk space.', AI1WM_PLUGIN_NAME ) );
 
 
1087
  }
1088
 
1089
  return $write_result;
@@ -1101,7 +1103,7 @@ function ai1wm_read( $handle, $filesize ) {
1101
  $read_result = @fread( $handle, $filesize );
1102
  if ( false === $read_result ) {
1103
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1104
- throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read file: %s', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1105
  }
1106
  }
1107
 
@@ -1118,7 +1120,7 @@ function ai1wm_seek( $handle, $offset, $mode = SEEK_SET ) {
1118
  $seek_result = @fseek( $handle, $offset, $mode );
1119
  if ( -1 === $seek_result ) {
1120
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1121
- throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset %d on %s', AI1WM_PLUGIN_NAME ), $offset, $meta['uri'] ) );
1122
  }
1123
  }
1124
 
@@ -1135,7 +1137,7 @@ function ai1wm_tell( $handle ) {
1135
  $tell_result = @ftell( $handle );
1136
  if ( false === $tell_result ) {
1137
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1138
- throw new Ai1wm_Not_Tellable_Exception( sprintf( __( 'Unable to get current pointer position of %s', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1139
  }
1140
  }
1141
 
@@ -1298,7 +1300,7 @@ function ai1wm_fseek( $file_handle, Math_BigInteger $offset ) {
1298
  */
1299
  function ai1wm_verify_secret_key( $secret_key ) {
1300
  if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) {
1301
- throw new Ai1wm_Not_Valid_Secret_Key_Exception( __( 'Unable to authenticate the secret key.', AI1WM_PLUGIN_NAME ) );
1302
  }
1303
 
1304
  return true;
31
  */
32
  function ai1wm_storage_path( $params ) {
33
  if ( empty( $params['storage'] ) ) {
34
+ throw new Ai1wm_Storage_Exception( __( 'Unable to locate storage path. <a href="https://help.servmask.com/knowledgebase/invalid-storage-path/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
35
  }
36
 
37
  // Get storage path
51
  */
52
  function ai1wm_backup_path( $params ) {
53
  if ( empty( $params['archive'] ) ) {
54
+ throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path. <a href="https://help.servmask.com/knowledgebase/invalid-archive-path/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
55
  }
56
 
57
  // Validate archive path
58
  if ( validate_file( $params['archive'] ) !== 0 ) {
59
+ throw new Ai1wm_Archive_Exception( __( 'Invalid archive path. <a href="https://help.servmask.com/knowledgebase/invalid-archive-path/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
60
  }
61
 
62
  return AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . $params['archive'];
70
  */
71
  function ai1wm_archive_path( $params ) {
72
  if ( empty( $params['archive'] ) ) {
73
+ throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path. <a href="https://help.servmask.com/knowledgebase/invalid-archive-path/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
74
  }
75
 
76
  // Validate archive path
77
  if ( validate_file( $params['archive'] ) !== 0 ) {
78
+ throw new Ai1wm_Archive_Exception( __( 'Invalid archive path. <a href="https://help.servmask.com/knowledgebase/invalid-archive-path/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
79
  }
80
 
81
  // Get archive path
1061
  function ai1wm_open( $file, $mode ) {
1062
  $file_handle = @fopen( $file, $mode );
1063
  if ( false === $file_handle ) {
1064
+ throw new Ai1wm_Not_Accessible_Exception( sprintf( __( 'Unable to open %s with mode %s. <a href="https://help.servmask.com/knowledgebase/invalid-file-permissions/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $file, $mode ) );
1065
  }
1066
 
1067
  return $file_handle;
1080
  $write_result = @fwrite( $handle, $content );
1081
  if ( false === $write_result ) {
1082
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1083
+ throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write to: %s. <a href="https://help.servmask.com/knowledgebase/invalid-file-permissions/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1084
  }
1085
  } elseif ( strlen( $content ) !== $write_result ) {
1086
+ if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1087
+ throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write to: %s. <a href="https://help.servmask.com/knowledgebase/out-of-disk-space/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1088
+ }
1089
  }
1090
 
1091
  return $write_result;
1103
  $read_result = @fread( $handle, $filesize );
1104
  if ( false === $read_result ) {
1105
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1106
+ throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read file: %s. <a href="https://help.servmask.com/knowledgebase/invalid-file-permissions/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1107
  }
1108
  }
1109
 
1120
  $seek_result = @fseek( $handle, $offset, $mode );
1121
  if ( -1 === $seek_result ) {
1122
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1123
+ throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset %d on %s. <a href="https://help.servmask.com/knowledgebase/php-32bit/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $offset, $meta['uri'] ) );
1124
  }
1125
  }
1126
 
1137
  $tell_result = @ftell( $handle );
1138
  if ( false === $tell_result ) {
1139
  if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1140
+ throw new Ai1wm_Not_Tellable_Exception( sprintf( __( 'Unable to get current pointer position of %s. <a href="https://help.servmask.com/knowledgebase/php-32bit/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1141
  }
1142
  }
1143
 
1300
  */
1301
  function ai1wm_verify_secret_key( $secret_key ) {
1302
  if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) {
1303
+ throw new Ai1wm_Not_Valid_Secret_Key_Exception( __( 'Unable to authenticate the secret key. <a href="https://help.servmask.com/knowledgebase/invalid-secret-key/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ) );
1304
  }
1305
 
1306
  return true;
lib/controller/class-ai1wm-export-controller.php CHANGED
@@ -101,7 +101,14 @@ class Ai1wm_Export_Controller {
101
  exit;
102
  }
103
 
104
- return Ai1wm_Http::get( admin_url( 'admin-ajax.php?action=ai1wm_export' ), $params );
 
 
 
 
 
 
 
105
  }
106
  }
107
 
@@ -126,4 +133,14 @@ class Ai1wm_Export_Controller {
126
  apply_filters( 'ai1wm_export_azure_storage', Ai1wm_Template::get_content( 'export/button-azure-storage' ) ),
127
  );
128
  }
 
 
 
 
 
 
 
 
 
 
129
  }
101
  exit;
102
  }
103
 
104
+ wp_remote_post( apply_filters( 'ai1wm_http_export_url', admin_url( 'admin-ajax.php?action=ai1wm_export' ) ), array(
105
+ 'timeout' => apply_filters( 'ai1wm_http_export_timeout', 5 ),
106
+ 'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ),
107
+ 'sslverify' => apply_filters( 'ai1wm_http_export_sslverify', false ),
108
+ 'headers' => apply_filters( 'ai1wm_http_export_headers', array() ),
109
+ 'body' => apply_filters( 'ai1wm_http_export_body', $params ),
110
+ ) );
111
+ exit;
112
  }
113
  }
114
 
133
  apply_filters( 'ai1wm_export_azure_storage', Ai1wm_Template::get_content( 'export/button-azure-storage' ) ),
134
  );
135
  }
136
+
137
+ public static function http_export_headers( $headers = array() ) {
138
+ if ( ( $user = get_option( AI1WM_AUTH_USER ) ) && ( $password = get_option( AI1WM_AUTH_PASSWORD ) ) ) {
139
+ if ( ( $hash = base64_encode( sprintf( '%s:%s', $user, $password ) ) ) ) {
140
+ $headers['Authorization'] = sprintf( 'Basic %s', $hash );
141
+ }
142
+ }
143
+
144
+ return $headers;
145
+ }
146
  }
lib/controller/class-ai1wm-import-controller.php CHANGED
@@ -105,7 +105,14 @@ class Ai1wm_Import_Controller {
105
  exit;
106
  }
107
 
108
- return Ai1wm_Http::get( admin_url( 'admin-ajax.php?action=ai1wm_import' ), $params );
 
 
 
 
 
 
 
109
  }
110
  }
111
 
@@ -132,6 +139,16 @@ class Ai1wm_Import_Controller {
132
  );
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
135
  public static function max_chunk_size() {
136
  return min(
137
  ai1wm_parse_size( ini_get( 'post_max_size' ), AI1WM_MAX_CHUNK_SIZE ),
105
  exit;
106
  }
107
 
108
+ wp_remote_post( apply_filters( 'ai1wm_http_import_url', admin_url( 'admin-ajax.php?action=ai1wm_import' ) ), array(
109
+ 'timeout' => apply_filters( 'ai1wm_http_import_timeout', 5 ),
110
+ 'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ),
111
+ 'sslverify' => apply_filters( 'ai1wm_http_import_sslverify', false ),
112
+ 'headers' => apply_filters( 'ai1wm_http_import_headers', array() ),
113
+ 'body' => apply_filters( 'ai1wm_http_import_body', $params ),
114
+ ) );
115
+ exit;
116
  }
117
  }
118
 
139
  );
140
  }
141
 
142
+ public static function http_import_headers( $headers = array() ) {
143
+ if ( ( $user = get_option( AI1WM_AUTH_USER ) ) && ( $password = get_option( AI1WM_AUTH_PASSWORD ) ) ) {
144
+ if ( ( $hash = base64_encode( sprintf( '%s:%s', $user, $password ) ) ) ) {
145
+ $headers['Authorization'] = sprintf( 'Basic %s', $hash );
146
+ }
147
+ }
148
+
149
+ return $headers;
150
+ }
151
+
152
  public static function max_chunk_size() {
153
  return min(
154
  ai1wm_parse_size( ini_get( 'post_max_size' ), AI1WM_MAX_CHUNK_SIZE ),
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -34,35 +34,41 @@ class Ai1wm_Main_Controller {
34
  register_activation_hook( AI1WM_PLUGIN_BASENAME, array( $this, 'activation_hook' ) );
35
 
36
  // Activate hooks
37
- $this->activate_actions()
38
- ->activate_filters()
39
- ->activate_textdomain();
40
  }
41
 
42
  /**
43
  * Activation hook callback
44
  *
45
- * @return Object Instance of this class
46
  */
47
  public function activation_hook() {
 
 
 
 
 
48
 
 
 
 
49
  }
50
 
51
  /**
52
  * Initializes language domain for the plugin
53
  *
54
- * @return Object Instance of this class
55
  */
56
  private function activate_textdomain() {
57
  load_plugin_textdomain( AI1WM_PLUGIN_NAME, false, false );
58
-
59
- return $this;
60
  }
61
 
62
  /**
63
  * Register listeners for actions
64
  *
65
- * @return Object Instance of this class
66
  */
67
  private function activate_actions() {
68
  // Init
@@ -71,12 +77,12 @@ class Ai1wm_Main_Controller {
71
  // Router
72
  add_action( 'admin_init', array( $this, 'router' ) );
73
 
 
 
 
74
  // Admin header
75
  add_action( 'admin_head', array( $this, 'admin_head' ) );
76
 
77
- // Create initial folders
78
- add_action( 'admin_init', array( $this, 'create_folders' ) );
79
-
80
  // All in One WP Migration
81
  add_action( 'plugins_loaded', array( $this, 'ai1wm_loaded' ), 10 );
82
 
@@ -100,23 +106,19 @@ class Ai1wm_Main_Controller {
100
 
101
  // Enqueue updater scripts and styles
102
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_updater_scripts_and_styles' ), 5 );
103
-
104
- return $this;
105
  }
106
 
107
  /**
108
  * Register listeners for filters
109
  *
110
- * @return Object Instance of this class
111
  */
112
  private function activate_filters() {
113
- // Add a links to plugin list page
114
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
115
 
116
  // Add custom schedules
117
  add_filter( 'cron_schedules', array( $this, 'add_cron_schedules' ), 9999 );
118
-
119
- return $this;
120
  }
121
 
122
  /**
@@ -128,12 +130,6 @@ class Ai1wm_Main_Controller {
128
  // Add export commands
129
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Init::execute', 5 );
130
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Compatibility::execute', 5 );
131
-
132
- // Resolve URL address
133
- if ( ai1wm_is_scheduled_backup() ) {
134
- add_filter( 'ai1wm_export', 'Ai1wm_Export_Resolve::execute', 5 );
135
- }
136
-
137
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Archive::execute', 10 );
138
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config::execute', 50 );
139
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config_File::execute', 60 );
@@ -147,12 +143,6 @@ class Ai1wm_Main_Controller {
147
  // Add import commands
148
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Upload::execute', 5 );
149
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Compatibility::execute', 10 );
150
-
151
- // Resolve URL address
152
- if ( ai1wm_is_scheduled_backup() ) {
153
- add_filter( 'ai1wm_import', 'Ai1wm_Import_Resolve::execute', 10 );
154
- }
155
-
156
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Validate::execute', 50 );
157
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Confirm::execute', 100 );
158
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Blogs::execute', 150 );
@@ -200,6 +190,12 @@ class Ai1wm_Main_Controller {
200
  // Add automatic plugins update
201
  add_action( 'wp_maybe_auto_update', 'Ai1wm_Updater_Controller::check_for_updates' );
202
 
 
 
 
 
 
 
203
  // Add chunk size limit
204
  add_filter( 'ai1wm_max_chunk_size', 'Ai1wm_Import_Controller::max_chunk_size' );
205
 
@@ -216,6 +212,155 @@ class Ai1wm_Main_Controller {
216
  add_filter( 'plugin_row_meta', 'Ai1wm_Updater_Controller::plugin_row_meta', 10, 2 );
217
  }
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  /**
220
  * Display multisite notice
221
  *
@@ -280,89 +425,25 @@ class Ai1wm_Main_Controller {
280
  }
281
 
282
  /**
283
- * Add a links to plugin list page
284
  *
285
- * @return array
286
  */
287
- public function plugin_row_meta( $links, $file ) {
288
- if ( $file == AI1WM_PLUGIN_BASENAME ) {
289
- $links[] = Ai1wm_Template::get_content( 'main/get-support' );
290
- }
291
-
292
- return $links;
293
  }
294
 
295
  /**
296
- * Create folders needed for plugin operation, if they don't exist
297
  *
298
- * @return void
299
  */
300
- public function create_folders() {
301
- // Check if storage folder is created
302
- if ( ! is_dir( AI1WM_STORAGE_PATH ) ) {
303
- if ( ! mkdir( AI1WM_STORAGE_PATH ) ) {
304
- if ( is_multisite() ) {
305
- return add_action( 'network_admin_notices', array( $this, 'storage_path_notice' ) );
306
- } else {
307
- return add_action( 'admin_notices', array( $this, 'storage_path_notice' ) );
308
- }
309
- }
310
- }
311
-
312
- // Check if index.php is created in storage folder
313
- if ( ! is_file( AI1WM_STORAGE_INDEX ) ) {
314
- if ( ! Ai1wm_File_Index::create( AI1WM_STORAGE_INDEX ) ) {
315
- if ( is_multisite() ) {
316
- return add_action( 'network_admin_notices', array( $this, 'storage_index_notice' ) );
317
- } else {
318
- return add_action( 'admin_notices', array( $this, 'storage_index_notice' ) );
319
- }
320
- }
321
- }
322
-
323
- // Check if ai1wm-backups folder is created
324
- if ( ! is_dir( AI1WM_BACKUPS_PATH ) ) {
325
- if ( ! mkdir( AI1WM_BACKUPS_PATH ) ) {
326
- if ( is_multisite() ) {
327
- return add_action( 'network_admin_notices', array( $this, 'backups_path_notice' ) );
328
- } else {
329
- return add_action( 'admin_notices', array( $this, 'backups_path_notice' ) );
330
- }
331
- }
332
- }
333
-
334
- // Check if .htaccess is created in backups folder
335
- if ( ! is_file( AI1WM_BACKUPS_HTACCESS ) ) {
336
- if ( ! Ai1wm_File_Htaccess::create( AI1WM_BACKUPS_HTACCESS ) ) {
337
- if ( is_multisite() ) {
338
- return add_action( 'network_admin_notices', array( $this, 'backups_htaccess_notice' ) );
339
- } else {
340
- return add_action( 'admin_notices', array( $this, 'backups_htaccess_notice' ) );
341
- }
342
- }
343
- }
344
-
345
- // Check if web.config is created in backups folder
346
- if ( ! is_file( AI1WM_BACKUPS_WEBCONFIG ) ) {
347
- if ( ! Ai1wm_File_Webconfig::create( AI1WM_BACKUPS_WEBCONFIG ) ) {
348
- if ( is_multisite() ) {
349
- return add_action( 'network_admin_notices', array( $this, 'backups_webconfig_notice' ) );
350
- } else {
351
- return add_action( 'admin_notices', array( $this, 'backups_webconfig_notice' ) );
352
- }
353
- }
354
  }
355
 
356
- // Check if index.php is created in backups folder
357
- if ( ! is_file( AI1WM_BACKUPS_INDEX ) ) {
358
- if ( ! Ai1wm_File_Index::create( AI1WM_BACKUPS_INDEX ) ) {
359
- if ( is_multisite() ) {
360
- return add_action( 'network_admin_notices', array( $this, 'backups_index_notice' ) );
361
- } else {
362
- return add_action( 'admin_notices', array( $this, 'backups_index_notice' ) );
363
- }
364
- }
365
- }
366
  }
367
 
368
  /**
@@ -508,6 +589,22 @@ class Ai1wm_Main_Controller {
508
  ),
509
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
510
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  }
512
 
513
  /**
@@ -568,20 +665,47 @@ class Ai1wm_Main_Controller {
568
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
569
  ),
570
  'filters' => array(
571
- 'ai1wm_archive_extension' => array( 'wpress', 'bin' ),
572
  'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
573
  ),
574
  ) );
575
 
576
  wp_localize_script( 'ai1wm_import', 'ai1wm_import', array(
577
- 'ajax' => array(
578
  'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
579
  ),
580
- 'status' => array(
581
  'url' => wp_make_link_relative( add_query_arg( array( 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
582
  ),
583
- 'secret_key' => get_option( AI1WM_SECRET_KEY ),
584
- 'oversize' => sprintf(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  __(
586
  'The file that you are trying to import is over the maximum upload file size limit of <strong>%s</strong>.<br />' .
587
  'You can remove this restriction by purchasing our ' .
@@ -590,12 +714,6 @@ class Ai1wm_Main_Controller {
590
  ),
591
  size_format( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) )
592
  ),
593
- 'invalid_extension' => __(
594
- 'The file type that you have tried to upload is not compatible with this plugin. ' .
595
- 'Please ensure that your file is a <strong>.wpress</strong> file that was created with the All-in-One WP migration plugin. ' .
596
- '<a href="https://help.servmask.com/knowledgebase/invalid-backup-file/" target="_blank">Technical details</a>',
597
- AI1WM_PLUGIN_NAME
598
- ),
599
  ) );
600
  }
601
 
@@ -664,6 +782,27 @@ class Ai1wm_Main_Controller {
664
  ),
665
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
666
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
  }
668
 
669
  /**
@@ -700,6 +839,11 @@ class Ai1wm_Main_Controller {
700
  'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_updater' ) ),
701
  ),
702
  ) );
 
 
 
 
 
703
  }
704
 
705
  /**
@@ -755,7 +899,6 @@ class Ai1wm_Main_Controller {
755
  add_action( 'wp_ajax_nopriv_ai1wm_export', 'Ai1wm_Export_Controller::export' );
756
  add_action( 'wp_ajax_nopriv_ai1wm_import', 'Ai1wm_Import_Controller::import' );
757
  add_action( 'wp_ajax_nopriv_ai1wm_status', 'Ai1wm_Status_Controller::status' );
758
- add_action( 'wp_ajax_nopriv_ai1wm_resolve', 'Ai1wm_Resolve_Controller::resolve' );
759
  add_action( 'wp_ajax_nopriv_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' );
760
  add_action( 'wp_ajax_nopriv_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' );
761
  add_action( 'wp_ajax_nopriv_ai1wm_report', 'Ai1wm_Report_Controller::report' );
@@ -764,7 +907,6 @@ class Ai1wm_Main_Controller {
764
  add_action( 'wp_ajax_ai1wm_export', 'Ai1wm_Export_Controller::export' );
765
  add_action( 'wp_ajax_ai1wm_import', 'Ai1wm_Import_Controller::import' );
766
  add_action( 'wp_ajax_ai1wm_status', 'Ai1wm_Status_Controller::status' );
767
- add_action( 'wp_ajax_ai1wm_resolve', 'Ai1wm_Resolve_Controller::resolve' );
768
  add_action( 'wp_ajax_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' );
769
  add_action( 'wp_ajax_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' );
770
  add_action( 'wp_ajax_ai1wm_report', 'Ai1wm_Report_Controller::report' );
34
  register_activation_hook( AI1WM_PLUGIN_BASENAME, array( $this, 'activation_hook' ) );
35
 
36
  // Activate hooks
37
+ $this->activate_actions();
38
+ $this->activate_filters();
39
+ $this->activate_textdomain();
40
  }
41
 
42
  /**
43
  * Activation hook callback
44
  *
45
+ * @return void
46
  */
47
  public function activation_hook() {
48
+ if ( is_dir( AI1WM_BACKUPS_PATH ) ) {
49
+ $this->create_backups_htaccess( AI1WM_BACKUPS_HTACCESS );
50
+ $this->create_backups_webconfig( AI1WM_BACKUPS_WEBCONFIG );
51
+ $this->create_backups_index( AI1WM_BACKUPS_INDEX );
52
+ }
53
 
54
+ if ( extension_loaded( 'litespeed' ) ) {
55
+ $this->create_litespeed_htaccess( AI1WM_WORDPRESS_HTACCESS );
56
+ }
57
  }
58
 
59
  /**
60
  * Initializes language domain for the plugin
61
  *
62
+ * @return void
63
  */
64
  private function activate_textdomain() {
65
  load_plugin_textdomain( AI1WM_PLUGIN_NAME, false, false );
 
 
66
  }
67
 
68
  /**
69
  * Register listeners for actions
70
  *
71
+ * @return void
72
  */
73
  private function activate_actions() {
74
  // Init
77
  // Router
78
  add_action( 'admin_init', array( $this, 'router' ) );
79
 
80
+ // Setup folders
81
+ add_action( 'admin_init', array( $this, 'setup_folders' ) );
82
+
83
  // Admin header
84
  add_action( 'admin_head', array( $this, 'admin_head' ) );
85
 
 
 
 
86
  // All in One WP Migration
87
  add_action( 'plugins_loaded', array( $this, 'ai1wm_loaded' ), 10 );
88
 
106
 
107
  // Enqueue updater scripts and styles
108
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_updater_scripts_and_styles' ), 5 );
 
 
109
  }
110
 
111
  /**
112
  * Register listeners for filters
113
  *
114
+ * @return void
115
  */
116
  private function activate_filters() {
117
+ // Add links to plugin list page
118
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
119
 
120
  // Add custom schedules
121
  add_filter( 'cron_schedules', array( $this, 'add_cron_schedules' ), 9999 );
 
 
122
  }
123
 
124
  /**
130
  // Add export commands
131
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Init::execute', 5 );
132
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Compatibility::execute', 5 );
 
 
 
 
 
 
133
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Archive::execute', 10 );
134
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config::execute', 50 );
135
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config_File::execute', 60 );
143
  // Add import commands
144
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Upload::execute', 5 );
145
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Compatibility::execute', 10 );
 
 
 
 
 
 
146
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Validate::execute', 50 );
147
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Confirm::execute', 100 );
148
  add_filter( 'ai1wm_import', 'Ai1wm_Import_Blogs::execute', 150 );
190
  // Add automatic plugins update
191
  add_action( 'wp_maybe_auto_update', 'Ai1wm_Updater_Controller::check_for_updates' );
192
 
193
+ // Add HTTP export headers
194
+ add_filter( 'ai1wm_http_export_headers', 'Ai1wm_Export_Controller::http_export_headers' );
195
+
196
+ // Add HTTP import headers
197
+ add_filter( 'ai1wm_http_import_headers', 'Ai1wm_Import_Controller::http_import_headers' );
198
+
199
  // Add chunk size limit
200
  add_filter( 'ai1wm_max_chunk_size', 'Ai1wm_Import_Controller::max_chunk_size' );
201
 
212
  add_filter( 'plugin_row_meta', 'Ai1wm_Updater_Controller::plugin_row_meta', 10, 2 );
213
  }
214
 
215
+ /**
216
+ * Create folders and files needed for plugin operation, if they don't exist
217
+ *
218
+ * @return void
219
+ */
220
+ public function setup_folders() {
221
+ // Check if storage folder is created
222
+ if ( ! is_dir( AI1WM_STORAGE_PATH ) ) {
223
+ $this->create_storage_folder( AI1WM_STORAGE_PATH );
224
+ }
225
+
226
+ // Check if backups folder is created
227
+ if ( ! is_dir( AI1WM_BACKUPS_PATH ) ) {
228
+ $this->create_backups_folder( AI1WM_BACKUPS_PATH );
229
+ }
230
+
231
+ // Check if index.php is created in storage folder
232
+ if ( ! is_file( AI1WM_STORAGE_INDEX ) ) {
233
+ $this->create_storage_index( AI1WM_STORAGE_INDEX );
234
+ }
235
+
236
+ // Check if index.php is created in backups folder
237
+ if ( ! is_file( AI1WM_BACKUPS_INDEX ) ) {
238
+ $this->create_backups_index( AI1WM_BACKUPS_INDEX );
239
+ }
240
+
241
+ // Check if .htaccess is created in backups folder
242
+ if ( ! is_file( AI1WM_BACKUPS_HTACCESS ) ) {
243
+ $this->create_backups_htaccess( AI1WM_BACKUPS_HTACCESS );
244
+ }
245
+
246
+ // Check if web.config is created in backups folder
247
+ if ( ! is_file( AI1WM_BACKUPS_WEBCONFIG ) ) {
248
+ $this->create_backups_webconfig( AI1WM_BACKUPS_WEBCONFIG );
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Create storage folder
254
+ *
255
+ * @param string Path to folder
256
+ * @return void
257
+ */
258
+ public function create_storage_folder( $path ) {
259
+ if ( ! Ai1wm_Directory::create( $path ) ) {
260
+ if ( is_multisite() ) {
261
+ return add_action( 'network_admin_notices', array( $this, 'storage_path_notice' ) );
262
+ } else {
263
+ return add_action( 'admin_notices', array( $this, 'storage_path_notice' ) );
264
+ }
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Create backups folder
270
+ *
271
+ * @param string Path to folder
272
+ * @return void
273
+ */
274
+ public function create_backups_folder( $path ) {
275
+ if ( ! Ai1wm_Directory::create( $path ) ) {
276
+ if ( is_multisite() ) {
277
+ return add_action( 'network_admin_notices', array( $this, 'backups_path_notice' ) );
278
+ } else {
279
+ return add_action( 'admin_notices', array( $this, 'backups_path_notice' ) );
280
+ }
281
+ }
282
+ }
283
+
284
+ /**
285
+ * Create storage index.php file
286
+ *
287
+ * @param string Path to file
288
+ * @return void
289
+ */
290
+ public function create_storage_index( $path ) {
291
+ if ( ! Ai1wm_File_Index::create( $path ) ) {
292
+ if ( is_multisite() ) {
293
+ return add_action( 'network_admin_notices', array( $this, 'storage_index_notice' ) );
294
+ } else {
295
+ return add_action( 'admin_notices', array( $this, 'storage_index_notice' ) );
296
+ }
297
+ }
298
+ }
299
+
300
+ /**
301
+ * Create backups .htaccess file
302
+ *
303
+ * @param string Path to file
304
+ * @return void
305
+ */
306
+ public function create_backups_htaccess( $path ) {
307
+ if ( ! Ai1wm_File_Htaccess::create( $path ) ) {
308
+ if ( is_multisite() ) {
309
+ return add_action( 'network_admin_notices', array( $this, 'backups_htaccess_notice' ) );
310
+ } else {
311
+ return add_action( 'admin_notices', array( $this, 'backups_htaccess_notice' ) );
312
+ }
313
+ }
314
+ }
315
+
316
+ /**
317
+ * Create backups web.config file
318
+ *
319
+ * @param string Path to file
320
+ * @return void
321
+ */
322
+ public function create_backups_webconfig( $path ) {
323
+ if ( ! Ai1wm_File_Webconfig::create( $path ) ) {
324
+ if ( is_multisite() ) {
325
+ return add_action( 'network_admin_notices', array( $this, 'backups_webconfig_notice' ) );
326
+ } else {
327
+ return add_action( 'admin_notices', array( $this, 'backups_webconfig_notice' ) );
328
+ }
329
+ }
330
+ }
331
+
332
+ /**
333
+ * Create backups index.php file
334
+ *
335
+ * @param string Path to file
336
+ * @return void
337
+ */
338
+ public function create_backups_index( $path ) {
339
+ if ( ! Ai1wm_File_Index::create( $path ) ) {
340
+ if ( is_multisite() ) {
341
+ return add_action( 'network_admin_notices', array( $this, 'backups_index_notice' ) );
342
+ } else {
343
+ return add_action( 'admin_notices', array( $this, 'backups_index_notice' ) );
344
+ }
345
+ }
346
+ }
347
+
348
+ /**
349
+ * If the "noabort" environment variable has been set,
350
+ * the script will continue to run even though the connection has been broken
351
+ *
352
+ * @return void
353
+ */
354
+ public function create_litespeed_htaccess( $path ) {
355
+ if ( ! Ai1wm_File_Htaccess::litespeed( $path ) ) {
356
+ if ( is_multisite() ) {
357
+ return add_action( 'network_admin_notices', array( $this, 'wordpress_htaccess_notice' ) );
358
+ } else {
359
+ return add_action( 'admin_notices', array( $this, 'wordpress_htaccess_notice' ) );
360
+ }
361
+ }
362
+ }
363
+
364
  /**
365
  * Display multisite notice
366
  *
425
  }
426
 
427
  /**
428
+ * Display notice for .htaccess file in WordPress directory
429
  *
430
+ * @return void
431
  */
432
+ public function wordpress_htaccess_notice() {
433
+ Ai1wm_Template::render( 'main/wordpress-htaccess-notice' );
 
 
 
 
434
  }
435
 
436
  /**
437
+ * Add links to plugin list page
438
  *
439
+ * @return array
440
  */
441
+ public function plugin_row_meta( $links, $file ) {
442
+ if ( $file == AI1WM_PLUGIN_BASENAME ) {
443
+ $links[] = Ai1wm_Template::get_content( 'main/get-support' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  }
445
 
446
+ return $links;
 
 
 
 
 
 
 
 
 
447
  }
448
 
449
  /**
589
  ),
590
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
591
  ) );
592
+
593
+ wp_localize_script( 'ai1wm_export', 'ai1wm_locale', array(
594
+ 'stop_exporting_your_website' => __( 'You are about to stop exporting your website, are you sure?', AI1WM_PLUGIN_NAME ),
595
+ 'preparing_to_export' => __( 'Preparing to export...', AI1WM_PLUGIN_NAME ),
596
+ 'unable_to_export' => __( 'Unable to export', AI1WM_PLUGIN_NAME ),
597
+ 'unable_to_start_the_export' => __( 'Unable to start the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
598
+ 'unable_to_run_the_export' => __( 'Unable to run the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
599
+ 'unable_to_stop_the_export' => __( 'Unable to stop the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
600
+ 'please_wait_stopping_the_export' => __( 'Please wait, stopping the export...', AI1WM_PLUGIN_NAME ),
601
+ 'close_export' => __( 'Close', AI1WM_PLUGIN_NAME ),
602
+ 'stop_export' => __( 'Stop export', AI1WM_PLUGIN_NAME ),
603
+ 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ),
604
+ 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ),
605
+ 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ),
606
+ 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ),
607
+ ) );
608
  }
609
 
610
  /**
665
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
666
  ),
667
  'filters' => array(
668
+ 'ai1wm_archive_extension' => array( 'wpress' ),
669
  'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
670
  ),
671
  ) );
672
 
673
  wp_localize_script( 'ai1wm_import', 'ai1wm_import', array(
674
+ 'ajax' => array(
675
  'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
676
  ),
677
+ 'status' => array(
678
  'url' => wp_make_link_relative( add_query_arg( array( 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ),
679
  ),
680
+ 'secret_key' => get_option( AI1WM_SECRET_KEY ),
681
+ ) );
682
+
683
+ wp_localize_script( 'ai1wm_import', 'ai1wm_locale', array(
684
+ 'stop_importing_your_website' => __( 'You are about to stop importing your website, are you sure?', AI1WM_PLUGIN_NAME ),
685
+ 'preparing_to_import' => __( 'Preparing to import...', AI1WM_PLUGIN_NAME ),
686
+ 'unable_to_import' => __( 'Unable to import', AI1WM_PLUGIN_NAME ),
687
+ 'unable_to_start_the_import' => __( 'Unable to start the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
688
+ 'unable_to_confirm_the_import' => __( 'Unable to confirm the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
689
+ 'unable_to_prepare_blogs_on_import' => __( 'Unable to prepare blogs on import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
690
+ 'unable_to_stop_the_import' => __( 'Unable to stop the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
691
+ 'please_wait_stopping_the_export' => __( 'Please wait, stopping the import...', AI1WM_PLUGIN_NAME ),
692
+ 'close_import' => __( 'Close', AI1WM_PLUGIN_NAME ),
693
+ 'stop_import' => __( 'Stop import', AI1WM_PLUGIN_NAME ),
694
+ 'confirm_import' => __( 'Proceed', AI1WM_PLUGIN_NAME ),
695
+ 'continue_import' => __( 'Continue', AI1WM_PLUGIN_NAME ),
696
+ 'please_do_not_close_this_browser' => __( 'Please do not close this browser window or your import will fail', AI1WM_PLUGIN_NAME ),
697
+ 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ),
698
+ 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ),
699
+ 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ),
700
+ 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ),
701
+ 'problem_while_uploading_your_file' => __( 'We are sorry, there seems to be a problem while uploading your file. Follow <a href="https://www.youtube.com/watch?v=mRp7qTFYKgs" target="_blank">this guide</a> to resolve it.', AI1WM_PLUGIN_NAME ),
702
+ 'invalid_archive_extension' => __(
703
+ 'The file type that you have tried to upload is not compatible with this plugin. ' .
704
+ 'Please ensure that your file is a <strong>.wpress</strong> file that was created with the All-in-One WP migration plugin. ' .
705
+ '<a href="https://help.servmask.com/knowledgebase/invalid-backup-file/" target="_blank">Technical details</a>',
706
+ AI1WM_PLUGIN_NAME
707
+ ),
708
+ 'invalid_archive_size' => sprintf(
709
  __(
710
  'The file that you are trying to import is over the maximum upload file size limit of <strong>%s</strong>.<br />' .
711
  'You can remove this restriction by purchasing our ' .
714
  ),
715
  size_format( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) )
716
  ),
 
 
 
 
 
 
717
  ) );
718
  }
719
 
782
  ),
783
  'secret_key' => get_option( AI1WM_SECRET_KEY ),
784
  ) );
785
+
786
+ wp_localize_script( 'ai1wm_backups', 'ai1wm_locale', array(
787
+ 'stop_importing_your_website' => __( 'You are about to stop importing your website, are you sure?', AI1WM_PLUGIN_NAME ),
788
+ 'preparing_to_import' => __( 'Preparing to import...', AI1WM_PLUGIN_NAME ),
789
+ 'unable_to_import' => __( 'Unable to import', AI1WM_PLUGIN_NAME ),
790
+ 'unable_to_start_the_import' => __( 'Unable to start the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
791
+ 'unable_to_confirm_the_import' => __( 'Unable to confirm the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
792
+ 'unable_to_prepare_blogs_on_import' => __( 'Unable to prepare blogs on import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
793
+ 'unable_to_stop_the_import' => __( 'Unable to stop the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ),
794
+ 'please_wait_stopping_the_export' => __( 'Please wait, stopping the import...', AI1WM_PLUGIN_NAME ),
795
+ 'close_import' => __( 'Close', AI1WM_PLUGIN_NAME ),
796
+ 'stop_import' => __( 'Stop import', AI1WM_PLUGIN_NAME ),
797
+ 'confirm_import' => __( 'Proceed', AI1WM_PLUGIN_NAME ),
798
+ 'continue_import' => __( 'Continue', AI1WM_PLUGIN_NAME ),
799
+ 'please_do_not_close_this_browser' => __( 'Please do not close this browser window or your import will fail', AI1WM_PLUGIN_NAME ),
800
+ 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ),
801
+ 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ),
802
+ 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ),
803
+ 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ),
804
+ 'want_to_delete_this_file' => __( 'Are you sure you want to delete this file?', AI1WM_PLUGIN_NAME ),
805
+ ) );
806
  }
807
 
808
  /**
839
  'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_updater' ) ),
840
  ),
841
  ) );
842
+
843
+ wp_localize_script( 'ai1wm_backups', 'ai1wm_locale', array(
844
+ 'check_for_updates' => __( 'Check for updates', AI1WM_PLUGIN_NAME ),
845
+ 'invalid_purchase_id' => __( 'Your purchase ID is invalid, please <a href="mailto:support@servmask.com">contact us</a>', AI1WM_PLUGIN_NAME ),
846
+ ) );
847
  }
848
 
849
  /**
899
  add_action( 'wp_ajax_nopriv_ai1wm_export', 'Ai1wm_Export_Controller::export' );
900
  add_action( 'wp_ajax_nopriv_ai1wm_import', 'Ai1wm_Import_Controller::import' );
901
  add_action( 'wp_ajax_nopriv_ai1wm_status', 'Ai1wm_Status_Controller::status' );
 
902
  add_action( 'wp_ajax_nopriv_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' );
903
  add_action( 'wp_ajax_nopriv_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' );
904
  add_action( 'wp_ajax_nopriv_ai1wm_report', 'Ai1wm_Report_Controller::report' );
907
  add_action( 'wp_ajax_ai1wm_export', 'Ai1wm_Export_Controller::export' );
908
  add_action( 'wp_ajax_ai1wm_import', 'Ai1wm_Import_Controller::import' );
909
  add_action( 'wp_ajax_ai1wm_status', 'Ai1wm_Status_Controller::status' );
 
910
  add_action( 'wp_ajax_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' );
911
  add_action( 'wp_ajax_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' );
912
  add_action( 'wp_ajax_ai1wm_report', 'Ai1wm_Report_Controller::report' );
lib/controller/class-ai1wm-resolve-controller.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Resolve_Controller {
27
-
28
- public static function resolve( $params = array() ) {
29
-
30
- // Set params
31
- if ( empty( $params ) ) {
32
- $params = stripslashes_deep( $_GET );
33
- }
34
-
35
- // Set secret key
36
- $secret_key = null;
37
- if ( isset( $params['secret_key'] ) ) {
38
- $secret_key = trim( $params['secret_key'] );
39
- }
40
-
41
- try {
42
- // Ensure that unauthorized people cannot access resolve action
43
- ai1wm_verify_secret_key( $secret_key );
44
- } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
45
- exit;
46
- }
47
-
48
- // Set IP address
49
- if ( isset( $params['url_ip'] ) && ( $ip = $params['url_ip'] ) ) {
50
- update_option( AI1WM_URL_IP, $ip );
51
- }
52
-
53
- // Set adapter
54
- if ( isset( $params['url_adapter'] ) && ( $adapter = $params['url_adapter'] ) ) {
55
- if ( $adapter === 'curl' ) {
56
- update_option( AI1WM_URL_ADAPTER, 'curl' );
57
- } else {
58
- update_option( AI1WM_URL_ADAPTER, 'stream' );
59
- }
60
- }
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/class-ai1wm-backups.php CHANGED
@@ -36,13 +36,13 @@ class Ai1wm_Backups {
36
  // Iterate over directory
37
  $iterator = new Ai1wm_Recursive_Directory_Iterator( AI1WM_BACKUPS_PATH );
38
 
 
 
 
39
  // Recursively iterate over directory
40
- $iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
41
- $iterator->setMaxDepth( 3 );
42
 
43
  // Get backup files
44
- $iterator = new Ai1wm_Extension_Filter( $iterator, array( 'wpress', 'bin' ) );
45
-
46
  foreach ( $iterator as $item ) {
47
  try {
48
  if ( ai1wm_is_filesize_supported( $item->getPathname() ) ) {
36
  // Iterate over directory
37
  $iterator = new Ai1wm_Recursive_Directory_Iterator( AI1WM_BACKUPS_PATH );
38
 
39
+ // Filter by extensions
40
+ $iterator = new Ai1wm_Recursive_Extension_Filter( $iterator, array( 'wpress' ) );
41
+
42
  // Recursively iterate over directory
43
+ $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
 
44
 
45
  // Get backup files
 
 
46
  foreach ( $iterator as $item ) {
47
  try {
48
  if ( ai1wm_is_filesize_supported( $item->getPathname() ) ) {
lib/model/class-ai1wm-extensions.php CHANGED
@@ -40,7 +40,7 @@ class Ai1wm_Extensions {
40
  'about' => AI1WMZE_PLUGIN_ABOUT,
41
  'basename' => AI1WMZE_PLUGIN_BASENAME,
42
  'version' => AI1WMZE_VERSION,
43
- 'requires' => '1.0',
44
  'short' => AI1WMZE_PLUGIN_SHORT,
45
  );
46
  }
@@ -52,7 +52,7 @@ class Ai1wm_Extensions {
52
  'about' => AI1WMAE_PLUGIN_ABOUT,
53
  'basename' => AI1WMAE_PLUGIN_BASENAME,
54
  'version' => AI1WMAE_VERSION,
55
- 'requires' => '1.0',
56
  'short' => AI1WMAE_PLUGIN_SHORT,
57
  );
58
  }
@@ -64,7 +64,7 @@ class Ai1wm_Extensions {
64
  'about' => AI1WMBE_PLUGIN_ABOUT,
65
  'basename' => AI1WMBE_PLUGIN_BASENAME,
66
  'version' => AI1WMBE_VERSION,
67
- 'requires' => '1.10',
68
  'short' => AI1WMBE_PLUGIN_SHORT,
69
  );
70
  }
@@ -76,7 +76,7 @@ class Ai1wm_Extensions {
76
  'about' => AI1WMIE_PLUGIN_ABOUT,
77
  'basename' => AI1WMIE_PLUGIN_BASENAME,
78
  'version' => AI1WMIE_VERSION,
79
- 'requires' => '1.1',
80
  'short' => AI1WMIE_PLUGIN_SHORT,
81
  );
82
  }
@@ -88,7 +88,7 @@ class Ai1wm_Extensions {
88
  'about' => AI1WMDE_PLUGIN_ABOUT,
89
  'basename' => AI1WMDE_PLUGIN_BASENAME,
90
  'version' => AI1WMDE_VERSION,
91
- 'requires' => '3.29',
92
  'short' => AI1WMDE_PLUGIN_SHORT,
93
  );
94
  }
@@ -100,7 +100,7 @@ class Ai1wm_Extensions {
100
  'about' => AI1WMFE_PLUGIN_ABOUT,
101
  'basename' => AI1WMFE_PLUGIN_BASENAME,
102
  'version' => AI1WMFE_VERSION,
103
- 'requires' => '2.34',
104
  'short' => AI1WMFE_PLUGIN_SHORT,
105
  );
106
  }
@@ -124,7 +124,7 @@ class Ai1wm_Extensions {
124
  'about' => AI1WMGE_PLUGIN_ABOUT,
125
  'basename' => AI1WMGE_PLUGIN_BASENAME,
126
  'version' => AI1WMGE_VERSION,
127
- 'requires' => '2.31',
128
  'short' => AI1WMGE_PLUGIN_SHORT,
129
  );
130
  }
@@ -136,7 +136,7 @@ class Ai1wm_Extensions {
136
  'about' => AI1WMEE_PLUGIN_ABOUT,
137
  'basename' => AI1WMEE_PLUGIN_BASENAME,
138
  'version' => AI1WMEE_VERSION,
139
- 'requires' => '1.7',
140
  'short' => AI1WMEE_PLUGIN_SHORT,
141
  );
142
  }
@@ -148,7 +148,7 @@ class Ai1wm_Extensions {
148
  'about' => AI1WMME_PLUGIN_ABOUT,
149
  'basename' => AI1WMME_PLUGIN_BASENAME,
150
  'version' => AI1WMME_VERSION,
151
- 'requires' => '3.52',
152
  'short' => AI1WMME_PLUGIN_SHORT,
153
  );
154
  }
@@ -160,7 +160,7 @@ class Ai1wm_Extensions {
160
  'about' => AI1WMOE_PLUGIN_ABOUT,
161
  'basename' => AI1WMOE_PLUGIN_BASENAME,
162
  'version' => AI1WMOE_VERSION,
163
- 'requires' => '1.20',
164
  'short' => AI1WMOE_PLUGIN_SHORT,
165
  );
166
  }
@@ -172,7 +172,7 @@ class Ai1wm_Extensions {
172
  'about' => AI1WMSE_PLUGIN_ABOUT,
173
  'basename' => AI1WMSE_PLUGIN_BASENAME,
174
  'version' => AI1WMSE_VERSION,
175
- 'requires' => '3.23',
176
  'short' => AI1WMSE_PLUGIN_SHORT,
177
  );
178
  }
@@ -184,7 +184,7 @@ class Ai1wm_Extensions {
184
  'about' => AI1WMUE_PLUGIN_ABOUT,
185
  'basename' => AI1WMUE_PLUGIN_BASENAME,
186
  'version' => AI1WMUE_VERSION,
187
- 'requires' => '2.16',
188
  'short' => AI1WMUE_PLUGIN_SHORT,
189
  );
190
  }
@@ -196,7 +196,7 @@ class Ai1wm_Extensions {
196
  'about' => AI1WMLE_PLUGIN_ABOUT,
197
  'basename' => AI1WMLE_PLUGIN_BASENAME,
198
  'version' => AI1WMLE_VERSION,
199
- 'requires' => '2.23',
200
  'short' => AI1WMLE_PLUGIN_SHORT,
201
  );
202
  }
40
  'about' => AI1WMZE_PLUGIN_ABOUT,
41
  'basename' => AI1WMZE_PLUGIN_BASENAME,
42
  'version' => AI1WMZE_VERSION,
43
+ 'requires' => '1.1',
44
  'short' => AI1WMZE_PLUGIN_SHORT,
45
  );
46
  }
52
  'about' => AI1WMAE_PLUGIN_ABOUT,
53
  'basename' => AI1WMAE_PLUGIN_BASENAME,
54
  'version' => AI1WMAE_VERSION,
55
+ 'requires' => '1.3',
56
  'short' => AI1WMAE_PLUGIN_SHORT,
57
  );
58
  }
64
  'about' => AI1WMBE_PLUGIN_ABOUT,
65
  'basename' => AI1WMBE_PLUGIN_BASENAME,
66
  'version' => AI1WMBE_VERSION,
67
+ 'requires' => '1.13',
68
  'short' => AI1WMBE_PLUGIN_SHORT,
69
  );
70
  }
76
  'about' => AI1WMIE_PLUGIN_ABOUT,
77
  'basename' => AI1WMIE_PLUGIN_BASENAME,
78
  'version' => AI1WMIE_VERSION,
79
+ 'requires' => '1.6',
80
  'short' => AI1WMIE_PLUGIN_SHORT,
81
  );
82
  }
88
  'about' => AI1WMDE_PLUGIN_ABOUT,
89
  'basename' => AI1WMDE_PLUGIN_BASENAME,
90
  'version' => AI1WMDE_VERSION,
91
+ 'requires' => '3.32',
92
  'short' => AI1WMDE_PLUGIN_SHORT,
93
  );
94
  }
100
  'about' => AI1WMFE_PLUGIN_ABOUT,
101
  'basename' => AI1WMFE_PLUGIN_BASENAME,
102
  'version' => AI1WMFE_VERSION,
103
+ 'requires' => '2.37',
104
  'short' => AI1WMFE_PLUGIN_SHORT,
105
  );
106
  }
124
  'about' => AI1WMGE_PLUGIN_ABOUT,
125
  'basename' => AI1WMGE_PLUGIN_BASENAME,
126
  'version' => AI1WMGE_VERSION,
127
+ 'requires' => '2.36',
128
  'short' => AI1WMGE_PLUGIN_SHORT,
129
  );
130
  }
136
  'about' => AI1WMEE_PLUGIN_ABOUT,
137
  'basename' => AI1WMEE_PLUGIN_BASENAME,
138
  'version' => AI1WMEE_VERSION,
139
+ 'requires' => '1.10',
140
  'short' => AI1WMEE_PLUGIN_SHORT,
141
  );
142
  }
148
  'about' => AI1WMME_PLUGIN_ABOUT,
149
  'basename' => AI1WMME_PLUGIN_BASENAME,
150
  'version' => AI1WMME_VERSION,
151
+ 'requires' => '3.56',
152
  'short' => AI1WMME_PLUGIN_SHORT,
153
  );
154
  }
160
  'about' => AI1WMOE_PLUGIN_ABOUT,
161
  'basename' => AI1WMOE_PLUGIN_BASENAME,
162
  'version' => AI1WMOE_VERSION,
163
+ 'requires' => '1.23',
164
  'short' => AI1WMOE_PLUGIN_SHORT,
165
  );
166
  }
172
  'about' => AI1WMSE_PLUGIN_ABOUT,
173
  'basename' => AI1WMSE_PLUGIN_BASENAME,
174
  'version' => AI1WMSE_VERSION,
175
+ 'requires' => '3.27',
176
  'short' => AI1WMSE_PLUGIN_SHORT,
177
  );
178
  }
184
  'about' => AI1WMUE_PLUGIN_ABOUT,
185
  'basename' => AI1WMUE_PLUGIN_BASENAME,
186
  'version' => AI1WMUE_VERSION,
187
+ 'requires' => '2.18',
188
  'short' => AI1WMUE_PLUGIN_SHORT,
189
  );
190
  }
196
  'about' => AI1WMLE_PLUGIN_ABOUT,
197
  'basename' => AI1WMLE_PLUGIN_BASENAME,
198
  'version' => AI1WMLE_VERSION,
199
+ 'requires' => '2.27',
200
  'short' => AI1WMLE_PLUGIN_SHORT,
201
  );
202
  }
lib/model/class-ai1wm-http.php DELETED
@@ -1,154 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Http {
27
-
28
- public static function get( $url, $params = array(), Ai1wm_Http_Abstract $http = null ) {
29
-
30
- // Get IP address
31
- $ip = get_option( AI1WM_URL_IP );
32
-
33
- // Get adapter
34
- $adapter = get_option( AI1WM_URL_ADAPTER );
35
-
36
- // Get host
37
- $host = parse_url( $url, PHP_URL_HOST );
38
-
39
- // Get port
40
- $port = parse_url( $url, PHP_URL_PORT );
41
-
42
- // Set HTTP client
43
- if ( empty( $http ) ) {
44
- $http = Ai1wm_Http_Factory::create( $adapter );
45
- }
46
-
47
- // Set HTTP host
48
- if ( empty( $port ) ) {
49
- $http->set_header( 'Host', $host );
50
- } else {
51
- $http->set_header( 'Host', "{$host}:{$port}" );
52
- }
53
-
54
- // Set HTTP authorization
55
- if ( ( $user = get_option( AI1WM_AUTH_USER ) ) && ( $password = get_option( AI1WM_AUTH_PASSWORD ) ) ) {
56
- if ( ( $hash = base64_encode( "{$user}:{$password}" ) ) ) {
57
- $http->set_header( 'Authorization', "Basic {$hash}" );
58
- }
59
- }
60
-
61
- $blocking = false;
62
-
63
- // Run non-blocking HTTP request
64
- $http->get( add_query_arg( ai1wm_urlencode( $params ), str_replace( "//{$host}", "//{$ip}", $url ) ), $blocking );
65
- }
66
-
67
- public static function resolve( $url, $params = array(), Ai1wm_Http_Abstract $http = null ) {
68
-
69
- // Reset IP address and adapter
70
- delete_option( AI1WM_URL_IP );
71
- delete_option( AI1WM_URL_ADAPTER );
72
-
73
- // Set secret
74
- $secret_key = get_option( AI1WM_SECRET_KEY );
75
-
76
- // Set host
77
- $host = parse_url( $url, PHP_URL_HOST );
78
-
79
- // Get port
80
- $port = parse_url( $url, PHP_URL_PORT );
81
-
82
- // Set server IP address
83
- if ( ! empty( $_SERVER['SERVER_ADDR'] ) ) {
84
- $server = $_SERVER['SERVER_ADDR'];
85
- } elseif ( ! empty( $_SERVER['LOCAL_ADDR'] ) ) {
86
- $server = $_SERVER['LOCAL_ADDR'];
87
- } else {
88
- $server = '127.0.0.1';
89
- }
90
-
91
- // Set local IP address
92
- $local = gethostbyname( $host );
93
-
94
- // HTTP resolve
95
- foreach ( array( 'stream', 'curl' ) as $adapter ) {
96
- foreach ( array( $server, $local, $host ) as $ip ) {
97
-
98
- // Add IPv6 support
99
- if ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
100
- $ip = "[$ip]";
101
- }
102
-
103
- // Set HTTP params
104
- $params = array_merge( $params, array(
105
- 'secret_key' => $secret_key,
106
- 'url_ip' => $ip,
107
- 'url_adapter' => $adapter,
108
- ) );
109
-
110
- // Set HTTP client
111
- if ( empty( $http ) ) {
112
- $http = Ai1wm_Http_Factory::create( $adapter );
113
- }
114
-
115
- // Set HTTP host
116
- if ( empty( $port ) ) {
117
- $http->set_header( 'Host', $host );
118
- } else {
119
- $http->set_header( 'Host', "{$host}:{$port}" );
120
- }
121
-
122
- // Set HTTP authorization
123
- if ( ( $user = get_option( AI1WM_AUTH_USER ) ) && ( $password = get_option( AI1WM_AUTH_PASSWORD ) ) ) {
124
- if ( ( $hash = base64_encode( "{$user}:{$password}" ) ) ) {
125
- $http->set_header( 'Authorization', "Basic {$hash}" );
126
- }
127
- }
128
-
129
- $blocking = true;
130
-
131
- // Run blocking HTTP request
132
- $http->get( add_query_arg( ai1wm_urlencode( $params ), str_replace( "//{$host}", "//{$ip}", $url ) ), $blocking );
133
-
134
- // Flush WP cache
135
- ai1wm_cache_flush();
136
-
137
- // Is valid adapter?
138
- if ( get_option( AI1WM_URL_IP ) && get_option( AI1WM_URL_ADAPTER ) ) {
139
- return;
140
- }
141
-
142
- // Reset HTTP client
143
- $http = null;
144
- }
145
- }
146
-
147
- // No connection
148
- throw new Ai1wm_Http_Exception( __(
149
- 'There was a problem while reaching your server.<br />' .
150
- 'Contact <a href="mailto:support@servmask.com">support@servmask.com</a> for assistance.',
151
- AI1WM_PLUGIN_NAME
152
- ) );
153
- }
154
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/export/class-ai1wm-export-database.php CHANGED
@@ -67,24 +67,24 @@ class Ai1wm_Export_Database {
67
  $mysql = new Ai1wm_Database_Mysqli( $wpdb );
68
  }
69
 
70
- // Spam comments
71
  if ( isset( $params['options']['no_spam_comments'] ) ) {
72
  $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'comments', array( "`comment_approved` != 'spam'" ) )
73
  ->set_table_where_clauses( ai1wm_table_prefix() . 'commentmeta', array( sprintf( "`comment_ID` IN ( SELECT `comment_ID` FROM `%s` WHERE `comment_approved` != 'spam' )", ai1wm_table_prefix() . 'comments' ) ) );
74
  }
75
 
76
- // Post revisions
77
  if ( isset( $params['options']['no_revisions'] ) ) {
78
  $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'posts', array( "`post_type` != 'revision'" ) );
79
  }
80
 
81
- $old_table_prefixes = array();
82
- $new_table_prefixes = array();
83
 
84
  // Set table prefixes
85
  if ( ai1wm_table_prefix() ) {
86
- $old_table_prefixes[] = ai1wm_table_prefix();
87
- $new_table_prefixes[] = ai1wm_servmask_prefix();
88
  } else {
89
  // Set table prefixes based on table name
90
  foreach ( $mysql->get_tables() as $table_name ) {
@@ -92,10 +92,16 @@ class Ai1wm_Export_Database {
92
  $new_table_prefixes[] = ai1wm_servmask_prefix() . $table_name;
93
  }
94
 
95
- // Set table prefixes based on user meta
96
- foreach ( array( 'capabilities', 'user_level', 'user_roles', 'dashboard_quick_press_last_post_id', 'user-settings', 'user-settings-time' ) as $user_meta ) {
97
- $old_table_prefixes[] = $user_meta;
98
- $new_table_prefixes[] = ai1wm_servmask_prefix() . $user_meta;
 
 
 
 
 
 
99
  }
100
  }
101
 
@@ -114,11 +120,13 @@ class Ai1wm_Export_Database {
114
  // Set database options
115
  $mysql->set_old_table_prefixes( $old_table_prefixes )
116
  ->set_new_table_prefixes( $new_table_prefixes )
 
 
117
  ->set_include_table_prefixes( $include_table_prefixes )
118
  ->set_exclude_table_prefixes( $exclude_table_prefixes );
119
 
120
- // Exclude table options
121
- $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'options', array( sprintf( "`option_name` NOT IN ('%s', '%s', '%s', '%s')", AI1WM_ACTIVE_PLUGINS, AI1WM_ACTIVE_TEMPLATE, AI1WM_ACTIVE_STYLESHEET, AI1WM_STATUS ) ) );
122
 
123
  // Replace table prefix on columns
124
  $mysql->set_table_prefix_columns( ai1wm_table_prefix() . 'options', array( 'option_name' ) )
67
  $mysql = new Ai1wm_Database_Mysqli( $wpdb );
68
  }
69
 
70
+ // Exclude spam comments
71
  if ( isset( $params['options']['no_spam_comments'] ) ) {
72
  $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'comments', array( "`comment_approved` != 'spam'" ) )
73
  ->set_table_where_clauses( ai1wm_table_prefix() . 'commentmeta', array( sprintf( "`comment_ID` IN ( SELECT `comment_ID` FROM `%s` WHERE `comment_approved` != 'spam' )", ai1wm_table_prefix() . 'comments' ) ) );
74
  }
75
 
76
+ // Exclude post revisions
77
  if ( isset( $params['options']['no_revisions'] ) ) {
78
  $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'posts', array( "`post_type` != 'revision'" ) );
79
  }
80
 
81
+ $old_table_prefixes = $old_column_prefixes = array();
82
+ $new_table_prefixes = $new_column_prefixes = array();
83
 
84
  // Set table prefixes
85
  if ( ai1wm_table_prefix() ) {
86
+ $old_table_prefixes[] = $old_column_prefixes[] = ai1wm_table_prefix();
87
+ $new_table_prefixes[] = $new_column_prefixes[] = ai1wm_servmask_prefix();
88
  } else {
89
  // Set table prefixes based on table name
90
  foreach ( $mysql->get_tables() as $table_name ) {
92
  $new_table_prefixes[] = ai1wm_servmask_prefix() . $table_name;
93
  }
94
 
95
+ // Set table prefixes based on column name
96
+ foreach ( array( 'user_roles' ) as $option_name ) {
97
+ $old_column_prefixes[] = $option_name;
98
+ $new_column_prefixes[] = ai1wm_servmask_prefix() . $option_name;
99
+ }
100
+
101
+ // Set table prefixes based on column name
102
+ foreach ( array( 'capabilities', 'user_level', 'dashboard_quick_press_last_post_id', 'user-settings', 'user-settings-time' ) as $meta_key ) {
103
+ $old_column_prefixes[] = $meta_key;
104
+ $new_column_prefixes[] = ai1wm_servmask_prefix() . $meta_key;
105
  }
106
  }
107
 
120
  // Set database options
121
  $mysql->set_old_table_prefixes( $old_table_prefixes )
122
  ->set_new_table_prefixes( $new_table_prefixes )
123
+ ->set_old_column_prefixes( $old_column_prefixes )
124
+ ->set_new_column_prefixes( $new_column_prefixes )
125
  ->set_include_table_prefixes( $include_table_prefixes )
126
  ->set_exclude_table_prefixes( $exclude_table_prefixes );
127
 
128
+ // Exclude site options
129
+ $mysql->set_table_where_clauses( ai1wm_table_prefix() . 'options', array( sprintf( "`option_name` NOT IN ('%s', '%s', '%s', '%s', '%s', '%s', '%s')", AI1WM_ACTIVE_PLUGINS, AI1WM_ACTIVE_TEMPLATE, AI1WM_ACTIVE_STYLESHEET, AI1WM_STATUS, AI1WM_SECRET_KEY, AI1WM_AUTH_USER, AI1WM_AUTH_PASSWORD ) ) );
130
 
131
  // Replace table prefix on columns
132
  $mysql->set_table_prefix_columns( ai1wm_table_prefix() . 'options', array( 'option_name' ) )
lib/model/export/class-ai1wm-export-enumerate.php CHANGED
@@ -105,35 +105,28 @@ class Ai1wm_Export_Enumerate {
105
  // Create map file
106
  $filemap = ai1wm_open( ai1wm_filemap_path( $params ), 'w' );
107
 
108
- try {
 
109
 
110
- // Iterate over content directory
111
- $iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
112
 
113
- // Exclude new line file names
114
- $iterator = new Ai1wm_Recursive_Newline_Filter( $iterator );
115
 
116
- // Exclude uploads, plugins or themes
117
- $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_content_from_export', $exclude_filters ) );
118
 
119
- // Recursively iterate over content directory
120
- $iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
 
 
 
121
 
122
- // Write path line
123
- foreach ( $iterator as $item ) {
124
- if ( $item->isFile() ) {
125
- if ( ai1wm_write( $filemap, $iterator->getSubPathName() . PHP_EOL ) ) {
126
- $total_files_count++;
127
-
128
- // Add current file size
129
- $total_files_size += $iterator->getSize();
130
- }
131
  }
132
  }
133
- } catch ( Ai1wm_Quota_Exceeded_Exception $e ) {
134
- throw new Exception( 'Out of disk space.' );
135
- } catch ( Exception $e ) {
136
- // Skip bad file permissions
137
  }
138
 
139
  // Set progress
105
  // Create map file
106
  $filemap = ai1wm_open( ai1wm_filemap_path( $params ), 'w' );
107
 
108
+ // Iterate over content directory
109
+ $iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
110
 
111
+ // Exclude new line file names
112
+ $iterator = new Ai1wm_Recursive_Newline_Filter( $iterator );
113
 
114
+ // Exclude uploads, plugins or themes
115
+ $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_content_from_export', $exclude_filters ) );
116
 
117
+ // Recursively iterate over content directory
118
+ $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
119
 
120
+ // Write path line
121
+ foreach ( $iterator as $item ) {
122
+ if ( $item->isFile() ) {
123
+ if ( ai1wm_write( $filemap, $iterator->getSubPathName() . PHP_EOL ) ) {
124
+ $total_files_count++;
125
 
126
+ // Add current file size
127
+ $total_files_size += $iterator->getSize();
 
 
 
 
 
 
 
128
  }
129
  }
 
 
 
 
130
  }
131
 
132
  // Set progress
lib/model/export/class-ai1wm-export-resolve.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Export_Resolve {
27
-
28
- public static function execute( $params ) {
29
-
30
- // Set progress
31
- Ai1wm_Status::info( __( 'Resolving URL address...', AI1WM_PLUGIN_NAME ) );
32
-
33
- // HTTP resolve
34
- Ai1wm_Http::resolve( admin_url( 'admin-ajax.php?action=ai1wm_resolve' ) );
35
-
36
- // Set progress
37
- Ai1wm_Status::info( __( 'Done resolving URL address.', AI1WM_PLUGIN_NAME ) );
38
-
39
- return $params;
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/http/class-ai1wm-http-abstract.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- abstract class Ai1wm_Http_Abstract {
27
-
28
- protected $headers = array(
29
- 'Accept' => '*/*',
30
- 'Accept-Encoding' => '*',
31
- 'Accept-Charset' => '*',
32
- 'Accept-Language' => '*',
33
- 'User-Agent' => 'Mozilla/5.0',
34
- );
35
-
36
- public function __construct() {
37
- // Set user agent
38
- if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
39
- $this->headers['User-Agent'] = $_SERVER['HTTP_USER_AGENT'];
40
- }
41
- }
42
-
43
- public function set_header( $key, $value ) {
44
- $this->headers[ $key ] = $value;
45
-
46
- return $this;
47
- }
48
-
49
- public function get_header( $key ) {
50
- return $this->headers[ $key ];
51
- }
52
-
53
- abstract public function get( $url, $blocking = false );
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/http/class-ai1wm-http-curl.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Http_Curl extends Ai1wm_Http_Abstract {
27
-
28
- public function get( $url, $blocking = false ) {
29
-
30
- $headers = array();
31
-
32
- // Set headers
33
- foreach ( $this->headers as $key => $value ) {
34
- $headers[] = "{$key}: {$value}";
35
- }
36
-
37
- // Set scheme
38
- $scheme = parse_url( $url, PHP_URL_SCHEME );
39
-
40
- // Set host
41
- $host = parse_url( $url, PHP_URL_HOST );
42
-
43
- // Set port
44
- $port = parse_url( $url, PHP_URL_PORT );
45
-
46
- // Set cURL client
47
- $handle = curl_init();
48
-
49
- // Set cURL options
50
- curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 5 );
51
- curl_setopt( $handle, CURLOPT_TIMEOUT, 5 );
52
- curl_setopt( $handle, CURLOPT_URL, $url );
53
- curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
54
- curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
55
- curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
56
- curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );
57
- curl_setopt( $handle, CURLOPT_HEADER, false );
58
- curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
59
-
60
- // Send data to server
61
- if ( ! curl_exec( $handle ) ) {
62
- if ( $scheme === 'https' ) {
63
- if ( empty( $port ) ) {
64
- curl_setopt( $handle, CURLOPT_URL, str_replace( "https://{$host}", "http://{$host}:443", $url ) );
65
- } else {
66
- curl_setopt( $handle, CURLOPT_URL, str_replace( "https://{$host}:{$port}", "http://{$host}:{$port}", $url ) );
67
- }
68
-
69
- // Re-send data to server
70
- curl_exec( $handle );
71
- }
72
- }
73
-
74
- // Close cURL handle
75
- curl_close( $handle );
76
- }
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/http/class-ai1wm-http-stream.php DELETED
@@ -1,110 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2018 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Http_Stream extends Ai1wm_Http_Abstract {
27
-
28
- public function get( $url, $blocking = false ) {
29
-
30
- $headers = array();
31
-
32
- // Set headers
33
- foreach ( $this->headers as $key => $value ) {
34
- $headers[] = "{$key}: {$value}";
35
- }
36
-
37
- // Set scheme
38
- $scheme = parse_url( $url, PHP_URL_SCHEME );
39
-
40
- // Set host
41
- $host = parse_url( $url, PHP_URL_HOST );
42
-
43
- // Set port
44
- $port = parse_url( $url, PHP_URL_PORT );
45
-
46
- // Set path
47
- $path = parse_url( $url, PHP_URL_PATH );
48
-
49
- // Set query
50
- $query = parse_url( $url, PHP_URL_QUERY );
51
-
52
- // Set port
53
- if ( empty( $port ) ) {
54
- if ( $scheme === 'https' ) {
55
- $port = 443;
56
- } else {
57
- $port = 80;
58
- }
59
- }
60
-
61
- // Set stream context
62
- $context = stream_context_create( array(
63
- 'ssl' => array(
64
- 'verify_peer' => false,
65
- 'verify_peer_name' => false,
66
- 'capture_peer_cert' => false,
67
- 'allow_self_signed' => true,
68
- ),
69
- ) );
70
-
71
- // Set stream client
72
- if ( $scheme === 'https' ) {
73
- if ( ! ( $handle = stream_socket_client( "ssl://{$host}:{$port}", $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context ) ) ) {
74
- $handle = stream_socket_client( "tcp://{$host}:{$port}", $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context );
75
- }
76
- } else {
77
- $handle = stream_socket_client( "tcp://{$host}:{$port}", $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context );
78
- }
79
-
80
- // Ensure the stream is ready to write to
81
- $no_streams = array();
82
- $write_streams = array( $handle );
83
- stream_select( $no_streams, $write_streams, $no_streams, 0, 200000 );
84
-
85
- // Prepare headers
86
- $headers = implode( "\r\n", $headers );
87
-
88
- // Prepare request
89
- $request = "GET {$path}?{$query} HTTP/1.0\r\n{$headers}\r\n\r\n";
90
-
91
- // Send data to server
92
- if ( ( $length = fwrite( $handle, $request ) ) !== strlen( $request ) ) {
93
- trigger_error( sprintf( 'fwrite wrote only %d instead of %d', $length, strlen( $request ) ) );
94
- }
95
-
96
- // Set blocking/non-blocking mode on a stream
97
- if ( $blocking ) {
98
- fread( $handle, 1024 );
99
- } else {
100
- stream_set_blocking( $handle, 0 );
101
- // What we observed is that when the stream is non-blocking, it takes time for the webserver to start a new php thread.
102
- // By sleeping for 3s, we give some time for the webserver to start a new php process to process the request.
103
- // This is a temporary solution and a new one will be addressed in WM-651
104
- sleep( 3 );
105
- }
106
-
107
- // Close stream handle
108
- fclose( $handle );
109
- }
110
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/model/import/class-ai1wm-import-database.php CHANGED
@@ -73,11 +73,8 @@ class Ai1wm_Import_Database {
73
  // Set progress
74
  Ai1wm_Status::info( sprintf( __( 'Restoring database...<br />%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
75
 
76
- $old_values = array();
77
- $new_values = array();
78
-
79
- $old_raw_values = array();
80
- $new_raw_values = array();
81
 
82
  // Get Blog URLs
83
  foreach ( $blogs as $blog ) {
@@ -91,104 +88,106 @@ class Ai1wm_Import_Database {
91
 
92
  // Add Internal Home URL
93
  if ( ! empty( $blog['Old']['InternalHomeURL'] ) ) {
94
- $home_urls[] = $blog['Old']['InternalHomeURL'];
 
 
95
  }
96
 
97
  // Get Home URL
98
  foreach ( $home_urls as $home_url ) {
99
 
100
  // Get blogs dir Upload Path
101
- if ( ! in_array( sprintf( "'%s'", trim( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) ), $old_raw_values ) ) {
102
- $old_raw_values[] = sprintf( "'%s'", trim( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) );
103
- $new_raw_values[] = sprintf( "'%s'", get_option( 'upload_path' ) );
104
  }
105
 
106
  // Get sites dir Upload Path
107
- if ( ! in_array( sprintf( "'%s'", trim( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) ), $old_raw_values ) ) {
108
- $old_raw_values[] = sprintf( "'%s'", trim( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) );
109
- $new_raw_values[] = sprintf( "'%s'", get_option( 'upload_path' ) );
110
  }
111
 
112
  // Handle old and new sites dir style
113
  if ( defined( 'UPLOADBLOGSDIR' ) ) {
114
 
115
  // Get plain Upload Path
116
- if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
117
- $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
118
- $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
119
  }
120
 
121
  // Get URL encoded Upload Path
122
- if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
123
- $old_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
124
- $new_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
125
  }
126
 
127
  // Get JSON escaped Upload Path
128
- if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
129
- $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
130
- $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
131
  }
132
 
133
  // Get plain Upload Path
134
- if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
135
- $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
136
- $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
137
  }
138
 
139
  // Get URL encoded Upload Path
140
- if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
141
- $old_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
142
- $new_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
143
  }
144
 
145
  // Get JSON escaped Upload Path
146
- if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
147
- $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
148
- $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
149
  }
150
  } else {
151
 
152
  // Get files dir Upload URL
153
- if ( ! in_array( sprintf( '%s/%s/', untrailingslashit( $home_url ), 'files' ), $old_values ) ) {
154
- $old_values[] = sprintf( '%s/%s/', untrailingslashit( $home_url ), 'files' );
155
- $new_values[] = ai1wm_uploads_url( $blog['New']['BlogID'] );
156
  }
157
 
158
  // Get plain Upload Path
159
- if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
160
- $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
161
- $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
162
  }
163
 
164
  // Get URL encoded Upload Path
165
- if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
166
- $old_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
167
- $new_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
168
  }
169
 
170
  // Get JSON escaped Upload Path
171
- if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
172
- $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
173
- $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
174
  }
175
 
176
  // Get plain Upload Path
177
- if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
178
- $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
179
- $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
180
  }
181
 
182
  // Get URL encoded Upload Path
183
- if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
184
- $old_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
185
- $new_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
186
  }
187
 
188
  // Get JSON escaped Upload Path
189
- if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
190
- $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
191
- $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
192
  }
193
  }
194
  }
@@ -202,7 +201,9 @@ class Ai1wm_Import_Database {
202
 
203
  // Add Internal Site URL
204
  if ( ! empty( $blog['Old']['InternalSiteURL'] ) ) {
205
- $site_urls[] = $blog['Old']['InternalSiteURL'];
 
 
206
  }
207
 
208
  // Get Site URL
@@ -233,21 +234,21 @@ class Ai1wm_Import_Database {
233
  $new_scheme = parse_url( $blog['New']['SiteURL'], PHP_URL_SCHEME );
234
 
235
  // Add domain and path
236
- if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_raw_values ) ) {
237
- $old_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
238
- $new_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
239
  }
240
 
241
  // Add domain and path with single quote
242
- if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
243
- $old_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
244
- $new_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
245
  }
246
 
247
  // Add domain and path with double quote
248
- if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
249
- $old_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
250
- $new_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
251
  }
252
 
253
  // Add Site URL scheme
@@ -258,29 +259,29 @@ class Ai1wm_Import_Database {
258
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
259
 
260
  // Add plain Site URL
261
- if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_values ) ) {
262
- $old_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
263
- $new_values[] = ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] );
264
  }
265
 
266
  // Add URL encoded Site URL
267
- if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_values ) ) {
268
- $old_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
269
- $new_values[] = urlencode( ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ) );
270
  }
271
 
272
  // Add JSON escaped Site URL
273
- if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_values ) ) {
274
- $old_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
275
- $new_values[] = addcslashes( ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ), '/' );
276
  }
277
  }
278
 
279
  // Add email
280
  if ( ! isset( $config['NoEmailReplace'] ) ) {
281
- if ( ! in_array( sprintf( '@%s', $old_domain ), $old_values ) ) {
282
- $old_values[] = sprintf( '@%s', $old_domain );
283
- $new_values[] = sprintf( '@%s', $new_domain );
284
  }
285
  }
286
  }
@@ -296,7 +297,9 @@ class Ai1wm_Import_Database {
296
 
297
  // Add Internal Home URL
298
  if ( ! empty( $blog['Old']['InternalHomeURL'] ) ) {
299
- $home_urls[] = $blog['Old']['InternalHomeURL'];
 
 
300
  }
301
 
302
  // Get Home URL
@@ -327,21 +330,21 @@ class Ai1wm_Import_Database {
327
  $new_scheme = parse_url( $blog['New']['HomeURL'], PHP_URL_SCHEME );
328
 
329
  // Add domain and path
330
- if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_raw_values ) ) {
331
- $old_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
332
- $new_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
333
  }
334
 
335
  // Add domain and path with single quote
336
- if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
337
- $old_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
338
- $new_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
339
  }
340
 
341
  // Add domain and path with double quote
342
- if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
343
- $old_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
344
- $new_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
345
  }
346
 
347
  // Set Home URL scheme
@@ -352,29 +355,29 @@ class Ai1wm_Import_Database {
352
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
353
 
354
  // Add plain Home URL
355
- if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_values ) ) {
356
- $old_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
357
- $new_values[] = ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] );
358
  }
359
 
360
  // Add URL encoded Home URL
361
- if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_values ) ) {
362
- $old_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
363
- $new_values[] = urlencode( ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ) );
364
  }
365
 
366
  // Add JSON escaped Home URL
367
- if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_values ) ) {
368
- $old_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
369
- $new_values[] = addcslashes( ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ), '/' );
370
  }
371
  }
372
 
373
  // Add email
374
  if ( ! isset( $config['NoEmailReplace'] ) ) {
375
- if ( ! in_array( sprintf( '@%s', $old_domain ), $old_values ) ) {
376
- $old_values[] = sprintf( '@%s', $old_domain );
377
- $new_values[] = sprintf( '@%s', $new_domain );
378
  }
379
  }
380
  }
@@ -391,7 +394,9 @@ class Ai1wm_Import_Database {
391
 
392
  // Add Internal Site URL
393
  if ( ! empty( $config['InternalSiteURL'] ) ) {
394
- $site_urls[] = $config['InternalSiteURL'];
 
 
395
  }
396
 
397
  // Get Site URL
@@ -422,21 +427,21 @@ class Ai1wm_Import_Database {
422
  $new_scheme = parse_url( site_url(), PHP_URL_SCHEME );
423
 
424
  // Add domain and path
425
- if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_raw_values ) ) {
426
- $old_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
427
- $new_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
428
  }
429
 
430
  // Add domain and path with single quote
431
- if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
432
- $old_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
433
- $new_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
434
  }
435
 
436
  // Add domain and path with double quote
437
- if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
438
- $old_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
439
- $new_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
440
  }
441
 
442
  // Set Site URL scheme
@@ -447,29 +452,29 @@ class Ai1wm_Import_Database {
447
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
448
 
449
  // Add plain Site URL
450
- if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_values ) ) {
451
- $old_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
452
- $new_values[] = ai1wm_urlscheme( site_url(), $new_schemes[ $i ] );
453
  }
454
 
455
  // Add URL encoded Site URL
456
- if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_values ) ) {
457
- $old_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
458
- $new_values[] = urlencode( ai1wm_urlscheme( site_url(), $new_schemes[ $i ] ) );
459
  }
460
 
461
  // Add JSON escaped Site URL
462
- if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_values ) ) {
463
- $old_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
464
- $new_values[] = addcslashes( ai1wm_urlscheme( site_url(), $new_schemes[ $i ] ), '/' );
465
  }
466
  }
467
 
468
  // Add email
469
  if ( ! isset( $config['NoEmailReplace'] ) ) {
470
- if ( ! in_array( sprintf( '@%s', $old_domain ), $old_values ) ) {
471
- $old_values[] = sprintf( '@%s', $old_domain );
472
- $new_values[] = sprintf( '@%s', $new_domain );
473
  }
474
  }
475
  }
@@ -485,7 +490,9 @@ class Ai1wm_Import_Database {
485
 
486
  // Add Internal Home URL
487
  if ( ! empty( $config['InternalHomeURL'] ) ) {
488
- $home_urls[] = $config['InternalHomeURL'];
 
 
489
  }
490
 
491
  // Get Home URL
@@ -516,21 +523,21 @@ class Ai1wm_Import_Database {
516
  $new_scheme = parse_url( home_url(), PHP_URL_SCHEME );
517
 
518
  // Add domain and path
519
- if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_raw_values ) ) {
520
- $old_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
521
- $new_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
522
  }
523
 
524
  // Add domain and path with single quote
525
- if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
526
- $old_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
527
- $new_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
528
  }
529
 
530
  // Add domain and path with double quote
531
- if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_values ) ) {
532
- $old_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
533
- $new_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
534
  }
535
 
536
  // Add Home URL scheme
@@ -541,29 +548,29 @@ class Ai1wm_Import_Database {
541
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
542
 
543
  // Add plain Home URL
544
- if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_values ) ) {
545
- $old_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
546
- $new_values[] = ai1wm_urlscheme( home_url(), $new_schemes[ $i ] );
547
  }
548
 
549
  // Add URL encoded Home URL
550
- if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_values ) ) {
551
- $old_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
552
- $new_values[] = urlencode( ai1wm_urlscheme( home_url(), $new_schemes[ $i ] ) );
553
  }
554
 
555
  // Add JSON escaped Home URL
556
- if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_values ) ) {
557
- $old_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
558
- $new_values[] = addcslashes( ai1wm_urlscheme( home_url(), $new_schemes[ $i ] ), '/' );
559
  }
560
  }
561
 
562
  // Add email
563
  if ( ! isset( $config['NoEmailReplace'] ) ) {
564
- if ( ! in_array( sprintf( '@%s', $old_domain ), $old_values ) ) {
565
- $old_values[] = sprintf( '@%s', $old_domain );
566
- $new_values[] = sprintf( '@%s', $new_domain );
567
  }
568
  }
569
  }
@@ -577,21 +584,21 @@ class Ai1wm_Import_Database {
577
  if ( $content_dir !== WP_CONTENT_DIR ) {
578
 
579
  // Add plain WordPress Content
580
- if ( ! in_array( $content_dir, $old_values ) ) {
581
- $old_values[] = $content_dir;
582
- $new_values[] = WP_CONTENT_DIR;
583
  }
584
 
585
  // Add URL encoded WordPress Content
586
- if ( ! in_array( urlencode( $content_dir ), $old_values ) ) {
587
- $old_values[] = urlencode( $content_dir );
588
- $new_values[] = urlencode( WP_CONTENT_DIR );
589
  }
590
 
591
  // Add JSON escaped WordPress Content
592
- if ( ! in_array( addcslashes( $content_dir, '/' ), $old_values ) ) {
593
- $old_values[] = addcslashes( $content_dir, '/' );
594
- $new_values[] = addcslashes( WP_CONTENT_DIR, '/' );
595
  }
596
  }
597
  }
@@ -602,31 +609,31 @@ class Ai1wm_Import_Database {
602
  if ( ! empty( $replace['OldValues'][ $i ] ) && ! empty( $replace['NewValues'][ $i ] ) ) {
603
 
604
  // Add plain replace values
605
- if ( ! in_array( $replace['OldValues'][ $i ], $old_values ) ) {
606
- $old_values[] = $replace['OldValues'][ $i ];
607
- $new_values[] = $replace['NewValues'][ $i ];
608
  }
609
 
610
  // Add URL encoded replace values
611
- if ( ! in_array( urlencode( $replace['OldValues'][ $i ] ), $old_values ) ) {
612
- $old_values[] = urlencode( $replace['OldValues'][ $i ] );
613
- $new_values[] = urlencode( $replace['NewValues'][ $i ] );
614
  }
615
 
616
  // Add JSON Escaped replace values
617
- if ( ! in_array( addcslashes( $replace['OldValues'][ $i ], '/' ), $old_values ) ) {
618
- $old_values[] = addcslashes( $replace['OldValues'][ $i ], '/' );
619
- $new_values[] = addcslashes( $replace['NewValues'][ $i ], '/' );
620
  }
621
  }
622
  }
623
  }
624
 
625
- // Get URL IP
626
- $url_ip = get_option( AI1WM_URL_IP );
627
 
628
- // Get URL adapter
629
- $url_adapter = get_option( AI1WM_URL_ADAPTER );
630
 
631
  // Get secret key
632
  $secret_key = get_option( AI1WM_SECRET_KEY );
@@ -637,40 +644,40 @@ class Ai1wm_Import_Database {
637
  // Get HTTP password
638
  $auth_password = get_option( AI1WM_AUTH_PASSWORD );
639
 
640
- $old_prefixes = array();
641
- $new_prefixes = array();
642
 
643
  // Set main table prefixes
644
- $old_prefixes[] = ai1wm_servmask_prefix( 'mainsite' );
645
- $new_prefixes[] = ai1wm_table_prefix();
646
 
647
  // Set site table prefixes
648
  foreach ( $blogs as $blog ) {
649
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === false ) {
650
- $old_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] );
651
- $new_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
652
  }
653
  }
654
 
655
  // Set base table prefixes
656
  foreach ( $blogs as $blog ) {
657
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === true ) {
658
- $old_prefixes[] = ai1wm_servmask_prefix( 'basesite' );
659
- $new_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
660
  }
661
  }
662
 
663
  // Set site table prefixes
664
  foreach ( $blogs as $blog ) {
665
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === true ) {
666
- $old_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] );
667
- $new_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
668
  }
669
  }
670
 
671
  // Set table prefixes
672
- $old_prefixes[] = ai1wm_servmask_prefix();
673
- $new_prefixes[] = ai1wm_table_prefix();
674
 
675
  // Get database client
676
  if ( empty( $wpdb->use_mysqli ) ) {
@@ -680,12 +687,12 @@ class Ai1wm_Import_Database {
680
  }
681
 
682
  // Set database options
683
- $mysql->set_old_table_prefixes( $old_prefixes )
684
- ->set_new_table_prefixes( $new_prefixes )
685
- ->set_old_replace_values( $old_values )
686
- ->set_new_replace_values( $new_values )
687
- ->set_old_replace_raw_values( $old_raw_values )
688
- ->set_new_replace_raw_values( $new_raw_values );
689
 
690
  // Flush database
691
  if ( isset( $config['Plugin']['Version'] ) && ( $version = $config['Plugin']['Version'] ) ) {
@@ -743,11 +750,11 @@ class Ai1wm_Import_Database {
743
  // Activate plugins
744
  ai1wm_activate_plugins( ai1wm_active_servmask_plugins() );
745
 
746
- // Set the new URL IP
747
- update_option( AI1WM_URL_IP, $url_ip );
748
 
749
- // Set the new URL adapter
750
- update_option( AI1WM_URL_ADAPTER, $url_adapter );
751
 
752
  // Set the new secret key value
753
  update_option( AI1WM_SECRET_KEY, $secret_key );
73
  // Set progress
74
  Ai1wm_Status::info( sprintf( __( 'Restoring database...<br />%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
75
 
76
+ $old_replace_values = $old_replace_raw_values = array();
77
+ $new_replace_values = $new_replace_raw_values = array();
 
 
 
78
 
79
  // Get Blog URLs
80
  foreach ( $blogs as $blog ) {
88
 
89
  // Add Internal Home URL
90
  if ( ! empty( $blog['Old']['InternalHomeURL'] ) ) {
91
+ if ( parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_SCHEME ) && parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_HOST ) ) {
92
+ $home_urls[] = $blog['Old']['InternalHomeURL'];
93
+ }
94
  }
95
 
96
  // Get Home URL
97
  foreach ( $home_urls as $home_url ) {
98
 
99
  // Get blogs dir Upload Path
100
+ if ( ! in_array( sprintf( "'%s'", trim( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) ), $old_replace_raw_values ) ) {
101
+ $old_replace_raw_values[] = sprintf( "'%s'", trim( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) );
102
+ $new_replace_raw_values[] = sprintf( "'%s'", get_option( 'upload_path' ) );
103
  }
104
 
105
  // Get sites dir Upload Path
106
+ if ( ! in_array( sprintf( "'%s'", trim( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) ), $old_replace_raw_values ) ) {
107
+ $old_replace_raw_values[] = sprintf( "'%s'", trim( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) );
108
+ $new_replace_raw_values[] = sprintf( "'%s'", get_option( 'upload_path' ) );
109
  }
110
 
111
  // Handle old and new sites dir style
112
  if ( defined( 'UPLOADBLOGSDIR' ) ) {
113
 
114
  // Get plain Upload Path
115
+ if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_replace_values ) ) {
116
+ $old_replace_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
117
+ $new_replace_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
118
  }
119
 
120
  // Get URL encoded Upload Path
121
+ if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) {
122
+ $old_replace_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
123
+ $new_replace_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
124
  }
125
 
126
  // Get JSON escaped Upload Path
127
+ if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) {
128
+ $old_replace_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
129
+ $new_replace_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
130
  }
131
 
132
  // Get plain Upload Path
133
+ if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_replace_values ) ) {
134
+ $old_replace_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
135
+ $new_replace_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
136
  }
137
 
138
  // Get URL encoded Upload Path
139
+ if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) {
140
+ $old_replace_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
141
+ $new_replace_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
142
  }
143
 
144
  // Get JSON escaped Upload Path
145
+ if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) {
146
+ $old_replace_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
147
+ $new_replace_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
148
  }
149
  } else {
150
 
151
  // Get files dir Upload URL
152
+ if ( ! in_array( sprintf( '%s/%s/', untrailingslashit( $home_url ), 'files' ), $old_replace_values ) ) {
153
+ $old_replace_values[] = sprintf( '%s/%s/', untrailingslashit( $home_url ), 'files' );
154
+ $new_replace_values[] = ai1wm_uploads_url( $blog['New']['BlogID'] );
155
  }
156
 
157
  // Get plain Upload Path
158
+ if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_replace_values ) ) {
159
+ $old_replace_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
160
+ $new_replace_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
161
  }
162
 
163
  // Get URL encoded Upload Path
164
+ if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) {
165
+ $old_replace_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
166
+ $new_replace_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
167
  }
168
 
169
  // Get JSON escaped Upload Path
170
+ if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) {
171
+ $old_replace_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
172
+ $new_replace_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
173
  }
174
 
175
  // Get plain Upload Path
176
+ if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_replace_values ) ) {
177
+ $old_replace_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
178
+ $new_replace_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
179
  }
180
 
181
  // Get URL encoded Upload Path
182
+ if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) {
183
+ $old_replace_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
184
+ $new_replace_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
185
  }
186
 
187
  // Get JSON escaped Upload Path
188
+ if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) {
189
+ $old_replace_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
190
+ $new_replace_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
191
  }
192
  }
193
  }
201
 
202
  // Add Internal Site URL
203
  if ( ! empty( $blog['Old']['InternalSiteURL'] ) ) {
204
+ if ( parse_url( $blog['Old']['InternalSiteURL'], PHP_URL_SCHEME ) && parse_url( $blog['Old']['InternalSiteURL'], PHP_URL_HOST ) ) {
205
+ $site_urls[] = $blog['Old']['InternalSiteURL'];
206
+ }
207
  }
208
 
209
  // Get Site URL
234
  $new_scheme = parse_url( $blog['New']['SiteURL'], PHP_URL_SCHEME );
235
 
236
  // Add domain and path
237
+ if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) {
238
+ $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
239
+ $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
240
  }
241
 
242
  // Add domain and path with single quote
243
+ if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
244
+ $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
245
+ $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
246
  }
247
 
248
  // Add domain and path with double quote
249
+ if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
250
+ $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
251
+ $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
252
  }
253
 
254
  // Add Site URL scheme
259
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
260
 
261
  // Add plain Site URL
262
+ if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
263
+ $old_replace_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
264
+ $new_replace_values[] = ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] );
265
  }
266
 
267
  // Add URL encoded Site URL
268
+ if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
269
+ $old_replace_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
270
+ $new_replace_values[] = urlencode( ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ) );
271
  }
272
 
273
  // Add JSON escaped Site URL
274
+ if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
275
+ $old_replace_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
276
+ $new_replace_values[] = addcslashes( ai1wm_urlscheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ), '/' );
277
  }
278
  }
279
 
280
  // Add email
281
  if ( ! isset( $config['NoEmailReplace'] ) ) {
282
+ if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) {
283
+ $old_replace_values[] = sprintf( '@%s', $old_domain );
284
+ $new_replace_values[] = sprintf( '@%s', $new_domain );
285
  }
286
  }
287
  }
297
 
298
  // Add Internal Home URL
299
  if ( ! empty( $blog['Old']['InternalHomeURL'] ) ) {
300
+ if ( parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_SCHEME ) && parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_HOST ) ) {
301
+ $home_urls[] = $blog['Old']['InternalHomeURL'];
302
+ }
303
  }
304
 
305
  // Get Home URL
330
  $new_scheme = parse_url( $blog['New']['HomeURL'], PHP_URL_SCHEME );
331
 
332
  // Add domain and path
333
+ if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) {
334
+ $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
335
+ $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
336
  }
337
 
338
  // Add domain and path with single quote
339
+ if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
340
+ $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
341
+ $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
342
  }
343
 
344
  // Add domain and path with double quote
345
+ if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
346
+ $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
347
+ $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
348
  }
349
 
350
  // Set Home URL scheme
355
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
356
 
357
  // Add plain Home URL
358
+ if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
359
+ $old_replace_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
360
+ $new_replace_values[] = ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] );
361
  }
362
 
363
  // Add URL encoded Home URL
364
+ if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
365
+ $old_replace_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
366
+ $new_replace_values[] = urlencode( ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ) );
367
  }
368
 
369
  // Add JSON escaped Home URL
370
+ if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
371
+ $old_replace_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
372
+ $new_replace_values[] = addcslashes( ai1wm_urlscheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ), '/' );
373
  }
374
  }
375
 
376
  // Add email
377
  if ( ! isset( $config['NoEmailReplace'] ) ) {
378
+ if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) {
379
+ $old_replace_values[] = sprintf( '@%s', $old_domain );
380
+ $new_replace_values[] = sprintf( '@%s', $new_domain );
381
  }
382
  }
383
  }
394
 
395
  // Add Internal Site URL
396
  if ( ! empty( $config['InternalSiteURL'] ) ) {
397
+ if ( parse_url( $config['InternalSiteURL'], PHP_URL_SCHEME ) && parse_url( $config['InternalSiteURL'], PHP_URL_HOST ) ) {
398
+ $site_urls[] = $config['InternalSiteURL'];
399
+ }
400
  }
401
 
402
  // Get Site URL
427
  $new_scheme = parse_url( site_url(), PHP_URL_SCHEME );
428
 
429
  // Add domain and path
430
+ if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) {
431
+ $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
432
+ $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
433
  }
434
 
435
  // Add domain and path with single quote
436
+ if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
437
+ $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
438
+ $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
439
  }
440
 
441
  // Add domain and path with double quote
442
+ if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
443
+ $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
444
+ $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
445
  }
446
 
447
  // Set Site URL scheme
452
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
453
 
454
  // Add plain Site URL
455
+ if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
456
+ $old_replace_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
457
+ $new_replace_values[] = ai1wm_urlscheme( site_url(), $new_schemes[ $i ] );
458
  }
459
 
460
  // Add URL encoded Site URL
461
+ if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
462
+ $old_replace_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
463
+ $new_replace_values[] = urlencode( ai1wm_urlscheme( site_url(), $new_schemes[ $i ] ) );
464
  }
465
 
466
  // Add JSON escaped Site URL
467
+ if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
468
+ $old_replace_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
469
+ $new_replace_values[] = addcslashes( ai1wm_urlscheme( site_url(), $new_schemes[ $i ] ), '/' );
470
  }
471
  }
472
 
473
  // Add email
474
  if ( ! isset( $config['NoEmailReplace'] ) ) {
475
+ if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) {
476
+ $old_replace_values[] = sprintf( '@%s', $old_domain );
477
+ $new_replace_values[] = sprintf( '@%s', $new_domain );
478
  }
479
  }
480
  }
490
 
491
  // Add Internal Home URL
492
  if ( ! empty( $config['InternalHomeURL'] ) ) {
493
+ if ( parse_url( $config['InternalHomeURL'], PHP_URL_SCHEME ) && parse_url( $config['InternalHomeURL'], PHP_URL_HOST ) ) {
494
+ $home_urls[] = $config['InternalHomeURL'];
495
+ }
496
  }
497
 
498
  // Get Home URL
523
  $new_scheme = parse_url( home_url(), PHP_URL_SCHEME );
524
 
525
  // Add domain and path
526
+ if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) {
527
+ $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) );
528
+ $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) );
529
  }
530
 
531
  // Add domain and path with single quote
532
+ if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
533
+ $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) );
534
+ $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) );
535
  }
536
 
537
  // Add domain and path with double quote
538
+ if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) {
539
+ $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) );
540
+ $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) );
541
  }
542
 
543
  // Add Home URL scheme
548
  for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
549
 
550
  // Add plain Home URL
551
+ if ( ! in_array( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
552
+ $old_replace_values[] = ai1wm_urlscheme( $url, $old_schemes[ $i ] );
553
+ $new_replace_values[] = ai1wm_urlscheme( home_url(), $new_schemes[ $i ] );
554
  }
555
 
556
  // Add URL encoded Home URL
557
+ if ( ! in_array( urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
558
+ $old_replace_values[] = urlencode( ai1wm_urlscheme( $url, $old_schemes[ $i ] ) );
559
+ $new_replace_values[] = urlencode( ai1wm_urlscheme( home_url(), $new_schemes[ $i ] ) );
560
  }
561
 
562
  // Add JSON escaped Home URL
563
+ if ( ! in_array( addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
564
+ $old_replace_values[] = addcslashes( ai1wm_urlscheme( $url, $old_schemes[ $i ] ), '/' );
565
+ $new_replace_values[] = addcslashes( ai1wm_urlscheme( home_url(), $new_schemes[ $i ] ), '/' );
566
  }
567
  }
568
 
569
  // Add email
570
  if ( ! isset( $config['NoEmailReplace'] ) ) {
571
+ if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) {
572
+ $old_replace_values[] = sprintf( '@%s', $old_domain );
573
+ $new_replace_values[] = sprintf( '@%s', $new_domain );
574
  }
575
  }
576
  }
584
  if ( $content_dir !== WP_CONTENT_DIR ) {
585
 
586
  // Add plain WordPress Content
587
+ if ( ! in_array( $content_dir, $old_replace_values ) ) {
588
+ $old_replace_values[] = $content_dir;
589
+ $new_replace_values[] = WP_CONTENT_DIR;
590
  }
591
 
592
  // Add URL encoded WordPress Content
593
+ if ( ! in_array( urlencode( $content_dir ), $old_replace_values ) ) {
594
+ $old_replace_values[] = urlencode( $content_dir );
595
+ $new_replace_values[] = urlencode( WP_CONTENT_DIR );
596
  }
597
 
598
  // Add JSON escaped WordPress Content
599
+ if ( ! in_array( addcslashes( $content_dir, '/' ), $old_replace_values ) ) {
600
+ $old_replace_values[] = addcslashes( $content_dir, '/' );
601
+ $new_replace_values[] = addcslashes( WP_CONTENT_DIR, '/' );
602
  }
603
  }
604
  }
609
  if ( ! empty( $replace['OldValues'][ $i ] ) && ! empty( $replace['NewValues'][ $i ] ) ) {
610
 
611
  // Add plain replace values
612
+ if ( ! in_array( $replace['OldValues'][ $i ], $old_replace_values ) ) {
613
+ $old_replace_values[] = $replace['OldValues'][ $i ];
614
+ $new_replace_values[] = $replace['NewValues'][ $i ];
615
  }
616
 
617
  // Add URL encoded replace values
618
+ if ( ! in_array( urlencode( $replace['OldValues'][ $i ] ), $old_replace_values ) ) {
619
+ $old_replace_values[] = urlencode( $replace['OldValues'][ $i ] );
620
+ $new_replace_values[] = urlencode( $replace['NewValues'][ $i ] );
621
  }
622
 
623
  // Add JSON Escaped replace values
624
+ if ( ! in_array( addcslashes( $replace['OldValues'][ $i ], '/' ), $old_replace_values ) ) {
625
+ $old_replace_values[] = addcslashes( $replace['OldValues'][ $i ], '/' );
626
+ $new_replace_values[] = addcslashes( $replace['NewValues'][ $i ], '/' );
627
  }
628
  }
629
  }
630
  }
631
 
632
+ // Get site URL
633
+ $site_url = get_option( AI1WM_SITE_URL );
634
 
635
+ // Get home URL
636
+ $home_url = get_option( AI1WM_HOME_URL );
637
 
638
  // Get secret key
639
  $secret_key = get_option( AI1WM_SECRET_KEY );
644
  // Get HTTP password
645
  $auth_password = get_option( AI1WM_AUTH_PASSWORD );
646
 
647
+ $old_table_prefixes = array();
648
+ $new_table_prefixes = array();
649
 
650
  // Set main table prefixes
651
+ $old_table_prefixes[] = ai1wm_servmask_prefix( 'mainsite' );
652
+ $new_table_prefixes[] = ai1wm_table_prefix();
653
 
654
  // Set site table prefixes
655
  foreach ( $blogs as $blog ) {
656
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === false ) {
657
+ $old_table_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] );
658
+ $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
659
  }
660
  }
661
 
662
  // Set base table prefixes
663
  foreach ( $blogs as $blog ) {
664
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === true ) {
665
+ $old_table_prefixes[] = ai1wm_servmask_prefix( 'basesite' );
666
+ $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
667
  }
668
  }
669
 
670
  // Set site table prefixes
671
  foreach ( $blogs as $blog ) {
672
  if ( ai1wm_main_site( $blog['Old']['BlogID'] ) === true ) {
673
+ $old_table_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] );
674
+ $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] );
675
  }
676
  }
677
 
678
  // Set table prefixes
679
+ $old_table_prefixes[] = ai1wm_servmask_prefix();
680
+ $new_table_prefixes[] = ai1wm_table_prefix();
681
 
682
  // Get database client
683
  if ( empty( $wpdb->use_mysqli ) ) {
687
  }
688
 
689
  // Set database options
690
+ $mysql->set_old_table_prefixes( $old_table_prefixes )
691
+ ->set_new_table_prefixes( $new_table_prefixes )
692
+ ->set_old_replace_values( $old_replace_values )
693
+ ->set_new_replace_values( $new_replace_values )
694
+ ->set_old_replace_raw_values( $old_replace_raw_values )
695
+ ->set_new_replace_raw_values( $new_replace_raw_values );
696
 
697
  // Flush database
698
  if ( isset( $config['Plugin']['Version'] ) && ( $version = $config['Plugin']['Version'] ) ) {
750
  // Activate plugins
751
  ai1wm_activate_plugins( ai1wm_active_servmask_plugins() );
752
 
753
+ // Set the new site URL
754
+ update_option( AI1WM_SITE_URL, $site_url );
755
 
756
+ // Set the new home URL
757
+ update_option( AI1WM_HOME_URL, $home_url );
758
 
759
  // Set the new secret key value
760
  update_option( AI1WM_SECRET_KEY, $secret_key );
lib/vendor/servmask/command/class-ai1wm-wp-cli-command.php CHANGED
@@ -121,7 +121,7 @@ if ( class_exists( 'WP_CLI_Command' ) ) {
121
  foreach ( $model->get_files() as $backup ) {
122
  $backups->addRow( array(
123
  'name' => $backup['filename'],
124
- 'date' => human_time_diff( $backup['mtime'] ) . __( ' ago', AI1WM_PLUGIN_NAME ),
125
  'size' => size_format( $backup['size'], 2 ),
126
  ) );
127
  }
@@ -188,7 +188,6 @@ if ( class_exists( 'WP_CLI_Command' ) ) {
188
  try {
189
 
190
  // Remove filters
191
- remove_filter( 'ai1wm_export', 'Ai1wm_Export_Resolve::execute', 5 );
192
  remove_filter( 'ai1wm_export', 'Ai1wm_Export_Clean::execute', 300 );
193
 
194
  // Run filters
@@ -251,7 +250,6 @@ if ( class_exists( 'WP_CLI_Command' ) ) {
251
 
252
  // Remove filters
253
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Upload::execute', 5 );
254
- remove_filter( 'ai1wm_import', 'Ai1wm_Import_Resolve::execute', 10 );
255
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Confirm::execute', 100 );
256
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Clean::execute', 400 );
257
 
121
  foreach ( $model->get_files() as $backup ) {
122
  $backups->addRow( array(
123
  'name' => $backup['filename'],
124
+ 'date' => sprintf( __( '%s ago', AI1WM_PLUGIN_NAME ), human_time_diff( $backup['mtime'] ) ),
125
  'size' => size_format( $backup['size'], 2 ),
126
  ) );
127
  }
188
  try {
189
 
190
  // Remove filters
 
191
  remove_filter( 'ai1wm_export', 'Ai1wm_Export_Clean::execute', 300 );
192
 
193
  // Run filters
250
 
251
  // Remove filters
252
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Upload::execute', 5 );
 
253
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Confirm::execute', 100 );
254
  remove_filter( 'ai1wm_import', 'Ai1wm_Import_Clean::execute', 400 );
255
 
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -53,6 +53,20 @@ abstract class Ai1wm_Database {
53
  */
54
  protected $new_table_prefixes = array();
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * Old replace values
58
  *
@@ -185,6 +199,48 @@ abstract class Ai1wm_Database {
185
  return $this->new_table_prefixes;
186
  }
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  /**
189
  * Set old replace values
190
  *
@@ -610,7 +666,7 @@ abstract class Ai1wm_Database {
610
  foreach ( $row as $key => $value ) {
611
  // Replace table prefix columns
612
  if ( isset( $columns[ strtolower( $key ) ] ) ) {
613
- $value = $this->replace_table_prefixes( $value, 0 );
614
  }
615
 
616
  // Replace table values
@@ -906,8 +962,8 @@ abstract class Ai1wm_Database {
906
  /**
907
  * Replace table prefixes
908
  *
909
- * @param string $input Table value
910
- * @param bool $position Replace first occurrence at a specified position
911
  * @return string
912
  */
913
  protected function replace_table_prefixes( $input, $position = false ) {
@@ -931,6 +987,34 @@ abstract class Ai1wm_Database {
931
  return str_ireplace( $search, $replace, $input );
932
  }
933
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
934
  /**
935
  * Replace table values
936
  *
53
  */
54
  protected $new_table_prefixes = array();
55
 
56
+ /**
57
+ * Old column prefixes
58
+ *
59
+ * @var array
60
+ */
61
+ protected $old_column_prefixes = array();
62
+
63
+ /**
64
+ * New column prefixes
65
+ *
66
+ * @var array
67
+ */
68
+ protected $new_column_prefixes = array();
69
+
70
  /**
71
  * Old replace values
72
  *
199
  return $this->new_table_prefixes;
200
  }
201
 
202
+ /**
203
+ * Set old column prefixes
204
+ *
205
+ * @param array $prefixes List of column prefixes
206
+ * @return Ai1wm_Database
207
+ */
208
+ public function set_old_column_prefixes( $prefixes ) {
209
+ $this->old_column_prefixes = $prefixes;
210
+
211
+ return $this;
212
+ }
213
+
214
+ /**
215
+ * Get old column prefixes
216
+ *
217
+ * @return array
218
+ */
219
+ public function get_old_column_prefixes() {
220
+ return $this->old_column_prefixes;
221
+ }
222
+
223
+ /**
224
+ * Set new column prefixes
225
+ *
226
+ * @param array $prefixes List of column prefixes
227
+ * @return Ai1wm_Database
228
+ */
229
+ public function set_new_column_prefixes( $prefixes ) {
230
+ $this->new_column_prefixes = $prefixes;
231
+
232
+ return $this;
233
+ }
234
+
235
+ /**
236
+ * Get new column prefixes
237
+ *
238
+ * @return array
239
+ */
240
+ public function get_new_column_prefixes() {
241
+ return $this->new_column_prefixes;
242
+ }
243
+
244
  /**
245
  * Set old replace values
246
  *
666
  foreach ( $row as $key => $value ) {
667
  // Replace table prefix columns
668
  if ( isset( $columns[ strtolower( $key ) ] ) ) {
669
+ $value = $this->replace_column_prefixes( $value, 0 );
670
  }
671
 
672
  // Replace table values
962
  /**
963
  * Replace table prefixes
964
  *
965
+ * @param string $input Table value
966
+ * @param mixed $position Replace first occurrence at a specified position
967
  * @return string
968
  */
969
  protected function replace_table_prefixes( $input, $position = false ) {
987
  return str_ireplace( $search, $replace, $input );
988
  }
989
 
990
+ /**
991
+ * Replace column prefixes
992
+ *
993
+ * @param string $input Column value
994
+ * @param mixed $position Replace first occurrence at a specified position
995
+ * @return string
996
+ */
997
+ protected function replace_column_prefixes( $input, $position = false ) {
998
+ // Get column prefixes
999
+ $search = $this->get_old_column_prefixes();
1000
+ $replace = $this->get_new_column_prefixes();
1001
+
1002
+ // Replace first occurance at a specified position
1003
+ if ( $position !== false ) {
1004
+ for ( $i = 0; $i < count( $search ); $i++ ) {
1005
+ $current = stripos( $input, $search[ $i ] );
1006
+ if ( $current === $position ) {
1007
+ $input = substr_replace( $input, $replace[ $i ], $current, strlen( $search[ $i ] ) );
1008
+ }
1009
+ }
1010
+
1011
+ return $input;
1012
+ }
1013
+
1014
+ // Replace all occurrences
1015
+ return str_ireplace( $search, $replace, $input );
1016
+ }
1017
+
1018
  /**
1019
  * Replace table values
1020
  *
lib/vendor/servmask/filesystem/class-ai1wm-directory.php CHANGED
@@ -26,20 +26,27 @@
26
  class Ai1wm_Directory {
27
 
28
  /**
29
- * Delete directory and its contents
30
- * The method will recursively delete a directory and its contents.
31
  *
32
- * @param string $path Path to the directory
33
  * @return boolean
 
 
 
 
 
 
 
34
  *
35
- * @throws UnexpectedValueException
 
36
  */
37
  public static function delete( $path ) {
38
  // Iterate over directory
39
  $iterator = new Ai1wm_Recursive_Directory_Iterator( $path );
40
 
41
  // Recursively iterate over directory
42
- $iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
43
 
44
  // Remove files and directories
45
  foreach ( $iterator as $item ) {
@@ -50,7 +57,6 @@ class Ai1wm_Directory {
50
  }
51
  }
52
 
53
- // Remove path
54
  return @rmdir( $path );
55
  }
56
  }
26
  class Ai1wm_Directory {
27
 
28
  /**
29
+ * Create directory (recursively)
 
30
  *
31
+ * @param string $path Path to the directory
32
  * @return boolean
33
+ */
34
+ public static function create( $path ) {
35
+ return @mkdir( $path, 0777, true );
36
+ }
37
+
38
+ /**
39
+ * Delete directory (recursively)
40
  *
41
+ * @param string $path Path to the directory
42
+ * @return boolean
43
  */
44
  public static function delete( $path ) {
45
  // Iterate over directory
46
  $iterator = new Ai1wm_Recursive_Directory_Iterator( $path );
47
 
48
  // Recursively iterate over directory
49
+ $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
50
 
51
  // Remove files and directories
52
  foreach ( $iterator as $item ) {
57
  }
58
  }
59
 
 
60
  return @rmdir( $path );
61
  }
62
  }
lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php CHANGED
@@ -24,23 +24,38 @@
24
  */
25
 
26
  class Ai1wm_File_Htaccess {
 
27
  /**
28
- * Create .htaccess file
29
- *
30
- * The method will create .htaccess file with contents 'AddType application/octet-stream .wpress'
31
  *
32
- * @param string $path Path to the backups directory
33
  * @return boolean
34
  */
35
  public static function create( $path ) {
36
- $contents = "<IfModule mod_mime.c>\n" .
37
- "AddType application/octet-stream .wpress\n" .
38
- "</IfModule>\n" .
39
- "<IfModule mod_dir.c>\n" .
40
- "DirectoryIndex index.php\n" .
41
- "</IfModule>\n" .
42
- "Options -Indexes\n";
 
 
 
 
 
43
 
44
- return Ai1wm_File::create( $path, $contents );
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
  }
24
  */
25
 
26
  class Ai1wm_File_Htaccess {
27
+
28
  /**
29
+ * Create .htaccess file (ServMask)
 
 
30
  *
31
+ * @param string $path Path to file
32
  * @return boolean
33
  */
34
  public static function create( $path ) {
35
+ return Ai1wm_File::create( $path, implode( PHP_EOL, array(
36
+ '<IfModule mod_mime.c>',
37
+ 'AddType application/octet-stream .wpress',
38
+ '</IfModule>',
39
+ '<IfModule mod_dir.c>',
40
+ 'DirectoryIndex index.php',
41
+ '</IfModule>',
42
+ '<IfModule mod_autoindex.c>',
43
+ 'Options -Indexes',
44
+ '</IfModule>',
45
+ ) ) );
46
+ }
47
 
48
+ /**
49
+ * Create .htaccess file (LiteSpeed)
50
+ *
51
+ * @param string $path Path to file
52
+ * @return boolean
53
+ */
54
+ public static function litespeed( $path ) {
55
+ return Ai1wm_File::create_with_markers( $path, 'LiteSpeed', array(
56
+ '<IfModule Litespeed>',
57
+ 'SetEnv noabort 1',
58
+ '</IfModule>',
59
+ ) );
60
  }
61
  }
lib/vendor/servmask/filesystem/class-ai1wm-file-index.php CHANGED
@@ -26,17 +26,12 @@
26
  class Ai1wm_File_Index {
27
 
28
  /**
29
- * Create a index.php file
30
  *
31
- * The method will create index.php file with contents '<?php // silence is golden' without the single quotes
32
- * at the path specified by the argument.
33
- *
34
- * @param string $path Path to the index.php file
35
  * @return boolean
36
  */
37
  public static function create( $path ) {
38
- $contents = '<?php // silence is golden';
39
-
40
- return Ai1wm_File::create( $path, $contents );
41
  }
42
  }
26
  class Ai1wm_File_Index {
27
 
28
  /**
29
+ * Create index.php file
30
  *
31
+ * @param string $path Path to file
 
 
 
32
  * @return boolean
33
  */
34
  public static function create( $path ) {
35
+ return Ai1wm_File::create( $path, '<?php // silence is golden' );
 
 
36
  }
37
  }
lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php CHANGED
@@ -28,26 +28,23 @@ class Ai1wm_File_Webconfig {
28
  /**
29
  * Create web.config file
30
  *
31
- * The method will create web.config file with contents '<mimeMap fileExtension=".wpress" mimeType="application/octet-stream" />'
32
- *
33
- * @param string $path Path to the web.config file
34
  * @return boolean
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
  }
53
  }
28
  /**
29
  * Create web.config file
30
  *
31
+ * @param string $path Path to file
 
 
32
  * @return boolean
33
  */
34
  public static function create( $path ) {
35
+ return Ai1wm_File::create( $path, implode( PHP_EOL, array(
36
+ '<configuration>',
37
+ '<system.webServer>',
38
+ '<mimeMap fileExtension=".wpress" mimeType="application/octet-stream" />',
39
+ '</staticContent>',
40
+ '<defaultDocument>',
41
+ '<files>',
42
+ '<add value="index.php" />',
43
+ '</files>',
44
+ '</defaultDocument>',
45
+ '<directoryBrowse enabled="false" />',
46
+ '</system.webServer>',
47
+ '</configuration>',
48
+ ) ) );
 
49
  }
50
  }
lib/vendor/servmask/filesystem/class-ai1wm-file.php CHANGED
@@ -26,17 +26,28 @@
26
  class Ai1wm_File {
27
 
28
  /**
29
- * Create a file with contents
30
- *
31
- * @param string $path Path to the file
32
- * @param string $contents Contents of the file
33
  *
 
 
34
  * @return boolean
35
  */
36
- public static function create( $path, $contents ) {
 
 
 
 
 
 
 
 
 
 
 
 
37
  $is_written = false;
38
  if ( ( $handle = @fopen( $path, 'w' ) ) !== false ) {
39
- if ( @fwrite( $handle, $contents ) !== false ) {
40
  $is_written = true;
41
  }
42
 
@@ -45,4 +56,16 @@ class Ai1wm_File {
45
 
46
  return $is_written;
47
  }
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
26
  class Ai1wm_File {
27
 
28
  /**
29
+ * Create a file with content
 
 
 
30
  *
31
+ * @param string $path Path to the file
32
+ * @param string $content Content of the file
33
  * @return boolean
34
  */
35
+ public static function create( $path, $content ) {
36
+ if ( ! @file_exists( $path ) ) {
37
+ if ( ! @is_writable( dirname( $path ) ) ) {
38
+ return false;
39
+ }
40
+
41
+ if ( ! @touch( $path ) ) {
42
+ return false;
43
+ }
44
+ } elseif ( ! @is_writable( $path ) ) {
45
+ return false;
46
+ }
47
+
48
  $is_written = false;
49
  if ( ( $handle = @fopen( $path, 'w' ) ) !== false ) {
50
+ if ( @fwrite( $handle, $content ) !== false ) {
51
  $is_written = true;
52
  }
53
 
56
 
57
  return $is_written;
58
  }
59
+
60
+ /**
61
+ * Create a file with marker and content
62
+ *
63
+ * @param string $path Path to the file
64
+ * @param string $marker Name of the marker
65
+ * @param string $content Content of the file
66
+ * @return boolean
67
+ */
68
+ public static function create_with_markers( $path, $marker, $content ) {
69
+ return @insert_with_markers( $path, $marker, $content );
70
+ }
71
  }
lib/vendor/servmask/filter/{class-ai1wm-extension-filter.php → class-ai1wm-recursive-extension-filter.php} RENAMED
@@ -23,11 +23,11 @@
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
25
 
26
- class Ai1wm_Extension_Filter extends FilterIterator {
27
 
28
  protected $include = array();
29
 
30
- public function __construct( Iterator $iterator, $include = array() ) {
31
  parent::__construct( $iterator );
32
 
33
  // Set include filter
@@ -35,10 +35,16 @@ class Ai1wm_Extension_Filter extends FilterIterator {
35
  }
36
 
37
  public function accept() {
38
- if ( in_array( pathinfo( $this->getInnerIterator()->getFilename(), PATHINFO_EXTENSION ), $this->include ) ) {
39
- return true;
 
 
40
  }
41
 
42
- return false;
 
 
 
 
43
  }
44
  }
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
25
 
26
+ class Ai1wm_Recursive_Extension_Filter extends RecursiveFilterIterator {
27
 
28
  protected $include = array();
29
 
30
+ public function __construct( RecursiveIterator $iterator, $include = array() ) {
31
  parent::__construct( $iterator );
32
 
33
  // Set include filter
35
  }
36
 
37
  public function accept() {
38
+ if ( $this->getInnerIterator()->isFile() ) {
39
+ if ( ! in_array( pathinfo( $this->getInnerIterator()->getFilename(), PATHINFO_EXTENSION ), $this->include ) ) {
40
+ return false;
41
+ }
42
  }
43
 
44
+ return true;
45
+ }
46
+
47
+ public function getChildren() {
48
+ return new self( $this->getInnerIterator()->getChildren(), $this->include );
49
  }
50
  }
lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php CHANGED
@@ -25,8 +25,6 @@
25
 
26
  class Ai1wm_Recursive_Directory_Iterator extends RecursiveDirectoryIterator {
27
 
28
- protected $exclude = array();
29
-
30
  public function __construct( $path ) {
31
  parent::__construct( $path );
32
 
25
 
26
  class Ai1wm_Recursive_Directory_Iterator extends RecursiveDirectoryIterator {
27
 
 
 
28
  public function __construct( $path ) {
29
  parent::__construct( $path );
30
 
lib/{model/http/class-ai1wm-http-factory.php → vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php} RENAMED
@@ -23,14 +23,6 @@
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
25
 
26
- class Ai1wm_Http_Factory {
27
-
28
- public static function create( $type ) {
29
- if ( $type === 'curl' ) {
30
- return new Ai1wm_Http_Curl;
31
- }
32
-
33
- return new Ai1wm_Http_Stream;
34
- }
35
 
36
  }
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
25
 
26
+ class Ai1wm_Recursive_Iterator_Iterator extends RecursiveIteratorIterator {
 
 
 
 
 
 
 
 
27
 
28
  }
lib/view/assets/css/backups.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:336px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:364px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{display:inline-block;font-size:12px;font-weight:700;margin-top:16px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-backup-progress,#ai1wm-backup-progress-bar{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;line-height:20px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:1em 0 2em;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:left}.ai1wm-backups .ai1wm-column-info{text-align:right}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center}.ai1wm-backups .ai1wm-column-actions{text-align:right}.ai1wm-backups thead th{padding:4px 6px;text-align:left;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td span{font-weight:700}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:right;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;white-space:nowrap;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-delete,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-download,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-restore{border-radius:50px;margin:0 2px;padding:4px 8px}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}.ai1wm-backups-empty{line-height:2em}
1
+ @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:336px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:364px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{display:inline-block;font-size:12px;font-weight:700;margin-top:16px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-backup-progress,#ai1wm-backup-progress-bar{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;line-height:20px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:1em 0 2em;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:left;word-wrap:break-all}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center;white-space:nowrap}.ai1wm-backups .ai1wm-column-actions{text-align:right;white-space:nowrap}.ai1wm-backups thead th{padding:4px 6px;text-align:left;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:right;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-delete,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-download,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-restore{border-radius:50px;margin:0 2px;padding:4px 8px}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}.ai1wm-backups-empty{line-height:2em}
lib/view/assets/css/backups.min.rtl.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:336px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:364px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:left}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;left:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{display:inline-block;font-size:12px;font-weight:700;margin-top:16px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-backup-progress,#ai1wm-backup-progress-bar{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;line-height:20px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:1em 0 2em;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:right}.ai1wm-backups .ai1wm-column-info{text-align:left}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center}.ai1wm-backups .ai1wm-column-actions{text-align:left}.ai1wm-backups thead th{padding:4px 6px;text-align:right;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td span{font-weight:700}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:left;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;white-space:nowrap;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-delete,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-download,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-restore{border-radius:50px;margin:0 2px;padding:4px 8px}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}.ai1wm-backups-empty{line-height:2em}
1
+ @charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:336px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:364px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"\200E"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:left}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;left:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{display:inline-block;font-size:12px;font-weight:700;margin-top:16px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-backup-progress,#ai1wm-backup-progress-bar{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;line-height:20px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:1em 0 2em;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:right;word-wrap:break-all}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center;white-space:nowrap}.ai1wm-backups .ai1wm-column-actions{text-align:left;white-space:nowrap}.ai1wm-backups thead th{padding:4px 6px;text-align:right;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:left;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-delete,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-download,.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-backup-restore{border-radius:50px;margin:0 2px;padding:4px 8px}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}.ai1wm-backups-empty{line-height:2em}
lib/view/assets/javascript/backups.min.js CHANGED
@@ -174,11 +174,11 @@ Import.prototype.start = function (options, retries) {
174
 
175
  // Initializing beforeunload event
176
  $(window).bind('beforeunload', function () {
177
- return 'You are about to stop importing your website, are you sure?';
178
  });
179
 
180
  // Set initial status
181
- this.setStatus({ type: 'info', message: 'Preparing to import...' });
182
 
183
  // Set params
184
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
@@ -208,8 +208,8 @@ Import.prototype.start = function (options, retries) {
208
  if (retries >= 5) {
209
  return self.setStatus({
210
  type: 'error',
211
- title: 'Unable to import',
212
- message: 'Unable to start the import. Refresh the page and try again'
213
  });
214
  }
215
 
@@ -287,8 +287,8 @@ Import.prototype.confirm = function (options, retries) {
287
  if (retries >= 5) {
288
  return self.setStatus({
289
  type: 'error',
290
- title: 'Unable to import',
291
- message: 'Unable to confirm the import. Refresh the page and try again'
292
  });
293
  }
294
 
@@ -335,8 +335,8 @@ Import.prototype.blogs = function (options, retries) {
335
  if (retries >= 5) {
336
  return self.setStatus({
337
  type: 'error',
338
- title: 'Unable to import',
339
- message: 'Unable to prepare blogs the import. Refresh the page and try again'
340
  });
341
  }
342
 
@@ -354,7 +354,7 @@ Import.prototype.clean = function (options, retries) {
354
  this.stopImport = true;
355
 
356
  // Set initial status
357
- this.setStatus({ type: 'info', message: 'Please wait, stopping the import...' });
358
 
359
  // Set params
360
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
@@ -384,8 +384,8 @@ Import.prototype.clean = function (options, retries) {
384
  if (retries >= 5) {
385
  return self.setStatus({
386
  type: 'error',
387
- title: 'Unable to import',
388
- message: 'Unable to stop the import. Refresh the page and try again'
389
  });
390
  }
391
 
@@ -515,11 +515,14 @@ var Modal = function Modal() {
515
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
516
 
517
  // Create close button
518
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
519
  self.destroy();
520
  });
521
 
522
- // Append close button
 
 
 
523
  action.append(closeButton);
524
 
525
  // Append title to section
@@ -540,10 +543,10 @@ var Modal = function Modal() {
540
  this.progress = function (params) {
541
  if (this.view === 'progress') {
542
 
543
- // Update progressBarMeter
544
  this.progress.progressBarMeter.width(params.percent + '%');
545
 
546
- // Update progressBarPercent
547
  this.progress.progressBarPercent.text(params.percent + '%');
548
  } else {
549
 
@@ -562,25 +565,28 @@ var Modal = function Modal() {
562
  // Create action section
563
  var action = $('<div></div>');
564
 
565
- // Create progressBar
566
  var progressBar = $('<span class="ai1wm-progress-bar"></span>');
567
 
568
- // Create progressBarMeter
569
  this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
570
 
571
- // Create progressBarPercent
572
- this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
573
 
574
  // Create stop import
575
- var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
576
  $(this).attr('disabled', 'disabled');
577
  self.onStop();
578
  });
579
 
 
 
 
580
  // Append progress meter and progress percent
581
  progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
582
 
583
- // Append stop button
584
  action.append(stopButton);
585
 
586
  // Append progress bar to section
@@ -619,22 +625,28 @@ var Modal = function Modal() {
619
  // Create warning
620
  var warning = $('<i class="ai1wm-icon-notification"></i>');
621
 
622
- // Create cancel button
623
- var cancelButton = $('<button type="button" class="ai1wm-button-gray">Cancel</button>').on('click', function () {
624
  $(this).attr('disabled', 'disabled');
625
  self.onStop();
626
  });
627
 
628
  // Create confirm button
629
- var confirmButton = $('<button type="button" class="ai1wm-button-green">Proceed &gt;</button>').on('click', function () {
630
  $(this).attr('disabled', 'disabled');
631
  self.onConfirm();
632
  });
633
 
634
- // Append cancel button
635
- action.append(cancelButton);
 
 
 
 
 
 
636
 
637
- // Append confirm button
638
  action.append(confirmButton);
639
 
640
  // Append warning to section
@@ -673,12 +685,15 @@ var Modal = function Modal() {
673
  var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
674
 
675
  // Create continue button
676
- var continueButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
677
  $(this).attr('disabled', 'disabled');
678
  self.onBlogs($(this).closest('form').serializeArray());
679
  });
680
 
681
- // Append continue button
 
 
 
682
  action.append(continueButton);
683
 
684
  // Append title to section
@@ -716,11 +731,17 @@ var Modal = function Modal() {
716
  // Create loader
717
  var loader = $('<span class="ai1wm-loader"></span>');
718
 
 
 
 
719
  // Create notice to be displayed during import process
720
- var importNotice = $('<div class="ai1wm-import-modal-notice"><p>Please do not close this browser window or your import will fail</p></div>');
721
 
722
- // Append stop button
723
- action.append(importNotice);
 
 
 
724
 
725
  // Append loader to header
726
  header.append(loader);
@@ -758,11 +779,14 @@ var Modal = function Modal() {
758
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
759
 
760
  // Create close button
761
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
762
  self.destroy();
763
  });
764
 
765
- // Append close button
 
 
 
766
  action.append(closeButton);
767
 
768
  // Append title to section
@@ -883,7 +907,7 @@ jQuery(document).ready(function ($) {
883
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
884
 
885
  // Change placeholder message
886
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
887
 
888
  // Show feedback form
889
  $('.ai1wm-feedback-form').fadeIn();
@@ -895,7 +919,7 @@ jQuery(document).ready(function ($) {
895
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
896
 
897
  // Change placeholder message
898
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
899
 
900
  // Show feedback form
901
  $('.ai1wm-feedback-form').fadeIn();
@@ -947,13 +971,13 @@ jQuery(document).ready(function ($) {
947
 
948
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
949
  $.each(data.errors, function (key, value) {
950
- errorMessage.append('<p>' + value + '</p>');
951
  });
952
 
953
  $('.ai1wm-feedback').prepend(errorMessage);
954
  } else {
955
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
956
- successMessage.append('<p>Thanks for submitting your feedback!</p>');
957
 
958
  $('.ai1wm-feedback').html(successMessage);
959
  }
@@ -1013,7 +1037,7 @@ jQuery(document).ready(function ($) {
1013
  var self = $(this);
1014
 
1015
  // Delete file
1016
- if (confirm('Are you sure you want to delete this file?')) {
1017
  $.ajax({
1018
  url: ai1wm_backups.ajax.url,
1019
  type: 'POST',
@@ -1140,13 +1164,13 @@ jQuery(document).ready(function ($) {
1140
 
1141
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1142
  $.each(data.errors, function (key, value) {
1143
- errorMessage.append('<p>' + value + '</p>');
1144
  });
1145
 
1146
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
1147
  } else {
1148
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1149
- successMessage.append('<p>Thanks for submitting your request!</p>');
1150
 
1151
  $('.ai1wm-report-problem-dialog').html(successMessage);
1152
 
174
 
175
  // Initializing beforeunload event
176
  $(window).bind('beforeunload', function () {
177
+ return ai1wm_locale.stop_importing_your_website;
178
  });
179
 
180
  // Set initial status
181
+ this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_import });
182
 
183
  // Set params
184
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
208
  if (retries >= 5) {
209
  return self.setStatus({
210
  type: 'error',
211
+ title: ai1wm_locale.unable_to_import,
212
+ message: ai1wm_locale.unable_to_start_the_import
213
  });
214
  }
215
 
287
  if (retries >= 5) {
288
  return self.setStatus({
289
  type: 'error',
290
+ title: ai1wm_locale.unable_to_import,
291
+ message: ai1wm_locale.unable_to_confirm_the_import
292
  });
293
  }
294
 
335
  if (retries >= 5) {
336
  return self.setStatus({
337
  type: 'error',
338
+ title: ai1wm_locale.unable_to_import,
339
+ message: ai1wm_locale.unable_to_prepare_blogs_on_import
340
  });
341
  }
342
 
354
  this.stopImport = true;
355
 
356
  // Set initial status
357
+ this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_export });
358
 
359
  // Set params
360
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
384
  if (retries >= 5) {
385
  return self.setStatus({
386
  type: 'error',
387
+ title: ai1wm_locale.unable_to_import,
388
+ message: ai1wm_locale.unable_to_stop_the_import
389
  });
390
  }
391
 
515
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
516
 
517
  // Create close button
518
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
519
  self.destroy();
520
  });
521
 
522
+ // Append text to close button
523
+ closeButton.append(ai1wm_locale.close_import);
524
+
525
+ // Append close button to action
526
  action.append(closeButton);
527
 
528
  // Append title to section
543
  this.progress = function (params) {
544
  if (this.view === 'progress') {
545
 
546
+ // Update progress bar meter
547
  this.progress.progressBarMeter.width(params.percent + '%');
548
 
549
+ // Update progress bar percent
550
  this.progress.progressBarPercent.text(params.percent + '%');
551
  } else {
552
 
565
  // Create action section
566
  var action = $('<div></div>');
567
 
568
+ // Create progress bar
569
  var progressBar = $('<span class="ai1wm-progress-bar"></span>');
570
 
571
+ // Create progress bar meter
572
  this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
573
 
574
+ // Create progress bar percent
575
+ this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%');
576
 
577
  // Create stop import
578
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
579
  $(this).attr('disabled', 'disabled');
580
  self.onStop();
581
  });
582
 
583
+ // Append text to stop button
584
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import);
585
+
586
  // Append progress meter and progress percent
587
  progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
588
 
589
+ // Append stop button to action
590
  action.append(stopButton);
591
 
592
  // Append progress bar to section
625
  // Create warning
626
  var warning = $('<i class="ai1wm-icon-notification"></i>');
627
 
628
+ // Create close button
629
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
630
  $(this).attr('disabled', 'disabled');
631
  self.onStop();
632
  });
633
 
634
  // Create confirm button
635
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
636
  $(this).attr('disabled', 'disabled');
637
  self.onConfirm();
638
  });
639
 
640
+ // Append text to close button
641
+ closeButton.append(ai1wm_locale.close_import);
642
+
643
+ // Append text to confirm button
644
+ confirmButton.append(ai1wm_locale.confirm_import + ' &gt;');
645
+
646
+ // Append close button to action
647
+ action.append(closeButton);
648
 
649
+ // Append confirm button to action
650
  action.append(confirmButton);
651
 
652
  // Append warning to section
685
  var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
686
 
687
  // Create continue button
688
+ var continueButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
689
  $(this).attr('disabled', 'disabled');
690
  self.onBlogs($(this).closest('form').serializeArray());
691
  });
692
 
693
+ // Append text to continue button
694
+ continueButton.append(ai1wm_locale.continue_import);
695
+
696
+ // Append continue button to action
697
  action.append(continueButton);
698
 
699
  // Append title to section
731
  // Create loader
732
  var loader = $('<span class="ai1wm-loader"></span>');
733
 
734
+ // Create warning
735
+ var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser);
736
+
737
  // Create notice to be displayed during import process
738
+ var notice = $('<div class="ai1wm-import-modal-notice"></div>');
739
 
740
+ // Append warning to notice
741
+ notice.append(warning);
742
+
743
+ // Append stop button to action
744
+ action.append(notice);
745
 
746
  // Append loader to header
747
  header.append(loader);
779
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
780
 
781
  // Create close button
782
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
783
  self.destroy();
784
  });
785
 
786
+ // Append text to close button
787
+ closeButton.append(ai1wm_locale.close_import);
788
+
789
+ // Append close button to action
790
  action.append(closeButton);
791
 
792
  // Append title to section
907
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
908
 
909
  // Change placeholder message
910
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.leave_feedback);
911
 
912
  // Show feedback form
913
  $('.ai1wm-feedback-form').fadeIn();
919
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
920
 
921
  // Change placeholder message
922
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
923
 
924
  // Show feedback form
925
  $('.ai1wm-feedback-form').fadeIn();
971
 
972
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
973
  $.each(data.errors, function (key, value) {
974
+ errorMessage.append($('<p />').text(value));
975
  });
976
 
977
  $('.ai1wm-feedback').prepend(errorMessage);
978
  } else {
979
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
980
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
981
 
982
  $('.ai1wm-feedback').html(successMessage);
983
  }
1037
  var self = $(this);
1038
 
1039
  // Delete file
1040
+ if (confirm(ai1wm_locale.want_to_delete_this_file)) {
1041
  $.ajax({
1042
  url: ai1wm_backups.ajax.url,
1043
  type: 'POST',
1164
 
1165
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
1166
  $.each(data.errors, function (key, value) {
1167
+ errorMessage.append($('<p />').text(value));
1168
  });
1169
 
1170
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
1171
  } else {
1172
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
1173
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
1174
 
1175
  $('.ai1wm-report-problem-dialog').html(successMessage);
1176
 
lib/view/assets/javascript/export.min.js CHANGED
@@ -146,7 +146,7 @@ jQuery(document).ready(function ($) {
146
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
147
 
148
  // Change placeholder message
149
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
150
 
151
  // Show feedback form
152
  $('.ai1wm-feedback-form').fadeIn();
@@ -158,7 +158,7 @@ jQuery(document).ready(function ($) {
158
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
159
 
160
  // Change placeholder message
161
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
162
 
163
  // Show feedback form
164
  $('.ai1wm-feedback-form').fadeIn();
@@ -210,13 +210,13 @@ jQuery(document).ready(function ($) {
210
 
211
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
212
  $.each(data.errors, function (key, value) {
213
- errorMessage.append('<p>' + value + '</p>');
214
  });
215
 
216
  $('.ai1wm-feedback').prepend(errorMessage);
217
  } else {
218
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
219
- successMessage.append('<p>Thanks for submitting your feedback!</p>');
220
 
221
  $('.ai1wm-feedback').html(successMessage);
222
  }
@@ -307,13 +307,13 @@ jQuery(document).ready(function ($) {
307
 
308
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
309
  $.each(data.errors, function (key, value) {
310
- errorMessage.append('<p>' + value + '</p>');
311
  });
312
 
313
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
314
  } else {
315
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
316
- successMessage.append('<p>Thanks for submitting your request!</p>');
317
 
318
  $('.ai1wm-report-problem-dialog').html(successMessage);
319
 
@@ -593,11 +593,11 @@ Export.prototype.start = function (options, retries) {
593
 
594
  // Initializing beforeunload event
595
  $(window).bind('beforeunload', function () {
596
- return 'You are about to stop exporting your website, are you sure?';
597
  });
598
 
599
  // Set initial status
600
- this.setStatus({ type: 'info', message: 'Preparing to export...' });
601
 
602
  // Set params
603
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
@@ -627,8 +627,8 @@ Export.prototype.start = function (options, retries) {
627
  if (retries >= 5) {
628
  return self.setStatus({
629
  type: 'error',
630
- title: 'Unable to export',
631
- message: 'Unable to start the export. Refresh the page and try again'
632
  });
633
  }
634
 
@@ -665,8 +665,8 @@ Export.prototype.run = function (params, retries) {
665
  if (retries >= 5) {
666
  return self.setStatus({
667
  type: 'error',
668
- title: 'Unable to export',
669
- message: 'Unable to run the export. Refresh the page and try again'
670
  });
671
  }
672
 
@@ -684,7 +684,7 @@ Export.prototype.clean = function (options, retries) {
684
  this.stopExport = true;
685
 
686
  // Set initial status
687
- this.setStatus({ type: 'info', message: 'Please wait, stopping the export...' });
688
 
689
  // Set params
690
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
@@ -714,8 +714,8 @@ Export.prototype.clean = function (options, retries) {
714
  if (retries >= 5) {
715
  return self.setStatus({
716
  type: 'error',
717
- title: 'Unable to export',
718
- message: 'Unable to stop the export. Refresh the page and try again'
719
  });
720
  }
721
 
@@ -833,11 +833,14 @@ var Modal = function Modal() {
833
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
834
 
835
  // Create close button
836
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
837
  self.destroy();
838
  });
839
 
840
- // Append close button
 
 
 
841
  action.append(closeButton);
842
 
843
  // Append title to section
@@ -876,12 +879,15 @@ var Modal = function Modal() {
876
  var loader = $('<span class="ai1wm-loader"></span>');
877
 
878
  // Create stop export
879
- var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop export</button>').on('click', function () {
880
  $(this).attr('disabled', 'disabled');
881
  self.onStop();
882
  });
883
 
884
- // Append stop button
 
 
 
885
  action.append(stopButton);
886
 
887
  // Append loader to header
@@ -920,11 +926,14 @@ var Modal = function Modal() {
920
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
921
 
922
  // Create close button
923
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
924
  self.destroy();
925
  });
926
 
927
- // Append close button
 
 
 
928
  action.append(closeButton);
929
 
930
  // Append title to section
@@ -960,11 +969,14 @@ var Modal = function Modal() {
960
  var action = $('<div></div>');
961
 
962
  // Create close button
963
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
964
  self.destroy();
965
  });
966
 
967
- // Append close button
 
 
 
968
  action.append(closeButton);
969
 
970
  // Append message to section
146
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
147
 
148
  // Change placeholder message
149
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.leave_feedback);
150
 
151
  // Show feedback form
152
  $('.ai1wm-feedback-form').fadeIn();
158
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
159
 
160
  // Change placeholder message
161
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
162
 
163
  // Show feedback form
164
  $('.ai1wm-feedback-form').fadeIn();
210
 
211
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
212
  $.each(data.errors, function (key, value) {
213
+ errorMessage.append($('<p />').text(value));
214
  });
215
 
216
  $('.ai1wm-feedback').prepend(errorMessage);
217
  } else {
218
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
219
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
220
 
221
  $('.ai1wm-feedback').html(successMessage);
222
  }
307
 
308
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
309
  $.each(data.errors, function (key, value) {
310
+ errorMessage.append($('<p />').text(value));
311
  });
312
 
313
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
314
  } else {
315
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
316
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
317
 
318
  $('.ai1wm-report-problem-dialog').html(successMessage);
319
 
593
 
594
  // Initializing beforeunload event
595
  $(window).bind('beforeunload', function () {
596
+ return ai1wm_locale.stop_exporting_your_website;
597
  });
598
 
599
  // Set initial status
600
+ this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_export });
601
 
602
  // Set params
603
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
627
  if (retries >= 5) {
628
  return self.setStatus({
629
  type: 'error',
630
+ title: ai1wm_locale.unable_to_export,
631
+ message: ai1wm_locale.unable_to_start_the_export
632
  });
633
  }
634
 
665
  if (retries >= 5) {
666
  return self.setStatus({
667
  type: 'error',
668
+ title: ai1wm_locale.unable_to_export,
669
+ message: ai1wm_locale.unable_to_run_the_export
670
  });
671
  }
672
 
684
  this.stopExport = true;
685
 
686
  // Set initial status
687
+ this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_export });
688
 
689
  // Set params
690
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
714
  if (retries >= 5) {
715
  return self.setStatus({
716
  type: 'error',
717
+ title: ai1wm_locale.unable_to_export,
718
+ message: ai1wm_locale.unable_to_stop_the_export
719
  });
720
  }
721
 
833
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
834
 
835
  // Create close button
836
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
837
  self.destroy();
838
  });
839
 
840
+ // Append text to close button
841
+ closeButton.append(ai1wm_locale.close_export);
842
+
843
+ // Append close button to action
844
  action.append(closeButton);
845
 
846
  // Append title to section
879
  var loader = $('<span class="ai1wm-loader"></span>');
880
 
881
  // Create stop export
882
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
883
  $(this).attr('disabled', 'disabled');
884
  self.onStop();
885
  });
886
 
887
+ // Append text to stop button
888
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_export);
889
+
890
+ // Append stop button to action
891
  action.append(stopButton);
892
 
893
  // Append loader to header
926
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
927
 
928
  // Create close button
929
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
930
  self.destroy();
931
  });
932
 
933
+ // Append text to close button
934
+ closeButton.append(ai1wm_locale.close_export);
935
+
936
+ // Append close button to action
937
  action.append(closeButton);
938
 
939
  // Append title to section
969
  var action = $('<div></div>');
970
 
971
  // Create close button
972
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
973
  self.destroy();
974
  });
975
 
976
+ // Append text to close button
977
+ closeButton.append(ai1wm_locale.close_export);
978
+
979
+ // Append close button to action
980
  action.append(closeButton);
981
 
982
  // Append message to section
lib/view/assets/javascript/feedback.min.js CHANGED
@@ -146,7 +146,7 @@ jQuery(document).ready(function ($) {
146
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
147
 
148
  // Change placeholder message
149
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
150
 
151
  // Show feedback form
152
  $('.ai1wm-feedback-form').fadeIn();
@@ -158,7 +158,7 @@ jQuery(document).ready(function ($) {
158
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
159
 
160
  // Change placeholder message
161
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
162
 
163
  // Show feedback form
164
  $('.ai1wm-feedback-form').fadeIn();
@@ -210,13 +210,13 @@ jQuery(document).ready(function ($) {
210
 
211
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
212
  $.each(data.errors, function (key, value) {
213
- errorMessage.append('<p>' + value + '</p>');
214
  });
215
 
216
  $('.ai1wm-feedback').prepend(errorMessage);
217
  } else {
218
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
219
- successMessage.append('<p>Thanks for submitting your feedback!</p>');
220
 
221
  $('.ai1wm-feedback').html(successMessage);
222
  }
146
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
147
 
148
  // Change placeholder message
149
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.leave_feedback);
150
 
151
  // Show feedback form
152
  $('.ai1wm-feedback-form').fadeIn();
158
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
159
 
160
  // Change placeholder message
161
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
162
 
163
  // Show feedback form
164
  $('.ai1wm-feedback-form').fadeIn();
210
 
211
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
212
  $.each(data.errors, function (key, value) {
213
+ errorMessage.append($('<p />').text(value));
214
  });
215
 
216
  $('.ai1wm-feedback').prepend(errorMessage);
217
  } else {
218
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
219
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
220
 
221
  $('.ai1wm-feedback').html(successMessage);
222
  }
lib/view/assets/javascript/import.min.js CHANGED
@@ -173,7 +173,7 @@ jQuery(document).ready(function ($) {
173
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
174
 
175
  // Change placeholder message
176
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
177
 
178
  // Show feedback form
179
  $('.ai1wm-feedback-form').fadeIn();
@@ -185,7 +185,7 @@ jQuery(document).ready(function ($) {
185
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
186
 
187
  // Change placeholder message
188
- $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
189
 
190
  // Show feedback form
191
  $('.ai1wm-feedback-form').fadeIn();
@@ -237,13 +237,13 @@ jQuery(document).ready(function ($) {
237
 
238
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
239
  $.each(data.errors, function (key, value) {
240
- errorMessage.append('<p>' + value + '</p>');
241
  });
242
 
243
  $('.ai1wm-feedback').prepend(errorMessage);
244
  } else {
245
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
246
- successMessage.append('<p>Thanks for submitting your feedback!</p>');
247
 
248
  $('.ai1wm-feedback').html(successMessage);
249
  }
@@ -333,13 +333,13 @@ jQuery(document).ready(function ($) {
333
 
334
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
335
  $.each(data.errors, function (key, value) {
336
- errorMessage.append('<p>' + value + '</p>');
337
  });
338
 
339
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
340
  } else {
341
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
342
- successMessage.append('<p>Thanks for submitting your request!</p>');
343
 
344
  $('.ai1wm-report-problem-dialog').html(successMessage);
345
 
@@ -542,11 +542,11 @@ Import.prototype.start = function (options, retries) {
542
 
543
  // Initializing beforeunload event
544
  $(window).bind('beforeunload', function () {
545
- return 'You are about to stop importing your website, are you sure?';
546
  });
547
 
548
  // Set initial status
549
- this.setStatus({ type: 'info', message: 'Preparing to import...' });
550
 
551
  // Set params
552
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
@@ -576,8 +576,8 @@ Import.prototype.start = function (options, retries) {
576
  if (retries >= 5) {
577
  return self.setStatus({
578
  type: 'error',
579
- title: 'Unable to import',
580
- message: 'Unable to start the import. Refresh the page and try again'
581
  });
582
  }
583
 
@@ -655,8 +655,8 @@ Import.prototype.confirm = function (options, retries) {
655
  if (retries >= 5) {
656
  return self.setStatus({
657
  type: 'error',
658
- title: 'Unable to import',
659
- message: 'Unable to confirm the import. Refresh the page and try again'
660
  });
661
  }
662
 
@@ -703,8 +703,8 @@ Import.prototype.blogs = function (options, retries) {
703
  if (retries >= 5) {
704
  return self.setStatus({
705
  type: 'error',
706
- title: 'Unable to import',
707
- message: 'Unable to prepare blogs the import. Refresh the page and try again'
708
  });
709
  }
710
 
@@ -722,7 +722,7 @@ Import.prototype.clean = function (options, retries) {
722
  this.stopImport = true;
723
 
724
  // Set initial status
725
- this.setStatus({ type: 'info', message: 'Please wait, stopping the import...' });
726
 
727
  // Set params
728
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
@@ -752,8 +752,8 @@ Import.prototype.clean = function (options, retries) {
752
  if (retries >= 5) {
753
  return self.setStatus({
754
  type: 'error',
755
- title: 'Unable to import',
756
- message: 'Unable to stop the import. Refresh the page and try again'
757
  });
758
  }
759
 
@@ -951,11 +951,14 @@ var Modal = function Modal() {
951
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
952
 
953
  // Create close button
954
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
955
  self.destroy();
956
  });
957
 
958
- // Append close button
 
 
 
959
  action.append(closeButton);
960
 
961
  // Append title to section
@@ -976,10 +979,10 @@ var Modal = function Modal() {
976
  this.progress = function (params) {
977
  if (this.view === 'progress') {
978
 
979
- // Update progressBarMeter
980
  this.progress.progressBarMeter.width(params.percent + '%');
981
 
982
- // Update progressBarPercent
983
  this.progress.progressBarPercent.text(params.percent + '%');
984
  } else {
985
 
@@ -998,25 +1001,28 @@ var Modal = function Modal() {
998
  // Create action section
999
  var action = $('<div></div>');
1000
 
1001
- // Create progressBar
1002
  var progressBar = $('<span class="ai1wm-progress-bar"></span>');
1003
 
1004
- // Create progressBarMeter
1005
  this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
1006
 
1007
- // Create progressBarPercent
1008
- this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
1009
 
1010
  // Create stop import
1011
- var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
1012
  $(this).attr('disabled', 'disabled');
1013
  self.onStop();
1014
  });
1015
 
 
 
 
1016
  // Append progress meter and progress percent
1017
  progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
1018
 
1019
- // Append stop button
1020
  action.append(stopButton);
1021
 
1022
  // Append progress bar to section
@@ -1055,22 +1061,28 @@ var Modal = function Modal() {
1055
  // Create warning
1056
  var warning = $('<i class="ai1wm-icon-notification"></i>');
1057
 
1058
- // Create cancel button
1059
- var cancelButton = $('<button type="button" class="ai1wm-button-gray">Cancel</button>').on('click', function () {
1060
  $(this).attr('disabled', 'disabled');
1061
  self.onStop();
1062
  });
1063
 
1064
  // Create confirm button
1065
- var confirmButton = $('<button type="button" class="ai1wm-button-green">Proceed &gt;</button>').on('click', function () {
1066
  $(this).attr('disabled', 'disabled');
1067
  self.onConfirm();
1068
  });
1069
 
1070
- // Append cancel button
1071
- action.append(cancelButton);
 
 
 
 
 
 
1072
 
1073
- // Append confirm button
1074
  action.append(confirmButton);
1075
 
1076
  // Append warning to section
@@ -1109,12 +1121,15 @@ var Modal = function Modal() {
1109
  var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
1110
 
1111
  // Create continue button
1112
- var continueButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
1113
  $(this).attr('disabled', 'disabled');
1114
  self.onBlogs($(this).closest('form').serializeArray());
1115
  });
1116
 
1117
- // Append continue button
 
 
 
1118
  action.append(continueButton);
1119
 
1120
  // Append title to section
@@ -1152,11 +1167,17 @@ var Modal = function Modal() {
1152
  // Create loader
1153
  var loader = $('<span class="ai1wm-loader"></span>');
1154
 
 
 
 
1155
  // Create notice to be displayed during import process
1156
- var importNotice = $('<div class="ai1wm-import-modal-notice"><p>Please do not close this browser window or your import will fail</p></div>');
1157
 
1158
- // Append stop button
1159
- action.append(importNotice);
 
 
 
1160
 
1161
  // Append loader to header
1162
  header.append(loader);
@@ -1194,11 +1215,14 @@ var Modal = function Modal() {
1194
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
1195
 
1196
  // Create close button
1197
- var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
1198
  self.destroy();
1199
  });
1200
 
1201
- // Append close button
 
 
 
1202
  action.append(closeButton);
1203
 
1204
  // Append title to section
@@ -1912,7 +1936,7 @@ FileUploader.prototype.upload = function (file, retries) {
1912
  }).catch(function (error) {
1913
  var timeout = retries * 1000;
1914
  if (retries >= 30) {
1915
- return _this2.onError(new Error('We are sorry, there seems to be a problem while uploading your file. Follow <a href="https://www.youtube.com/watch?v=mRp7qTFYKgs" target="_blank">this guide</a> to resolve it.'));
1916
  }
1917
 
1918
  retries++;
@@ -1938,7 +1962,7 @@ FileUploader.prototype.checkSize = function (file) {
1938
  var size = parseInt(ai1wm_uploader.filters.ai1wm_archive_size, 10);
1939
 
1940
  if (file.size > size && size !== 0) {
1941
- throw new Error(ai1wm_import.oversize);
1942
  }
1943
  };
1944
 
@@ -1950,7 +1974,7 @@ FileUploader.prototype.checkExtension = function (file) {
1950
  });
1951
 
1952
  if (!matchExtension) {
1953
- throw new Error(ai1wm_import.invalid_extension);
1954
  }
1955
  };
1956
 
@@ -1960,7 +1984,7 @@ FileUploader.prototype.onFilesAdded = function (file) {
1960
 
1961
  // Initializing beforeunload event
1962
  $(window).bind('beforeunload', function () {
1963
- return 'You are about to stop importing your website, are you sure?';
1964
  });
1965
  };
1966
 
@@ -2000,7 +2024,7 @@ FileUploader.prototype.onFileUploaded = function () {
2000
  };
2001
 
2002
  FileUploader.prototype.onError = function (error) {
2003
- this.model.setStatus({ type: 'error', title: 'Unable to import', message: error.message });
2004
  };
2005
 
2006
  module.exports = FileUploader;
173
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
174
 
175
  // Change placeholder message
176
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.leave_feedback);
177
 
178
  // Show feedback form
179
  $('.ai1wm-feedback-form').fadeIn();
185
  $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
186
 
187
  // Change placeholder message
188
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you);
189
 
190
  // Show feedback form
191
  $('.ai1wm-feedback-form').fadeIn();
237
 
238
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
239
  $.each(data.errors, function (key, value) {
240
+ errorMessage.append($('<p />').text(value));
241
  });
242
 
243
  $('.ai1wm-feedback').prepend(errorMessage);
244
  } else {
245
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
246
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_feedback));
247
 
248
  $('.ai1wm-feedback').html(successMessage);
249
  }
333
 
334
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
335
  $.each(data.errors, function (key, value) {
336
+ errorMessage.append($('<p />').text(value));
337
  });
338
 
339
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
340
  } else {
341
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
342
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
343
 
344
  $('.ai1wm-report-problem-dialog').html(successMessage);
345
 
542
 
543
  // Initializing beforeunload event
544
  $(window).bind('beforeunload', function () {
545
+ return ai1wm_locale.stop_importing_your_website;
546
  });
547
 
548
  // Set initial status
549
+ this.setStatus({ type: 'info', message: ai1wm_locale.preparing_to_import });
550
 
551
  // Set params
552
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
576
  if (retries >= 5) {
577
  return self.setStatus({
578
  type: 'error',
579
+ title: ai1wm_locale.unable_to_import,
580
+ message: ai1wm_locale.unable_to_start_the_import
581
  });
582
  }
583
 
655
  if (retries >= 5) {
656
  return self.setStatus({
657
  type: 'error',
658
+ title: ai1wm_locale.unable_to_import,
659
+ message: ai1wm_locale.unable_to_confirm_the_import
660
  });
661
  }
662
 
703
  if (retries >= 5) {
704
  return self.setStatus({
705
  type: 'error',
706
+ title: ai1wm_locale.unable_to_import,
707
+ message: ai1wm_locale.unable_to_prepare_blogs_on_import
708
  });
709
  }
710
 
722
  this.stopImport = true;
723
 
724
  // Set initial status
725
+ this.setStatus({ type: 'info', message: ai1wm_locale.please_wait_stopping_the_export });
726
 
727
  // Set params
728
  var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
752
  if (retries >= 5) {
753
  return self.setStatus({
754
  type: 'error',
755
+ title: ai1wm_locale.unable_to_import,
756
+ message: ai1wm_locale.unable_to_stop_the_import
757
  });
758
  }
759
 
951
  var title = $('<span></span>').addClass('ai1wm-title-red').text(params.title);
952
 
953
  // Create close button
954
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
955
  self.destroy();
956
  });
957
 
958
+ // Append text to close button
959
+ closeButton.append(ai1wm_locale.close_import);
960
+
961
+ // Append close button to action
962
  action.append(closeButton);
963
 
964
  // Append title to section
979
  this.progress = function (params) {
980
  if (this.view === 'progress') {
981
 
982
+ // Update progress bar meter
983
  this.progress.progressBarMeter.width(params.percent + '%');
984
 
985
+ // Update progress bar percent
986
  this.progress.progressBarPercent.text(params.percent + '%');
987
  } else {
988
 
1001
  // Create action section
1002
  var action = $('<div></div>');
1003
 
1004
+ // Create progress bar
1005
  var progressBar = $('<span class="ai1wm-progress-bar"></span>');
1006
 
1007
+ // Create progress bar meter
1008
  this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
1009
 
1010
+ // Create progress bar percent
1011
+ this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent"></span>').text(params.percent + '%');
1012
 
1013
  // Create stop import
1014
+ var stopButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1015
  $(this).attr('disabled', 'disabled');
1016
  self.onStop();
1017
  });
1018
 
1019
+ // Append text to stop button
1020
+ stopButton.append('<i class="ai1wm-icon-notification"></i> ' + ai1wm_locale.stop_import);
1021
+
1022
  // Append progress meter and progress percent
1023
  progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
1024
 
1025
+ // Append stop button to action
1026
  action.append(stopButton);
1027
 
1028
  // Append progress bar to section
1061
  // Create warning
1062
  var warning = $('<i class="ai1wm-icon-notification"></i>');
1063
 
1064
+ // Create close button
1065
+ var closeButton = $('<button type="button" class="ai1wm-button-gray"></button>').on('click', function () {
1066
  $(this).attr('disabled', 'disabled');
1067
  self.onStop();
1068
  });
1069
 
1070
  // Create confirm button
1071
+ var confirmButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1072
  $(this).attr('disabled', 'disabled');
1073
  self.onConfirm();
1074
  });
1075
 
1076
+ // Append text to close button
1077
+ closeButton.append(ai1wm_locale.close_import);
1078
+
1079
+ // Append text to confirm button
1080
+ confirmButton.append(ai1wm_locale.confirm_import + ' &gt;');
1081
+
1082
+ // Append close button to action
1083
+ action.append(closeButton);
1084
 
1085
+ // Append confirm button to action
1086
  action.append(confirmButton);
1087
 
1088
  // Append warning to section
1121
  var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
1122
 
1123
  // Create continue button
1124
+ var continueButton = $('<button type="button" class="ai1wm-button-green"></button>').on('click', function () {
1125
  $(this).attr('disabled', 'disabled');
1126
  self.onBlogs($(this).closest('form').serializeArray());
1127
  });
1128
 
1129
+ // Append text to continue button
1130
+ continueButton.append(ai1wm_locale.continue_import);
1131
+
1132
+ // Append continue button to action
1133
  action.append(continueButton);
1134
 
1135
  // Append title to section
1167
  // Create loader
1168
  var loader = $('<span class="ai1wm-loader"></span>');
1169
 
1170
+ // Create warning
1171
+ var warning = $('<p></p>').html(ai1wm_locale.please_do_not_close_this_browser);
1172
+
1173
  // Create notice to be displayed during import process
1174
+ var notice = $('<div class="ai1wm-import-modal-notice"></div>');
1175
 
1176
+ // Append warning to notice
1177
+ notice.append(warning);
1178
+
1179
+ // Append stop button to action
1180
+ action.append(notice);
1181
 
1182
  // Append loader to header
1183
  header.append(loader);
1215
  var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
1216
 
1217
  // Create close button
1218
+ var closeButton = $('<button type="button" class="ai1wm-button-red"></button>').on('click', function () {
1219
  self.destroy();
1220
  });
1221
 
1222
+ // Append text to close button
1223
+ closeButton.append(ai1wm_locale.close_import);
1224
+
1225
+ // Append close button to action
1226
  action.append(closeButton);
1227
 
1228
  // Append title to section
1936
  }).catch(function (error) {
1937
  var timeout = retries * 1000;
1938
  if (retries >= 30) {
1939
+ return _this2.onError(new Error(ai1wm_locale.problem_while_uploading_your_file));
1940
  }
1941
 
1942
  retries++;
1962
  var size = parseInt(ai1wm_uploader.filters.ai1wm_archive_size, 10);
1963
 
1964
  if (file.size > size && size !== 0) {
1965
+ throw new Error(ai1wm_locale.invalid_archive_size);
1966
  }
1967
  };
1968
 
1974
  });
1975
 
1976
  if (!matchExtension) {
1977
+ throw new Error(ai1wm_locale.invalid_archive_extension);
1978
  }
1979
  };
1980
 
1984
 
1985
  // Initializing beforeunload event
1986
  $(window).bind('beforeunload', function () {
1987
+ return ai1wm_locale.stop_importing_your_website;
1988
  });
1989
  };
1990
 
2024
  };
2025
 
2026
  FileUploader.prototype.onError = function (error) {
2027
+ this.model.setStatus({ type: 'error', title: ai1wm_locale.unable_to_import, message: error.message });
2028
  };
2029
 
2030
  module.exports = FileUploader;
lib/view/assets/javascript/report.min.js CHANGED
@@ -172,13 +172,13 @@ jQuery(document).ready(function ($) {
172
 
173
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
174
  $.each(data.errors, function (key, value) {
175
- errorMessage.append('<p>' + value + '</p>');
176
  });
177
 
178
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
179
  } else {
180
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
181
- successMessage.append('<p>Thanks for submitting your request!</p>');
182
 
183
  $('.ai1wm-report-problem-dialog').html(successMessage);
184
 
172
 
173
  var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
174
  $.each(data.errors, function (key, value) {
175
+ errorMessage.append($('<p />').text(value));
176
  });
177
 
178
  $('.ai1wm-report-problem-dialog').prepend(errorMessage);
179
  } else {
180
  var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message');
181
+ successMessage.append($('<p />').text(ai1wm_locale.thanks_for_submitting_your_request));
182
 
183
  $('.ai1wm-report-problem-dialog').html(successMessage);
184
 
lib/view/assets/javascript/updater.min.js CHANGED
@@ -134,13 +134,13 @@ jQuery(document).ready(function ($) {
134
  window.location.hash = '';
135
 
136
  // Update plugin row
137
- $('#ai1wm-update-section-' + index).html($('<a />').attr('href', updateLink).text('Check for updates'));
138
 
139
  self.attr('disabled', false);
140
  });
141
  }).fail(function () {
142
  self.attr('disabled', false);
143
- error.html('Your purchase ID is invalid, please <a href="mailto:support@servmask.com">contact us</a>');
144
  });
145
 
146
  e.preventDefault();
134
  window.location.hash = '';
135
 
136
  // Update plugin row
137
+ $('#ai1wm-update-section-' + index).html($('<a />').attr('href', updateLink).text(ai1wm_locale.check_for_updates));
138
 
139
  self.attr('disabled', false);
140
  });
141
  }).fail(function () {
142
  self.attr('disabled', false);
143
+ error.html(ai1wm_locale.invalid_purchase_id);
144
  });
145
 
146
  e.preventDefault();
lib/view/backups/index.php CHANGED
@@ -61,7 +61,7 @@
61
  <?php echo esc_html( basename( $backup['filename'] ) ); ?>
62
  </td>
63
  <td class="ai1wm-column-date">
64
- <?php echo human_time_diff( $backup['mtime'] ); ?> <?php _e( 'ago', AI1WM_PLUGIN_NAME ); ?>
65
  </td>
66
  <td class="ai1wm-column-size">
67
  <?php if ( is_null( $backup['size'] ) ) : ?>
61
  <?php echo esc_html( basename( $backup['filename'] ) ); ?>
62
  </td>
63
  <td class="ai1wm-column-date">
64
+ <?php echo esc_html( sprintf( __( '%s ago', AI1WM_PLUGIN_NAME ), human_time_diff( $backup['mtime'] ) ) ); ?>
65
  </td>
66
  <td class="ai1wm-column-size">
67
  <?php if ( is_null( $backup['size'] ) ) : ?>
lib/{model/import/class-ai1wm-import-resolve.php → view/main/wordpress-htaccess-notice.php} RENAMED
@@ -22,20 +22,20 @@
22
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
 
25
 
26
- class Ai1wm_Import_Resolve {
27
-
28
- public static function execute( $params ) {
29
-
30
- // Set progress
31
- Ai1wm_Status::info( __( 'Resolving URL address...', AI1WM_PLUGIN_NAME ) );
32
-
33
- // HTTP resolve
34
- Ai1wm_Http::resolve( admin_url( 'admin-ajax.php?action=ai1wm_resolve' ) );
35
-
36
- // Set progress
37
- Ai1wm_Status::info( __( 'Done resolving URL address.', AI1WM_PLUGIN_NAME ) );
38
-
39
- return $params;
40
- }
41
- }
22
  * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
  * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
  */
25
+ ?>
26
 
27
+ <div class="error">
28
+ <p>
29
+ <?php
30
+ printf(
31
+ __(
32
+ 'All in One WP Migration is not able to create <strong>%s</strong> file. ' .
33
+ 'Try to change permissions of the parent folder or send us an email at ' .
34
+ '<a href="mailto:support@servmask.com">support@servmask.com</a> for assistance.',
35
+ AI1WM_PLUGIN_NAME
36
+ ),
37
+ AI1WM_WORDPRESS_HTACCESS
38
+ )
39
+ ?>
40
+ </p>
41
+ </div>
 
loader.php CHANGED
@@ -101,13 +101,21 @@ require_once AI1WM_VENDOR_PATH .
101
  DIRECTORY_SEPARATOR .
102
  'class-ai1wm-recursive-directory-iterator.php';
103
 
 
 
 
 
 
 
 
 
104
  require_once AI1WM_VENDOR_PATH .
105
  DIRECTORY_SEPARATOR .
106
  'servmask' .
107
  DIRECTORY_SEPARATOR .
108
  'filter' .
109
  DIRECTORY_SEPARATOR .
110
- 'class-ai1wm-extension-filter.php';
111
 
112
  require_once AI1WM_VENDOR_PATH .
113
  DIRECTORY_SEPARATOR .
@@ -203,10 +211,6 @@ require_once AI1WM_CONTROLLER_PATH .
203
  DIRECTORY_SEPARATOR .
204
  'class-ai1wm-status-controller.php';
205
 
206
- require_once AI1WM_CONTROLLER_PATH .
207
- DIRECTORY_SEPARATOR .
208
- 'class-ai1wm-resolve-controller.php';
209
-
210
  require_once AI1WM_CONTROLLER_PATH .
211
  DIRECTORY_SEPARATOR .
212
  'class-ai1wm-backups-controller.php';
@@ -231,10 +235,6 @@ require_once AI1WM_EXPORT_PATH .
231
  DIRECTORY_SEPARATOR .
232
  'class-ai1wm-export-compatibility.php';
233
 
234
- require_once AI1WM_EXPORT_PATH .
235
- DIRECTORY_SEPARATOR .
236
- 'class-ai1wm-export-resolve.php';
237
-
238
  require_once AI1WM_EXPORT_PATH .
239
  DIRECTORY_SEPARATOR .
240
  'class-ai1wm-export-archive.php';
@@ -279,10 +279,6 @@ require_once AI1WM_IMPORT_PATH .
279
  DIRECTORY_SEPARATOR .
280
  'class-ai1wm-import-upload.php';
281
 
282
- require_once AI1WM_IMPORT_PATH .
283
- DIRECTORY_SEPARATOR .
284
- 'class-ai1wm-import-resolve.php';
285
-
286
  require_once AI1WM_IMPORT_PATH .
287
  DIRECTORY_SEPARATOR .
288
  'class-ai1wm-import-validate.php';
@@ -319,22 +315,6 @@ require_once AI1WM_IMPORT_PATH .
319
  DIRECTORY_SEPARATOR .
320
  'class-ai1wm-import-clean.php';
321
 
322
- require_once AI1WM_HTTP_PATH .
323
- DIRECTORY_SEPARATOR .
324
- 'class-ai1wm-http-abstract.php';
325
-
326
- require_once AI1WM_HTTP_PATH .
327
- DIRECTORY_SEPARATOR .
328
- 'class-ai1wm-http-stream.php';
329
-
330
- require_once AI1WM_HTTP_PATH .
331
- DIRECTORY_SEPARATOR .
332
- 'class-ai1wm-http-curl.php';
333
-
334
- require_once AI1WM_HTTP_PATH .
335
- DIRECTORY_SEPARATOR .
336
- 'class-ai1wm-http-factory.php';
337
-
338
  require_once AI1WM_MODEL_PATH .
339
  DIRECTORY_SEPARATOR .
340
  'class-ai1wm-deprecated.php';
@@ -386,8 +366,3 @@ require_once AI1WM_MODEL_PATH .
386
  require_once AI1WM_MODEL_PATH .
387
  DIRECTORY_SEPARATOR .
388
  'class-ai1wm-handler.php';
389
-
390
- require_once AI1WM_MODEL_PATH .
391
- DIRECTORY_SEPARATOR .
392
- 'class-ai1wm-http.php';
393
-
101
  DIRECTORY_SEPARATOR .
102
  'class-ai1wm-recursive-directory-iterator.php';
103
 
104
+ require_once AI1WM_VENDOR_PATH .
105
+ DIRECTORY_SEPARATOR .
106
+ 'servmask' .
107
+ DIRECTORY_SEPARATOR .
108
+ 'iterator' .
109
+ DIRECTORY_SEPARATOR .
110
+ 'class-ai1wm-recursive-iterator-iterator.php';
111
+
112
  require_once AI1WM_VENDOR_PATH .
113
  DIRECTORY_SEPARATOR .
114
  'servmask' .
115
  DIRECTORY_SEPARATOR .
116
  'filter' .
117
  DIRECTORY_SEPARATOR .
118
+ 'class-ai1wm-recursive-extension-filter.php';
119
 
120
  require_once AI1WM_VENDOR_PATH .
121
  DIRECTORY_SEPARATOR .
211
  DIRECTORY_SEPARATOR .
212
  'class-ai1wm-status-controller.php';
213
 
 
 
 
 
214
  require_once AI1WM_CONTROLLER_PATH .
215
  DIRECTORY_SEPARATOR .
216
  'class-ai1wm-backups-controller.php';
235
  DIRECTORY_SEPARATOR .
236
  'class-ai1wm-export-compatibility.php';
237
 
 
 
 
 
238
  require_once AI1WM_EXPORT_PATH .
239
  DIRECTORY_SEPARATOR .
240
  'class-ai1wm-export-archive.php';
279
  DIRECTORY_SEPARATOR .
280
  'class-ai1wm-import-upload.php';
281
 
 
 
 
 
282
  require_once AI1WM_IMPORT_PATH .
283
  DIRECTORY_SEPARATOR .
284
  'class-ai1wm-import-validate.php';
315
  DIRECTORY_SEPARATOR .
316
  'class-ai1wm-import-clean.php';
317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  require_once AI1WM_MODEL_PATH .
319
  DIRECTORY_SEPARATOR .
320
  'class-ai1wm-deprecated.php';
366
  require_once AI1WM_MODEL_PATH .
367
  DIRECTORY_SEPARATOR .
368
  'class-ai1wm-handler.php';
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordp
4
  Requires at least: 3.3
5
  Tested up to: 4.9
6
  Requires PHP: 5.2.17
7
- Stable tag: 6.73
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -103,6 +103,17 @@ Alternatively you can download the plugin using the download button on this page
103
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
104
 
105
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
106
  = 6.73 =
107
  **Fixed**
108
 
4
  Requires at least: 3.3
5
  Tested up to: 4.9
6
  Requires PHP: 5.2.17
7
+ Stable tag: 6.74
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
103
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
104
 
105
  == Changelog ==
106
+ = 6.74 =
107
+ **Added**
108
+
109
+ * Support for LiteSpeed web server
110
+ * Fully localized the export, import, and restore processes
111
+
112
+ **Fixed**
113
+
114
+ * Table prefix replacement on import in limited corner cases
115
+ * URL replacement in Bitnami
116
+
117
  = 6.73 =
118
  **Fixed**
119
 
uninstall.php CHANGED
@@ -35,10 +35,8 @@ if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) {
35
  global $wpdb, $wp_filesystem;
36
 
37
  // Delete any options or other data stored in the database here
38
- delete_option( AI1WM_URL_IP );
39
- delete_option( AI1WM_URL_ADAPTER );
40
  delete_option( AI1WM_SECRET_KEY );
41
  delete_option( AI1WM_AUTH_USER );
42
  delete_option( AI1WM_AUTH_PASSWORD );
43
- delete_option( AI1WM_STATUS );
44
  }
35
  global $wpdb, $wp_filesystem;
36
 
37
  // Delete any options or other data stored in the database here
38
+ delete_option( AI1WM_STATUS );
 
39
  delete_option( AI1WM_SECRET_KEY );
40
  delete_option( AI1WM_AUTH_USER );
41
  delete_option( AI1WM_AUTH_PASSWORD );
 
42
  }