Duplicator – WordPress Migration Plugin - Version 1.2.26

Version Description

Download this release

Release Info

Developer bobriley
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 1.2.26
Comparing to
See all releases

Code changes from version 1.2.24 to 1.2.26

classes/class.server.php CHANGED
@@ -110,7 +110,22 @@ class DUP_Server
110
  //Core Files
111
  $files = array();
112
  $files['wp-config.php'] = file_exists(DUP_Util::safePath(DUPLICATOR_WPROOTPATH.'/wp-config.php'));
113
- $wp_test2 = $files['wp-config.php'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  //Cache
116
  $Package = DUP_Package::getActive();
110
  //Core Files
111
  $files = array();
112
  $files['wp-config.php'] = file_exists(DUP_Util::safePath(DUPLICATOR_WPROOTPATH.'/wp-config.php'));
113
+
114
+ /** searching wp-config in working word press is not worthy
115
+ * if this script is executing that means wp-config.php exists :)
116
+ * we need to know the core folders and files added by the user at this point
117
+ * retaining old logic as else for the case if its used some where else
118
+ */
119
+ //Core dir and files logic
120
+
121
+ if (isset($_POST['file_notice']) && isset($_POST['dir_notice'])) {
122
+ //means if there are core directories excluded or core files excluded return false
123
+ if ((bool) $_POST['file_notice'] || (bool) $_POST['dir_notice'])
124
+ $wp_test2 = false;
125
+ else $wp_test2 = true;
126
+ }else {
127
+ $wp_test2 = $files['wp-config.php'];
128
+ }
129
 
130
  //Cache
131
  $Package = DUP_Package::getActive();
classes/package/class.pack.database.php CHANGED
@@ -239,14 +239,17 @@ class DUP_Database
239
  }
240
 
241
  $cmd .= ' -u '.escapeshellarg(DB_USER);
242
- $cmd .= (DB_PASSWORD) ? ' -p'.escapeshellarg(DB_PASSWORD) : '';
 
 
 
 
243
  $cmd .= ' -h '.escapeshellarg($host);
244
  $cmd .= (!empty($port) && is_numeric($port) ) ?
245
  ' -P '.$port : '';
246
  $cmd .= ' -r '.escapeshellarg($this->dbStorePath);
247
  $cmd .= ' '.escapeshellarg(DB_NAME);
248
  $cmd .= ' 2>&1';
249
-
250
  $output = shell_exec($cmd);
251
 
252
  // Password bug > 5.6 (@see http://bugs.mysql.com/bug.php?id=66546)
239
  }
240
 
241
  $cmd .= ' -u '.escapeshellarg(DB_USER);
242
+ if(DUP_Util::isWindows())
243
+ $cmd .= (DB_PASSWORD) ? ' -p'.escapeshellcmd(DB_PASSWORD) : '';
244
+ else
245
+ $cmd .= (DB_PASSWORD) ? ' -p'.escapeshellarg(DB_PASSWORD) : '';
246
+
247
  $cmd .= ' -h '.escapeshellarg($host);
248
  $cmd .= (!empty($port) && is_numeric($port) ) ?
249
  ' -P '.$port : '';
250
  $cmd .= ' -r '.escapeshellarg($this->dbStorePath);
251
  $cmd .= ' '.escapeshellarg(DB_NAME);
252
  $cmd .= ' 2>&1';
 
253
  $output = shell_exec($cmd);
254
 
255
  // Password bug > 5.6 (@see http://bugs.mysql.com/bug.php?id=66546)
classes/utilities/class.u.php CHANGED
@@ -51,6 +51,35 @@ class DUP_Util
51
  self::$PHP7_plus = version_compare(PHP_VERSION, '7.0.0', '>=');
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  /**
55
  * Groups an array into arrays by a given key, or set of keys, shared between all array members.
56
  *
51
  self::$PHP7_plus = version_compare(PHP_VERSION, '7.0.0', '>=');
52
  }
53
 
54
+
55
+ public static function getWPCoreDirs()
56
+ {
57
+ $wp_core_dirs = array(get_home_path().'wp-admin',get_home_path().'wp-includes');
58
+
59
+ //if wp_content is overrided
60
+ $wp_path = get_home_path()."wp-content";
61
+ if(get_home_path().'wp-content' != WP_CONTENT_DIR){
62
+ $wp_path = WP_CONTENT_DIR;
63
+ }
64
+ $wp_path = str_replace("\\", "/", $wp_path);
65
+
66
+ $wp_core_dirs[] = $wp_path;
67
+ $wp_core_dirs[] = $wp_path.'/plugins';
68
+ $wp_core_dirs[] = $wp_path.'/themes';
69
+
70
+
71
+ return $wp_core_dirs;
72
+ }
73
+ /**
74
+ * return absolute path for the files that are core directories
75
+ * @return string array
76
+ */
77
+ public static function getWPCoreFiles()
78
+ {
79
+ $wp_cored_dirs = array(get_home_path().'wp-config.php');
80
+ return $wp_cored_dirs;
81
+ }
82
+
83
  /**
84
  * Groups an array into arrays by a given key, or set of keys, shared between all array members.
85
  *
define.php CHANGED
@@ -2,7 +2,7 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.2.24');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.2.26');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
duplicator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
- Version: 1.2.24
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
+ Version: 1.2.26
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
installer/build/classes/class.db.php CHANGED
@@ -139,6 +139,30 @@ class DUPX_DB
139
  return mysqli_get_server_info($dbh);
140
  }
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  /**
143
  * Determine if a MySQL database supports a particular feature
144
  *
139
  return mysqli_get_server_info($dbh);
140
  }
141
 
142
+ /**
143
+ * Get an array of all supported collation names
144
+ *
145
+ * @param conn $dbh Database connection handle
146
+ *
147
+ * @return array
148
+ */
149
+ public static function getSupportedCollationsList($dbh)
150
+ {
151
+ $collations = array();
152
+
153
+ $query = "SHOW COLLATION";
154
+ if ($result = $dbh->query($query)) {
155
+
156
+ while ($row = $result->fetch_assoc()) {
157
+ $collations[] = $row["Collation"];
158
+ }
159
+
160
+ }
161
+ $result->free();
162
+
163
+ return $collations;
164
+ }
165
+
166
  /**
167
  * Determine if a MySQL database supports a particular feature
168
  *
installer/build/classes/class.engine.php CHANGED
@@ -217,22 +217,30 @@ class DUPX_UpdateEngine
217
  $where_sql = array();
218
  $upd = false;
219
  $serial_err = 0;
 
220
 
221
  //Loops every cell
222
  foreach ($columns as $column => $primary_key) {
223
  $report['scan_cells'] ++;
224
  $edited_data = $data_to_fix = $row[$column];
225
- $base64coverted = false;
226
  $txt_found = false;
227
 
 
 
 
 
 
 
 
228
  //Only replacing string values
229
- if (!empty($row[$column]) && !is_numeric($row[$column])) {
230
  //Base 64 detection
231
  if (base64_decode($row[$column], true)) {
232
  $decoded = base64_decode($row[$column], true);
233
  if (self::isSerialized($decoded)) {
234
  $edited_data = $decoded;
235
- $base64coverted = true;
236
  }
237
  }
238
 
@@ -247,12 +255,12 @@ class DUPX_UpdateEngine
247
  continue;
248
  }
249
 
250
- //Replace logic - level 1: simple check on any string or serlized strings
251
  foreach ($list as $item) {
252
  $edited_data = self::recursiveUnserializeReplace($item['search'], $item['replace'], $edited_data);
253
  }
254
 
255
- //Replace logic - level 2: repair serilized strings that have become broken
256
  $serial_check = self::fixSerialString($edited_data);
257
  if ($serial_check['fixed']) {
258
  $edited_data = $serial_check['data'];
@@ -265,7 +273,7 @@ class DUPX_UpdateEngine
265
  if ($edited_data != $data_to_fix || $serial_err > 0) {
266
  $report['updt_cells'] ++;
267
  //Base 64 encode
268
- if ($base64coverted) {
269
  $edited_data = base64_encode($edited_data);
270
  }
271
  $upd_col[] = $column;
217
  $where_sql = array();
218
  $upd = false;
219
  $serial_err = 0;
220
+ $is_unkeyed = !in_array(true,$columns);
221
 
222
  //Loops every cell
223
  foreach ($columns as $column => $primary_key) {
224
  $report['scan_cells'] ++;
225
  $edited_data = $data_to_fix = $row[$column];
226
+ $base64converted = false;
227
  $txt_found = false;
228
 
229
+ //Unkeyed table code
230
+ //Added this here to add all columns to $where_sql
231
+ //The if statement with $txt_found would skip additional columns
232
+ if($is_unkeyed){
233
+ $where_sql[] = $column.' = "'.mysqli_real_escape_string($dbh, $data_to_fix).'"';
234
+ }
235
+
236
  //Only replacing string values
237
+ if (!empty($row[$column]) && !is_numeric($row[$column]) && $primary_key != 1) {
238
  //Base 64 detection
239
  if (base64_decode($row[$column], true)) {
240
  $decoded = base64_decode($row[$column], true);
241
  if (self::isSerialized($decoded)) {
242
  $edited_data = $decoded;
243
+ $base64converted = true;
244
  }
245
  }
246
 
255
  continue;
256
  }
257
 
258
+ //Replace logic - level 1: simple check on any string or serialized strings
259
  foreach ($list as $item) {
260
  $edited_data = self::recursiveUnserializeReplace($item['search'], $item['replace'], $edited_data);
261
  }
262
 
263
+ //Replace logic - level 2: repair serialized strings that have become broken
264
  $serial_check = self::fixSerialString($edited_data);
265
  if ($serial_check['fixed']) {
266
  $edited_data = $serial_check['data'];
273
  if ($edited_data != $data_to_fix || $serial_err > 0) {
274
  $report['updt_cells'] ++;
275
  //Base 64 encode
276
+ if ($base64converted) {
277
  $edited_data = base64_encode($edited_data);
278
  }
279
  $upd_col[] = $column;
installer/build/ctrls/ctrl.step2.php CHANGED
@@ -217,6 +217,45 @@ $sql_result_file_length = count($sql_result_file_data);
217
  $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
218
  $sql_file = null;
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  //WARNING: Create installer-data.sql failed
221
  if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
222
  {
@@ -289,7 +328,7 @@ switch ($_POST['dbaction']) {
289
  case "empty":
290
  //DROP DB TABLES
291
  $drop_log = "Database already empty. Ready for install.";
292
- $sql = "SHOW TABLES FROM `{$_POST['dbname']}`";
293
  $found_tables = null;
294
  if ($result = mysqli_query($dbh, $sql)) {
295
  while ($row = mysqli_fetch_row($result)) {
217
  $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
218
  $sql_file = null;
219
 
220
+ if($_POST['dbcollatefb']){
221
+ $supportedCollations = DUPX_DB::getSupportedCollationsList($dbh);
222
+ $collation_arr = array(
223
+ 'utf8mb4_unicode_520_ci',
224
+ 'utf8mb4_unicode_520',
225
+ 'utf8mb4_unicode_ci',
226
+ 'utf8mb4',
227
+ 'utf8_unicode_520_ci',
228
+ 'utf8_unicode_520',
229
+ 'utf8_unicode_ci',
230
+ 'utf8'
231
+ );
232
+ $latest_supported_collation = '';
233
+ $latest_supported_index = -1;
234
+
235
+ foreach ($collation_arr as $key => $val){
236
+ if(in_array($val,$supportedCollations)){
237
+ $latest_supported_collation = $val;
238
+ $latest_supported_index = $key;
239
+ break;
240
+ }
241
+ }
242
+
243
+ //No need to replace if current DB is up to date
244
+ if($latest_supported_index != 0){
245
+ for($i=0;$i<$latest_supported_index;$i++){
246
+ foreach ($sql_result_file_data as $index => $col_sql_query){
247
+ if(strpos($col_sql_query,$collation_arr[$i]) !== false){
248
+ $sql_result_file_data[$index] = str_replace($collation_arr[$i],$latest_supported_collation,$col_sql_query);
249
+ if(strpos($collation_arr[$i],'utf8mb4') !== false && strpos($latest_supported_collation,'utf8mb4') === false){
250
+ $sql_result_file_data[$index] = str_replace('utf8mb4','utf8',$sql_result_file_data[$index]);
251
+ }
252
+ DUPX_Log::info("Collation {$collation_arr[$i]} was changed with {$latest_supported_collation}");
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+
259
  //WARNING: Create installer-data.sql failed
260
  if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
261
  {
328
  case "empty":
329
  //DROP DB TABLES
330
  $drop_log = "Database already empty. Ready for install.";
331
+ $sql = "SHOW FULL TABLES WHERE Table_Type != 'VIEW'";
332
  $found_tables = null;
333
  if ($result = mysqli_query($dbh, $sql)) {
334
  while ($row = mysqli_fetch_row($result)) {
installer/build/view.help.php CHANGED
@@ -2,7 +2,7 @@
2
  HELP FORM -->
3
  <div id="main-help">
4
  <div class="help-online">
5
- <i class="fa fa-file-text-o"></i> For additional help visit the<br/> <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=knowledgebase" target="_blank">Online Knowledge-Base</a><br/>
6
  <small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
7
  </div>
8
 
@@ -89,9 +89,9 @@ STEP 1
89
  </td>
90
  </tr>
91
  <tr>
92
- <td>Config Files</td>
93
  <td>
94
- Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were set up with your packaged site.
95
  When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
96
  both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
97
  <br/><br/>
@@ -135,7 +135,7 @@ STEP 2
135
 
136
  <h3>Basic/cPanel:</h3>
137
  There are currently two options you can use to perform the database setup. The "Basic" option requires knowledge about the existing server and on most hosts
138
- will require that the database be set up ahead of time. The cPanel option is for hosts that support <a href="http://cpanel.com/" target="_blank">cPanel Software</a>.
139
  This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
140
  from the installer.
141
  <br/><br/>
@@ -170,7 +170,7 @@ STEP 2
170
  - Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
171
  - Your host has disabled cPanel API access <br/>
172
  - Your host has configured cPanel to work differently (please contact your host) <br/>
173
- - View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=affiliate&utm_content=inst_cpanel_hosts' target='_blank'>Supported Hosts</a>
174
  </td>
175
  </tr>
176
  </table>
@@ -240,12 +240,26 @@ STEP 2
240
  <th>Details</th>
241
  </tr>
242
  <tr>
243
- <td>Prefix:<sup>pro*</sup></td>
244
  <td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
245
  your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
246
- This will still require you to enter in the cPanel's required setup prefix if they require one. The checkbox will be set to read-only if your host has
247
  disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
248
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  <tr>
250
  <td>Spacing</td>
251
  <td>The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question
@@ -259,12 +273,12 @@ STEP 2
259
  <tr>
260
  <td>Charset</td>
261
  <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
262
- databases character set should be.</td>
263
  </tr>
264
  <tr>
265
  <td>Collation</td>
266
  <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
267
- databases character set should be.</td>
268
  </tr>
269
  </table>
270
  <sup>*cPanel Only Option</sup>
@@ -384,7 +398,7 @@ STEP 3
384
  <tr>
385
  <td>Config SSL</td>
386
  <td>Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set. The "Enforce on Login"
387
- will turn off SSL support for WordPress Logins. </td>
388
  </tr>
389
  <tr>
390
  <td>Config Cache</td>
@@ -426,7 +440,7 @@ STEP 4
426
  <div style="padding: 0px 10px 10px 10px;">
427
  <b>Common Quick Fix Issues:</b>
428
  <ul>
429
- <li>Use an <a href='https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=affiliate&utm_content=inst_help_hosts' target='_blank'>approved hosting provider</a></li>
430
  <li>Validate directory and file permissions (see below)</li>
431
  <li>Validate web server configuration file (see below)</li>
432
  <li>Clear your browsers cache</li>
@@ -461,8 +475,8 @@ STEP 4
461
 
462
  </div>
463
 
464
- <div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=additional_help" target="_blank">online resources</a></div>
465
 
466
  <br/><br/>
467
  </div>
468
- <!-- END OF VIEW HELP -->
2
  HELP FORM -->
3
  <div id="main-help">
4
  <div class="help-online">
5
+ <i class="fa fa-file-text-o"></i> For additional help visit the<br/> <a href="https://snapcreek.com/support/docs/" target="_blank">Online Knowledge-Base</a><br/>
6
  <small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
7
  </div>
8
 
89
  </td>
90
  </tr>
91
  <tr>
92
+ <td>Config Files <sup>pro</sup></td>
93
  <td>
94
+ Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were setup with your packaged site.
95
  When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
96
  both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
97
  <br/><br/>
135
 
136
  <h3>Basic/cPanel:</h3>
137
  There are currently two options you can use to perform the database setup. The "Basic" option requires knowledge about the existing server and on most hosts
138
+ will require that the database be setup ahead of time. The cPanel option is for hosts that support <a href="http://cpanel.com/" target="_blank">cPanel Software</a>.
139
  This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
140
  from the installer.
141
  <br/><br/>
170
  - Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
171
  - Your host has disabled cPanel API access <br/>
172
  - Your host has configured cPanel to work differently (please contact your host) <br/>
173
+ - View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>Supported Hosts</a>
174
  </td>
175
  </tr>
176
  </table>
240
  <th>Details</th>
241
  </tr>
242
  <tr>
243
+ <td>Prefix<sup>pro*</sup></td>
244
  <td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
245
  your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
246
+ This will still require you to enter in the cPanels required setup prefix if they require one. The checkbox will be set to read-only if your host has
247
  disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
248
  </tr>
249
+ <tr>
250
+ <td>Legacy</td>
251
+ <td>When creating a database table, the Mysql version being used may not support the collation type of the Mysql version where the table was created.
252
+ In this scenario, the installer will fallback to a legacy collation type to try and create the table. This value should only be checked if you receive an error when
253
+ testing the database.
254
+ <br/><br/>
255
+ For example, if the database was created on MySQL 5.7 and the tables collation type was 'utf8mb4_unicode_520_ci', however your trying to run the installer
256
+ on an older MySQL 5.5 engine that does not support that type then an error will be thrown. If this option is checked then the legacy setting will try to
257
+ use 'utf8mb4_unicode_520', then 'utf8mb4', then 'utf8' and so on until it runs out of options.
258
+ <br/><br/>
259
+ For more information about this feature see the online FAQ question titled
260
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">"What is Compatibility mode & ' collation' errors"</a>
261
+ </td>
262
+ </tr>
263
  <tr>
264
  <td>Spacing</td>
265
  <td>The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question
273
  <tr>
274
  <td>Charset</td>
275
  <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
276
+ databases character set should be.</td>
277
  </tr>
278
  <tr>
279
  <td>Collation</td>
280
  <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
281
+ databases collation set should be.</td>
282
  </tr>
283
  </table>
284
  <sup>*cPanel Only Option</sup>
398
  <tr>
399
  <td>Config SSL</td>
400
  <td>Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set. The "Enforce on Login"
401
+ will turn off SSL support for WordPress Logins.</td>
402
  </tr>
403
  <tr>
404
  <td>Config Cache</td>
440
  <div style="padding: 0px 10px 10px 10px;">
441
  <b>Common Quick Fix Issues:</b>
442
  <ul>
443
+ <li>Use an <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>approved hosting provider</a></li>
444
  <li>Validate directory and file permissions (see below)</li>
445
  <li>Validate web server configuration file (see below)</li>
446
  <li>Clear your browsers cache</li>
475
 
476
  </div>
477
 
478
+ <div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/" target="_blank">online resources</a></div>
479
 
480
  <br/><br/>
481
  </div>
482
+ <!-- END OF VIEW HELP -->
installer/build/view.step2.php CHANGED
@@ -136,6 +136,10 @@ VIEW: STEP 2- INPUT -->
136
  <div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
137
 
138
  <table class="dupx-opts dupx-advopts">
 
 
 
 
139
  <tr>
140
  <td>Spacing:</td>
141
  <td colspan="2">
136
  <div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
137
 
138
  <table class="dupx-opts dupx-advopts">
139
+ <tr>
140
+ <td>Legacy:</td>
141
+ <td><input type="checkbox" name="dbcollatefb" id="dbcollatefb" value="1" /> <label for="dbcollatefb">Apply legacy collation fallback support for unknown collations types</label></td>
142
+ </tr>
143
  <tr>
144
  <td>Spacing:</td>
145
  <td colspan="2">
installer/build/view.step4.php CHANGED
@@ -127,7 +127,7 @@ VIEW: STEP 4 - INPUT -->
127
  <ul>
128
  <li>
129
  <b>Unknown collation:</b> See Online FAQ:
130
- <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step4_unknowncoll#faq-trouble-090-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
131
  </li>
132
  <li>
133
  <b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
127
  <ul>
128
  <li>
129
  <b>Unknown collation:</b> See Online FAQ:
130
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step4_unknowncoll#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
131
  </li>
132
  <li>
133
  <b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
readme.txt CHANGED
@@ -2,16 +2,17 @@
2
  Contributors: corylamleorg, bobriley
3
  Donate link: www.lifeinthegrid.com/partner
4
  Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
5
- Requires at least: 4.5
6
- Tested up to: 4.8
7
- Stable tag: 1.2.24
 
8
  License: GPLv2
9
 
10
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
11
 
12
  == Description ==
13
 
14
- > Duplicator gives WordPress users the ability to migrate, copy, move or clone a site from one location to another and also serves as a simple backup utility. Duplicator handles both serialized and base64 serialized string replacement. WordPress migration and WordPress backups are easily handled by this plugin.
15
 
16
  For complete details visit [snapcreek.com](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=desc_details&utm_campaign=duplicator_free).
17
 
@@ -21,7 +22,7 @@ http://www.youtube.com/watch?v=oc73jtvHWYQ
21
  = Overview =
22
  Duplicator enables you to:
23
 
24
- * Move, migrate or clone a WordPress site between domains or hosts
25
  * Pull down a live site to localhost for development
26
  * Manually backup a WordPress site or parts of a site
27
  * Duplicate a live site to a staging area or vice versa
@@ -102,4 +103,4 @@ Please see the following url:
102
 
103
  == Upgrade Notice ==
104
 
105
- Please use our ticketing system when submitting your logs. Please do not post to the forums.
2
  Contributors: corylamleorg, bobriley
3
  Donate link: www.lifeinthegrid.com/partner
4
  Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
5
+ Requires at least: 4.0
6
+ Tested up to: 4.8.2
7
+ Requires PHP: 5.2.17
8
+ Stable tag: 1.2.26
9
  License: GPLv2
10
 
11
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
12
 
13
  == Description ==
14
 
15
+ > Duplicator gives WordPress users the ability to migrate, copy, move or clone a site from one location to another and also serves as a simple backup utility. Duplicator handles both serialized and base64 serialized string replacement. Standard WordPress migration and WordPress backups are easily handled by this plugin as are **zero downtime migrations**.
16
 
17
  For complete details visit [snapcreek.com](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=desc_details&utm_campaign=duplicator_free).
18
 
22
  = Overview =
23
  Duplicator enables you to:
24
 
25
+ * Move, migrate or clone a WordPress site between domains or hosts with **zero downtime**
26
  * Pull down a live site to localhost for development
27
  * Manually backup a WordPress site or parts of a site
28
  * Duplicate a live site to a staging area or vice versa
103
 
104
  == Upgrade Notice ==
105
 
106
+ Please use our ticketing system when submitting your logs. Please do not post to the forums.
views/help/gopro.php CHANGED
@@ -12,6 +12,8 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
12
  background:#fff; border-radius:20px;
13
  box-shadow:inset 0px 0px 67px 20px rgba(241,241,241,1);
14
  }
 
 
15
  div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow:0 8px 6px -6px #ccc;}
16
  div.feature {background:#fff; padding:15px; margin:2px; text-align:center; min-height:20px}
17
  div.feature a {font-size:18px; font-weight:bold;}
@@ -43,6 +45,11 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
43
  <th class="check-column"><?php _e('Free', 'duplicator') ?></th>
44
  <th class="check-column"><?php _e('Professional', 'duplicator') ?></th>
45
  </tr>
 
 
 
 
 
46
  <tr>
47
  <td class="feature-column"><?php _e('Backup Files & Database', 'duplicator') ?></td>
48
  <td class="check-column"><i class="fa fa-check"></i></td>
@@ -63,6 +70,16 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
63
  <td class="check-column"><i class="fa fa-check"></i></td>
64
  <td class="check-column"><i class="fa fa-check"></i></td>
65
  </tr>
 
 
 
 
 
 
 
 
 
 
66
  <tr>
67
  <td class="feature-column">
68
  <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
@@ -95,40 +112,103 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
95
  <td class="check-column"></td>
96
  <td class="check-column"><i class="fa fa-check"></i></td>
97
  </tr>
 
 
 
98
  <tr>
99
- <td class="feature-column">
100
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
101
- <?php _e('cPanel Database API', 'duplicator') ?>
 
 
 
 
102
  </td>
103
  <td class="check-column"></td>
104
  <td class="check-column"><i class="fa fa-check"></i></td>
105
- </tr>
106
  <tr>
107
- <td class="feature-column"><?php _e('Scheduled Backups', 'duplicator') ?></td>
108
  <td class="check-column"></td>
109
  <td class="check-column"><i class="fa fa-check"></i></td>
110
- </tr>
111
  <tr>
112
- <td class="feature-column"><?php _e('Large Package Support', 'duplicator') ?></td>
113
  <td class="check-column"></td>
114
  <td class="check-column"><i class="fa fa-check"></i></td>
115
  </tr>
116
- <tr>
117
- <td class="feature-column"><?php _e('Multisite Backup', 'duplicator') ?></td>
 
 
 
 
 
 
 
 
 
 
 
118
  <td class="check-column"></td>
119
  <td class="check-column"><i class="fa fa-check"></i></td>
120
  </tr>
121
-
122
  <tr>
123
- <td class="feature-column"><?php _e('Email Alerts', 'duplicator') ?></td>
 
 
 
 
 
 
 
124
  <td class="check-column"></td>
125
  <td class="check-column"><i class="fa fa-check"></i></td>
126
  </tr>
 
 
 
 
 
 
 
127
  <tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  <td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
129
  <td class="check-column"></td>
130
  <td class="check-column"><i class="fa fa-check"></i></td>
131
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <tr>
133
  <td class="feature-column"><?php _e('Manual Transfers', 'duplicator') ?></td>
134
  <td class="check-column"></td>
12
  background:#fff; border-radius:20px;
13
  box-shadow:inset 0px 0px 67px 20px rgba(241,241,241,1);
14
  }
15
+ i.dup-gopro-help {color:#777 !important; margin-left:5px; font-size:14px; }
16
+ td.group-header {background-color:#D5D5D5; color: #000; font-size: 20px; padding:7px !important; font-weight: bold}
17
  div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow:0 8px 6px -6px #ccc;}
18
  div.feature {background:#fff; padding:15px; margin:2px; text-align:center; min-height:20px}
19
  div.feature a {font-size:18px; font-weight:bold;}
45
  <th class="check-column"><?php _e('Free', 'duplicator') ?></th>
46
  <th class="check-column"><?php _e('Professional', 'duplicator') ?></th>
47
  </tr>
48
+ <!-- =====================
49
+ CORE FEATURES
50
+ <tr>
51
+ <td colspan="3" class="group-header"><?php _e('Core Features', 'duplicator') ?></td>
52
+ </tr> -->
53
  <tr>
54
  <td class="feature-column"><?php _e('Backup Files & Database', 'duplicator') ?></td>
55
  <td class="check-column"><i class="fa fa-check"></i></td>
70
  <td class="check-column"><i class="fa fa-check"></i></td>
71
  <td class="check-column"><i class="fa fa-check"></i></td>
72
  </tr>
73
+ <tr>
74
+ <td class="feature-column"><?php _e('Scheduled Backups', 'duplicator') ?></td>
75
+ <td class="check-column"></td>
76
+ <td class="check-column"><i class="fa fa-check"></i></td>
77
+ </tr>
78
+ <!-- =====================
79
+ CLOUD STORAGE
80
+ <tr>
81
+ <td colspan="3" class="group-header"><?php _e('Cloud Storage', 'duplicator') ?></td>
82
+ </tr>-->
83
  <tr>
84
  <td class="feature-column">
85
  <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
112
  <td class="check-column"></td>
113
  <td class="check-column"><i class="fa fa-check"></i></td>
114
  </tr>
115
+
116
+ <!-- =====================
117
+ ENHANCED PROCCESING
118
  <tr>
119
+ <td colspan="3" class="group-header"><?php _e('Improved Processing', 'duplicator') ?></td>
120
+ </tr>-->
121
+ <tr>
122
+ <td class="feature-column"><?php _e('Large Site Support', 'duplicator') ?><sup>
123
+ <i class="fa fa-question-circle dup-gopro-help"
124
+ data-tooltip-title="<?php _e("Large Site Support", 'duplicator'); ?>"
125
+ data-tooltip="<?php _e('Advanced archive engine processes multi-gig sites on even stubborn budget hosts!', 'duplicator'); ?>"/></i></sup>
126
  </td>
127
  <td class="check-column"></td>
128
  <td class="check-column"><i class="fa fa-check"></i></td>
129
+ </tr>
130
  <tr>
131
+ <td class="feature-column"><?php _e('Multiple Archive Engines', 'duplicator') ?></td>
132
  <td class="check-column"></td>
133
  <td class="check-column"><i class="fa fa-check"></i></td>
134
+ </tr>
135
  <tr>
136
+ <td class="feature-column"><?php _e('Server Throttling', 'duplicator') ?></td>
137
  <td class="check-column"></td>
138
  <td class="check-column"><i class="fa fa-check"></i></td>
139
  </tr>
140
+ <tr>
141
+ <td class="feature-column"><?php _e('Background Processing', 'duplicator') ?></td>
142
+ <td class="check-column"></td>
143
+ <td class="check-column"><i class="fa fa-check"></i></td>
144
+ </tr>
145
+
146
+ <!-- =====================
147
+ ROBUST INSTALLATION
148
+ <tr>
149
+ <td colspan="3" class="group-header"><?php _e('Robust Installation', 'duplicator') ?></td>
150
+ </tr>-->
151
+ <tr>
152
+ <td class="feature-column"><?php _e('Installer Passwords', 'duplicator') ?></td>
153
  <td class="check-column"></td>
154
  <td class="check-column"><i class="fa fa-check"></i></td>
155
  </tr>
 
156
  <tr>
157
+ <td class="feature-column">
158
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
159
+ <?php _e('cPanel Database API', 'duplicator') ?>
160
+ <sup>
161
+ <i class="fa fa-question-circle dup-gopro-help"
162
+ data-tooltip-title="<?php _e("cPanel", 'duplicator'); ?>"
163
+ data-tooltip="<?php _e('Create the database and database user directly in the installer. No need to browse to your host\'s cPanel application.', 'duplicator'); ?>"/></i></sup>
164
+ </td>
165
  <td class="check-column"></td>
166
  <td class="check-column"><i class="fa fa-check"></i></td>
167
  </tr>
168
+
169
+
170
+ <!-- =====================
171
+ MULTI-SITE
172
+ <tr>
173
+ <td colspan="3" class="group-header"><?php _e('Multisite', 'duplicator') ?></td>
174
+ </tr>-->
175
  <tr>
176
+ <td class="feature-column"><?php _e('Multisite Network Migration', 'duplicator') ?></td>
177
+ <td class="check-column"></td>
178
+ <td class="check-column"><i class="fa fa-check"></i></td>
179
+ </tr>
180
+ <tr>
181
+ <td class="feature-column"><?php _e('Multisite Subsite &gt; Standalone', 'duplicator') ?><sup>
182
+ <i class="fa fa-question-circle dup-gopro-help"
183
+ data-tooltip-title="<?php _e("Multisite", 'duplicator'); ?>"
184
+ data-tooltip="<?php _e('Install an individual subsite from a Multisite as a standalone site.', 'duplicator'); ?>"/></i></sup>
185
+ </td>
186
+ <td class="check-column"></td>
187
+ <td class="check-column"><i class="fa fa-check"></i></td>
188
+ </tr>
189
+
190
+ <tr>
191
  <td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
192
  <td class="check-column"></td>
193
  <td class="check-column"><i class="fa fa-check"></i></td>
194
  </tr>
195
+ <!--tr>
196
+ <td class="feature-column"><?php _e('Duplicate Subsite in Network', 'duplicator') ?></td>
197
+ <td class="check-column"></td>
198
+ <td class="check-column"><i class="fa fa-check"></i></td>
199
+ </tr-->
200
+
201
+ <!-- =====================
202
+ ENHANCED EXPERIENCE
203
+ <tr>
204
+ <td colspan="3" class="group-header"><?php _e('Enhanced Experience', 'duplicator') ?></td>
205
+ </tr>-->
206
+ <tr>
207
+ <td class="feature-column"><?php _e('Email Alerts', 'duplicator') ?></td>
208
+ <td class="check-column"></td>
209
+ <td class="check-column"><i class="fa fa-check"></i></td>
210
+ </tr>
211
+
212
  <tr>
213
  <td class="feature-column"><?php _e('Manual Transfers', 'duplicator') ?></td>
214
  <td class="check-column"></td>
views/packages/main/s1.setup1.php CHANGED
@@ -30,9 +30,9 @@ $ui_css_archive = (isset($data->payload['dup-pack-archive-panel']) && $data->pa
30
  $ui_css_installer = (isset($data->payload['dup-pack-installer-panel']) && $data->payload['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
31
  $dup_intaller_files = implode(", ", array_keys(DUP_Server::getInstallerFiles()));
32
  $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath()) ? 'mysqldump' : 'PHP';
33
- $retry_enabled = isset($_GET['retry']) ? true : false;
34
- $retry_dbenabled = isset($_GET['retry']) && $_GET['retry'] == 2 ? true : false;
35
 
 
 
36
  ?>
37
 
38
  <style>
30
  $ui_css_installer = (isset($data->payload['dup-pack-installer-panel']) && $data->payload['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
31
  $dup_intaller_files = implode(", ", array_keys(DUP_Server::getInstallerFiles()));
32
  $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath()) ? 'mysqldump' : 'PHP';
 
 
33
 
34
+ //="No Selection", 1="Try Again", 2="Two-Part Install"
35
+ $retry_state = isset($_GET['retry']) ? $_GET['retry'] : 0;
36
  ?>
37
 
38
  <style>
views/packages/main/s1.setup2.php CHANGED
@@ -35,7 +35,7 @@
35
  div.dup-store-pro a {text-decoration:underline}
36
  span.dup-pro-text {font-style:italic; font-size:12px; color:#555; font-style:italic }
37
  div#dup-exportdb-items-checked, div#dup-exportdb-items-off {min-height:275px; display:none}
38
- div#dup-exportdb-items-checked {padding: 5px; max-width:650px}
39
 
40
  /*INSTALLER SECTION*/
41
  div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
@@ -48,7 +48,7 @@
48
  ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
49
  </style>
50
 
51
- <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo $retry_enabled ? '&retry=1' : '';?>" data-validate="parsley">
52
  <input type="hidden" id="dup-form-opts-action" name="action" value="">
53
  <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
54
 
@@ -202,24 +202,28 @@ ARCHIVE -->
202
  </div>
203
 
204
  <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
205
- <?php
 
 
 
 
 
 
 
 
 
 
206
  _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
207
  . "will be included in the archive.zip file. The option can be used for backing up and moving only the database.", 'duplicator');
208
-
209
- echo '<br/><br/>';
210
-
211
- _e("<b><i class='fa fa-exclamation-circle'></i> Notice:</b><br/> Installing only the database over an existing site may have unintended consequences. "
212
- . "Be sure to know the state of your system before installing the database without the associated files. ", 'duplicator');
213
 
214
  echo '<br/><br/>';
215
 
216
- _e("For example, if you have WordPress 4.6 on this site and you copy this sites database to a host that has WordPress 4.8 files then the source code of the files "
217
- . " will not be in sync with the database causing possible errors.", 'duplicator');
218
-
219
- echo '<br/><br/>';
220
-
221
- _e("This can also be true of plugins and themes. When moving only the database be sure to know the database will be compatible with ALL source code files."
222
- . " Please use this advanced feature with caution!", 'duplicator');
223
  ?>
224
  <br/><br/>
225
  </div>
@@ -526,8 +530,8 @@ jQuery(document).ready(function ($)
526
  }
527
  }
528
 
529
- <?php if ($retry_dbenabled) :?>
530
- $('#dup-pack-archive-panel').show(500);
531
  $('#export-onlydb').prop( "checked", true );
532
  <?php endif; ?>
533
 
35
  div.dup-store-pro a {text-decoration:underline}
36
  span.dup-pro-text {font-style:italic; font-size:12px; color:#555; font-style:italic }
37
  div#dup-exportdb-items-checked, div#dup-exportdb-items-off {min-height:275px; display:none}
38
+ div#dup-exportdb-items-checked {padding: 5px; max-width:700px}
39
 
40
  /*INSTALLER SECTION*/
41
  div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
48
  ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
49
  </style>
50
 
51
+ <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo "&retry={$retry_state}"; ?>" data-validate="parsley">
52
  <input type="hidden" id="dup-form-opts-action" name="action" value="">
53
  <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
54
 
202
  </div>
203
 
204
  <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
205
+ <?php
206
+
207
+ if ($retry_state == '2') {
208
+ echo '<i style="color:maroon">';
209
+ _e("This option has automatically been checked because you have opted for a <i class='fa fa-random'></i> Two-Part Install Process. Please complete the package build and continue with the ", 'duplicator');
210
+ printf('%s <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>.',
211
+ __('', 'duplicator'),
212
+ __('Quick Start Two-Part Install Instructions', 'duplicator'));
213
+ echo '</i><br/><br/>';
214
+ }
215
+
216
  _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
217
  . "will be included in the archive.zip file. The option can be used for backing up and moving only the database.", 'duplicator');
 
 
 
 
 
218
 
219
  echo '<br/><br/>';
220
 
221
+ _e("<b><i class='fa fa-exclamation-circle'></i> Notice:</b><br/>", 'duplicator');
222
+
223
+ _e("Please use caution when installing only the database over an existing site and be sure the correct files correspond with the database. For example, "
224
+ . "if WordPress 4.6 is on this site and you copy the database to a host that has WordPress 4.8 files then the source code of the files will not be "
225
+ . "in sync with the database causing possible errors. If you’re immediately moving the source files with the database then you can ignore this notice. "
226
+ . "Please use this advanced feature with caution!", 'duplicator');
 
227
  ?>
228
  <br/><br/>
229
  </div>
530
  }
531
  }
532
 
533
+ <?php if ($retry_state == '2') :?>
534
+ $('#dup-pack-archive-panel').show();
535
  $('#export-onlydb').prop( "checked", true );
536
  <?php endif; ?>
537
 
views/packages/main/s2.scan1.php CHANGED
@@ -32,14 +32,15 @@
32
  div#dup-msg-success div.details {padding:10px 15px 10px 15px; margin:5px 0 15px 0; background:#fff; border-radius:5px; border:1px solid #ddd; box-shadow:0 8px 6px -6px #999; }
33
  div#dup-msg-success div.details-title {font-size:20px; border-bottom:1px solid #dfdfdf; padding:5px; margin:0 0 10px 0; font-weight:bold}
34
  div#dup-msg-success-subtitle {color:#999; margin:0; font-size:11px}
35
- div.dup-scan-filter-status {display:inline; float:right; font-size:11px; margin-right:10px; color:#630f0f;}
36
  div#dup-msg-error {color:#A62426; padding:5px; max-width:790px;}
37
  div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
38
  div.dup-hdr-error-details {text-align:left; margin:20px 0}
39
  i[data-tooltip].fa-question-circle {color:#555}
40
 
41
  /*SCAN ITEMS: Sections */
42
- div.scan-header { font-size:16px; padding:7px 5px 5px 7px; font-weight:bold; background-color:#E0E0E0; border-bottom:0px solid #C0C0C0 }
 
43
  div.scan-item {border:1px solid #E0E0E0; border-bottom:none;}
44
  div.scan-item-first { border-top-right-radius:4px; border-top-left-radius:4px}
45
  div.scan-item-last {border-bottom:1px solid #E0E0E0}
@@ -58,8 +59,9 @@
58
  div.dup-more-details:hover {color:#777; cursor:pointer}
59
 
60
  /*FILES */
61
- div#data-arc-size1 {display:inline-block; float:right; font-size:11px; margin-right:5px;}
62
- i.data-size-help { float:right; margin-right:5px; display:block; font-size:11px}
 
63
  div.hb-files-style div.container {border:1px solid #E0E0E0; border-radius:4px; margin:5px 0 10px 0}
64
  div.hb-files-style div.container b {font-weight:bold}
65
  div.hb-files-style div.container div.divider {margin-bottom:2px; font-weight:bold}
@@ -92,7 +94,7 @@
92
  div#dup-scan-db-info {margin-top:5px}
93
  div#data-db-tablelist {max-height:250px; overflow-y:scroll; border:1px solid silver; padding:8px; background: #efefef; border-radius: 4px}
94
  div#data-db-tablelist td{padding:0 5px 3px 20px; min-width:100px}
95
- div#data-db-size1 {display:inline-block; float:right; font-size:11px; margin-right:5px;}
96
 
97
  /*WARNING-CONTINUE*/
98
  div#dup-scan-warning-continue {display:none; text-align:center; padding:0 0 15px 0}
@@ -120,6 +122,7 @@
120
  /*FOOTER*/
121
  div.dup-button-footer {text-align:center; margin:0}
122
  button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
 
123
  </style>
124
 
125
  <!-- =========================================
@@ -186,7 +189,7 @@ TOOL BAR:STEPS -->
186
  <?php
187
  include ('s2.scan2.php');
188
  echo '<br/>';
189
- include ('s2.scan3.php')
190
  ?>
191
  </div>
192
 
@@ -227,7 +230,7 @@ jQuery(document).ready(function($)
227
  // Performs ajax call to get scanner retults via JSON response
228
  Duplicator.Pack.runScanner = function()
229
  {
230
- var data = {action : 'duplicator_package_scan'}
231
  $.ajax({
232
  type: "POST",
233
  cache: false,
32
  div#dup-msg-success div.details {padding:10px 15px 10px 15px; margin:5px 0 15px 0; background:#fff; border-radius:5px; border:1px solid #ddd; box-shadow:0 8px 6px -6px #999; }
33
  div#dup-msg-success div.details-title {font-size:20px; border-bottom:1px solid #dfdfdf; padding:5px; margin:0 0 10px 0; font-weight:bold}
34
  div#dup-msg-success-subtitle {color:#999; margin:0; font-size:11px}
35
+ div.dup-scan-filter-status {display:inline; font-size:11px; margin-right:10px; color:#630f0f;}
36
  div#dup-msg-error {color:#A62426; padding:5px; max-width:790px;}
37
  div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
38
  div.dup-hdr-error-details {text-align:left; margin:20px 0}
39
  i[data-tooltip].fa-question-circle {color:#555}
40
 
41
  /*SCAN ITEMS: Sections */
42
+ div.scan-header { font-size:16px; padding:7px 5px 7px 7px; font-weight:bold; background-color:#E0E0E0; border-bottom:0px solid #C0C0C0 }
43
+ div.scan-header-details {float:right; margin-top:-5px}
44
  div.scan-item {border:1px solid #E0E0E0; border-bottom:none;}
45
  div.scan-item-first { border-top-right-radius:4px; border-top-left-radius:4px}
46
  div.scan-item-last {border-bottom:1px solid #E0E0E0}
59
  div.dup-more-details:hover {color:#777; cursor:pointer}
60
 
61
  /*FILES */
62
+ div#data-arc-size1 {display:inline-block; font-size:11px; margin-right:1px;}
63
+ i.data-size-help { font-size:12px; display:inline-block; margin:0; padding:0}
64
+ div.dup-data-size-uncompressed {font-size:10px; text-align: right; padding:0; margin:-7px 0 0 0; font-style: italic; font-weight: normal; border:0px solid red; clear:both}
65
  div.hb-files-style div.container {border:1px solid #E0E0E0; border-radius:4px; margin:5px 0 10px 0}
66
  div.hb-files-style div.container b {font-weight:bold}
67
  div.hb-files-style div.container div.divider {margin-bottom:2px; font-weight:bold}
94
  div#dup-scan-db-info {margin-top:5px}
95
  div#data-db-tablelist {max-height:250px; overflow-y:scroll; border:1px solid silver; padding:8px; background: #efefef; border-radius: 4px}
96
  div#data-db-tablelist td{padding:0 5px 3px 20px; min-width:100px}
97
+ div#data-db-size1 {display:inline-block; font-size:11px; margin-right:1px;}
98
 
99
  /*WARNING-CONTINUE*/
100
  div#dup-scan-warning-continue {display:none; text-align:center; padding:0 0 15px 0}
122
  /*FOOTER*/
123
  div.dup-button-footer {text-align:center; margin:0}
124
  button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
125
+ i.scan-warn {color:#630f0f;}
126
  </style>
127
 
128
  <!-- =========================================
189
  <?php
190
  include ('s2.scan2.php');
191
  echo '<br/>';
192
+ include ('s2.scan3.php');
193
  ?>
194
  </div>
195
 
230
  // Performs ajax call to get scanner retults via JSON response
231
  Duplicator.Pack.runScanner = function()
232
  {
233
+ var data = {action : 'duplicator_package_scan',file_notice:'<?= $core_file_notice; ?>',dir_notice:'<?= $core_dir_notice; ?>'}
234
  $.ajax({
235
  type: "POST",
236
  cache: false,
views/packages/main/s2.scan2.php CHANGED
@@ -10,6 +10,45 @@ SERVER -->
10
  <!-- ============
11
  PHP SETTINGS -->
12
  <div class="scan-item">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
14
  <div class="text"><i class="fa fa-caret-right"></i> <?php _e('Setup', 'duplicator');?></div>
15
  <div id="data-srv-php-all"></div>
@@ -58,6 +97,8 @@ PHP SETTINGS -->
58
  <!-- ============
59
  WP SETTINGS -->
60
  <div class="scan-item scan-item-last">
 
 
61
  <div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
62
  <div class="text"><i class="fa fa-caret-right"></i> <?php _e('WordPress', 'duplicator');?></div>
63
  <div id="data-srv-wp-all"></div>
@@ -71,7 +112,48 @@ WP SETTINGS -->
71
 
72
  //CORE FILES
73
  echo '<hr size="1" /><span id="data-srv-wp-core"></span>&nbsp;<b>' . __('Core Files', 'duplicator') . "</b> <br/>";
74
- _e("If the scanner is unable to locate the wp-config.php file in the root directory, then you will need to manually copy it to its new location.", 'duplicator');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  //CACHE DIR
77
  $cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
10
  <!-- ============
11
  PHP SETTINGS -->
12
  <div class="scan-item">
13
+
14
+ <?php
15
+
16
+ //TODO Login Need to go here
17
+
18
+ $core_dir_included = array();
19
+ $core_files_included = array();
20
+ //by default fault
21
+ $core_dir_notice = false;
22
+ $core_file_notice = false;
23
+
24
+ if (!$Package->Archive->ExportOnlyDB && isset($_POST['filter-on']) && isset($_POST['filter-dirs'])) {
25
+
26
+ //findout matched core directories
27
+ $filter_dirs = explode(";", trim($_POST['filter-dirs']));
28
+
29
+ // clean possible blank spaces before and after the paths
30
+ for ($i = 0; $i < count($filter_dirs); $i++) {
31
+ $filter_dirs[$i] = trim($filter_dirs[$i]);
32
+ $filter_dirs[$i] = (substr($filter_dirs[$i], -1) == "/") ? substr($filter_dirs[$i],0, strlen($filter_dirs[$i])-1):$filter_dirs[$i] ;
33
+
34
+ }
35
+ $core_dir_included = array_intersect($filter_dirs,
36
+ DUP_Util::getWPCoreDirs());
37
+ if (count($core_dir_included)) $core_dir_notice = true;
38
+
39
+
40
+ //find out core files
41
+ $filter_files = explode(";", trim($_POST['filter-files']));
42
+
43
+ // clean possible blank spaces before and after the paths
44
+ for ($i = 0; $i < count($filter_files); $i++) {
45
+ $filter_files[$i] = trim($filter_files[$i]);
46
+ }
47
+ $core_files_included = array_intersect($filter_files,
48
+ DUP_Util::getWPCoreFiles());
49
+ if (count($core_files_included)) $core_file_notice = true;
50
+ }
51
+ ?>
52
  <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
53
  <div class="text"><i class="fa fa-caret-right"></i> <?php _e('Setup', 'duplicator');?></div>
54
  <div id="data-srv-php-all"></div>
97
  <!-- ============
98
  WP SETTINGS -->
99
  <div class="scan-item scan-item-last">
100
+
101
+
102
  <div class="title" onclick="Duplicator.Pack.toggleScanItem(this);">
103
  <div class="text"><i class="fa fa-caret-right"></i> <?php _e('WordPress', 'duplicator');?></div>
104
  <div id="data-srv-wp-all"></div>
112
 
113
  //CORE FILES
114
  echo '<hr size="1" /><span id="data-srv-wp-core"></span>&nbsp;<b>' . __('Core Files', 'duplicator') . "</b> <br/>";
115
+
116
+
117
+ $filter_text="";
118
+ if($core_dir_notice) {
119
+ echo '<small id="data-srv-wp-core-missing-dirs">';
120
+ _e("The core WordPress paths below will <u>not</u> be included in the archive. These paths are required for WordPress to function!");
121
+ echo "<br/>";
122
+ foreach($core_dir_included as $core_dir) {
123
+ echo '&nbsp; &nbsp; <b><i class="fa fa-exclamation-circle scan-warn"></i>&nbsp;'. $core_dir . '</b><br/>';
124
+ }
125
+ echo '</small><br/>';
126
+ $filter_text="directories";
127
+ }
128
+
129
+ if($core_file_notice) {
130
+ echo '<small id="data-srv-wp-core-missing-dirs">';
131
+ _e("The core WordPress file below will <u>not</u> be included in the archive. This file is required for WordPress to function!");
132
+ echo "<br/>";
133
+ foreach($core_files_included as $core_file) {
134
+ echo '&nbsp; &nbsp; <b><i class="fa fa-exclamation-circle scan-warn"></i>&nbsp;'. $core_file . '</b><br/>';
135
+ }
136
+ echo '</small><br/>';
137
+ $filter_text .= (strlen($filter_text) > 0) ? " and file" : "files";
138
+
139
+ }
140
+
141
+ if(strlen($filter_text) > 0) {
142
+ echo '<small>';
143
+ _e("Note: Please change the {$filter_text} filters if you wish to include the WordPress core files otherwise the data will have to be manually copied"
144
+ . " to the new location for the site to function properly.");
145
+ echo '</small>';
146
+ }
147
+
148
+
149
+ if(!$core_dir_notice && !$core_file_notice):
150
+ echo '<small>';
151
+ _e("If the scanner is unable to locate the wp-config.php file in the root directory, then you will need to manually copy it to its new location. "
152
+ . "This check will also look for core WordPress paths that should be included in the archive for WordPress to work correctly.");
153
+ echo '</small>';
154
+ endif;
155
+
156
+
157
 
158
  //CACHE DIR
159
  $cache_path = $cache_path = DUP_Util::safePath(WP_CONTENT_DIR) . '/cache';
views/packages/main/s2.scan3.php CHANGED
@@ -19,19 +19,24 @@ ARCHIVE -->
19
  <div class="scan-header scan-item-first">
20
  <i class="fa fa-files-o"></i>
21
  <?php _e("Files", 'duplicator'); ?>
22
- <i class="fa fa-question-circle data-size-help"
23
- data-tooltip-title="<?php _e('Archive Size', 'duplicator'); ?>"
24
- data-tooltip="<?php _e('This size includes only files BEFORE compression is applied. It does not include the size of the '
25
- . 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i>
26
- <div id="data-arc-size1"></div>
27
- <div class="dup-scan-filter-status">
28
- <?php
29
- if ($Package->Archive->ExportOnlyDB) {
30
- echo '<i class="fa fa-filter"></i> '; _e('Database Only', 'duplicator');
31
- } elseif ($Package->Archive->FilterOn) {
32
- echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
33
- }
34
- ?>
 
 
 
 
 
35
  </div>
36
  </div>
37
 
@@ -116,7 +121,7 @@ TOTAL SIZE -->
116
  _e('No large files found during this scan.', 'duplicator');
117
  } else {
118
  echo "<div style='color:maroon'>";
119
- _e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
120
  . 'adding a file filter to non-essential files paths like wp-content/uploads. These excluded files can then '
121
  . 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
122
  echo "</div>";
@@ -231,17 +236,22 @@ DATABASE -->
231
  <div class="scan-header">
232
  <i class="fa fa-table"></i>
233
  <?php _e("Database", 'duplicator'); ?>
234
- <i class="fa fa-question-circle data-size-help"
235
- data-tooltip-title="<?php _e("Database Size:", 'duplicator'); ?>"
236
- data-tooltip="<?php _e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. '
237
- . 'The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
238
- <div id="data-db-size1"></div>
239
- <div class="dup-scan-filter-status">
240
- <?php
241
- if ($Package->Database->FilterOn) {
242
- echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
243
- }
244
- ?>
 
 
 
 
 
245
  </div>
246
  </div>
247
 
@@ -294,8 +304,8 @@ DATABASE -->
294
  </div>
295
  <?php
296
  echo '<div class="dup-pro-support">&nbsp;';
297
- _e('Package support up to 2GB available in', 'duplicator');
298
- echo '&nbsp;<i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_size_warn&amp;utm_campaign=duplicator_pro" target="_blank">' . __('Duplicator Pro', 'duplicator') . '!</a></i>';
299
  echo '</div>';
300
  ?>
301
  </div>
@@ -649,7 +659,7 @@ jQuery(document).ready(function($)
649
  }
650
 
651
  <?php
652
- if (isset($_GET['retry'])) {
653
  echo "$('#scan-itme-file-size').show(300)";
654
  }
655
  ?>
19
  <div class="scan-header scan-item-first">
20
  <i class="fa fa-files-o"></i>
21
  <?php _e("Files", 'duplicator'); ?>
22
+
23
+ <div class="scan-header-details">
24
+ <div class="dup-scan-filter-status">
25
+ <?php
26
+ if ($Package->Archive->ExportOnlyDB) {
27
+ echo '<i class="fa fa-filter"></i> '; _e('Database Only', 'duplicator');
28
+ } elseif ($Package->Archive->FilterOn) {
29
+ echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
30
+ }
31
+ ?>
32
+ </div>
33
+ <div id="data-arc-size1"></div>
34
+ <i class="fa fa-question-circle data-size-help"
35
+ data-tooltip-title="<?php _e('Archive Size', 'duplicator'); ?>"
36
+ data-tooltip="<?php _e('This size includes only files BEFORE compression is applied. It does not include the size of the '
37
+ . 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i>
38
+
39
+ <div class="dup-data-size-uncompressed"><?php _e("uncompressed"); ?></div>
40
  </div>
41
  </div>
42
 
121
  _e('No large files found during this scan.', 'duplicator');
122
  } else {
123
  echo "<div style='color:maroon'>";
124
+ _e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
125
  . 'adding a file filter to non-essential files paths like wp-content/uploads. These excluded files can then '
126
  . 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
127
  echo "</div>";
236
  <div class="scan-header">
237
  <i class="fa fa-table"></i>
238
  <?php _e("Database", 'duplicator'); ?>
239
+ <div class="scan-header-details">
240
+ <div class="dup-scan-filter-status">
241
+ <?php
242
+ if ($Package->Database->FilterOn) {
243
+ echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
244
+ }
245
+ ?>
246
+ </div>
247
+ <div id="data-db-size1"></div>
248
+ <i class="fa fa-question-circle data-size-help"
249
+ data-tooltip-title="<?php _e("Database Size:", 'duplicator'); ?>"
250
+ data-tooltip="<?php _e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. '
251
+ . 'The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
252
+
253
+ <div class="dup-data-size-uncompressed"><?php _e("uncompressed"); ?></div>
254
+
255
  </div>
256
  </div>
257
 
304
  </div>
305
  <?php
306
  echo '<div class="dup-pro-support">&nbsp;';
307
+ _e('Migrate large, multi-gig sites with', 'duplicator');
308
+ echo '&nbsp;<i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_size_warn_multigig&amp;utm_campaign=duplicator_pro" target="_blank">' . __('Duplicator Pro', 'duplicator') . '!</a></i>';
309
  echo '</div>';
310
  ?>
311
  </div>
659
  }
660
 
661
  <?php
662
+ if (isset($_GET['retry']) && $_GET['retry'] == '1' ) {
663
  echo "$('#scan-itme-file-size').show(300)";
664
  }
665
  ?>
views/packages/main/s3.build.php CHANGED
@@ -160,7 +160,7 @@ TOOL BAR: STEPS -->
160
  <div id="dup-msg-error" style="display:none; color:#000">
161
  <div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Host Build Interrupt', 'duplicator'); ?></div>
162
  <b><?php _e('This server cannot complete the build due to setup constraints.', 'duplicator'); ?></b><br/>
163
- <i><?php _e("To help get you past this hosts limitation consider these options:", 'duplicator'); ?></i>
164
  <br/><br/><br/>
165
 
166
  <!-- OPTION 1: TRY AGAIN -->
@@ -202,9 +202,8 @@ TOOL BAR: STEPS -->
202
  <div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
203
  <b class="opt-title"><?php _e('OPTION 2:', 'duplicator'); ?></b><br/>
204
 
205
- <?php _e('A two-part install minimizes server load and can avoid I/O and CPU host restrictions. With this procedure you simply build a \'database-only\' archive, manually move the website files, '
206
- . 'and then run the installer to complete the process.', 'duplicator'); ?><br/><br/>
207
-
208
 
209
  <b><?php _e('<i class="fa fa-file-text-o"></i> Overview', 'duplicator'); ?></b><br/>
210
  <?php _e('Please follow these steps:', 'duplicator'); ?><br/>
@@ -222,7 +221,11 @@ TOOL BAR: STEPS -->
222
  </ol> <br/>
223
 
224
  <div style="text-align: center; margin: 10px">
225
- <input type="button" class="button-large button-primary" value="<?php _e('Continue with Two-Part Install', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2'" />
 
 
 
 
226
  </div><br/>
227
  </div>
228
  </div>
@@ -238,9 +241,10 @@ TOOL BAR: STEPS -->
238
  <?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
239
  . 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
240
 
241
- <div style="text-align: center; margin: 10px">
242
- <input type="button" style="margin-right:10px;" class="button-large button-primary" value="<?php _e('Diagnose Server Setup', 'duplicator'); ?>"
243
- onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q', '_blank');return false;" />
 
244
  </div>
245
 
246
  <b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
@@ -368,6 +372,15 @@ jQuery(document).ready(function($) {
368
  return false;
369
  }
370
 
 
 
 
 
 
 
 
 
 
371
  //Page Init:
372
  Duplicator.UI.AnimateProgressBar('dup-progress-bar');
373
  Duplicator.Pack.Create();
160
  <div id="dup-msg-error" style="display:none; color:#000">
161
  <div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Host Build Interrupt', 'duplicator'); ?></div>
162
  <b><?php _e('This server cannot complete the build due to setup constraints.', 'duplicator'); ?></b><br/>
163
+ <i><?php _e("To help get you past this hosts limitation consider these three options:", 'duplicator'); ?></i>
164
  <br/><br/><br/>
165
 
166
  <!-- OPTION 1: TRY AGAIN -->
202
  <div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
203
  <b class="opt-title"><?php _e('OPTION 2:', 'duplicator'); ?></b><br/>
204
 
205
+ <?php _e('A two-part install minimizes server load and can avoid I/O and CPU issues encountered on some budget hosts. With this procedure you simply build a '
206
+ . '\'database-only\' archive, manually move the website files, and then run the installer to complete the process.', 'duplicator'); ?><br/><br/>
 
207
 
208
  <b><?php _e('<i class="fa fa-file-text-o"></i> Overview', 'duplicator'); ?></b><br/>
209
  <?php _e('Please follow these steps:', 'duplicator'); ?><br/>
221
  </ol> <br/>
222
 
223
  <div style="text-align: center; margin: 10px">
224
+ <input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()">
225
+ <label for="dup-two-part-check"><?php _e('Yes. I have read the above overview and would like to continue!', 'duplicator'); ?></label><br/><br/>
226
+ <button id="dup-two-part-btn" type="button" class="button-large button-primary" disabled="true" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2'">
227
+ <i class="fa fa-random"></i> <?php _e('Start Two-Part Install Process', 'duplicator'); ?>
228
+ </button>
229
  </div><br/>
230
  </div>
231
  </div>
241
  <?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
242
  . 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
243
 
244
+ <div style="text-align: center; margin: 10px; font-size:16px; font-weight: bold">
245
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q" target="_blank">
246
+ [<?php _e('Diagnose Server Setup', 'duplicator'); ?>]
247
+ </a>
248
  </div>
249
 
250
  <b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
372
  return false;
373
  }
374
 
375
+ Duplicator.Pack.ToggleTwoPart = function() {
376
+ var $btn = $('#dup-two-part-btn');
377
+ if ($('#dup-two-part-check').is(':checked')) {
378
+ $btn.removeAttr("disabled");
379
+ } else {
380
+ $btn.attr("disabled", true);
381
+ }
382
+ };
383
+
384
  //Page Init:
385
  Duplicator.UI.AnimateProgressBar('dup-progress-bar');
386
  Duplicator.Pack.Create();
views/settings/controller.php CHANGED
@@ -23,6 +23,7 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'general';
23
  <a href="?page=duplicator-settings&tab=package" class="nav-tab <?php echo ($current_tab == 'package') ? 'nav-tab-active' : '' ?>"> <?php _e('Packages', 'duplicator'); ?></a>
24
  <a href="?page=duplicator-settings&tab=schedule" class="nav-tab <?php echo ($current_tab == 'schedule') ? 'nav-tab-active' : '' ?>"> <?php _e('Schedules', 'duplicator'); ?></a>
25
  <a href="?page=duplicator-settings&tab=storage" class="nav-tab <?php echo ($current_tab == 'storage') ? 'nav-tab-active' : '' ?>"> <?php _e('Storage', 'duplicator'); ?></a>
 
26
  <a href="?page=duplicator-settings&tab=about" class="nav-tab <?php echo ($current_tab == 'about') ? 'nav-tab-active' : '' ?>"> <?php _e('About', 'duplicator'); ?></a>
27
  </h2>
28
 
@@ -36,6 +37,8 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'general';
36
  break;
37
  case 'storage': include('storage.php');
38
  break;
 
 
39
  case 'about': include('about-info.php');
40
  break;
41
  }
23
  <a href="?page=duplicator-settings&tab=package" class="nav-tab <?php echo ($current_tab == 'package') ? 'nav-tab-active' : '' ?>"> <?php _e('Packages', 'duplicator'); ?></a>
24
  <a href="?page=duplicator-settings&tab=schedule" class="nav-tab <?php echo ($current_tab == 'schedule') ? 'nav-tab-active' : '' ?>"> <?php _e('Schedules', 'duplicator'); ?></a>
25
  <a href="?page=duplicator-settings&tab=storage" class="nav-tab <?php echo ($current_tab == 'storage') ? 'nav-tab-active' : '' ?>"> <?php _e('Storage', 'duplicator'); ?></a>
26
+ <a href="?page=duplicator-settings&tab=license" class="nav-tab <?php echo ($current_tab == 'license') ? 'nav-tab-active' : '' ?>"> <?php _e('License', 'duplicator'); ?></a>
27
  <a href="?page=duplicator-settings&tab=about" class="nav-tab <?php echo ($current_tab == 'about') ? 'nav-tab-active' : '' ?>"> <?php _e('About', 'duplicator'); ?></a>
28
  </h2>
29
 
37
  break;
38
  case 'storage': include('storage.php');
39
  break;
40
+ case 'license': include('license.php');
41
+ break;
42
  case 'about': include('about-info.php');
43
  break;
44
  }
views/settings/general.php CHANGED
@@ -7,23 +7,22 @@ $action_response = __("General Settings Saved", 'duplicator');
7
 
8
  //SAVE RESULTS
9
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
10
-
11
  //Nonce Check
12
- if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' ) )
13
- {
14
  die('Invalid token permissions to perform this request.');
15
  }
16
-
17
- DUP_Settings::Set('uninstall_settings', isset($_POST['uninstall_settings']) ? "1" : "0");
18
- DUP_Settings::Set('uninstall_files', isset($_POST['uninstall_files']) ? "1" : "0");
19
- DUP_Settings::Set('uninstall_tables', isset($_POST['uninstall_tables']) ? "1" : "0");
20
- DUP_Settings::Set('storage_htaccess_off', isset($_POST['storage_htaccess_off']) ? "1" : "0");
21
 
22
- DUP_Settings::Set('wpfront_integrate', isset($_POST['wpfront_integrate']) ? "1" : "0");
 
 
 
 
 
23
  DUP_Settings::Set('package_debug', isset($_POST['package_debug']) ? "1" : "0");
24
-
25
- $action_updated = DUP_Settings::Save();
26
- DUP_Util::initSnapshotDirectory();
27
  }
28
 
29
  $uninstall_settings = DUP_Settings::Get('uninstall_settings');
@@ -130,6 +129,5 @@ $package_debug = DUP_Settings::Get('package_debug');
130
  <script>
131
  jQuery(document).ready(function($)
132
  {
133
- $('#package_ui_created').val(<?php echo $package_ui_created ?> );
134
  });
135
  </script>
7
 
8
  //SAVE RESULTS
9
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
10
+
11
  //Nonce Check
12
+ if (!isset($_POST['dup_settings_save_nonce_field']) || !wp_verify_nonce($_POST['dup_settings_save_nonce_field'], 'dup_settings_save')) {
 
13
  die('Invalid token permissions to perform this request.');
14
  }
 
 
 
 
 
15
 
16
+ DUP_Settings::Set('uninstall_settings', isset($_POST['uninstall_settings']) ? "1" : "0");
17
+ DUP_Settings::Set('uninstall_files', isset($_POST['uninstall_files']) ? "1" : "0");
18
+ DUP_Settings::Set('uninstall_tables', isset($_POST['uninstall_tables']) ? "1" : "0");
19
+ DUP_Settings::Set('storage_htaccess_off', isset($_POST['storage_htaccess_off']) ? "1" : "0");
20
+
21
+ DUP_Settings::Set('wpfront_integrate', isset($_POST['wpfront_integrate']) ? "1" : "0");
22
  DUP_Settings::Set('package_debug', isset($_POST['package_debug']) ? "1" : "0");
23
+
24
+ $action_updated = DUP_Settings::Save();
25
+ DUP_Util::initSnapshotDirectory();
26
  }
27
 
28
  $uninstall_settings = DUP_Settings::Get('uninstall_settings');
129
  <script>
130
  jQuery(document).ready(function($)
131
  {
 
132
  });
133
  </script>
views/settings/license.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <h3 class="title"><?php _e("Activation"); ?> </h3>
3
+ <hr size="1" />
4
+ <table class="form-table">
5
+ <tr valign="top">
6
+ <th scope="row"><?php _e("Manage") ?></th>
7
+ <td><?php echo sprintf(__('%1$sManage Licenses%2$s'), '<a target="_blank" href="https://snapcreek.com/dashboard?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=settings_license_manage_licenses">', '</a>'); ?></td>
8
+ </tr>
9
+ <tr valign="top">
10
+ <th scope="row"><?php _e("Type") ?></th>
11
+ <td class="dpro-license-type">
12
+ <?php _e('Duplicator Free'); ?>
13
+ <div style="padding: 10px">
14
+ <i class="fa fa-check-square-o"></i> <?php _e('Basic Features'); ?> <br/>
15
+ <i class="fa fa-square-o"></i> <a href="admin.php?page=duplicator-gopro"><?php _e('Pro Features'); ?></a><br>
16
+ </div>
17
+ </td>
18
+ </tr>
19
+ <tr valign="top">
20
+ <th scope="row"><label><?php _e("License Key"); ?></label></th>
21
+ <td>
22
+
23
+ <p class="description" style="max-width:700px">
24
+ <?php
25
+ _e("The free version of Duplicator does not require a license key. ");
26
+ echo '<br/><br/>';
27
+ _e("<b>Professional Users:</b> Please note that if you have already purchased the Professional version it is a separate plugin that you download and install. "
28
+ . "You can download the Professional version from the email sent after your purchase or click on the 'Manage Licenses' link above to "
29
+ . "download the plugin from your snapcreek.com dashboard. ");
30
+ _e("If you would like to purchase the professional version you can ");
31
+ echo '<a href="https://snapcreek.com/duplicator?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=settings_license_get_copy_here" target="_blank">' . __("get a copy here") . '</a>!';
32
+ ?>
33
+ </p>
34
+ <br/><br/>
35
+
36
+ </td>
37
+ </tr>
38
+ </table>
39
+
40
+
41
+
views/settings/schedule.php CHANGED
@@ -1,25 +1,25 @@
1
- <style>
2
- div.panel {padding: 20px 5px 10px 10px;}
3
- div.area {font-size:16px; text-align: center; line-height: 30px}
4
- </style>
5
-
6
- <div class="panel">
7
-
8
- <br/>
9
- <div class="area">
10
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
11
- <?php
12
- echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
13
- _e('Create robust automated schedules that automatically create packages while you sleep.', 'duplicator');
14
- echo '<br/>';
15
- _e('Simply choose your storage location and when you want it to run.', 'duplicator');
16
- ?>
17
- </div>
18
- <p style="text-align:center">
19
- <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
20
- <?php _e('Learn More', 'duplicator') ?>
21
- </a>
22
- </p>
23
- </div>
24
-
25
-
1
+ <style>
2
+ div.panel {padding: 20px 5px 10px 10px;}
3
+ div.area {font-size:16px; text-align: center; line-height: 30px}
4
+ </style>
5
+
6
+ <div class="panel">
7
+
8
+ <br/>
9
+ <div class="area">
10
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
11
+ <?php
12
+ echo '<h2><i class="fa fa-clock-o"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
13
+ _e('Create robust schedules that automatically create packages while you sleep.', 'duplicator');
14
+ echo '<br/>';
15
+ _e('Simply choose your storage location and when you want it to run.', 'duplicator');
16
+ ?>
17
+ </div>
18
+ <p style="text-align:center">
19
+ <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_schedule&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
20
+ <?php _e('Learn More', 'duplicator') ?>
21
+ </a>
22
+ </p>
23
+ </div>
24
+
25
+
views/tools/controller.php CHANGED
@@ -8,28 +8,26 @@ global $wpdb;
8
  //COMMON HEADER DISPLAY
9
  require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
10
  require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
11
- $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'logging';
12
  ?>
 
 
 
 
13
  <div class="wrap">
14
 
15
  <?php duplicator_header(__("Tools", 'duplicator')) ?>
16
 
17
  <h2 class="nav-tab-wrapper">
18
- <a href="?page=duplicator-tools&tab=logging" class="nav-tab <?php echo ($current_tab == 'logging') ? 'nav-tab-active' : '' ?>"> <?php _e('Logging', 'duplicator'); ?></a>
19
- <a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php _e('Diagnostics', 'duplicator'); ?></a>
20
- <a href="?page=duplicator-tools&tab=cleanup" class="nav-tab <?php echo ($current_tab == 'cleanup') ? 'nav-tab-active' : '' ?>"> <?php _e('Cleanup', 'duplicator'); ?></a>
21
- <a href="?page=duplicator-tools&tab=support" class="nav-tab <?php echo ($current_tab == 'support') ? 'nav-tab-active' : '' ?>"> <?php _e('Support', 'duplicator'); ?></a>
22
  </h2>
23
 
24
  <?php
25
  switch ($current_tab) {
26
- case 'logging': include('logging.php');
27
- break;
28
- case 'diagnostics': include('diagnostics/main.php');
29
- break;
30
- case 'cleanup': include('cleanup.php');
31
  break;
32
- case 'support': include('support.php');
33
  break;
34
  }
35
  ?>
8
  //COMMON HEADER DISPLAY
9
  require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
10
  require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
11
+ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'diagnostics';
12
  ?>
13
+
14
+ <style>
15
+ div.lite-sub-tabs {padding: 10px 0 10px 0; font-size: 14px}
16
+ </style>
17
  <div class="wrap">
18
 
19
  <?php duplicator_header(__("Tools", 'duplicator')) ?>
20
 
21
  <h2 class="nav-tab-wrapper">
22
+ <a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php _e('Diagnostics', 'duplicator'); ?></a>
23
+ <a href="?page=duplicator-tools&tab=cleanup" class="nav-tab <?php echo ($current_tab == 'cleanup') ? 'nav-tab-active' : '' ?>"> <?php _e('Cleanup', 'duplicator'); ?></a>
 
 
24
  </h2>
25
 
26
  <?php
27
  switch ($current_tab) {
28
+ case 'diagnostics': include('diagnostics/main.php');
 
 
 
 
29
  break;
30
+ case 'cleanup': include('cleanup.php');
31
  break;
32
  }
33
  ?>
views/tools/diagnostics/information.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics&section=diagnostic' ); ?>" method="post">
2
+ <?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
3
+ <input type="hidden" id="dup-settings-form-action" name="action" value="">
4
+ <br/>
5
+
6
+ <?php if (! empty($action_response)) : ?>
7
+ <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
8
+ <?php endif; ?>
9
+
10
+ <?php
11
+ include_once 'inc.data.php';
12
+ include_once 'inc.settings.php';
13
+ include_once 'inc.validator.php';
14
+ include_once 'inc.phpinfo.php';
15
+ ?>
16
+ </form>
views/tools/diagnostics/logging.php ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
3
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
4
+
5
+ $logs = glob(DUPLICATOR_SSDIR_PATH . '/*.log') ;
6
+ if ($logs != false && count($logs))
7
+ {
8
+ usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
9
+ @chmod(DUP_Util::safePath($logs[0]), 0644);
10
+ }
11
+
12
+ $logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
13
+ $refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
14
+ $auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
15
+
16
+ //Check for invalid file
17
+ if (!empty($logname))
18
+ {
19
+ $validFiles = array_map('basename', $logs);
20
+ if (validate_file($logname, $validFiles) > 0) {
21
+ unset($logname);
22
+ }
23
+ unset($validFiles);
24
+ }
25
+
26
+ if (!isset($logname) || !$logname) {
27
+ $logname = (count($logs) > 0) ? basename($logs[0]) : "";
28
+ }
29
+
30
+ $logurl = get_site_url(null, '', is_ssl() ? 'https' : 'http') . '/' . DUPLICATOR_SSDIR_NAME . '/' . $logname;
31
+ $logfound = (strlen($logname) > 0) ? true :false;
32
+ ?>
33
+
34
+ <style>
35
+ div#dup-refresh-count {display: inline-block}
36
+ table#dup-log-panels {width:100%; }
37
+ td#dup-log-panel-left {width:75%;}
38
+ td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
39
+ td#dup-log-panel-left div.opts {float:right;}
40
+ td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
41
+ iframe#dup-log-content {padding:5px; background: #fff; min-height:500px; width:99%; border:1px solid silver}
42
+
43
+ /* OPTIONS */
44
+ div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
45
+ div.dup-log-hdr small{font-weight:normal; font-style: italic}
46
+ div.dup-log-file-list {font-family:monospace;}
47
+ div.dup-log-file-list a, span.dup-log{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; overflow:hidden}
48
+ div.dup-log-file-list span {color:green}
49
+ div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
50
+ label#dup-auto-refresh-lbl {display: inline-block;}
51
+ </style>
52
+
53
+ <script>
54
+ jQuery(document).ready(function($)
55
+ {
56
+ Duplicator.Tools.FullLog = function() {
57
+ var $panelL = $('#dup-log-panel-left');
58
+ var $panelR = $('#dup-log-panel-right');
59
+
60
+ if ($panelR.is(":visible") ) {
61
+ $panelR.hide(400);
62
+ $panelL.css({width: '100%'});
63
+ } else {
64
+ $panelR.show(200);
65
+ $panelL.css({width: '75%'});
66
+ }
67
+ }
68
+
69
+ Duplicator.Tools.Refresh = function() {
70
+ $('#refresh').val(1);
71
+ $('#dup-form-logs').submit();
72
+ }
73
+
74
+ Duplicator.Tools.RefreshAuto = function() {
75
+ if ( $("#dup-auto-refresh").is(":checked")) {
76
+ $('#auto').val(1);
77
+ startTimer();
78
+ } else {
79
+ $('#auto').val(0);
80
+ }
81
+ }
82
+
83
+ Duplicator.Tools.GetLog = function(log) {
84
+ window.location = log;
85
+ }
86
+
87
+ Duplicator.Tools.WinResize = function() {
88
+ var height = $(window).height() - 215;
89
+ $("#dup-log-content").css({height: height + 'px'});
90
+ }
91
+
92
+ var duration = 10;
93
+ var count = duration;
94
+ var timerInterval;
95
+ function timer() {
96
+ count = count - 1;
97
+ $("#dup-refresh-count").html(count.toString());
98
+ if (! $("#dup-auto-refresh").is(":checked")) {
99
+ clearInterval(timerInterval);
100
+ $("#dup-refresh-count").text(count.toString().trim());
101
+ return;
102
+ }
103
+
104
+ if (count <= 0) {
105
+ count = duration + 1;
106
+ Duplicator.Tools.Refresh();
107
+ }
108
+ }
109
+
110
+ function startTimer() {
111
+ timerInterval = setInterval(timer, 1000);
112
+ }
113
+
114
+ //INIT Events
115
+ $(window).resize(Duplicator.Tools.WinResize);
116
+ $('#dup-options').click(Duplicator.Tools.FullLog);
117
+ $("#dup-refresh").click(Duplicator.Tools.Refresh);
118
+ $("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
119
+ $("#dup-refresh-count").html(duration.toString());
120
+
121
+ //INIT
122
+ Duplicator.Tools.WinResize();
123
+ <?php if ($refresh) : ?>
124
+ //Scroll to Bottom
125
+ $("#dup-log-content").load(function () {
126
+ var $contents = $('#dup-log-content').contents();
127
+ $contents.scrollTop($contents.height());
128
+ });
129
+ <?php if ($auto) : ?>
130
+ $("#dup-auto-refresh").prop('checked', true);
131
+ Duplicator.Tools.RefreshAuto();
132
+ <?php endif; ?>
133
+ <?php endif; ?>
134
+ });
135
+ </script>
136
+
137
+ <form id="dup-form-logs" method="post" action="">
138
+ <input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
139
+ <input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
140
+
141
+ <?php if (! $logfound) : ?>
142
+ <div style="padding:20px">
143
+ <h2><?php _e("Log file not found or unreadable", 'duplicator') ?>.</h2>
144
+ <?php _e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
145
+ <?php _e("Reasons for log file not showing", 'duplicator') ?>: <br/>
146
+ - <?php _e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
147
+ - <?php _e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
148
+ - <?php _e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
149
+ </div>
150
+ <?php else: ?>
151
+ <table id="dup-log-panels">
152
+ <tr>
153
+ <td id="dup-log-panel-left">
154
+ <div class="name">
155
+ <i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> &nbsp; | &nbsp;
156
+ <i style="cursor: pointer"
157
+ data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
158
+ data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
159
+ <i class="fa fa-lightbulb-o" aria-hidden="true"></i>
160
+ <?php
161
+ printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
162
+ __("Consider our recommended", 'duplicator'),
163
+ __("host list", 'duplicator'),
164
+ __("if you’re unhappy with your current provider", 'duplicator'));
165
+ ?>
166
+ </i>
167
+ </div>
168
+ <div class="opts"><a href="javascript:void(0)" id="dup-options"><?php _e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> &nbsp;</div>
169
+ <br style="clear:both" />
170
+ <iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
171
+ </td>
172
+ <td id="dup-log-panel-right">
173
+ <h2><?php _e("Options", 'duplicator') ?> </h2>
174
+ <div class="dup-opts-items">
175
+ <input type="button" class="button button-small" id="dup-refresh" value="<?php _e("Refresh", 'duplicator') ?>" /> &nbsp;
176
+ <input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
177
+ <label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
178
+ <?php _e("Auto Refresh", 'duplicator') ?>
179
+ [<div id="dup-refresh-count"></div>]
180
+ </label>
181
+ </div>
182
+
183
+ <div class="dup-log-hdr">
184
+ <?php _e("Package Logs", 'duplicator') ?>
185
+ <small><?php _e("Top 20", 'duplicator') ?></small>
186
+ </div>
187
+
188
+ <div class="dup-log-file-list">
189
+ <?php
190
+ $count=0;
191
+ $active = basename($logurl);
192
+ foreach ($logs as $log) {
193
+ $time = date('m/d/y h:i:s', filemtime($log));
194
+ $name = esc_html(basename($log));
195
+ $url = '?page=duplicator-tools&tab=diagnostics&section=log&logname=' . $name;
196
+ echo ($active == $name)
197
+ ? "<span class='dup-log' title='{$name}'>{$time}-{$name}</span>"
198
+ : "<a href='javascript:void(0)' title='{$name}' onclick='Duplicator.Tools.GetLog(\"{$url}\")'>{$time}-{$name}</a>";
199
+ if ($count > 20) break;
200
+ }
201
+ ?>
202
+ </div>
203
+ </td>
204
+ </tr>
205
+ </table>
206
+ <?php endif; ?>
207
+ </form>
208
+
views/tools/diagnostics/main.php CHANGED
@@ -50,23 +50,27 @@
50
  textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
51
  </style>
52
 
53
- <form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
54
- <?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
55
- <input type="hidden" id="dup-settings-form-action" name="action" value="">
56
- <br/>
57
-
58
- <?php if (! empty($action_response)) : ?>
59
- <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
60
- <?php endif; ?>
61
-
62
- <?php
63
- include_once 'inc.settings.php';
64
- include_once 'inc.data.php';
65
- include_once 'inc.validator.php';
66
- include_once 'inc.phpinfo.php';
67
- ?>
68
- </form>
69
-
70
 
 
 
 
 
 
 
71
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
 
 
 
50
  textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
51
  </style>
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ <?php
55
+ $section = isset($_GET['section']) ? $_GET['section'] : 'info';
56
+ $txt_diagnostic = "Information";
57
+ $txt_log = "Logs";
58
+ $txt_support = "Support";
59
+ $tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
60
 
61
+ switch ($section) {
62
+ case 'info':
63
+ echo "<div class='lite-sub-tabs'><b>{$txt_diagnostic}</b> &nbsp;|&nbsp; <a href='{$tools_url}&section=log'>{$txt_log}</a> &nbsp;|&nbsp; <a href='{$tools_url}&section=support'>{$txt_support}</a></div>";
64
+ include(dirname(__FILE__) . '/information.php');
65
+ break;
66
+ case 'log':
67
+ echo "<div class='lite-sub-tabs'><a href='{$tools_url}&section=info'>{$txt_diagnostic}</a> &nbsp;|&nbsp;<b>{$txt_log}</b> &nbsp;|&nbsp; <a href='{$tools_url}&section=support'>{$txt_support}</a></div>";
68
+ include(dirname(__FILE__) . '/logging.php');
69
+ break;
70
+ case 'support':
71
+ echo "<div class='lite-sub-tabs'><a href='{$tools_url}&section=info'>{$txt_diagnostic}</a> &nbsp;|&nbsp; <a href='{$tools_url}&section=log'>{$txt_log}</a> &nbsp;|&nbsp; <b>{$txt_support}</b> </div>";
72
+ include(dirname(__FILE__) . '/support.php');
73
 
74
+ break;
75
+ }
76
+ ?>
views/tools/diagnostics/support.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+ div.dup-support-all {font-size:13px; line-height:20px}
3
+ div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
4
+ div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
5
+ table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
6
+ table.dup-support-hlp-hdrs {background-color:#efefef;}
7
+ div.dup-support-hlp-hdrs {
8
+ font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
9
+ background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
10
+ background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
11
+ background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
12
+ background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
13
+ background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
14
+ background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
15
+ }
16
+ div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
17
+ div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
18
+ </style>
19
+
20
+
21
+ <div class="wrap dup-wrap dup-support-all">
22
+
23
+ <div style="width:800px; margin:auto; margin-top: 20px">
24
+ <table>
25
+ <tr>
26
+ <td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
27
+ <td valign="top" style="padding-top:10px; font-size:13px">
28
+ <?php
29
+ _e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
30
+ ?>
31
+ </td>
32
+ </tr>
33
+ </table>
34
+ <br/><br/>
35
+
36
+ <!-- HELP LINKS -->
37
+ <div class="dup-support-hlp-area">
38
+ <div class="dup-support-hlp-hdrs">
39
+ <i class="fa fa-cube fa-2x pull-left"></i>
40
+ <div><?php _e('Knowledgebase', 'duplicator') ?></div>
41
+ </div>
42
+ <div class="dup-support-hlp-txt">
43
+ <?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
44
+ <select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
45
+ <option> <?php _e('Choose A Section', 'duplicator') ?> </option>
46
+ <option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php _e('Quick Start', 'duplicator') ?></option>
47
+ <option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php _e('User Guide', 'duplicator') ?></option>
48
+ <option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php _e('FAQs', 'duplicator') ?></option>
49
+ <option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php _e('Change Log', 'duplicator') ?></option>
50
+ </select>
51
+ </div>
52
+ </div>
53
+
54
+ <!-- ONLINE SUPPORT -->
55
+ <div class="dup-support-hlp-area">
56
+ <div class="dup-support-hlp-hdrs">
57
+ <i class="fa fa-lightbulb-o fa-2x pull-left"></i>
58
+ <div><?php _e('Online Support', 'duplicator') ?></div>
59
+ </div>
60
+ <div class="dup-support-hlp-txt">
61
+ <?php _e("Get Help From IT Professionals", 'duplicator'); ?>
62
+ <br/>
63
+ <div class="dup-support-txts-links" style="margin:10px 0 10px 0">
64
+ <button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
65
+ <?php _e('Get Support!', 'duplicator') ?>
66
+ </button> <br/>
67
+ </div>
68
+ <small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
69
+ </div>
70
+ </div>
71
+ <br style="clear:both" /><br/><br/>
72
+
73
+
74
+ <!-- APPROVED HOSTING -->
75
+ <div class="dup-support-hlp-area">
76
+
77
+ <div class="dup-support-hlp-hdrs">
78
+ <i class="fa fa-bolt fa-2x pull-left"></i>
79
+ <div><?php _e('Approved Hosting', 'duplicator') ?></div>
80
+ </div>
81
+ <div class="dup-support-hlp-txt">
82
+ <?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
83
+ <br/><br/>
84
+ <div class="dup-support-txts-links">
85
+ <button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php _e('Trusted Providers!', 'duplicator') ?></button> &nbsp;
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ <!-- ALTERNATIVES -->
91
+ <div class="dup-support-hlp-area">
92
+
93
+ <div class="dup-support-hlp-hdrs">
94
+ <i class="fa fa-code-fork fa-2x pull-left"></i>
95
+ <div><?php _e('Alternatives', 'duplicator') ?></div>
96
+ </div>
97
+ <div class="dup-support-hlp-txt">
98
+ <?php _e('Other Commercial Resources', 'duplicator'); ?>
99
+ <br/><br/>
100
+ <div class="dup-support-txts-links">
101
+ <button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php _e('Pro Solutions!', 'duplicator') ?></button> &nbsp;
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div><br/><br/><br/><br/>
107
+
108
+ <script>
109
+ jQuery(document).ready(function($) {
110
+
111
+ Duplicator.OpenSupportWindow = function() {
112
+ var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
113
+ window.open(url, 'litg');
114
+ }
115
+
116
+ //ATTACHED EVENTS
117
+ jQuery('#dup-support-kb-lnks').change(function() {
118
+ if (jQuery(this).val() != "null")
119
+ window.open(jQuery(this).val())
120
+ });
121
+
122
+ });
123
+ </script>