Duplicator – WordPress Migration Plugin - Version 1.5.1

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

Files changed (39) hide show
  1. assets/css/style.css +1 -0
  2. classes/class.db.php +10 -7
  3. classes/package/class.pack.archive.php +1 -0
  4. classes/package/class.pack.installer.php +2 -2
  5. define.php +2 -2
  6. duplicator.php +2 -2
  7. installer/dup-installer/classes/class.installer.state.php +8 -3
  8. installer/dup-installer/classes/database/class.db.php +16 -8
  9. installer/dup-installer/ctrls/classes/class.ctrl.ajax.php +3 -2
  10. installer/dup-installer/ctrls/classes/class.ctrl.params.php +1 -0
  11. installer/dup-installer/ctrls/classes/class.ctrl.s3.funcs.php +4 -1
  12. installer/dup-installer/main.installer.php +1 -1
  13. installer/dup-installer/src/Core/Bootstrap.php +0 -1
  14. installer/dup-installer/src/Core/Deploy/Database/QueryFixes.php +16 -15
  15. installer/dup-installer/src/Core/Params/Descriptors/ParamDescEngines.php +23 -12
  16. installer/dup-installer/src/Core/Params/Descriptors/ParamDescGeneric.php +16 -1
  17. installer/dup-installer/src/Core/Params/Descriptors/ParamDescReplace.php +1 -1
  18. installer/dup-installer/src/Utils/Tests/MessageCustomizer.php +199 -0
  19. installer/dup-installer/src/Utils/Tests/MessageCustomizerItem.php +45 -0
  20. installer/dup-installer/src/Utils/Tests/TestInterface.php +16 -0
  21. installer/dup-installer/src/Utils/Tests/WP/TestsErrorHandler.php +290 -0
  22. installer/dup-installer/src/Utils/Tests/WP/TestsExecuter.php +149 -0
  23. installer/dup-installer/src/Utils/Tests/WP/tests_template.php +121 -0
  24. installer/dup-installer/templates/default/pages-parts/help/steps/step-3.php +18 -1
  25. installer/dup-installer/templates/default/pages-parts/help/steps/step1-parts/advanced-step1-options.php +14 -2
  26. installer/dup-installer/templates/default/pages-parts/help/steps/step1-parts/basic-step1-setup.php +75 -25
  27. installer/dup-installer/templates/default/pages-parts/step1/info-tabs/overviews/restore-backup.php +7 -7
  28. installer/dup-installer/templates/default/pages-parts/step1/info-tabs/overviews/type-single-site.php +7 -7
  29. installer/dup-installer/templates/default/pages-parts/step3/options-tabs/search-rules.php +1 -0
  30. installer/dup-installer/templates/default/parts/validation/database-tests/db-supported-engine.php +1 -1
  31. installer/dup-installer/templates/default/parts/validation/tests/manual-extraction.php +6 -5
  32. installer/dup-installer/templates/default/scripts/modules/final-tests.php +3 -2
  33. installer/dup-installer/templates/default/scripts/step1-init.php +0 -8
  34. readme.txt +2 -2
  35. src/Libs/Snap/SnapCode.php +10 -4
  36. src/Libs/Snap/wordpress_core_files.php +85 -21
  37. views/packages/details/detail.php +52 -39
  38. views/parts/migration-clean-installation-files.php +1 -1
  39. views/settings/packages.php +6 -5
assets/css/style.css CHANGED
@@ -15,6 +15,7 @@ i[data-tooltip].fa-lightbulb-o {cursor:pointer; color:gray}
15
  span.btn-separator {content:''; display:inline-block; background:silver; margin:2px 3px; height:25px; width:1px; vertical-align:top;}
16
  a.grey-icon i.fa {color:#777}
17
  i.grey-icon {color:#777}
 
18
 
19
  .no-display {display:none !important;}
20
  .link-style {color:#0074ab; cursor:pointer; text-decoration:underline;}
15
  span.btn-separator {content:''; display:inline-block; background:silver; margin:2px 3px; height:25px; width:1px; vertical-align:top;}
16
  a.grey-icon i.fa {color:#777}
17
  i.grey-icon {color:#777}
18
+ .maroon {color:maroon}
19
 
20
  .no-display {display:none !important;}
21
  .link-style {color:#0074ab; cursor:pointer; text-decoration:underline;}
classes/class.db.php CHANGED
@@ -125,7 +125,9 @@ class DUP_DB extends wpdb
125
 
126
  $custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
127
  $custom_mysqldump_path = (strlen($custom_mysqldump_path)) ? $custom_mysqldump_path : '';
128
- //Common Windows Paths
 
 
129
  if (DUP_Util::isWindows()) {
130
  $paths = array(
131
  $custom_mysqldump_path,
@@ -137,7 +139,7 @@ class DUP_DB extends wpdb
137
  'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
138
  'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump'
139
  );
140
- //Common Linux Paths
141
  } else {
142
  $paths = array(
143
  $custom_mysqldump_path,
@@ -214,10 +216,9 @@ class DUP_DB extends wpdb
214
  * Returns all collation types that are assigned to the tables and columns table in
215
  * the current database. Each element in the array is unique
216
  *
217
- * @param array &$tablesToInclude A list of tables to include in the search.
218
- * Parameter does not change in the function, is passed by reference only to avoid copying.
219
  *
220
- * @return array Returns an array with all the collation types being used
221
  */
222
  public static function getTableCollationList($tablesToInclude)
223
  {
@@ -240,6 +241,7 @@ class DUP_DB extends wpdb
240
 
241
  $collations = array_unique(array_merge($collations, $wpdb->get_col()));
242
  }
 
243
  sort($collations);
244
  }
245
  return $collations;
@@ -249,7 +251,7 @@ class DUP_DB extends wpdb
249
  * Returns list of MySQL engines used by $tablesToInclude in the current DB
250
  *
251
  * @param string[] $tablesToInclude tables to check the engines for
252
- * @return null
253
  * @throws Exception
254
  */
255
  public static function getTableEngineList($tablesToInclude)
@@ -265,8 +267,9 @@ class DUP_DB extends wpdb
265
  DUP_Log::info("GET TABLE ENGINES ERROR: " . $wpdb->last_error);
266
  }
267
 
268
- $engines = array_unique(array_merge($engines, $wpdb->get_col($query)));
269
  }
 
270
  }
271
 
272
  return $engines;
125
 
126
  $custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
127
  $custom_mysqldump_path = (strlen($custom_mysqldump_path)) ? $custom_mysqldump_path : '';
128
+ $custom_mysqldump_path = escapeshellcmd($custom_mysqldump_path);
129
+
130
+ // Common Windows Paths
131
  if (DUP_Util::isWindows()) {
132
  $paths = array(
133
  $custom_mysqldump_path,
139
  'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
140
  'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump'
141
  );
142
+ // Common Linux Paths
143
  } else {
144
  $paths = array(
145
  $custom_mysqldump_path,
216
  * Returns all collation types that are assigned to the tables and columns table in
217
  * the current database. Each element in the array is unique
218
  *
219
+ * @param string[] $tablesToInclude A list of tables to include in the search.
 
220
  *
221
+ * @return string[] Returns an array with all the collation types being used
222
  */
223
  public static function getTableCollationList($tablesToInclude)
224
  {
241
 
242
  $collations = array_unique(array_merge($collations, $wpdb->get_col()));
243
  }
244
+ $collations = array_values($collations);
245
  sort($collations);
246
  }
247
  return $collations;
251
  * Returns list of MySQL engines used by $tablesToInclude in the current DB
252
  *
253
  * @param string[] $tablesToInclude tables to check the engines for
254
+ * @return string[]
255
  * @throws Exception
256
  */
257
  public static function getTableEngineList($tablesToInclude)
267
  DUP_Log::info("GET TABLE ENGINES ERROR: " . $wpdb->last_error);
268
  }
269
 
270
+ $engines = array_merge($engines, $wpdb->get_col($query));
271
  }
272
+ $engines = array_values(array_unique($engines));
273
  }
274
 
275
  return $engines;
classes/package/class.pack.archive.php CHANGED
@@ -804,6 +804,7 @@ class DUP_Archive
804
  $origUrls = array(
805
  'home' => $homeUrl,
806
  'abs' => site_url(),
 
807
  'wpcontent' => content_url(),
808
  'uploads' => $updDirs['baseurl'],
809
  'plugins' => plugins_url(),
804
  $origUrls = array(
805
  'home' => $homeUrl,
806
  'abs' => site_url(),
807
+ 'login' => wp_login_url(),
808
  'wpcontent' => content_url(),
809
  'uploads' => $updDirs['baseurl'],
810
  'plugins' => plugins_url(),
classes/package/class.pack.installer.php CHANGED
@@ -120,9 +120,8 @@ web server is not set up properly.
120
  Please contact your host and ask them to enable "PHP" processing on your
121
  account.
122
  ----------------------------- NOTICE --------------------------------- */
123
- ?>
124
  HEADER;
125
- $installer_contents = $header . SnapCode::getSrcClassCode($template_filepath, false) . "\n/* DUPLICATOR_INSTALLER_EOF */";
126
  // $installer_contents = file_get_contents($template_filepath);
127
  // $csrf_class_contents = file_get_contents($csrf_class_filepath);
128
 
@@ -388,6 +387,7 @@ HEADER;
388
  $originalUrls = DUP_Archive::getOriginalUrls();
389
  $wpInfo->configs->realValues->siteUrl = $originalUrls['abs'];
390
  $wpInfo->configs->realValues->homeUrl = $originalUrls['home'];
 
391
  $wpInfo->configs->realValues->contentUrl = $originalUrls['wpcontent'];
392
  $wpInfo->configs->realValues->uploadBaseUrl = $originalUrls['uploads'];
393
  $wpInfo->configs->realValues->pluginsUrl = $originalUrls['plugins'];
120
  Please contact your host and ask them to enable "PHP" processing on your
121
  account.
122
  ----------------------------- NOTICE --------------------------------- */
 
123
  HEADER;
124
+ $installer_contents = $header . SnapCode::getSrcClassCode($template_filepath, false, true) . "\n/* DUPLICATOR_INSTALLER_EOF */";
125
  // $installer_contents = file_get_contents($template_filepath);
126
  // $csrf_class_contents = file_get_contents($csrf_class_filepath);
127
 
387
  $originalUrls = DUP_Archive::getOriginalUrls();
388
  $wpInfo->configs->realValues->siteUrl = $originalUrls['abs'];
389
  $wpInfo->configs->realValues->homeUrl = $originalUrls['home'];
390
+ $wpInfo->configs->realValues->loginUrl = $originalUrls['login'];
391
  $wpInfo->configs->realValues->contentUrl = $originalUrls['wpcontent'];
392
  $wpInfo->configs->realValues->uploadBaseUrl = $originalUrls['uploads'];
393
  $wpInfo->configs->realValues->pluginsUrl = $originalUrls['plugins'];
define.php CHANGED
@@ -5,8 +5,8 @@ defined('ABSPATH') || defined('DUPXABSPATH') || exit;
5
 
6
 
7
  if (function_exists('plugin_dir_url')) {
8
- define('DUPLICATOR_VERSION', '1.5.0');
9
- define('DUPLICATOR_VERSION_BUILD', '2022-08-28_19:00');
10
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
11
  define('DUPLICATOR_SITE_URL', get_site_url());
12
 
5
 
6
 
7
  if (function_exists('plugin_dir_url')) {
8
+ define('DUPLICATOR_VERSION', '1.5.1');
9
+ define('DUPLICATOR_VERSION_BUILD', '2022-11-16_13:00');
10
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
11
  define('DUPLICATOR_SITE_URL', get_site_url());
12
 
duplicator.php CHANGED
@@ -4,9 +4,9 @@
4
  * Plugin Name: Duplicator
5
  * Plugin URI: https://snapcreek.com/duplicator/duplicator-free/
6
  * Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
7
- * Version: 1.5.0
8
  * Requires at least: 4.0
9
- * Tested up to: 6.0
10
  * Requires PHP: 5.3.8
11
  * Author: Snap Creek
12
  * Author URI: http://www.snapcreek.com/duplicator/
4
  * Plugin Name: Duplicator
5
  * Plugin URI: https://snapcreek.com/duplicator/duplicator-free/
6
  * Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
7
+ * Version: 1.5.1
8
  * Requires at least: 4.0
9
+ * Tested up to: 6.1
10
  * Requires PHP: 5.3.8
11
  * Author: Snap Creek
12
  * Author URI: http://www.snapcreek.com/duplicator/
installer/dup-installer/classes/class.installer.state.php CHANGED
@@ -595,9 +595,14 @@ class DUPX_InstallerState
595
  */
596
  public static function getAdminLogin()
597
  {
598
- $paramsManager = PrmMng::getInstance();
599
- $adminUrl = rtrim($paramsManager->getValue(PrmMng::PARAM_SITE_URL), "/");
600
- return $adminUrl . '/wp-login.php';
 
 
 
 
 
601
  }
602
 
603
  /**
595
  */
596
  public static function getAdminLogin()
597
  {
598
+ $paramsManager = PrmMng::getInstance();
599
+ $archiveConfig = \DUPX_ArchiveConfig::getInstance();
600
+ $adminUrl = rtrim($paramsManager->getValue(PrmMng::PARAM_SITE_URL), "/");
601
+ $sourceAdminUrl = rtrim($archiveConfig->getRealValue("siteUrl"), "/");
602
+ $sourceLoginUrl = $archiveConfig->getRealValue("loginUrl");
603
+ $relLoginUrl = substr($sourceLoginUrl, strlen($sourceAdminUrl));
604
+ $loginUrl = $adminUrl . $relLoginUrl;
605
+ return $loginUrl;
606
  }
607
 
608
  /**
installer/dup-installer/classes/database/class.db.php CHANGED
@@ -11,7 +11,9 @@
11
  */
12
 
13
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
 
14
  use Duplicator\Installer\Utils\Log\Log;
 
15
  class DUPX_DB
16
  {
17
  const DELETE_CHUNK_SIZE = 500;
@@ -540,9 +542,9 @@ class DUPX_DB
540
  /**
541
  * Sets the MySQL connection's character set.
542
  *
543
- * @param \mysqli $dbh The resource given by mysqli_connect
544
- * @param string $charset The character set (optional)
545
- * @param string $collate The collation (optional)
546
  */
547
  public static function setCharset($dbh, $charset = null, $collate = null)
548
  {
@@ -552,16 +554,22 @@ class DUPX_DB
552
 
553
  $charset = (!isset($charset) ) ? $GLOBALS['DBCHARSET_DEFAULT'] : $charset;
554
  $collate = (!isset($collate) ) ? '' : $collate;
 
555
  if (empty($charset)) {
556
  return true;
557
  }
558
 
559
  if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
560
- if (($result1 = mysqli_set_charset($dbh, $charset)) === false) {
561
- $errMsg = mysqli_error($dbh);
562
- Log::info('DATABASE ERROR: mysqli_set_charset ' . Log::v2str($charset) . ' MSG: ' . $errMsg);
563
- } else {
564
- Log::info('DATABASE: mysqli_set_charset ' . Log::v2str($charset), Log::LV_DETAILED);
 
 
 
 
 
565
  }
566
 
567
  if (!empty($collate)) {
11
  */
12
 
13
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
14
+
15
  use Duplicator\Installer\Utils\Log\Log;
16
+
17
  class DUPX_DB
18
  {
19
  const DELETE_CHUNK_SIZE = 500;
542
  /**
543
  * Sets the MySQL connection's character set.
544
  *
545
+ * @param \mysqli $dbh The resource given by mysqli_connect
546
+ * @param ?string $charset The character set, null default value
547
+ * @param ?string $collate The collation, null default value
548
  */
549
  public static function setCharset($dbh, $charset = null, $collate = null)
550
  {
554
 
555
  $charset = (!isset($charset) ) ? $GLOBALS['DBCHARSET_DEFAULT'] : $charset;
556
  $collate = (!isset($collate) ) ? '' : $collate;
557
+
558
  if (empty($charset)) {
559
  return true;
560
  }
561
 
562
  if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
563
+ try {
564
+ if (($result1 = mysqli_set_charset($dbh, $charset)) === false) {
565
+ $errMsg = mysqli_error($dbh);
566
+ Log::info('DATABASE ERROR: mysqli_set_charset ' . Log::v2str($charset) . ' MSG: ' . $errMsg);
567
+ } else {
568
+ Log::info('DATABASE: mysqli_set_charset ' . Log::v2str($charset), Log::LV_DETAILED);
569
+ }
570
+ } catch (Exception $e) {
571
+ Log::info('DATABASE ERROR: mysqli_set_charset ' . Log::v2str($charset) . ' MSG: ' . $e->getMessage());
572
+ $result1 = false;
573
  }
574
 
575
  if (!empty($collate)) {
installer/dup-installer/ctrls/classes/class.ctrl.ajax.php CHANGED
@@ -14,6 +14,7 @@ defined('ABSPATH') || defined('DUPXABSPATH') || exit;
14
 
15
  use Duplicator\Installer\Utils\Log\Log;
16
  use Duplicator\Installer\Core\Params\PrmMng;
 
17
  use Duplicator\Libs\Snap\SnapJson;
18
  use Duplicator\Libs\Snap\SnapString;
19
  use Duplicator\Libs\Snap\SnapUtil;
@@ -215,10 +216,10 @@ final class DUPX_Ctrl_ajax
215
  $actionData = DUPX_S3_Funcs::getInstance()->updateWebsite();
216
  break;
217
  case self::ACTION_FINAL_TESTS_PREPARE:
218
- $actionData = DUPX_test_wordpress_exec::preTestPrepare();
219
  break;
220
  case self::ACTION_FINAL_TESTS_AFTER:
221
- $actionData = DUPX_test_wordpress_exec::afterTestClean();
222
  break;
223
  case self::ACTION_SET_AUTO_CLEAN_FILES:
224
  if (DUPX_Ctrl_Params::setParamAutoClean()) {
14
 
15
  use Duplicator\Installer\Utils\Log\Log;
16
  use Duplicator\Installer\Core\Params\PrmMng;
17
+ use Duplicator\Installer\Utils\Tests\WP\TestsExecuter;
18
  use Duplicator\Libs\Snap\SnapJson;
19
  use Duplicator\Libs\Snap\SnapString;
20
  use Duplicator\Libs\Snap\SnapUtil;
216
  $actionData = DUPX_S3_Funcs::getInstance()->updateWebsite();
217
  break;
218
  case self::ACTION_FINAL_TESTS_PREPARE:
219
+ $actionData = TestsExecuter::preTestPrepare();
220
  break;
221
  case self::ACTION_FINAL_TESTS_AFTER:
222
+ $actionData = TestsExecuter::afterTestClean();
223
  break;
224
  case self::ACTION_SET_AUTO_CLEAN_FILES:
225
  if (DUPX_Ctrl_Params::setParamAutoClean()) {
installer/dup-installer/ctrls/classes/class.ctrl.params.php CHANGED
@@ -325,6 +325,7 @@ final class DUPX_Ctrl_Params
325
  $readParamsList = array(
326
  PrmMng::PARAM_EMAIL_REPLACE,
327
  PrmMng::PARAM_FULL_SEARCH,
 
328
  PrmMng::PARAM_POSTGUID,
329
  PrmMng::PARAM_MAX_SERIALIZE_CHECK,
330
  PrmMng::PARAM_PLUGINS,
325
  $readParamsList = array(
326
  PrmMng::PARAM_EMAIL_REPLACE,
327
  PrmMng::PARAM_FULL_SEARCH,
328
+ PrmMng::PARAM_SKIP_PATH_REPLACE,
329
  PrmMng::PARAM_POSTGUID,
330
  PrmMng::PARAM_MAX_SERIALIZE_CHECK,
331
  PrmMng::PARAM_PLUGINS,
installer/dup-installer/ctrls/classes/class.ctrl.s3.funcs.php CHANGED
@@ -358,6 +358,7 @@ final class DUPX_S3_Funcs
358
  public function initLog()
359
  {
360
  $paramsManager = PrmMng::getInstance();
 
361
 
362
  // make sure dbConnection is initialized
363
  $this->dbConnection();
@@ -378,6 +379,8 @@ final class DUPX_S3_Funcs
378
  "********************************************************************************\n" .
379
  "OPTIONS:\n";
380
 
 
 
381
  $wpConfigsKeys = array(
382
  PrmMng::PARAM_WP_CONF_DISALLOW_FILE_EDIT,
383
  PrmMng::PARAM_WP_CONF_DISALLOW_FILE_MODS,
@@ -405,7 +408,7 @@ final class DUPX_S3_Funcs
405
  foreach ($wpConfigsKeys as $key) {
406
  $label = $paramsManager->getLabel($key);
407
  $value = SnapString::implodeKeyVals(', ', $paramsManager->getValue($key), '[%s = %s]');
408
- $log .= str_pad($label, 22, '_', STR_PAD_RIGHT) . ': ' . $value . "\n";
409
  }
410
  $log .= "********************************************************************************\n";
411
 
358
  public function initLog()
359
  {
360
  $paramsManager = PrmMng::getInstance();
361
+ $labelPadSize = 22;
362
 
363
  // make sure dbConnection is initialized
364
  $this->dbConnection();
379
  "********************************************************************************\n" .
380
  "OPTIONS:\n";
381
 
382
+ $log .= str_pad('SKIP PATH REPLACE', $labelPadSize, '_', STR_PAD_RIGHT) . ': ' . Log::v2str($paramsManager->getValue(PrmMng::PARAM_SKIP_PATH_REPLACE)) . "\n";
383
+
384
  $wpConfigsKeys = array(
385
  PrmMng::PARAM_WP_CONF_DISALLOW_FILE_EDIT,
386
  PrmMng::PARAM_WP_CONF_DISALLOW_FILE_MODS,
408
  foreach ($wpConfigsKeys as $key) {
409
  $label = $paramsManager->getLabel($key);
410
  $value = SnapString::implodeKeyVals(', ', $paramsManager->getValue($key), '[%s = %s]');
411
+ $log .= str_pad($label, $labelPadSize, '_', STR_PAD_RIGHT) . ': ' . $value . "\n";
412
  }
413
  $log .= "********************************************************************************\n";
414
 
installer/dup-installer/main.installer.php CHANGED
@@ -34,7 +34,7 @@ if (in_array(basename(dirname(__FILE__)), $disabled_dirs)) {
34
  die;
35
  }
36
 
37
- define('DUPX_VERSION', '1.5.0');
38
  define('DUPX_INIT', str_replace('\\', '/', dirname(__FILE__)));
39
  define('DUPX_ROOT', preg_match('/^[\\\\\/]?$/', dirname(DUPX_INIT)) ? '/' : dirname(DUPX_INIT));
40
 
34
  die;
35
  }
36
 
37
+ define('DUPX_VERSION', '1.5.1');
38
  define('DUPX_INIT', str_replace('\\', '/', dirname(__FILE__)));
39
  define('DUPX_ROOT', preg_match('/^[\\\\\/]?$/', dirname(DUPX_INIT)) ? '/' : dirname(DUPX_INIT));
40
 
installer/dup-installer/src/Core/Bootstrap.php CHANGED
@@ -204,7 +204,6 @@ class Bootstrap
204
  require_once(DUPX_INIT . '/classes/config/class.constants.php');
205
  require_once(DUPX_INIT . '/classes/config/class.conf.utils.php');
206
  require_once(DUPX_INIT . '/classes/class.installer.state.php');
207
- require_once(DUPX_INIT . '/classes/tests/class.test.wordpress.exec.php');
208
  require_once(DUPX_INIT . '/ctrls/classes/class.ctrl.ajax.php');
209
  require_once(DUPX_INIT . '/ctrls/classes/class.ctrl.params.php');
210
  require_once(DUPX_INIT . '/ctrls/ctrl.base.php');
204
  require_once(DUPX_INIT . '/classes/config/class.constants.php');
205
  require_once(DUPX_INIT . '/classes/config/class.conf.utils.php');
206
  require_once(DUPX_INIT . '/classes/class.installer.state.php');
 
207
  require_once(DUPX_INIT . '/ctrls/classes/class.ctrl.ajax.php');
208
  require_once(DUPX_INIT . '/ctrls/classes/class.ctrl.params.php');
209
  require_once(DUPX_INIT . '/ctrls/ctrl.base.php');
installer/dup-installer/src/Core/Deploy/Database/QueryFixes.php CHANGED
@@ -45,7 +45,7 @@ class QueryFixes extends AbstractJsonSerializable
45
  /**
46
  * Filter props on json encode
47
  *
48
- * @return strng[]
49
  */
50
  public function __sleep()
51
  {
@@ -109,10 +109,9 @@ class QueryFixes extends AbstractJsonSerializable
109
  }
110
 
111
  /**
112
- * return search and replace rules
113
  *
114
- * @return array
115
- * @throws Exception
116
  */
117
  protected function rulesProcAndViews()
118
  {
@@ -160,6 +159,8 @@ class QueryFixes extends AbstractJsonSerializable
160
  }
161
 
162
  /**
 
 
163
  * regex managed examples
164
  * - `meta_value` longtext CHARACTER SET utf16 COLLATE utf16_slovak_ci DEFAULT NULL,
165
  * - `comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
@@ -168,7 +169,7 @@ class QueryFixes extends AbstractJsonSerializable
168
  *
169
  * accept ['"`]charset['"`]
170
  *
171
- * @return boolean|array
172
  */
173
  public function legacyCharsetAndCollation()
174
  {
@@ -183,12 +184,12 @@ class QueryFixes extends AbstractJsonSerializable
183
  }, $invalidCharsets)) . ')';
184
 
185
  $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' .
186
- $invalidChrRegex . ')([`\'"]?\s.*COLLATE\s*[\s=]\s*[`\'"]?)([^`\'"\s;]+)([`\'"]?.*$)/m';
187
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3' . $defCollateRegex . '$5';
188
- $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)([^`\'"\s;]+)([`\'"]?\s.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' .
189
- $invalidChrRegex . ')([`\'"]?[\s;].*$)/m';
190
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3' . $defCharsetRegex . '$5';
191
- $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' . $invalidChrRegex . ')([`\'"]?[\s;].*$)/m';
192
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3';
193
 
194
  $this->generatorLog .= "GLOBAL RULES ADDED: INVALID CHARSETS\n";
@@ -199,13 +200,13 @@ class QueryFixes extends AbstractJsonSerializable
199
  return preg_quote($val, '/');
200
  }, $invalidCollations)) . ')';
201
 
202
- $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)([^`\'"\s;]+)([`\'"]?\s.*COLLATE\s*[\s=]\s*[`\'"]?)(' .
203
- $invalidColRegex . ')([`\'"]?[\s;].*$)/m';
204
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3' . $defCollateRegex . '$5';
205
  $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)(' .
206
- $invalidColRegex . ')([`\'"]?\s.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)([^`\'"\s;]+)([`\'"]?.*$)/m';
207
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3' . $defCharsetRegex . '$5';
208
- $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)(' . $invalidColRegex . ')([`\'"]?[\s;].*$)/m';
209
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3';
210
 
211
  $this->generatorLog .= "GLOBAL RULES ADDED: INVALID COLLATIONS\n";
@@ -213,9 +214,9 @@ class QueryFixes extends AbstractJsonSerializable
213
  }
214
 
215
  /**
216
- * return search and replace table prefix rules
217
  *
218
- * @return array
219
  */
220
  protected function rulesTableNames()
221
  {
45
  /**
46
  * Filter props on json encode
47
  *
48
+ * @return string[]
49
  */
50
  public function __sleep()
51
  {
109
  }
110
 
111
  /**
112
+ * Set search and replace rules
113
  *
114
+ * @return void
 
115
  */
116
  protected function rulesProcAndViews()
117
  {
159
  }
160
 
161
  /**
162
+ * Set legacy charset adn collation rules
163
+ *
164
  * regex managed examples
165
  * - `meta_value` longtext CHARACTER SET utf16 COLLATE utf16_slovak_ci DEFAULT NULL,
166
  * - `comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
169
  *
170
  * accept ['"`]charset['"`]
171
  *
172
+ * @return void
173
  */
174
  public function legacyCharsetAndCollation()
175
  {
184
  }, $invalidCharsets)) . ')';
185
 
186
  $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' .
187
+ $invalidChrRegex . ')([`\'"]?\s.*COLLATE\s*[\s=]\s*[`\'"]?)([^`\'"\s;,]+)([`\'"]?.*$)/m';
188
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3' . $defCollateRegex . '$5';
189
+ $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)([^`\'"\s;,]+)([`\'"]?\s.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' .
190
+ $invalidChrRegex . ')([`\'"]?[\s;,].*$)/m';
191
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3' . $defCharsetRegex . '$5';
192
+ $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)(' . $invalidChrRegex . ')([`\'"]?[\s;,].*$)/m';
193
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3';
194
 
195
  $this->generatorLog .= "GLOBAL RULES ADDED: INVALID CHARSETS\n";
200
  return preg_quote($val, '/');
201
  }, $invalidCollations)) . ')';
202
 
203
+ $this->globalRules['search'][] = '/(^.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)([^`\'"\s;,]+)([`\'"]?\s.*COLLATE\s*[\s=]\s*[`\'"]?)(' .
204
+ $invalidColRegex . ')([`\'"]?[\s;,].*$)/m';
205
  $this->globalRules['replace'][] = '$1' . $defCharsetRegex . '$3' . $defCollateRegex . '$5';
206
  $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)(' .
207
+ $invalidColRegex . ')([`\'"]?\s.*(?:CHARSET|CHARACTER SET)\s*[\s=]\s*[`\'"]?)([^`\'"\s;,]+)([`\'"]?.*$)/m';
208
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3' . $defCharsetRegex . '$5';
209
+ $this->globalRules['search'][] = '/(^.*COLLATE\s*[\s=]\s*[`\'"]?)(' . $invalidColRegex . ')([`\'"]?[\s;,].*$)/m';
210
  $this->globalRules['replace'][] = '$1' . $defCollateRegex . '$3';
211
 
212
  $this->generatorLog .= "GLOBAL RULES ADDED: INVALID COLLATIONS\n";
214
  }
215
 
216
  /**
217
+ * Set search and replace table prefix rules
218
  *
219
+ * @return void
220
  */
221
  protected function rulesTableNames()
222
  {
installer/dup-installer/src/Core/Params/Descriptors/ParamDescEngines.php CHANGED
@@ -18,12 +18,15 @@ use Duplicator\Installer\Core\Params\Items\ParamItem;
18
  use Duplicator\Installer\Core\Params\Items\ParamForm;
19
  use Duplicator\Installer\Core\Params\Items\ParamOption;
20
  use DUPX_InstallerState;
 
21
 
22
  /**
23
  * class where all parameters are initialized. Used by the param manager
24
  */
25
  final class ParamDescEngines implements DescriptorInterface
26
  {
 
 
27
  /**
28
  * Init params
29
  *
@@ -241,7 +244,7 @@ final class ParamDescEngines implements DescriptorInterface
241
  PrmMng::PARAM_DB_CHUNK,
242
  ParamForm::TYPE_BOOL,
243
  array(
244
- 'default' => ($params[PrmMng::PARAM_DB_ENGINE]->getValue() === \DUPX_DBInstall::ENGINE_CHUNK)
245
  )
246
  );
247
 
@@ -257,11 +260,25 @@ final class ParamDescEngines implements DescriptorInterface
257
  ))
258
  );
259
 
260
- $params[PrmMng::PARAM_SKIP_PATH_REPLACE] = new ParamItem(
 
261
  PrmMng::PARAM_SKIP_PATH_REPLACE,
262
  ParamForm::TYPE_BOOL,
 
 
 
 
263
  array(
264
- 'default' => false
 
 
 
 
 
 
 
 
 
265
  )
266
  );
267
  }
@@ -282,12 +299,6 @@ final class ParamDescEngines implements DescriptorInterface
282
  $params[PrmMng::PARAM_ARCHIVE_ACTION]->setValue(DUP_Extraction::ACTION_REMOVE_WP_FILES);
283
  }
284
 
285
- if ($params[PrmMng::PARAM_SKIP_PATH_REPLACE]->getStatus() !== ParamItem::STATUS_OVERWRITE) {
286
- if (strlen($params[PrmMng::PARAM_PATH_OLD]->getValue()) === 0) {
287
- $params[PrmMng::PARAM_SKIP_PATH_REPLACE]->setValue(true);
288
- }
289
- }
290
-
291
  if (DUPX_InstallerState::isRestoreBackup($params[PrmMng::PARAM_INST_TYPE]->getValue())) {
292
  $default = \DUPX_S3_Funcs::MODE_SKIP;
293
  } elseif ($params[PrmMng::PARAM_DB_ENGINE]->getValue() === \DUPX_DBInstall::ENGINE_CHUNK) {
@@ -412,14 +423,14 @@ SUBNOTEHTML;
412
  );
413
  }
414
 
415
- if ($zipEnable) {
 
 
416
  $default = DUP_Extraction::ENGINE_ZIP_CHUNK;
417
  } elseif ($shellZipEnable) {
418
  $default = DUP_Extraction::ENGINE_ZIP_SHELL;
419
  } elseif ($dupEnable) {
420
  $default = DUP_Extraction::ENGINE_DUP;
421
- } elseif ($manualEnable) {
422
- $default = DUP_Extraction::ENGINE_MANUAL;
423
  } else {
424
  $default = null;
425
  }
18
  use Duplicator\Installer\Core\Params\Items\ParamForm;
19
  use Duplicator\Installer\Core\Params\Items\ParamOption;
20
  use DUPX_InstallerState;
21
+ use DUPX_ArchiveConfig;
22
 
23
  /**
24
  * class where all parameters are initialized. Used by the param manager
25
  */
26
  final class ParamDescEngines implements DescriptorInterface
27
  {
28
+ const AUTO_SKIP_PATH_REPLACE_LIST = ['', '/html'];
29
+
30
  /**
31
  * Init params
32
  *
244
  PrmMng::PARAM_DB_CHUNK,
245
  ParamForm::TYPE_BOOL,
246
  array(
247
+ 'default' => ($params[PrmMng::PARAM_DB_ENGINE]->getValue() === \DUPX_DBInstall::ENGINE_CHUNK)
248
  )
249
  );
250
 
260
  ))
261
  );
262
 
263
+ $oldHomePath = DUPX_ArchiveConfig::getInstance()->getRealValue('archivePaths')->home;
264
+ $params[PrmMng::PARAM_SKIP_PATH_REPLACE] = new ParamForm(
265
  PrmMng::PARAM_SKIP_PATH_REPLACE,
266
  ParamForm::TYPE_BOOL,
267
+ ParamForm::FORM_TYPE_CHECKBOX,
268
+ array(
269
+ 'default' => in_array($oldHomePath, self::AUTO_SKIP_PATH_REPLACE_LIST)
270
+ ),
271
  array(
272
+ 'label' => 'Skip Path Replace:',
273
+ 'checkboxLabel' => 'Skips the replacement of the source path',
274
+ 'status' => function (ParamForm $paramObj) {
275
+ $sourcePath = PrmMng::getInstance()->getValue(PrmMng::PARAM_PATH_OLD);
276
+ if (strlen($sourcePath) == 0) {
277
+ return ParamForm::STATUS_DISABLED;
278
+ } else {
279
+ return ParamForm::STATUS_ENABLED;
280
+ }
281
+ }
282
  )
283
  );
284
  }
299
  $params[PrmMng::PARAM_ARCHIVE_ACTION]->setValue(DUP_Extraction::ACTION_REMOVE_WP_FILES);
300
  }
301
 
 
 
 
 
 
 
302
  if (DUPX_InstallerState::isRestoreBackup($params[PrmMng::PARAM_INST_TYPE]->getValue())) {
303
  $default = \DUPX_S3_Funcs::MODE_SKIP;
304
  } elseif ($params[PrmMng::PARAM_DB_ENGINE]->getValue() === \DUPX_DBInstall::ENGINE_CHUNK) {
423
  );
424
  }
425
 
426
+ if ($manualEnable) {
427
+ $default = DUP_Extraction::ENGINE_MANUAL;
428
+ } elseif ($zipEnable) {
429
  $default = DUP_Extraction::ENGINE_ZIP_CHUNK;
430
  } elseif ($shellZipEnable) {
431
  $default = DUP_Extraction::ENGINE_ZIP_SHELL;
432
  } elseif ($dupEnable) {
433
  $default = DUP_Extraction::ENGINE_DUP;
 
 
434
  } else {
435
  $default = null;
436
  }
installer/dup-installer/src/Core/Params/Descriptors/ParamDescGeneric.php CHANGED
@@ -19,6 +19,7 @@ use Duplicator\Installer\Core\Params\Items\ParamOption;
19
  use Duplicator\Installer\Core\Params\Items\ParamFormPass;
20
  use Duplicator\Installer\Utils\Log\Log;
21
  use Duplicator\Libs\Snap\SnapOS;
 
22
  use DUPX_InstallerState;
23
 
24
  /**
@@ -149,10 +150,24 @@ final class ParamDescGeneric implements DescriptorInterface
149
  ),
150
  array(
151
  'label' => 'File Times:',
 
 
 
 
 
 
 
152
  'options' => array(
153
  new ParamOption('current', 'Current', ParamOption::OPT_ENABLED, array('title' => 'Set the files current date time to now')),
154
  new ParamOption('original', 'Original', ParamOption::OPT_ENABLED, array('title' => 'Keep the files date time the same'))
155
- )
 
 
 
 
 
 
 
156
  )
157
  );
158
 
19
  use Duplicator\Installer\Core\Params\Items\ParamFormPass;
20
  use Duplicator\Installer\Utils\Log\Log;
21
  use Duplicator\Libs\Snap\SnapOS;
22
+ use DUPX_ArchiveConfig;
23
  use DUPX_InstallerState;
24
 
25
  /**
150
  ),
151
  array(
152
  'label' => 'File Times:',
153
+ 'status' => function (ParamItem $paramObj) {
154
+ if (DUPX_ArchiveConfig::getInstance()->isZipArchive()) {
155
+ return ParamForm::STATUS_ENABLED;
156
+ } else {
157
+ return ParamForm::STATUS_DISABLED;
158
+ }
159
+ },
160
  'options' => array(
161
  new ParamOption('current', 'Current', ParamOption::OPT_ENABLED, array('title' => 'Set the files current date time to now')),
162
  new ParamOption('original', 'Original', ParamOption::OPT_ENABLED, array('title' => 'Keep the files date time the same'))
163
+ ),
164
+ 'subNote' => function (ParamItem $paramObj) {
165
+ if (DUPX_ArchiveConfig::getInstance()->isZipArchive()) {
166
+ return '';
167
+ } else {
168
+ return 'This option is not supported for Dup Archive (.daf)';
169
+ }
170
+ }
171
  )
172
  );
173
 
installer/dup-installer/src/Core/Params/Descriptors/ParamDescReplace.php CHANGED
@@ -107,7 +107,7 @@ final class ParamDescReplace implements DescriptorInterface
107
  'max' => 99,
108
  'step' => 1,
109
  'wrapperClasses' => array('small'),
110
- 'label' => 'Serialized obj max size:',
111
  'postfix' => array('type' => 'label', 'label' => 'MB'),
112
  'subNote' => 'If the serialized object stored in the database exceeds this size, it will not be parsed for replacement.'
113
  . '<br><b>Too large a size in low memory installations can generate a fatal error.</b>'
107
  'max' => 99,
108
  'step' => 1,
109
  'wrapperClasses' => array('small'),
110
+ 'label' => 'Serialized Max Size:',
111
  'postfix' => array('type' => 'label', 'label' => 'MB'),
112
  'subNote' => 'If the serialized object stored in the database exceeds this size, it will not be parsed for replacement.'
113
  . '<br><b>Too large a size in low memory installations can generate a fatal error.</b>'
installer/dup-installer/src/Utils/Tests/MessageCustomizer.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Customizes final report error messages
5
+ *
6
+ * Standard: PSR-2
7
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
8
+ *
9
+ * @package SC\DUPX\U
10
+ *
11
+ */
12
+
13
+ namespace Duplicator\Installer\Utils\Tests;
14
+
15
+ class MessageCustomizer
16
+ {
17
+ const CONTEXT_SHORT_MESSAGE = 'short';
18
+ const CONTEXT_LONG_MESSAGE = 'long';
19
+ const CONTEXT_NOTICE_ID = 'notice-id';
20
+
21
+ /**
22
+ * Tries to apply each customization until one of them works
23
+ *
24
+ * @param string $shortMessage short message of notice to be customized
25
+ * @param string $longMessage long message of notice to be customized
26
+ * @param string $noticeId notice IDfinal-tests.php
27
+ * @return bool true if any of the customizations were applied, false otherwise
28
+ */
29
+ public static function applyAllNoticeCustomizations(&$shortMessage, &$longMessage, &$noticeId)
30
+ {
31
+ foreach (self::getCustomizationItems() as $item) {
32
+ if ($item->conditionSatisfied($longMessage)) {
33
+ $shortMessage = $item->apply($shortMessage, self::CONTEXT_SHORT_MESSAGE);
34
+ $longMessage = $item->apply($longMessage, self::CONTEXT_LONG_MESSAGE);
35
+ $noticeId = $item->apply($noticeId, self::CONTEXT_NOTICE_ID);
36
+ return true;
37
+ }
38
+ }
39
+
40
+ return false;
41
+ }
42
+
43
+ /**
44
+ * Get customization to apply at error messages
45
+ *
46
+ * @return MessageCustomizerItem[] customizations list
47
+ * @throws \Exception
48
+ */
49
+ protected static function getCustomizationItems()
50
+ {
51
+ $items = array();
52
+ $items[] = new MessageCustomizerItem(
53
+ function ($string) {
54
+ if (self::getArchiveConfigData() == false) {
55
+ return false;
56
+ }
57
+ return preg_match("/undefined.*create_function/", $string) &&
58
+ version_compare(phpversion(), "8") >= 0 &&
59
+ version_compare(self::getArchiveConfigData()->version_php, "8") < 0;
60
+ },
61
+ function ($string, $context) {
62
+ if (self::getArchiveConfigData() == false) {
63
+ return $string;
64
+ }
65
+ $phpVersionNew = self::getTwoLevelVersion(phpversion());
66
+ $phpVersionOld = self::getTwoLevelVersion(self::getArchiveConfigData()->version_php);
67
+ $longMsgPrefix = "There is code in this site that is not compatible with PHP " . $phpVersionNew . ". " .
68
+ "To make the install work you will either have to\ninstall on PHP " .
69
+ $phpVersionOld . " or ";
70
+
71
+ switch ($context) {
72
+ case self::CONTEXT_SHORT_MESSAGE:
73
+ return "Source site or plugins are incompatible with PHP " . $phpVersionNew;
74
+ case self::CONTEXT_LONG_MESSAGE:
75
+ if (($plugin = self::getProblematicPluginFromError($string)) !== false) {
76
+ return $longMsgPrefix . "disable the plugin '{$plugin->name}' (slug: $plugin->slug) using a " .
77
+ "file manager of your choice.\nSee full error message below: \n\n" . $string;
78
+ } elseif (($theme = self::getProblematicThemeFromError($string)) !== false) {
79
+ return $longMsgPrefix . "disable the theme '{$theme->themeName}' (slug: $theme->slug) using a " .
80
+ "file manager of your choice.\nSee full error message below: \n\n" . $string;
81
+ } else {
82
+ return $longMsgPrefix . "manually modify the affected files mentioned in the error trace below: \n\n" .
83
+ $string;
84
+ }
85
+ case self::CONTEXT_NOTICE_ID:
86
+ return $string . '_php8';
87
+ }
88
+ }
89
+ );
90
+
91
+ return $items;
92
+ }
93
+
94
+ /**
95
+ * Return the plugin that is causing the error message if present
96
+ *
97
+ * @param string $longMessage the long error message containing the error trace
98
+ *
99
+ * @return false|object object containing plugin info or false on failure
100
+ */
101
+ protected static function getProblematicPluginFromError($longMessage)
102
+ {
103
+ if (($archiveConfig = self::getArchiveConfigData()) === false) {
104
+ return false;
105
+ }
106
+ $oldMain = $archiveConfig->wpInfo->targetRoot;
107
+ $oldMuPlugins = $archiveConfig->wpInfo->configs->realValues->originalPaths->muplugins;
108
+ $oldPlugins = $archiveConfig->wpInfo->configs->realValues->originalPaths->plugins;
109
+ $relativeMuPlugins = str_replace($oldMain, "", $oldMuPlugins);
110
+ $relativePlugins = str_replace($oldMain, "", $oldPlugins);
111
+ $regex = "/(?:" . preg_quote($relativePlugins, "/") . "\/|" . preg_quote($relativeMuPlugins, "/") . "\/)(.*?)(\/|\.php).*$/m";
112
+ if (!preg_match($regex, $longMessage, $matches)) {
113
+ return false;
114
+ }
115
+
116
+ //matches the first part of the slug related to the plugin directory
117
+ $slug = $matches[1];
118
+ foreach ($archiveConfig->wpInfo->plugins as $plugin) {
119
+ if (strpos($plugin->slug, $slug) === 0) {
120
+ return $plugin;
121
+ }
122
+ }
123
+
124
+ return false;
125
+ }
126
+
127
+ /**
128
+ * Returns the theme that is causing the error message if present
129
+ *
130
+ * @param string $longMessage the long error message containing the error trace
131
+ *
132
+ * @return false|object object containing theme info or false
133
+ */
134
+ protected static function getProblematicThemeFromError($longMessage)
135
+ {
136
+ $archiveConfig = self::getArchiveConfigData();
137
+ $oldMain = $archiveConfig->wpInfo->targetRoot;
138
+ $oldThemes = $archiveConfig->wpInfo->configs->realValues->originalPaths->themes;
139
+ $relativeThemes = str_replace($oldMain, "", $oldThemes);
140
+
141
+ file_put_contents(
142
+ DUPX_INIT . "/my_log.txt",
143
+ "OLD THEMES: {$oldThemes} \n" .
144
+ "Relative themes: {$relativeThemes} \n" .
145
+ "regex: " . "/(" . preg_quote($relativeThemes, "/") . "\/)(.*?)(\/|\.php).*$/m"
146
+ );
147
+
148
+ if (!preg_match("/(?:" . preg_quote($relativeThemes, "/") . "\/)(.*?)(?:\/|\.php).*$/m", $longMessage, $matches)) {
149
+ return false;
150
+ }
151
+
152
+ $slug = $matches[1];
153
+ foreach ($archiveConfig->wpInfo->themes as $theme) {
154
+ if ($theme->slug == $slug) {
155
+ return $theme;
156
+ }
157
+ }
158
+
159
+ return false;
160
+ }
161
+
162
+ /**
163
+ * Get package config data
164
+ *
165
+ * @return false|object package config data or false on failure
166
+ */
167
+ protected static function getArchiveConfigData()
168
+ {
169
+ static $archiveConfig = null;
170
+ if (is_null($archiveConfig)) {
171
+ if (
172
+ ($path = glob(DUPX_INIT . "/dup-archive__*.txt")) === false ||
173
+ count($path) !== 1
174
+ ) {
175
+ return $archiveConfig = false;
176
+ }
177
+
178
+ if (($json = file_get_contents($path[0])) === false) {
179
+ return $archiveConfig = false;
180
+ }
181
+
182
+ $archiveConfig = json_decode($json);
183
+ if (!is_object($archiveConfig)) {
184
+ $archiveConfig = false;
185
+ }
186
+ }
187
+ return $archiveConfig;
188
+ }
189
+
190
+ /**
191
+ * @param string $version a version number
192
+ * @return string returns only the first 2 levels of the version numbers
193
+ */
194
+ private static function getTwoLevelVersion($version)
195
+ {
196
+ $arr = explode(".", $version);
197
+ return $arr[0] . "." . $arr[1];
198
+ }
199
+ }
installer/dup-installer/src/Utils/Tests/MessageCustomizerItem.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Duplicator\Installer\Utils\Tests;
4
+
5
+ class MessageCustomizerItem
6
+ {
7
+ private $checkCallback;
8
+ private $applyCallback;
9
+
10
+ /**
11
+ * @param callable|bool $checkCallback callback or bool whether to apply customization
12
+ * @param callable $applyCallback the customizations to be applied
13
+ */
14
+ public function __construct($checkCallback, $applyCallback)
15
+ {
16
+ if (!is_bool($checkCallback) && !is_callable($checkCallback)) {
17
+ throw new \Exception("check callback must be either bool or callable");
18
+ }
19
+ $this->checkCallback = $checkCallback;
20
+
21
+ if (!is_callable($applyCallback)) {
22
+ throw new \Exception("customization callback must be callable");
23
+ }
24
+ $this->applyCallback = $applyCallback;
25
+ }
26
+
27
+ /**
28
+ * @param mixed $input necessary input to check condition
29
+ * @return bool
30
+ */
31
+ public function conditionSatisfied($input)
32
+ {
33
+ return (is_bool($this->checkCallback) && $this->checkCallback) || call_user_func($this->checkCallback, $input);
34
+ }
35
+
36
+ /**
37
+ * @param string $string string to be customized
38
+ * @param mixed $context context about what to apply
39
+ * @return false|mixed
40
+ */
41
+ public function apply($string, $context)
42
+ {
43
+ return call_user_func($this->applyCallback, $string, $context);
44
+ }
45
+ }
installer/dup-installer/src/Utils/Tests/TestInterface.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Duplicator\Installer\Utils\Tests;
4
+
5
+ interface TestInterface
6
+ {
7
+ /**
8
+ * @return bool true on success
9
+ */
10
+ public static function preTestPrepare();
11
+
12
+ /**
13
+ * @return bool true on success
14
+ */
15
+ public static function afterTestClean();
16
+ }
installer/dup-installer/src/Utils/Tests/WP/TestsErrorHandler.php ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Error handler for test scripts
5
+ * *******************
6
+ * IMPORTANT
7
+ * Don\'t use snap lib functions o other duplicator functions
8
+ * *******************
9
+ *
10
+ * Standard: PSR-2
11
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
12
+ *
13
+ * @package SC\DUPX\U
14
+ *
15
+ */
16
+
17
+ namespace Duplicator\Installer\Utils\Tests\WP;
18
+
19
+ class TestsErrorHandler
20
+ {
21
+ const ERR_TYPE_ERROR = 'error';
22
+ const ERR_TYPE_WARNING = 'warning';
23
+ const ERR_TYPE_NOTICE = 'notice';
24
+ const ERR_TYPE_DEPRECATED = 'deprecated';
25
+ const ERRNO_EXCEPTION = 1073741824; // 31 pos of bit mask
26
+
27
+ protected static $errors = array();
28
+
29
+ /**
30
+ * If it is null a json is displayed otherwise the callback function is executed in the shutd
31
+ *
32
+ * @var null| callable
33
+ */
34
+ protected static $shutdownCallback = null;
35
+
36
+ /**
37
+ * register error handlers
38
+ *
39
+ * @return void
40
+ */
41
+ public static function register()
42
+ {
43
+ @register_shutdown_function(array(__CLASS__, 'shutdown'));
44
+ @set_error_handler(array(__CLASS__, 'error'));
45
+ @set_exception_handler(array(__CLASS__, 'exception'));
46
+ }
47
+
48
+ /**
49
+ * @param callable $callback shutdown callback
50
+ * @return void
51
+ */
52
+ public static function setShutdownCallabck($callback)
53
+ {
54
+ if (is_callable($callback)) {
55
+ self::$shutdownCallback = $callback;
56
+ } else {
57
+ self::$shutdownCallback = null;
58
+ }
59
+ }
60
+
61
+ /**
62
+ * add error on list
63
+ *
64
+ * @param int $errno error number
65
+ * @param string $errstr error string
66
+ * @param string $errfile error file
67
+ * @param int $errline error line
68
+ * @param array $trace error trace
69
+ * @return void
70
+ */
71
+ protected static function addError($errno, $errstr, $errfile, $errline, $trace)
72
+ {
73
+ $newError = array(
74
+ 'error_cat' => self::getErrorCategoryFromErrno($errno),
75
+ 'errno' => $errno,
76
+ 'errno_str' => self::errnoToString($errno),
77
+ 'errstr' => $errstr,
78
+ 'errfile' => $errfile,
79
+ 'errline' => $errline,
80
+ 'trace' => array_map(array(__CLASS__, 'normalizeTraceElement'), $trace)
81
+ );
82
+
83
+ self::$errors[] = $newError;
84
+
85
+ if (function_exists('error_clear_last')) {
86
+ error_clear_last();
87
+ }
88
+ }
89
+
90
+ /**
91
+ * @param array $error the error array
92
+ * @return string human-readable error message with trace
93
+ */
94
+ public static function errorToString($error)
95
+ {
96
+ $result = $error['errno_str'] . ' ' . $error['errstr'] . "\n";
97
+ $result .= "\t" . 'FILE: ' . $error['errfile'] . '[' . $error['errline'] . ']' . "\n";
98
+ $result .= "\t--- TRACE ---\n";
99
+ foreach ($error['trace'] as $trace) {
100
+ $result .= "\t";
101
+ if (!empty($trace['class'])) {
102
+ $result .= str_pad('CLASS___: ' . $trace['class'] . $trace['type'] . $trace['function'], 40, ' ');
103
+ } else {
104
+ $result .= str_pad('FUNCTION: ' . $trace['function'], 40, ' ');
105
+ }
106
+ $result .= 'FILE: ' . $trace['file'] . '[' . $trace['line'] . ']' . "\n";
107
+ }
108
+
109
+ return $result;
110
+ }
111
+
112
+ /**
113
+ * Error handler
114
+ *
115
+ * @param integer $errno Error level
116
+ * @param string $errstr Error message
117
+ * @param string $errfile Error file
118
+ * @param integer $errline Error line
119
+ * @return void
120
+ */
121
+ public static function error($errno, $errstr, $errfile, $errline)
122
+ {
123
+ $trace = debug_backtrace();
124
+ array_shift($trace);
125
+ self::adderror($errno, $errstr, $errfile, $errline, $trace);
126
+ }
127
+
128
+ /**
129
+ * Exception handler
130
+ *
131
+ * @param Exception|Error $e // Throwable in php 7
132
+ * @return void
133
+ */
134
+ public static function exception($e)
135
+ {
136
+ self::adderror(self::ERRNO_EXCEPTION, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTrace());
137
+ }
138
+
139
+ /**
140
+ * Shutdown handler
141
+ *
142
+ * @return void
143
+ */
144
+ public static function shutdown()
145
+ {
146
+ self::obCleanAll();
147
+
148
+ if (($error = error_get_last())) {
149
+ self::error($error['type'], $error['message'], $error['file'], $error['line']);
150
+ }
151
+ ob_end_clean();
152
+
153
+ if (is_callable(self::$shutdownCallback)) {
154
+ call_user_func(self::$shutdownCallback, self::$errors);
155
+ } else {
156
+ echo json_encode(self::$errors);
157
+ }
158
+
159
+ // prevent other shutdown functions
160
+ exit();
161
+ }
162
+
163
+ /**
164
+ * Close all buffers and return content
165
+ *
166
+ * @param bool $getContent If true it returns buffer content, otherwise it is discarded
167
+ *
168
+ * @return string
169
+ */
170
+ protected static function obCleanAll($getContent = true)
171
+ {
172
+ $result = '';
173
+ for ($i = 0; $i < ob_get_level(); $i++) {
174
+ if ($getContent) {
175
+ $result .= ob_get_contents();
176
+ }
177
+ ob_clean();
178
+ }
179
+ return $result;
180
+ }
181
+
182
+ /**
183
+ * @param array $elem normalize error element
184
+ * @return array
185
+ */
186
+ public static function normalizeTraceElement($elem)
187
+ {
188
+ if (!is_array($elem)) {
189
+ $elem = array();
190
+ }
191
+
192
+ unset($elem['args']);
193
+ unset($elem['object']);
194
+
195
+ return array_merge(array(
196
+ 'file' => '',
197
+ 'line' => -1,
198
+ 'function' => '',
199
+ 'class' => '',
200
+ 'type' => ''), $elem);
201
+ }
202
+
203
+ /**
204
+ *
205
+ * @param int $errno error number
206
+ * @return string
207
+ */
208
+ public static function getErrorCategoryFromErrno($errno)
209
+ {
210
+ switch ($errno) {
211
+ case E_PARSE:
212
+ case E_ERROR:
213
+ case E_CORE_ERROR:
214
+ case E_COMPILE_ERROR:
215
+ case E_USER_ERROR:
216
+ case self::ERRNO_EXCEPTION:
217
+ return self::ERR_TYPE_ERROR;
218
+ case E_WARNING:
219
+ case E_USER_WARNING:
220
+ case E_COMPILE_WARNING:
221
+ return self::ERR_TYPE_WARNING;
222
+ case E_NOTICE:
223
+ case E_USER_NOTICE:
224
+ return self::ERR_TYPE_NOTICE;
225
+ default:
226
+ break;
227
+ }
228
+ if (defined('E_STRICT') && $errno === E_STRICT) {
229
+ return self::ERR_TYPE_WARNING;
230
+ }
231
+ if (defined('E_RECOVERABLE_ERROR') && $errno === E_RECOVERABLE_ERROR) {
232
+ return self::ERR_TYPE_WARNING;
233
+ }
234
+ if (defined('E_DEPRECATED') && $errno === E_DEPRECATED) {
235
+ return self::ERR_TYPE_DEPRECATED;
236
+ }
237
+ if (defined('E_USER_DEPRECATED') && $errno === E_USER_DEPRECATED) {
238
+ return self::ERR_TYPE_DEPRECATED;
239
+ }
240
+ return self::ERR_TYPE_WARNING;
241
+ }
242
+
243
+ /**
244
+ *
245
+ * @param int $errno error number
246
+ * @return string
247
+ */
248
+ public static function errnoToString($errno)
249
+ {
250
+ switch ($errno) {
251
+ case E_PARSE:
252
+ return 'E_PARSE';
253
+ case E_ERROR:
254
+ return 'E_ERROR';
255
+ case E_CORE_ERROR:
256
+ return 'E_CORE_ERROR';
257
+ case E_COMPILE_ERROR:
258
+ return 'E_COMPILE_ERROR';
259
+ case E_USER_ERROR:
260
+ return 'E_USER_ERROR';
261
+ case E_WARNING:
262
+ return 'E_WARNING';
263
+ case E_USER_WARNING:
264
+ return 'E_USER_WARNING';
265
+ case E_COMPILE_WARNING:
266
+ return 'E_COMPILE_WARNING';
267
+ case E_NOTICE:
268
+ return 'E_NOTICE';
269
+ case E_USER_NOTICE:
270
+ return 'E_USER_NOTICE';
271
+ case self::ERRNO_EXCEPTION:
272
+ return 'EXCEPTION';
273
+ default:
274
+ break;
275
+ }
276
+ if (defined('E_STRICT') && $errno === E_STRICT) {
277
+ return 'E_STRICT';
278
+ }
279
+ if (defined('E_RECOVERABLE_ERROR') && $errno === E_RECOVERABLE_ERROR) {
280
+ return 'E_RECOVERABLE_ERROR';
281
+ }
282
+ if (defined('E_DEPRECATED') && $errno === E_DEPRECATED) {
283
+ return 'E_DEPRECATED';
284
+ }
285
+ if (defined('E_USER_DEPRECATED') && $errno === E_USER_DEPRECATED) {
286
+ return 'E_USER_DEPRECATED';
287
+ }
288
+ return 'E_UNKNOWN CODE: ' . $errno;
289
+ }
290
+ }
installer/dup-installer/src/Utils/Tests/WP/TestsExecuter.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * plugin custom actions
5
+ *
6
+ * Standard: PSR-2
7
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
8
+ *
9
+ * @package SC\DUPX\U
10
+ *
11
+ */
12
+
13
+ namespace Duplicator\Installer\Utils\Tests\WP;
14
+
15
+ use Duplicator\Installer\Utils\Log\Log;
16
+ use Duplicator\Installer\Core\Params\PrmMng;
17
+ use Duplicator\Installer\Utils\Tests\TestInterface;
18
+ use DUPX_NOTICE_ITEM;
19
+ use DUPX_NOTICE_MANAGER;
20
+ use DUPX_Security;
21
+
22
+ class TestsExecuter implements TestInterface
23
+ {
24
+ const SCRIPT_NAME_HTTP_PARAM = 'dpro_test_script_name';
25
+
26
+ /**
27
+ * @return bool true on success
28
+ * @throws \Exception
29
+ */
30
+ public static function preTestPrepare()
31
+ {
32
+ $nManager = DUPX_NOTICE_MANAGER::getInstance();
33
+ $scriptFilePath = self::getScriptTestPath();
34
+ Log::info('PREPARE FILE BEFORE TEST: ' . $scriptFilePath, Log::LV_DETAILED);
35
+ if (file_put_contents($scriptFilePath, self::getExecFileContent()) === false) {
36
+ $nManager->addFinalReportNotice(array(
37
+ 'shortMsg' => 'Can\'t create final text script file',
38
+ 'longMsg' => 'Can\'t create file ' . $scriptFilePath,
39
+ 'longMsgMode' => DUPX_NOTICE_ITEM::MSG_MODE_DEFAULT,
40
+ 'level' => DUPX_NOTICE_ITEM::HARD_WARNING,
41
+ 'sections' => array('general'),
42
+ ));
43
+
44
+ return false;
45
+ }
46
+
47
+ return true;
48
+ }
49
+
50
+ /**
51
+ * @return bool true on success
52
+ * @throws \Exception
53
+ */
54
+ public static function afterTestClean()
55
+ {
56
+ $nManager = DUPX_NOTICE_MANAGER::getInstance();
57
+ $scriptFilePath = self::getScriptTestPath();
58
+ Log::info('DELETE FILE AFTER TEST: ' . $scriptFilePath, Log::LV_DETAILED);
59
+ if (file_exists($scriptFilePath)) {
60
+ if (unlink($scriptFilePath) == false) {
61
+ $nManager->addFinalReportNotice(array(
62
+ 'shortMsg' => 'Can\'t deleta final text script file',
63
+ 'longMsg' => 'Can\'t delete file ' . $scriptFilePath . '. Remove it manually',
64
+ 'longMsgMode' => DUPX_NOTICE_ITEM::MSG_MODE_DEFAULT,
65
+ 'level' => DUPX_NOTICE_ITEM::HARD_WARNING,
66
+ 'sections' => array('general'),
67
+ ));
68
+ }
69
+ }
70
+
71
+ return true;
72
+ }
73
+
74
+ /**
75
+ * @return string url of WP front-end
76
+ * @throws \Exception
77
+ */
78
+ public static function getFrontendUrl()
79
+ {
80
+ $indexPath = PrmMng::getInstance()->getValue(PrmMng::PARAM_PATH_NEW) . '/index.php';
81
+ $data = array(
82
+ self::SCRIPT_NAME_HTTP_PARAM => $indexPath
83
+ );
84
+
85
+ return self::getScriptTestUrl() . '?' . http_build_query($data);
86
+ }
87
+
88
+ /**
89
+ * @return string url of WP back-end
90
+ * @throws \Exception
91
+ */
92
+ public static function getBackendUrl()
93
+ {
94
+ $indexPath = PrmMng::getInstance()->getValue(PrmMng::PARAM_PATH_WP_CORE_NEW) . '/wp-login.php';
95
+ $data = array(
96
+ self::SCRIPT_NAME_HTTP_PARAM => $indexPath
97
+ );
98
+
99
+ return self::getScriptTestUrl() . '?' . http_build_query($data);
100
+ }
101
+
102
+ /**
103
+ * @return string test script name
104
+ */
105
+ protected static function getScriptTestName()
106
+ {
107
+ return 'wp_test_script_' . DUPX_Security::getInstance()->getSecondaryPackageHash() . '.php';
108
+ }
109
+
110
+ /**
111
+ * @return string test script path
112
+ * @throws \Exception
113
+ */
114
+ public static function getScriptTestPath()
115
+ {
116
+ // use wp-content path and not root path
117
+ return PrmMng::getInstance()->getValue(PrmMng::PARAM_PATH_CONTENT_NEW) . '/' . self::getScriptTestName();
118
+ }
119
+
120
+ /**
121
+ * @return string test script url
122
+ * @throws \Exception
123
+ */
124
+ public static function getScriptTestUrl()
125
+ {
126
+ // use wp-content path and not root path
127
+ return PrmMng::getInstance()->getValue(PrmMng::PARAM_URL_CONTENT_NEW) . '/' . self::getScriptTestName();
128
+ }
129
+
130
+ /**
131
+ * @return string contents to be added to the test script file
132
+ */
133
+ public static function getExecFileContent()
134
+ {
135
+ $result = file_get_contents(dirname(__FILE__) . '/tests_template.php');
136
+ $result = preg_replace('/^.*\[REMOVE LINE BY SCRIPT].*\n/m', '', $result); // remove first line with die
137
+ return str_replace(
138
+ array(
139
+ '$_$_NOTICES_FILE_PATH_$_$',
140
+ '$_$_DUPX_INIT_$_$'
141
+ ),
142
+ array(
143
+ $GLOBALS["NOTICES_FILE_PATH"],
144
+ DUPX_INIT
145
+ ),
146
+ $result
147
+ );
148
+ }
149
+ }
installer/dup-installer/src/Utils/Tests/WP/tests_template.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Duplicator\Installer\Utils\Tests\WP;
4
+
5
+ use Duplicator\Installer\Utils\Autoloader;
6
+ use Duplicator\Libs\Snap\SnapUtil;
7
+ use Duplicator\Installer\Utils\Tests\MessageCustomizer;
8
+ use DUPX_NOTICE_ITEM;
9
+ use DUPX_NOTICE_MANAGER;
10
+ use Exception;
11
+
12
+ // phpcs:disable
13
+ die(); // [REMOVE LINE BY SCRIPT] don't remove/change this *********************************
14
+
15
+ if (!defined('DUPXABSPATH')) {
16
+ define('DUPXABSPATH', dirname(__FILE__));
17
+ }
18
+
19
+ if (!defined('DUPX_INIT')) {
20
+ define('DUPX_INIT', '$_$_DUPX_INIT_$_$');
21
+ }
22
+ // phpcs:enable
23
+
24
+ require_once(DUPX_INIT . '/src/Utils/Autoloader.php');
25
+ Autoloader::register();
26
+
27
+ require_once(DUPX_INIT . '/classes/utilities/class.u.notices.manager.php');
28
+ $GLOBALS["NOTICES_FILE_PATH"] = '$_$_NOTICES_FILE_PATH_$_$';
29
+
30
+ $GLOBALS["TEST_SCRIPT"] = SnapUtil::filterInputDefaultSanitizeString(INPUT_GET, 'dpro_test_script_name');
31
+ ob_start();
32
+ TestsErrorHandler::register();
33
+ TestsErrorHandler::setShutdownCallabck(function ($errors) {
34
+
35
+ $nManager = DUPX_NOTICE_MANAGER::getInstance();
36
+ $scriptName = basename($GLOBALS["TEST_SCRIPT"]);
37
+ $scriptNameId = str_replace(array('.', '-', '#'), '_', $scriptName);
38
+ $firstFatal = true;
39
+ $firstNotice = true;
40
+
41
+ switch ($scriptName) {
42
+ case 'index.php':
43
+ $shortMessageFatal = 'Fatal error on WordPress front-end tests!';
44
+ $shortMessageNotice = 'Warnings or notices on WordPress front-end tests!';
45
+ $fatalErrorLevel = DUPX_NOTICE_ITEM::CRITICAL;
46
+ break;
47
+ case 'wp-login.php':
48
+ $shortMessageFatal = 'Fatal error on WordPress login tests!';
49
+ $shortMessageNotice = 'Warnings or notices on WordPress backend tests!';
50
+ $fatalErrorLevel = DUPX_NOTICE_ITEM::FATAL;
51
+ break;
52
+ default:
53
+ $shortMessageFatal = 'Fatal error on php script ' . $scriptName;
54
+ $shortMessageNotice = 'Warnings or notices on php script ' . $scriptName;
55
+ $fatalErrorLevel = DUPX_NOTICE_ITEM::CRITICAL;
56
+ break;
57
+ }
58
+
59
+ foreach ($errors as $error) {
60
+ $addBeforeNotice = false;
61
+ switch ($error['error_cat']) {
62
+ case TestsErrorHandler::ERR_TYPE_ERROR:
63
+ $noticeId = 'wptest_fatal_error_' . $scriptNameId;
64
+ $errorLevel = $fatalErrorLevel;
65
+ $shortMessage = $shortMessageFatal;
66
+ if ($firstFatal) {
67
+ $addBeforeNotice = true;
68
+ $firstFatal = false;
69
+ }
70
+
71
+ break;
72
+ case TestsErrorHandler::ERR_TYPE_NOTICE:
73
+ case TestsErrorHandler::ERR_TYPE_DEPRECATED:
74
+ case TestsErrorHandler::ERR_TYPE_WARNING:
75
+ default:
76
+ $noticeId = 'wptest_notice_' . $scriptNameId;
77
+ $errorLevel = DUPX_NOTICE_ITEM::NOTICE;
78
+ $shortMessage = $shortMessageNotice;
79
+ if ($firstNotice) {
80
+ $addBeforeNotice = true;
81
+ $firstNotice = false;
82
+ }
83
+ break;
84
+ }
85
+
86
+ if ($addBeforeNotice) {
87
+ $longMessage = 'SCRIPT FILE TEST: ' . $GLOBALS["TEST_SCRIPT"] . "\n\n";
88
+ } else {
89
+ $longMessage = '';
90
+ }
91
+ $longMessage .= TestsErrorHandler::errorToString($error) . "\n-----\n\n";
92
+ $longMessage .= "For solutions to these issues see the online FAQs \nhttps://snapcreek.com/duplicator/docs \n\n";
93
+
94
+ MessageCustomizer::applyAllNoticeCustomizations($shortMessage, $longMessage, $noticeId);
95
+ $data = array(
96
+ 'shortMsg' => $shortMessage,
97
+ 'level' => $errorLevel,
98
+ 'longMsgMode' => DUPX_NOTICE_ITEM::MSG_MODE_PRE,
99
+ 'longMsg' => $longMessage,
100
+ 'sections' => 'general'
101
+ );
102
+ if ($errorLevel == DUPX_NOTICE_ITEM::FATAL) {
103
+ $nManager->addBothNextAndFinalReportNotice($data, DUPX_NOTICE_MANAGER::ADD_UNIQUE_APPEND, $noticeId);
104
+ } else {
105
+ $nManager->addFinalReportNotice($data, DUPX_NOTICE_MANAGER::ADD_UNIQUE_APPEND, $noticeId);
106
+ }
107
+ }
108
+
109
+ if ($nManager->saveNotices()) {
110
+ echo json_encode(true);
111
+ } else {
112
+ echo json_encode(false);
113
+ }
114
+ });
115
+
116
+ $_SERVER['REQUEST_URI'] = '/';
117
+ if (file_exists($GLOBALS["TEST_SCRIPT"])) {
118
+ require_once($GLOBALS["TEST_SCRIPT"]);
119
+ } else {
120
+ throw new Exception('test script file ' . $GLOBALS["TEST_SCRIPT"] . ' doesn\'t exist');
121
+ }
installer/dup-installer/templates/default/pages-parts/help/steps/step-3.php CHANGED
@@ -57,6 +57,23 @@ $expandClass = $sectionId == $open_section ? 'open' : 'close';
57
  It is recommended that this remain enabled so that you do not have unwanted schedules and storage options.
58
  </td>
59
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  <tr>
61
  <td class="col-opt">Email<br/> Domains</td>
62
  <td>The domain portion of all email addresses will be updated if this option is enabled.</td>
@@ -94,7 +111,7 @@ $expandClass = $sectionId == $open_section ? 'open' : 'close';
94
  </td>
95
  </tr>
96
  <tr>
97
- <td class="col-opt">Serialized obj<br/> max size</td>
98
  <td>
99
  Large serialized objects can cause a fatal error when Duplicator attempts to transform them. <br>
100
  If a fatal error is generated, lower this limit. <br>
57
  It is recommended that this remain enabled so that you do not have unwanted schedules and storage options.
58
  </td>
59
  </tr>
60
+ <tr>
61
+ <td class="col-opt">Skip Path<br/> Replace</td>
62
+ <td>
63
+ This is an advanced option that should be used when trying to install from either the "/" or "/html" location. The following
64
+ conditions are set with this option when the install location is detected.
65
+ <ul>
66
+ <li>Source folder is <i>/</i> the parameter should be visible in read-only mode and not checkable.</li>
67
+ <li>Source folder is <i>/html</i> the parameter must be check by default and kept checked.</li>
68
+ <li>In other cases, the parameter must be inactive by default and checkable.</li>
69
+ </ul>
70
+
71
+ This option helps to resolve issues when the install path is either <i>"/" or "/html"</i>. In case the source path is /html this option
72
+ is required to prevent data update conflicts. For example the html_type option in the wp_options table with data such as
73
+ <i>text/html</i> is replaced with text/[new_path] which can lead to other issues therefore this option is required to be checked to
74
+ prevent those types of database update issues.
75
+ </td>
76
+ </tr>
77
  <tr>
78
  <td class="col-opt">Email<br/> Domains</td>
79
  <td>The domain portion of all email addresses will be updated if this option is enabled.</td>
111
  </td>
112
  </tr>
113
  <tr>
114
+ <td class="col-opt">Serialized<br/> Max Size</td>
115
  <td>
116
  Large serialized objects can cause a fatal error when Duplicator attempts to transform them. <br>
117
  If a fatal error is generated, lower this limit. <br>
installer/dup-installer/templates/default/pages-parts/help/steps/step1-parts/advanced-step1-options.php CHANGED
@@ -84,8 +84,19 @@ These are the advanced options for advanced users.
84
 
85
  <sup class="hlp-pro-lbl">Pro</sup>
86
  <b>Remove all files except add-on sites and extract</b><br/>
87
- All files except an add-on site will be removed, and then the archive will be extracted.
88
- <br/>
 
 
 
 
 
 
 
 
 
 
 
89
  </td>
90
  </tr>
91
  <tr>
@@ -116,6 +127,7 @@ These are the advanced options for advanced users.
116
  <td>
117
  When the archive is extracted it should show the current date-time or keep the original time it had when it was built.
118
  This setting will be applied to all files and directories.
 
119
  </td>
120
  </tr>
121
  <tr>
84
 
85
  <sup class="hlp-pro-lbl">Pro</sup>
86
  <b>Remove all files except add-on sites and extract</b><br/>
87
+ All files except an add-on site will be removed, and then the archive will be extracted. An add-on site is a site/domain that is stored in a
88
+ directory off of your main site that has been "added on" to your main hosting account. For instance, when you purchased a hosting account it
89
+ could be for a.com. Then after that, you decided to add b.com and c.com to the same hosting account. The structure of this setup is often the
90
+ following although it can vary some:
91
+
92
+ <ul>
93
+ <li>/public_html - contains files for a.com</li>
94
+ <li>/public_html/b.com - contains files for b.com</li>
95
+ <li>/public_html/c.com - contains files for c.com</li>
96
+ </ul>
97
+
98
+ The directories /public_html/b.com and c.com contain the files for the add-on sites b.com and c.com (so the option above means that b.com and c.com
99
+ would be preserved and not deleted when you installed to a.com)
100
  </td>
101
  </tr>
102
  <tr>
127
  <td>
128
  When the archive is extracted it should show the current date-time or keep the original time it had when it was built.
129
  This setting will be applied to all files and directories.
130
+ <i>Note: Setting the Original time is currently only supported when using the ZipArchive Format.</i>
131
  </td>
132
  </tr>
133
  <tr>
installer/dup-installer/templates/default/pages-parts/help/steps/step1-parts/basic-step1-setup.php CHANGED
@@ -4,14 +4,36 @@ defined('ABSPATH') || defined('DUPXABSPATH') || exit;
4
  use Duplicator\Installer\Utils\Utils;
5
  ?>
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  <!-- ===================================
8
  OVERVIEW -->
9
  <h3>Overview</h3>
10
- The overview section allows users to identify the install type and other details about the archive file. The installer has two operating modes: Basic and
11
- Advanced. Basic mode is the easiest and fastest install mode and covers most setup types. The Advanced mode allows users to implement and apply
12
- additional settings/features to the install process.
13
- <br/><br/>
14
- Note: Duplicator Lite supports only single WordPress sites, while <a href="<?php echo Utils::getCampainUrl("lite_section_help") ?>" target="_blank">Duplicator Pro</a> supports single and multisite websites.
 
 
15
  <br/><br/>
16
 
17
  <h4>
@@ -21,21 +43,54 @@ Note: Duplicator Lite supports only single WordPress sites, while <a href="<?php
21
  This section will give an overview of the various install modes, methods and types that are currently being used.
22
  <br/><br/>
23
 
24
- <b><i class="fas fa-angle-double-right"></i> Mode:</b>
25
  <ul>
26
  <li>
27
- <b>Basic:</b>
28
- This is a simple two-step mode with all options set to the defaults. This is the default mode.
29
  </li>
30
  <li>
31
- <b>Advanced:</b>
32
- This four-step mode allows for higher levels of customization with various detail settings.<br/>
33
- <small>This is the only mode that Duplicator supported before version 1.5</small>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  </li>
35
  </ul>
36
 
37
 
38
- <b><i class="fas fa-angle-double-right"></i> Method:</b>
39
  <ul>
40
  <li>
41
  <b>Standard Install</b>
@@ -72,18 +127,13 @@ This section will give an overview of the various install modes, methods and typ
72
  <li>Method is enabled when the installer detects an existing WordPress site is present.</li>
73
  </ul>
74
  </li>
75
- </ul>
76
-
77
- <b><i class="fas fa-angle-double-right"></i> Status:</b>
78
- <ul>
79
  <li>
80
- <b>Standard Site Setup:</b>
81
- This will perform the installation of a single WordPress site based on the associated method.
82
- </li>
83
- <li>
84
- <b>Restore Site Backup:</b>
85
- The restore backup status restores the original site by not performing any processing on the database or tables to ensure an exact copy
86
- of the original site, exists.
87
  </li>
88
  </ul>
89
 
@@ -100,7 +150,7 @@ This section will give an overview of the various install modes, methods and typ
100
  <i class="far fa-folder fa-fw"></i>
101
  Archive Tab
102
  </h4>
103
- The archive tab shows various details about the archive file and site details related to the site that was archived. With Duplicator Lite the following
104
  install modes are currently supported:
105
  <ul>
106
  <li>
@@ -115,7 +165,7 @@ install modes are currently supported:
115
  <li>
116
  <sup class="hlp-pro-lbl">Pro</sup>
117
  <b><a href="https://snapcreek.com/duplicator/docs/quick-start/#quick-045-q" target="_blank">Import Install:</a></b>
118
- Drag and drop or use a URL for super-fast installs. This Pro-only feature will import Lite archives.
119
  <ul>
120
  <li><b>Import File:</b> Drag and drop an existing Duplicator Lite or Pro archive and quickly replace the existing WordPress site</li>
121
  <li><b>Import Link:</b> Provide a link to an existing Duplicator Lite or Pro archive and quickly replace the existing WordPress site.</li>
4
  use Duplicator\Installer\Utils\Utils;
5
  ?>
6
 
7
+ If no passwords were set on the installer or archive file then users will initially see step one of the installer. The installer has two operating views
8
+ that can be toggled via the Basic and Advanced buttons in the right-hand corner of the application. These installer views can only be chosen on step 1.
9
+ An overview of each view is explained below.
10
+ <br/><br/>
11
+
12
+ <b><i class="fas fa-angle-double-right"></i> Views:</b>
13
+ <ul>
14
+ <li>
15
+ <b>Basic:</b>
16
+ This is a simple two-step mode with all options set to the defaults. This is the default mode. The Basic view is the easiest and fastest and
17
+ covers most setup types. This is the recommended view for most installs.
18
+ </li>
19
+ <li>
20
+ <b>Advanced:</b>
21
+ This four-step mode allows for higher levels of customization with various detail settings. The Advanced view allows users to implement and apply
22
+ additional settings/features to the install process. <br/>
23
+ <small class="hlp-lite-only">This is the only mode that Duplicator supported before version 1.5</small>
24
+ </li>
25
+ </ul>
26
+
27
  <!-- ===================================
28
  OVERVIEW -->
29
  <h3>Overview</h3>
30
+ The overview section allows users to identify the status, mode and select from the install type based on the user's install status. Additionally there are
31
+ other details about the archive file. Below is an overview of the various status, mode and install types. <br/>
32
+
33
+ <small class="hlp-lite-only">
34
+ Note: Duplicator Lite supports only single WordPress sites, while
35
+ <a href="<?php echo Utils::getCampainUrl("lite_section_help") ?>" target="_blank">Duplicator Pro</a> supports single and multisite websites.
36
+ </small>
37
  <br/><br/>
38
 
39
  <h4>
43
  This section will give an overview of the various install modes, methods and types that are currently being used.
44
  <br/><br/>
45
 
46
+ <b><i class="fas fa-angle-double-right"></i> Status:</b>
47
  <ul>
48
  <li>
49
+ <b>Install - Single Site</b><br/>
50
+ This will perform the installation of a single WordPress site based on the associated method.
51
  </li>
52
  <li>
53
+ <sup class="hlp-pro-lbl">Pro</sup>
54
+ <b>Install - Multisite-Subdomain:</b><br/>
55
+ This is a full Multisite installation subdomain (i.e. subdomain.mysite.com) install. All sites in the network will be extracted and installed.
56
+ </li>
57
+ <li>
58
+ <sup class="hlp-pro-lbl">Pro</sup>
59
+ <b>Install - Multisite-Subfolder:</b><br/>
60
+ This is a full Multisite installation via sub-folders install. All sites in the network will be extracted and installed.
61
+ </li>
62
+ <li>
63
+ <sup class="hlp-pro-lbl">Pro</sup>
64
+ <b>Install - Standalone Site:</b><br/>
65
+ This installation converts the selected subsite into a standalone website.
66
+ </li>
67
+ <li>
68
+ <sup class="hlp-pro-lbl">Pro</sup>
69
+ <b>Install - Archive Single Site into Subdomain/Subfolder Multisite:</b><br/>
70
+ This installation will insert the package site into the current multisite subdomain/subfolder setup.
71
+ </li>
72
+ <li>
73
+ <sup class="hlp-pro-lbl">Pro</sup>
74
+ <b>Install - Selected Subsite in Subdomain/Subfolder Multisite:</b><br/>
75
+ This installation will insert the selected subsite of the package into the current subdomain/subfolder multisite installation.
76
+ </li>
77
+ <li>
78
+ <sup class="hlp-pro-lbl">Pro</sup>
79
+ <b>Recovery - [Site Type]:</b><br/>
80
+ This status is enabled when the installer detects recovery mode installer was launched. This process will overwrite this site from the recovery
81
+ point made on a specific date. The site type will represent the type of site being recovered.
82
+ </li>
83
+ <li>
84
+ <sup class="hlp-pro-lbl">Pro</sup>
85
+ <b>Restore Site Backup:</b><br/>
86
+ This method is enabled when the installer detects an archive is imported that matches the current setup. The restore backup status restores the
87
+ original site by not performing any processing on the database or tables to ensure an exact copy of the original site exists. Restore has the
88
+ following status types: <i>Restore: Single Site Backup, Restore - Multisite-Subdomain Backup, Restore - Multisite-Subfolder Backup</i>
89
  </li>
90
  </ul>
91
 
92
 
93
+ <b><i class="fas fa-angle-double-right"></i> Mode:</b>
94
  <ul>
95
  <li>
96
  <b>Standard Install</b>
127
  <li>Method is enabled when the installer detects an existing WordPress site is present.</li>
128
  </ul>
129
  </li>
 
 
 
 
130
  <li>
131
+ <sup class="hlp-pro-lbl">Pro</sup>
132
+ <b>Custom Install</b><br/>
133
+ <ul>
134
+ <li>When the mode is custom this indicates the install is specifically driven by the status type.</li>
135
+ <li>See the status type of the install for all exact install details.</li>
136
+ </ul>
 
137
  </li>
138
  </ul>
139
 
150
  <i class="far fa-folder fa-fw"></i>
151
  Archive Tab
152
  </h4>
153
+ The archive tab shows various details about the archive file and site details related to the site that was archived. With Duplicator the following
154
  install modes are currently supported:
155
  <ul>
156
  <li>
165
  <li>
166
  <sup class="hlp-pro-lbl">Pro</sup>
167
  <b><a href="https://snapcreek.com/duplicator/docs/quick-start/#quick-045-q" target="_blank">Import Install:</a></b>
168
+ Drag and drop or use a URL for super-fast installs. This Pro-only feature will import both Pro and Lite archives.
169
  <ul>
170
  <li><b>Import File:</b> Drag and drop an existing Duplicator Lite or Pro archive and quickly replace the existing WordPress site</li>
171
  <li><b>Import Link:</b> Provide a link to an existing Duplicator Lite or Pro archive and quickly replace the existing WordPress site.</li>
installer/dup-installer/templates/default/pages-parts/step1/info-tabs/overviews/restore-backup.php CHANGED
@@ -28,17 +28,21 @@ $display = DUPX_InstallerState::getInstance()->isInstType(
28
  </div>
29
  <table>
30
  <tr>
31
- <td>Modes:</td>
32
  <td>
33
  Try
34
  <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-basic', 400, 3)">Basic</span>
35
  <sup class="hlp-new-lbl">new</sup> or
36
- <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-advanced', 400, 3)">Advanced</span> installer modes
37
 
38
  </td>
39
  </tr>
40
  <tr>
41
- <td>Method:</td>
 
 
 
 
42
  <td>
43
  <?php
44
  echo $overwriteMode ? '<i class="fas fa-exclamation-triangle"></i>&nbsp;' : '';
@@ -51,10 +55,6 @@ $display = DUPX_InstallerState::getInstance()->isInstType(
51
  ?>
52
  </td>
53
  </tr>
54
- <tr>
55
- <td>Status:</td>
56
- <td>Restore Single Site Backup</td>
57
- </tr>
58
  </table>
59
  </div>
60
  </div>
28
  </div>
29
  <table>
30
  <tr>
31
+ <td>Views:</td>
32
  <td>
33
  Try
34
  <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-basic', 400, 3)">Basic</span>
35
  <sup class="hlp-new-lbl">new</sup> or
36
+ <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-advanced', 400, 3)">Advanced</span> views
37
 
38
  </td>
39
  </tr>
40
  <tr>
41
+ <td>Status:</td>
42
+ <td>Restore Single Site Backup</td>
43
+ </tr>
44
+ <tr>
45
+ <td>Mode:</td>
46
  <td>
47
  <?php
48
  echo $overwriteMode ? '<i class="fas fa-exclamation-triangle"></i>&nbsp;' : '';
55
  ?>
56
  </td>
57
  </tr>
 
 
 
 
58
  </table>
59
  </div>
60
  </div>
installer/dup-installer/templates/default/pages-parts/step1/info-tabs/overviews/type-single-site.php CHANGED
@@ -24,16 +24,20 @@ $display = DUPX_InstallerState::getInstance()->isInstType(DUPX_InstallerSt
24
  </div>
25
  <table>
26
  <tr>
27
- <td>Modes:</td>
28
  <td>
29
  Try
30
  <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-basic', 400, 3)">Basic</span>
31
  <sup class="hlp-new-lbl">new</sup> or
32
- <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-advanced', 400, 3)">Advanced</span> installer modes
33
  </td>
34
  </tr>
35
  <tr>
36
- <td>Method:</td>
 
 
 
 
37
  <td>
38
  <?php
39
  echo $overwriteMode ? '<i class="fas fa-exclamation-triangle"></i>&nbsp;' : '';
@@ -46,10 +50,6 @@ $display = DUPX_InstallerState::getInstance()->isInstType(DUPX_InstallerSt
46
  ?>
47
  </td>
48
  </tr>
49
- <tr>
50
- <td>Status:</td>
51
- <td>Standard Single Site Setup</td>
52
- </tr>
53
  </table>
54
  </div>
55
  </div>
24
  </div>
25
  <table>
26
  <tr>
27
+ <td>View:</td>
28
  <td>
29
  Try
30
  <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-basic', 400, 3)">Basic</span>
31
  <sup class="hlp-new-lbl">new</sup> or
32
+ <span class="link-style" onclick="DUPX.blinkAnimation('s1-switch-template-btn-advanced', 400, 3)">Advanced</span> views
33
  </td>
34
  </tr>
35
  <tr>
36
+ <td>Status:</td>
37
+ <td>Standard Single Site Setup</td>
38
+ </tr>
39
+ <tr>
40
+ <td>Mode:</td>
41
  <td>
42
  <?php
43
  echo $overwriteMode ? '<i class="fas fa-exclamation-triangle"></i>&nbsp;' : '';
50
  ?>
51
  </td>
52
  </tr>
 
 
 
 
53
  </table>
54
  </div>
55
  </div>
installer/dup-installer/templates/default/pages-parts/step3/options-tabs/search-rules.php CHANGED
@@ -42,6 +42,7 @@ if (DUPX_InstallerState::isRestoreBackup()) {
42
  <div class="hdr-sub3 margin-top-2">Database Scan Options</div>
43
  <div class="dupx-opts">
44
  <?php
 
45
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_EMAIL_REPLACE);
46
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_FULL_SEARCH);
47
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_POSTGUID);
42
  <div class="hdr-sub3 margin-top-2">Database Scan Options</div>
43
  <div class="dupx-opts">
44
  <?php
45
+ $paramsManager->getHtmlFormParam(PrmMng::PARAM_SKIP_PATH_REPLACE);
46
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_EMAIL_REPLACE);
47
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_FULL_SEARCH);
48
  $paramsManager->getHtmlFormParam(PrmMng::PARAM_POSTGUID);
installer/dup-installer/templates/default/parts/validation/database-tests/db-supported-engine.php CHANGED
@@ -30,7 +30,7 @@ $subTitle = '';
30
  switch ($testResult) {
31
  case DUPX_Validation_abstract_item::LV_FAIL:
32
  ?>
33
- It is impossible to verify the list of engines in the database.
34
  <?php
35
  break;
36
  case DUPX_Validation_abstract_item::LV_HARD_WARNING:
30
  switch ($testResult) {
31
  case DUPX_Validation_abstract_item::LV_FAIL:
32
  ?>
33
+ The Duplicator Installer is currently unable to verify the list of engines in the database.
34
  <?php
35
  break;
36
  case DUPX_Validation_abstract_item::LV_HARD_WARNING:
installer/dup-installer/templates/default/parts/validation/tests/manual-extraction.php CHANGED
@@ -14,12 +14,13 @@ $paramsManager = PrmMng::getInstance();
14
  ?><p>
15
  <b>Deployment Path:</b> <i><?php echo DUPX_U::esc_html($paramsManager->getValue(PrmMng::PARAM_PATH_NEW)); ?></i>
16
  </p>
17
- The installer has detected that the archive file has been extracted to the deployment path above. To continue choose one of these options:
18
 
19
- <ol>
20
- <li>Skip the extraction process by <a href="javascript:void(0)" onclick="DUPX.getManaualArchiveOpt()">[enabling manual archive extraction]</a> </li>
21
- <li>Ignore this message and continue with the install process to re-extract the archive file.</li>
22
- </ol>
 
23
 
24
  <small>
25
  Note: This test looks for a file named <i>dup-manual-extract__[HASH]</i> in the <?php echo DUPX_U::esc_html(DUPX_INIT); ?> directory.
14
  ?><p>
15
  <b>Deployment Path:</b> <i><?php echo DUPX_U::esc_html($paramsManager->getValue(PrmMng::PARAM_PATH_NEW)); ?></i>
16
  </p>
17
+ The installer has detected that the archive file has been extracted to the deployment path above.
18
 
19
+ <p>
20
+ The installer has detected that the archive file has been extracted to the deployment path above. The installer is going
21
+ to skip the extraction process by default. If you want to re-extract the archive file, switch to "Advanced" mode, and
22
+ under "Options" > "Extraction Mode" choose the preferred extraction mode.
23
+ </p>
24
 
25
  <small>
26
  Note: This test looks for a file named <i>dup-manual-extract__[HASH]</i> in the <?php echo DUPX_U::esc_html(DUPX_INIT); ?> directory.
installer/dup-installer/templates/default/scripts/modules/final-tests.php CHANGED
@@ -8,14 +8,15 @@
8
 
9
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
10
 
 
11
  use Duplicator\Libs\Snap\SnapJson;
12
 
13
 
14
  ?>
15
  <script>
16
  DUPX.finalTests = {
17
- frontendTest: <?php echo json_encode(DUPX_test_wordpress_exec::getFrontendUrl()); ?>,
18
- backendTest: <?php echo json_encode(DUPX_test_wordpress_exec::getBackendUrl()); ?>,
19
  afterCallback: null,
20
  testsResults: {
21
  'wp_frontend': {
8
 
9
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
10
 
11
+ use Duplicator\Installer\Utils\Tests\WP\TestsExecuter;
12
  use Duplicator\Libs\Snap\SnapJson;
13
 
14
 
15
  ?>
16
  <script>
17
  DUPX.finalTests = {
18
+ frontendTest: <?php echo json_encode(TestsExecuter::getFrontendUrl()); ?>,
19
+ backendTest: <?php echo json_encode(TestsExecuter::getBackendUrl()); ?>,
20
  afterCallback: null,
21
  testsResults: {
22
  'wp_frontend': {
installer/dup-installer/templates/default/scripts/step1-init.php CHANGED
@@ -37,14 +37,6 @@ $paramsManager = PrmMng::getInstance();
37
 
38
  DUPX.beforeUnloadCheck(true);
39
 
40
- DUPX.getManaualArchiveOpt = function ()
41
- {
42
- $("html, body").animate({scrollTop: $(document).height()}, 1500);
43
- $("div[data-target='#s1-area-adv-opts']").find('i.fa').removeClass('fa-plus-square').addClass('fa-minus-square');
44
- $('#s1-area-adv-opts').show(1000);
45
- $('#' + archiveEngineInputId).val('manual').focus();
46
- };
47
-
48
  DUPX.onSafeModeSwitch = function ()
49
  {
50
  var safeObj = $('#' + exeSafeModeInputId)
37
 
38
  DUPX.beforeUnloadCheck(true);
39
 
 
 
 
 
 
 
 
 
40
  DUPX.onSafeModeSwitch = function ()
41
  {
42
  var safeObj = $('#' + exeSafeModeInputId)
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: migration, backup, duplicate, move, migrate, restore, transfer, clone, aut
4
  Requires at least: 4.0
5
  Tested up to: 6.1
6
  Requires PHP: 5.3.8
7
- Stable tag: 1.5.0
8
  License: GPLv2
9
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
10
 
@@ -29,7 +29,7 @@ Duplicator is the most powerful migrator available. It enables you to:
29
  * Perform a full WordPress migration without struggling with messy import/export sql scripts
30
 
31
  = Migrate WordPress and Run WordPress Backups =
32
- Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location of your choice. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
33
 
34
  = Improve Your Workflow with Pre-Bundled Sites =
35
  Duplicator lets you make your own preconfigured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many preconfigured sites!
4
  Requires at least: 4.0
5
  Tested up to: 6.1
6
  Requires PHP: 5.3.8
7
+ Stable tag: 1.5.1
8
  License: GPLv2
9
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
10
 
29
  * Perform a full WordPress migration without struggling with messy import/export sql scripts
30
 
31
  = Migrate WordPress and Run WordPress Backups =
32
+ Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
33
 
34
  = Improve Your Workflow with Pre-Bundled Sites =
35
  Duplicator lets you make your own preconfigured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many preconfigured sites!
src/Libs/Snap/SnapCode.php CHANGED
@@ -17,16 +17,18 @@ class SnapCode
17
  /**
18
  * Get class code from file
19
  *
20
- * @param string $file file path
21
- * @param bool $wrapNamespace if true wrap name space with brackets
22
- * @param bool $removeBalnkLines if treu remove balnk lines
23
- * @param bool $removeComments if true remove comments
 
24
  *
25
  * @return string
26
  */
27
  public static function getSrcClassCode(
28
  $file,
29
  $wrapNamespace = true,
 
30
  $removeBalnkLines = true,
31
  $removeComments = true
32
  ) {
@@ -38,6 +40,10 @@ class SnapCode
38
  return '';
39
  }
40
 
 
 
 
 
41
  if ($wrapNamespace) {
42
  $src = preg_replace('/(.*^\s*)(namespace.*?)(;)(.*)/sm', "$2 {\n$4}", $src);
43
  }
17
  /**
18
  * Get class code from file
19
  *
20
+ * @param string $file file path
21
+ * @param bool $wrapNamespace if true wrap name space with brackets
22
+ * @param bool $removeFirstPHPTag if true wrap name space with brackets
23
+ * @param bool $removeBalnkLines if treu remove balnk lines
24
+ * @param bool $removeComments if true remove comments
25
  *
26
  * @return string
27
  */
28
  public static function getSrcClassCode(
29
  $file,
30
  $wrapNamespace = true,
31
+ $removeFirstPHPTag = false,
32
  $removeBalnkLines = true,
33
  $removeComments = true
34
  ) {
40
  return '';
41
  }
42
 
43
+ if ($removeFirstPHPTag) {
44
+ $src = preg_replace('/^(<\?php)/', "", $src);
45
+ }
46
+
47
  if ($wrapNamespace) {
48
  $src = preg_replace('/(.*^\s*)(namespace.*?)(;)(.*)/sm', "$2 {\n$4}", $src);
49
  }
src/Libs/Snap/wordpress_core_files.php CHANGED
@@ -1,40 +1,35 @@
1
  <?php
2
 
3
  /**
4
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
5
- * >>>>>> USE THE GENERATOR SCRIPT <<<<<
6
  *
7
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
8
- * >>>>>> USE THE GENERATOR SCRIPT <<<<<
9
  *
10
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
11
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
12
  *
13
- * Core wordpress file list
14
- *
15
- * Standard: PSR-2
16
- * @link http://www.php-fig.org/psr/psr-2
17
- *
18
- * @package snaplib
19
- * @subpackage classes/utilities
20
- * @copyright (c) 2017, Snapcreek LLC
21
- * @license https://opensource.org/licenses/GPL-3.0 GNU Public License
22
  *
 
 
23
  */
24
 
25
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
26
 
27
  /*
28
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
29
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
30
  *
31
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
32
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
33
  *
34
- * >>>>>> THIS FILE IS AUTOGENERATED DON'T MODIFY THIS DIRECTLY <<<<<
35
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
36
- *
37
  */
 
 
38
  self::$corePathList = array(
39
  'wp-login.php' => "f",
40
  'wp-config-sample.php' => "f",
@@ -63,6 +58,7 @@ self::$corePathList = array(
63
  'class-wp-http-proxy.php' => "f",
64
  'class-phpass.php' => "f",
65
  'ms-settings.php' => "f",
 
66
  'class-wp-customize-manager.php' => "f",
67
  'class-wp-block-styles-registry.php' => "f",
68
  'class-wp-recovery-mode-key-service.php' => "f",
@@ -163,6 +159,7 @@ self::$corePathList = array(
163
  'rewrite.php' => "f",
164
  'registration-functions.php' => "f",
165
  'option.php' => "f",
 
166
  'class-walker-comment.php' => "f",
167
  'post-formats.php' => "f",
168
  'class-wp-customize-setting.php' => "f",
@@ -208,15 +205,30 @@ self::$corePathList = array(
208
  ),
209
  'code' => array(
210
  'style-rtl.min.css' => "f",
 
 
211
  'theme-rtl.css' => "f",
 
212
  'theme-rtl.min.css' => "f",
213
  'block.json' => "f",
 
214
  'theme.css' => "f",
215
  'style.css' => "f",
216
  'style-rtl.css' => "f",
217
  'theme.min.css' => "f",
218
  'style.min.css' => "f"
219
  ),
 
 
 
 
 
 
 
 
 
 
 
220
  'more' => array(
221
  'editor.min.css' => "f",
222
  'editor.css' => "f",
@@ -282,7 +294,11 @@ self::$corePathList = array(
282
  'style.min.css' => "f"
283
  ),
284
  'post-date' => array(
285
- 'block.json' => "f"
 
 
 
 
286
  ),
287
  'block' => array(
288
  'editor.min.css' => "f",
@@ -597,6 +613,9 @@ self::$corePathList = array(
597
  'style-rtl.css' => "f",
598
  'style.min.css' => "f"
599
  ),
 
 
 
600
  'social-link' => array(
601
  'editor.min.css' => "f",
602
  'editor.css' => "f",
@@ -681,12 +700,17 @@ self::$corePathList = array(
681
  'editor-rtl.min.css' => "f"
682
  ),
683
  'rss.php' => "f",
 
684
  'query-title' => array(
 
685
  'editor.min.css' => "f",
686
  'editor.css' => "f",
687
  'editor-rtl.css' => "f",
688
  'block.json' => "f",
689
- 'editor-rtl.min.css' => "f"
 
 
 
690
  ),
691
  'comments-pagination-numbers' => array(
692
  'editor.min.css' => "f",
@@ -753,6 +777,7 @@ self::$corePathList = array(
753
  ),
754
  'legacy-widget.php' => "f",
755
  'categories.php' => "f",
 
756
  'site-tagline' => array(
757
  'editor.min.css' => "f",
758
  'editor.css' => "f",
@@ -885,6 +910,7 @@ self::$corePathList = array(
885
  'editor-rtl.min.css' => "f"
886
  ),
887
  'post-featured-image.php' => "f",
 
888
  'latest-comments' => array(
889
  'style-rtl.min.css' => "f",
890
  'block.json' => "f",
@@ -957,6 +983,7 @@ self::$corePathList = array(
957
  ),
958
  'file.php' => "f",
959
  'query-pagination.php' => "f",
 
960
  'query-pagination-next' => array(
961
  'block.json' => "f"
962
  ),
@@ -971,12 +998,16 @@ self::$corePathList = array(
971
  'style-rtl.min.css' => "f",
972
  'view.min.asset.php' => "f",
973
  'editor.min.css' => "f",
 
974
  'editor.css' => "f",
975
  'view.js' => "f",
976
  'editor-rtl.css' => "f",
977
  'block.json' => "f",
978
  'view.min.js' => "f",
 
 
979
  'editor-rtl.min.css' => "f",
 
980
  'view.asset.php' => "f",
981
  'style.css' => "f",
982
  'style-rtl.css' => "f",
@@ -1009,6 +1040,13 @@ self::$corePathList = array(
1009
  ),
1010
  'query.php' => "f",
1011
  'class-pop3.php' => "f",
 
 
 
 
 
 
 
1012
  'class-wp-user-request.php' => "f",
1013
  'class-wp-user-meta-session-tokens.php' => "f",
1014
  'class-wp-oembed.php' => "f",
@@ -1586,6 +1624,7 @@ self::$corePathList = array(
1586
  'i18n.min.js' => "f",
1587
  'data-controls.js' => "f",
1588
  'deprecated.js' => "f",
 
1589
  'priority-queue.js' => "f",
1590
  'token-list.min.js' => "f",
1591
  'reusable-blocks.js' => "f",
@@ -1616,6 +1655,7 @@ self::$corePathList = array(
1616
  'html-entities.min.js' => "f",
1617
  'notices.js' => "f",
1618
  'wordcount.js' => "f",
 
1619
  'core-data.js' => "f",
1620
  'customize-widgets.min.js' => "f",
1621
  'compose.min.js' => "f",
@@ -1651,6 +1691,7 @@ self::$corePathList = array(
1651
  'date.js' => "f",
1652
  'list-reusable-blocks.min.js' => "f",
1653
  'block-library.js' => "f",
 
1654
  'plugins.min.js' => "f",
1655
  'nux.min.js' => "f",
1656
  'media-utils.js' => "f",
@@ -1689,6 +1730,7 @@ self::$corePathList = array(
1689
  'annotations.min.js' => "f",
1690
  'block-editor.js' => "f",
1691
  'data.js' => "f",
 
1692
  'rich-text.min.js' => "f",
1693
  'hooks.js' => "f",
1694
  'api-fetch.min.js' => "f",
@@ -1795,6 +1837,7 @@ self::$corePathList = array(
1795
  'jquery-ui-dialog.min.css' => "f",
1796
  'wp-pointer-rtl.min.css' => "f",
1797
  'wp-pointer.css' => "f",
 
1798
  'editor-rtl.min.css' => "f",
1799
  'media-views.min.css' => "f",
1800
  'customize-preview-rtl.css' => "f",
@@ -1874,8 +1917,13 @@ self::$corePathList = array(
1874
  'block-library' => array(
1875
  'style-rtl.min.css' => "f",
1876
  'reset.min.css' => "f",
 
 
1877
  'editor.min.css' => "f",
 
 
1878
  'common.min.css' => "f",
 
1879
  'editor.css' => "f",
1880
  'theme-rtl.css' => "f",
1881
  'editor-rtl.css' => "f",
@@ -1883,15 +1931,22 @@ self::$corePathList = array(
1883
  'theme-rtl.min.css' => "f",
1884
  'reset-rtl.min.css' => "f",
1885
  'reset-rtl.css' => "f",
 
1886
  'editor-rtl.min.css' => "f",
1887
  'theme.css' => "f",
 
 
1888
  'style.css' => "f",
 
1889
  'style-rtl.css' => "f",
 
1890
  'common.css' => "f",
1891
  'common-rtl.css' => "f",
1892
  'theme.min.css' => "f",
 
1893
  'reset.css' => "f",
1894
- 'style.min.css' => "f"
 
1895
  ),
1896
  'edit-widgets' => array(
1897
  'style-rtl.min.css' => "f",
@@ -1920,6 +1975,7 @@ self::$corePathList = array(
1920
  'customize-preview.min.css' => "f",
1921
  'wp-auth-check.css' => "f",
1922
  'media-views.css' => "f",
 
1923
  'wp-auth-check-rtl.css' => "f"
1924
  ),
1925
  'bookmark-template.php' => "f",
@@ -1968,6 +2024,7 @@ self::$corePathList = array(
1968
  'class-wp-meta-query.php' => "f",
1969
  'link-template.php' => "f",
1970
  'class-snoopy.php' => "f",
 
1971
  'class-wp-image-editor.php' => "f",
1972
  'class-wp-widget.php' => "f",
1973
  'feed-atom-comments.php' => "f",
@@ -2133,6 +2190,7 @@ self::$corePathList = array(
2133
  'class-wp-http-requests-response.php' => "f",
2134
  'class-wp-ajax-response.php' => "f",
2135
  'date.php' => "f",
 
2136
  'class-wp-simplepie-file.php' => "f",
2137
  'class-wp-theme-json-resolver.php' => "f",
2138
  'meta.php' => "f",
@@ -2147,6 +2205,7 @@ self::$corePathList = array(
2147
  'class.wp-styles.php' => "f",
2148
  'class-wp-block-supports.php' => "f",
2149
  'comment.php' => "f",
 
2150
  'sitemaps.php' => "f",
2151
  'block-editor.php' => "f",
2152
  'pomo' => array(
@@ -2262,10 +2321,15 @@ self::$corePathList = array(
2262
  'gzdecode.php' => "f",
2263
  'Category.php' => "f"
2264
  ),
 
2265
  'class-oembed.php' => "f",
2266
  'class-wp-object-cache.php' => "f",
 
2267
  'assets' => array(
2268
  'script-loader-react-refresh-runtime.php' => "f",
 
 
 
2269
  'script-loader-packages.php' => "f",
2270
  'script-loader-react-refresh-entry.php' => "f"
2271
  ),
1
  <?php
2
 
3
  /**
4
+ * Core wordpress file list
 
5
  *
6
+ * @package Duplicator
7
+ * @copyright (c) 2022, Snap Creek LLC
8
  *
9
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
10
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
11
  *
12
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
13
+ * >>>>>> USE THE GENERATOR SCRIPT <<<<<
 
 
 
 
 
 
 
14
  *
15
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
16
+ * >>>>>> USE THE GENERATOR SCRIPT <<<<<
17
  */
18
 
19
  defined('ABSPATH') || defined('DUPXABSPATH') || exit;
20
 
21
  /*
22
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
23
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
24
  *
25
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
26
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
27
  *
28
+ * >>>>>> THIS FILE IS GENERATED WITH A SCRIPT, DON'T EDIT IT DIRECTLY <<<<<
29
  * >>>>>> USE THE GENERATOR SCRIPT <<<<<
 
30
  */
31
+
32
+ // @phpstan-ignore-next-line
33
  self::$corePathList = array(
34
  'wp-login.php' => "f",
35
  'wp-config-sample.php' => "f",
58
  'class-wp-http-proxy.php' => "f",
59
  'class-phpass.php' => "f",
60
  'ms-settings.php' => "f",
61
+ 'style-engine.php' => "f",
62
  'class-wp-customize-manager.php' => "f",
63
  'class-wp-block-styles-registry.php' => "f",
64
  'class-wp-recovery-mode-key-service.php' => "f",
159
  'rewrite.php' => "f",
160
  'registration-functions.php' => "f",
161
  'option.php' => "f",
162
+ 'class-wp-styles.php' => "f",
163
  'class-walker-comment.php' => "f",
164
  'post-formats.php' => "f",
165
  'class-wp-customize-setting.php' => "f",
205
  ),
206
  'code' => array(
207
  'style-rtl.min.css' => "f",
208
+ 'editor.min.css' => "f",
209
+ 'editor.css' => "f",
210
  'theme-rtl.css' => "f",
211
+ 'editor-rtl.css' => "f",
212
  'theme-rtl.min.css' => "f",
213
  'block.json' => "f",
214
+ 'editor-rtl.min.css' => "f",
215
  'theme.css' => "f",
216
  'style.css' => "f",
217
  'style-rtl.css' => "f",
218
  'theme.min.css' => "f",
219
  'style.min.css' => "f"
220
  ),
221
+ 'comments' => array(
222
+ 'style-rtl.min.css' => "f",
223
+ 'editor.min.css' => "f",
224
+ 'editor.css' => "f",
225
+ 'editor-rtl.css' => "f",
226
+ 'block.json' => "f",
227
+ 'editor-rtl.min.css' => "f",
228
+ 'style.css' => "f",
229
+ 'style-rtl.css' => "f",
230
+ 'style.min.css' => "f"
231
+ ),
232
  'more' => array(
233
  'editor.min.css' => "f",
234
  'editor.css' => "f",
294
  'style.min.css' => "f"
295
  ),
296
  'post-date' => array(
297
+ 'style-rtl.min.css' => "f",
298
+ 'block.json' => "f",
299
+ 'style.css' => "f",
300
+ 'style-rtl.css' => "f",
301
+ 'style.min.css' => "f"
302
  ),
303
  'block' => array(
304
  'editor.min.css' => "f",
613
  'style-rtl.css' => "f",
614
  'style.min.css' => "f"
615
  ),
616
+ 'list-item' => array(
617
+ 'block.json' => "f"
618
+ ),
619
  'social-link' => array(
620
  'editor.min.css' => "f",
621
  'editor.css' => "f",
700
  'editor-rtl.min.css' => "f"
701
  ),
702
  'rss.php' => "f",
703
+ 'require-dynamic-blocks.php' => "f",
704
  'query-title' => array(
705
+ 'style-rtl.min.css' => "f",
706
  'editor.min.css' => "f",
707
  'editor.css' => "f",
708
  'editor-rtl.css' => "f",
709
  'block.json' => "f",
710
+ 'editor-rtl.min.css' => "f",
711
+ 'style.css' => "f",
712
+ 'style-rtl.css' => "f",
713
+ 'style.min.css' => "f"
714
  ),
715
  'comments-pagination-numbers' => array(
716
  'editor.min.css' => "f",
777
  ),
778
  'legacy-widget.php' => "f",
779
  'categories.php' => "f",
780
+ 'blocks-json.php' => "f",
781
  'site-tagline' => array(
782
  'editor.min.css' => "f",
783
  'editor.css' => "f",
910
  'editor-rtl.min.css' => "f"
911
  ),
912
  'post-featured-image.php' => "f",
913
+ 'comments.php' => "f",
914
  'latest-comments' => array(
915
  'style-rtl.min.css' => "f",
916
  'block.json' => "f",
983
  ),
984
  'file.php' => "f",
985
  'query-pagination.php' => "f",
986
+ 'require-static-blocks.php' => "f",
987
  'query-pagination-next' => array(
988
  'block.json' => "f"
989
  ),
998
  'style-rtl.min.css' => "f",
999
  'view.min.asset.php' => "f",
1000
  'editor.min.css' => "f",
1001
+ 'view-modal.js' => "f",
1002
  'editor.css' => "f",
1003
  'view.js' => "f",
1004
  'editor-rtl.css' => "f",
1005
  'block.json' => "f",
1006
  'view.min.js' => "f",
1007
+ 'view-modal.min.js' => "f",
1008
+ 'view-modal.min.asset.php' => "f",
1009
  'editor-rtl.min.css' => "f",
1010
+ 'view-modal.asset.php' => "f",
1011
  'view.asset.php' => "f",
1012
  'style.css' => "f",
1013
  'style-rtl.css' => "f",
1040
  ),
1041
  'query.php' => "f",
1042
  'class-pop3.php' => "f",
1043
+ 'style-engine' => array(
1044
+ 'class-wp-style-engine-css-rule.php' => "f",
1045
+ 'class-wp-style-engine-css-declarations.php' => "f",
1046
+ 'class-wp-style-engine.php' => "f",
1047
+ 'class-wp-style-engine-css-rules-store.php' => "f",
1048
+ 'class-wp-style-engine-processor.php' => "f"
1049
+ ),
1050
  'class-wp-user-request.php' => "f",
1051
  'class-wp-user-meta-session-tokens.php' => "f",
1052
  'class-wp-oembed.php' => "f",
1624
  'i18n.min.js' => "f",
1625
  'data-controls.js' => "f",
1626
  'deprecated.js' => "f",
1627
+ 'preferences-persistence.min.js' => "f",
1628
  'priority-queue.js' => "f",
1629
  'token-list.min.js' => "f",
1630
  'reusable-blocks.js' => "f",
1655
  'html-entities.min.js' => "f",
1656
  'notices.js' => "f",
1657
  'wordcount.js' => "f",
1658
+ 'style-engine.min.js' => "f",
1659
  'core-data.js' => "f",
1660
  'customize-widgets.min.js' => "f",
1661
  'compose.min.js' => "f",
1691
  'date.js' => "f",
1692
  'list-reusable-blocks.min.js' => "f",
1693
  'block-library.js' => "f",
1694
+ 'style-engine.js' => "f",
1695
  'plugins.min.js' => "f",
1696
  'nux.min.js' => "f",
1697
  'media-utils.js' => "f",
1730
  'annotations.min.js' => "f",
1731
  'block-editor.js' => "f",
1732
  'data.js' => "f",
1733
+ 'preferences-persistence.js' => "f",
1734
  'rich-text.min.js' => "f",
1735
  'hooks.js' => "f",
1736
  'api-fetch.min.js' => "f",
1837
  'jquery-ui-dialog.min.css' => "f",
1838
  'wp-pointer-rtl.min.css' => "f",
1839
  'wp-pointer.css' => "f",
1840
+ 'classic-themes.css' => "f",
1841
  'editor-rtl.min.css' => "f",
1842
  'media-views.min.css' => "f",
1843
  'customize-preview-rtl.css' => "f",
1917
  'block-library' => array(
1918
  'style-rtl.min.css' => "f",
1919
  'reset.min.css' => "f",
1920
+ 'elements.min.css' => "f",
1921
+ 'elements-rtl.css' => "f",
1922
  'editor.min.css' => "f",
1923
+ 'elements-rtl.min.css' => "f",
1924
+ 'editor-elements-rtl.min.css' => "f",
1925
  'common.min.css' => "f",
1926
+ 'classic-rtl.min.css' => "f",
1927
  'editor.css' => "f",
1928
  'theme-rtl.css' => "f",
1929
  'editor-rtl.css' => "f",
1931
  'theme-rtl.min.css' => "f",
1932
  'reset-rtl.min.css' => "f",
1933
  'reset-rtl.css' => "f",
1934
+ 'classic.min.css' => "f",
1935
  'editor-rtl.min.css' => "f",
1936
  'theme.css' => "f",
1937
+ 'editor-elements.min.css' => "f",
1938
+ 'elements.css' => "f",
1939
  'style.css' => "f",
1940
+ 'classic-rtl.css' => "f",
1941
  'style-rtl.css' => "f",
1942
+ 'classic.css' => "f",
1943
  'common.css' => "f",
1944
  'common-rtl.css' => "f",
1945
  'theme.min.css' => "f",
1946
+ 'editor-elements.css' => "f",
1947
  'reset.css' => "f",
1948
+ 'style.min.css' => "f",
1949
+ 'editor-elements-rtl.css' => "f"
1950
  ),
1951
  'edit-widgets' => array(
1952
  'style-rtl.min.css' => "f",
1975
  'customize-preview.min.css' => "f",
1976
  'wp-auth-check.css' => "f",
1977
  'media-views.css' => "f",
1978
+ 'classic-themes.min.css' => "f",
1979
  'wp-auth-check-rtl.css' => "f"
1980
  ),
1981
  'bookmark-template.php' => "f",
2024
  'class-wp-meta-query.php' => "f",
2025
  'link-template.php' => "f",
2026
  'class-snoopy.php' => "f",
2027
+ 'class-wp-scripts.php' => "f",
2028
  'class-wp-image-editor.php' => "f",
2029
  'class-wp-widget.php' => "f",
2030
  'feed-atom-comments.php' => "f",
2190
  'class-wp-http-requests-response.php' => "f",
2191
  'class-wp-ajax-response.php' => "f",
2192
  'date.php' => "f",
2193
+ 'class-wpdb.php' => "f",
2194
  'class-wp-simplepie-file.php' => "f",
2195
  'class-wp-theme-json-resolver.php' => "f",
2196
  'meta.php' => "f",
2205
  'class.wp-styles.php' => "f",
2206
  'class-wp-block-supports.php' => "f",
2207
  'comment.php' => "f",
2208
+ 'class-wp-theme-json-data.php' => "f",
2209
  'sitemaps.php' => "f",
2210
  'block-editor.php' => "f",
2211
  'pomo' => array(
2321
  'gzdecode.php' => "f",
2322
  'Category.php' => "f"
2323
  ),
2324
+ 'class-wp-textdomain-registry.php' => "f",
2325
  'class-oembed.php' => "f",
2326
  'class-wp-object-cache.php' => "f",
2327
+ 'class-wp-dependencies.php' => "f",
2328
  'assets' => array(
2329
  'script-loader-react-refresh-runtime.php' => "f",
2330
+ 'script-loader-react-refresh-entry.min.php' => "f",
2331
+ 'script-loader-packages.min.php' => "f",
2332
+ 'script-loader-react-refresh-runtime.min.php' => "f",
2333
  'script-loader-packages.php' => "f",
2334
  'script-loader-react-refresh-entry.php' => "f"
2335
  ),
views/packages/details/detail.php CHANGED
@@ -93,7 +93,7 @@ GENERAL -->
93
  <div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo esc_attr($ui_css_general); ?>">
94
  <table class='dup-dtl-data-tbl'>
95
  <tr>
96
- <td><?php esc_html_e('Name', 'duplicator') ?>:</td>
97
  <td>
98
  <span class="link-style" onclick="jQuery('#dup-name-info').toggle()">
99
  <?php echo esc_js($package->Name); ?>
@@ -101,15 +101,15 @@ GENERAL -->
101
  <div id="dup-name-info">
102
  <table class="dup-sub-info">
103
  <tr>
104
- <td><?php esc_html_e('ID', 'duplicator') ?>:</td>
105
  <td><?php echo absint($package->ID); ?></td>
106
  </tr>
107
  <tr>
108
- <td><?php esc_html_e('Hash', 'duplicator') ?>:</td>
109
  <td><?php echo esc_html($package->Hash); ?></td>
110
  </tr>
111
  <tr>
112
- <td><?php esc_html_e('Full Name', 'duplicator') ?>:</td>
113
  <td><?php echo esc_html($package->NameHash); ?></td>
114
  </tr>
115
  </table>
@@ -117,15 +117,15 @@ GENERAL -->
117
  </td>
118
  </tr>
119
  <tr>
120
- <td><?php esc_html_e('Notes', 'duplicator') ?>:</td>
121
  <td><?php echo strlen($package->Notes) ? $package->Notes : esc_html__('- no notes -', 'duplicator') ?></td>
122
  </tr>
123
  <tr>
124
- <td><?php esc_html_e('Created', 'duplicator') ?>:</td>
125
  <td><?php echo get_date_from_gmt($package->Created) ?></td>
126
  </tr>
127
  <tr>
128
- <td><?php esc_html_e('Version', 'duplicator') ?>:</td>
129
  <td>
130
  <span class="link-style" onclick="jQuery('#dup-version-info').toggle()">
131
  <?php echo esc_html($package->Version); ?>
@@ -133,15 +133,15 @@ GENERAL -->
133
  <div id="dup-version-info">
134
  <table class="dup-sub-info">
135
  <tr>
136
- <td><?php esc_html_e('WordPress', 'duplicator') ?>:</td>
137
  <td><?php echo strlen($package->VersionWP) ? esc_html($package->VersionWP) : esc_html__('- unknown -', 'duplicator') ?></td>
138
  </tr>
139
  <tr>
140
- <td><?php esc_html_e('PHP', 'duplicator') ?>: </td>
141
  <td><?php echo strlen($package->VersionPHP) ? esc_html($package->VersionPHP) : esc_html__('- unknown -', 'duplicator') ?></td>
142
  </tr>
143
  <tr>
144
- <td><?php esc_html_e('Mysql', 'duplicator') ?>:</td>
145
  <td>
146
  <?php echo strlen($package->VersionDB) ? esc_html($package->VersionDB) : esc_html__('- unknown -', 'duplicator') ?> |
147
  <?php echo strlen($package->Database->Comments) ? esc_html($package->Database->Comments) : esc_html__('- unknown -', 'duplicator') ?>
@@ -152,19 +152,19 @@ GENERAL -->
152
  </td>
153
  </tr>
154
  <tr>
155
- <td><?php esc_html_e('Runtime', 'duplicator') ?>:</td>
156
  <td><?php echo strlen($package->Runtime) ? esc_html($package->Runtime) : esc_html__("error running", 'duplicator'); ?></td>
157
  </tr>
158
  <tr>
159
- <td><?php esc_html_e('Status', 'duplicator') ?>:</td>
160
  <td><?php echo ($package->Status >= 100) ? esc_html__('completed', 'duplicator') : esc_html__('in-complete', 'duplicator') ?></td>
161
  </tr>
162
  <tr>
163
- <td><?php esc_html_e('User', 'duplicator') ?>:</td>
164
  <td><?php echo strlen($package->WPUser) ? esc_html($package->WPUser) : esc_html__('- unknown -', 'duplicator') ?></td>
165
  </tr>
166
  <tr>
167
- <td><?php esc_html_e('Files', 'duplicator') ?>: </td>
168
  <td>
169
  <div id="dup-downloads-area">
170
  <?php if (!$err_found) :?>
@@ -202,7 +202,7 @@ GENERAL -->
202
  <?php if (!$err_found) :?>
203
  <table class="dup-sub-list">
204
  <tr>
205
- <td><?php esc_html_e('Archive', 'duplicator') ?>: </td>
206
  <td>
207
  <a href="<?php echo esc_url($archiveDownloadInfo["url"]); ?>" class="link-style">
208
  <?php echo esc_html($package->Archive->File); ?>
@@ -210,7 +210,7 @@ GENERAL -->
210
  </td>
211
  </tr>
212
  <tr>
213
- <td><?php esc_html_e("Build Log", 'duplicator') ?>: </td>
214
  <td>
215
  <a href="<?php echo $logDownloadInfo["url"] ?>" target="file_results" class="link-style">
216
  <?php echo $logDownloadInfo["filename"]; ?>
@@ -218,7 +218,7 @@ GENERAL -->
218
  </td>
219
  </tr>
220
  <tr>
221
- <td><?php esc_html_e('Installer', 'duplicator') ?>: </td>
222
  <td><?php echo "{$installerSecureName}"; ?></td>
223
  </tr>
224
  <tr>
@@ -354,23 +354,23 @@ ARCHIVE -->
354
  </div>
355
  <table class='dup-dtl-data-tbl'>
356
  <tr>
357
- <td><?php esc_html_e('Build Mode', 'duplicator') ?>: </td>
358
 
359
  <td><?php echo esc_html($archive_build_mode); ?></td>
360
  </tr>
361
 
362
  <?php if ($package->Archive->ExportOnlyDB) : ?>
363
  <tr>
364
- <td><?php esc_html_e('Database Mode', 'duplicator') ?>: </td>
365
  <td><?php esc_html_e('Archive Database Only Enabled', 'duplicator') ?></td>
366
  </tr>
367
  <?php else : ?>
368
  <tr>
369
- <td><?php esc_html_e('Filters', 'duplicator') ?>: </td>
370
  <td>
371
  <?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?>
372
  <div class="sub-section">
373
- <b><?php esc_html_e('Directories', 'duplicator') ?>:</b> <br/>
374
  <?php
375
  $txt = strlen($package->Archive->FilterDirs)
376
  ? str_replace(';', ";\n", $package->Archive->FilterDirs)
@@ -380,7 +380,7 @@ ARCHIVE -->
380
  </div>
381
 
382
  <div class="sub-section">
383
- <b><?php esc_html_e('Extensions', 'duplicator') ?>: </b><br/>
384
  <?php
385
  echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
386
  ? esc_html($package->Archive->FilterExts)
@@ -389,7 +389,7 @@ ARCHIVE -->
389
  </div>
390
 
391
  <div class="sub-section">
392
- <b><?php esc_html_e('Files', 'duplicator') ?>:</b><br/>
393
  <?php
394
  $txt = strlen($package->Archive->FilterFiles)
395
  ? str_replace(';', ";\n", $package->Archive->FilterFiles)
@@ -400,7 +400,8 @@ ARCHIVE -->
400
  </td>
401
  </tr>
402
  <?php endif; ?>
403
- </table><br/>
 
404
 
405
  <!-- DATABASE -->
406
  <div class="dup-box-panel-hdr">
@@ -409,15 +410,15 @@ ARCHIVE -->
409
  </div>
410
  <table class='dup-dtl-data-tbl'>
411
  <tr>
412
- <td><?php esc_html_e('Name', 'duplicator') ?>: </td>
413
  <td><?php echo esc_html($package->Database->info->name); ?></td>
414
  </tr>
415
  <tr>
416
- <td><?php esc_html_e('Type', 'duplicator') ?>: </td>
417
  <td><?php echo esc_html($package->Database->Type); ?></td>
418
  </tr>
419
  <tr>
420
- <td><?php esc_html_e('SQL Mode', 'duplicator') ?>: </td>
421
  <td>
422
  <a href="?page=duplicator-settings&tab=package" target="_blank" class="link-style"><?php echo esc_html($dbbuild_mode); ?></a>
423
  <?php if ($mysqlcompat_on) : ?>
@@ -430,13 +431,13 @@ ARCHIVE -->
430
  </td>
431
  </tr>
432
  <tr>
433
- <td><?php esc_html_e('Filters', 'duplicator') ?>: </td>
434
  <td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
435
  </tr>
436
  <tr class="sub-section">
437
  <td>&nbsp;</td>
438
  <td>
439
- <b><?php esc_html_e('Tables', 'duplicator') ?>:</b><br/>
440
  <?php
441
  echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
442
  ? str_replace(',', "<br>\n", $package->Database->FilterTables)
@@ -460,18 +461,28 @@ INSTALLER -->
460
 
461
  <table class='dup-dtl-data-tbl'>
462
  <tr>
463
- <td colspan="2"><div class="dup-install-hdr-2"><?php esc_html_e(" Security", 'duplicator') ?></div></td>
 
 
464
  </tr>
465
  <tr>
466
- <td colspan="2">
467
- <?php esc_html_e("Password Protection", 'duplicator');?>:
468
- <?php echo $dup_install_secure_on ? "&nbsp; On" : "&nbsp; Off" ?>
469
- <i class="fas fa-shield-alt fa-sm fa-fw"></i>
 
 
 
 
 
 
 
470
  </td>
471
  </tr>
472
  <?php if ($dup_install_secure_on) :?>
473
  <tr>
474
- <td colspan="2">
 
475
  <div id="dup-pass-toggle">
476
  <input type="password" name="secure-pass" id="secure-pass" readonly="true" value="<?php echo esc_attr($dup_install_secure_pass); ?>" />
477
  <button type="button" id="secure-btn" onclick="Duplicator.Pack.TogglePassword()" title="<?php esc_attr_e('Show/Hide Password', 'duplicator'); ?>">
@@ -486,18 +497,20 @@ INSTALLER -->
486
 
487
  <table class='dup-dtl-data-tbl'>
488
  <tr>
489
- <td colspan="2"><div class="dup-install-hdr-2"><?php esc_html_e(" MySQL Server", 'duplicator') ?></div></td>
 
 
490
  </tr>
491
  <tr>
492
- <td><?php esc_html_e('Host', 'duplicator') ?>:</td>
493
  <td><?php echo strlen($package->Installer->OptsDBHost) ? esc_html($package->Installer->OptsDBHost) : esc_html__('- not set -', 'duplicator') ?></td>
494
  </tr>
495
  <tr>
496
- <td><?php esc_html_e('Database', 'duplicator') ?>:</td>
497
  <td><?php echo strlen($package->Installer->OptsDBName) ? esc_html($package->Installer->OptsDBName) : esc_html__('- not set -', 'duplicator') ?></td>
498
  </tr>
499
  <tr>
500
- <td><?php esc_html_e('User', 'duplicator') ?>:</td>
501
  <td><?php echo strlen($package->Installer->OptsDBUser) ? esc_html($package->Installer->OptsDBUser) : esc_html__('- not set -', 'duplicator') ?></td>
502
  </tr>
503
  </table>
93
  <div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo esc_attr($ui_css_general); ?>">
94
  <table class='dup-dtl-data-tbl'>
95
  <tr>
96
+ <td><?php esc_html_e('Name', 'duplicator') ?></td>
97
  <td>
98
  <span class="link-style" onclick="jQuery('#dup-name-info').toggle()">
99
  <?php echo esc_js($package->Name); ?>
101
  <div id="dup-name-info">
102
  <table class="dup-sub-info">
103
  <tr>
104
+ <td><?php esc_html_e('ID', 'duplicator') ?></td>
105
  <td><?php echo absint($package->ID); ?></td>
106
  </tr>
107
  <tr>
108
+ <td><?php esc_html_e('Hash', 'duplicator') ?></td>
109
  <td><?php echo esc_html($package->Hash); ?></td>
110
  </tr>
111
  <tr>
112
+ <td><?php esc_html_e('Full Name', 'duplicator') ?></td>
113
  <td><?php echo esc_html($package->NameHash); ?></td>
114
  </tr>
115
  </table>
117
  </td>
118
  </tr>
119
  <tr>
120
+ <td><?php esc_html_e('Notes', 'duplicator') ?></td>
121
  <td><?php echo strlen($package->Notes) ? $package->Notes : esc_html__('- no notes -', 'duplicator') ?></td>
122
  </tr>
123
  <tr>
124
+ <td><?php esc_html_e('Created', 'duplicator') ?></td>
125
  <td><?php echo get_date_from_gmt($package->Created) ?></td>
126
  </tr>
127
  <tr>
128
+ <td><?php esc_html_e('Version', 'duplicator') ?></td>
129
  <td>
130
  <span class="link-style" onclick="jQuery('#dup-version-info').toggle()">
131
  <?php echo esc_html($package->Version); ?>
133
  <div id="dup-version-info">
134
  <table class="dup-sub-info">
135
  <tr>
136
+ <td><?php esc_html_e('WordPress', 'duplicator') ?></td>
137
  <td><?php echo strlen($package->VersionWP) ? esc_html($package->VersionWP) : esc_html__('- unknown -', 'duplicator') ?></td>
138
  </tr>
139
  <tr>
140
+ <td><?php esc_html_e('PHP', 'duplicator') ?> </td>
141
  <td><?php echo strlen($package->VersionPHP) ? esc_html($package->VersionPHP) : esc_html__('- unknown -', 'duplicator') ?></td>
142
  </tr>
143
  <tr>
144
+ <td><?php esc_html_e('Mysql', 'duplicator') ?></td>
145
  <td>
146
  <?php echo strlen($package->VersionDB) ? esc_html($package->VersionDB) : esc_html__('- unknown -', 'duplicator') ?> |
147
  <?php echo strlen($package->Database->Comments) ? esc_html($package->Database->Comments) : esc_html__('- unknown -', 'duplicator') ?>
152
  </td>
153
  </tr>
154
  <tr>
155
+ <td><?php esc_html_e('Runtime', 'duplicator') ?></td>
156
  <td><?php echo strlen($package->Runtime) ? esc_html($package->Runtime) : esc_html__("error running", 'duplicator'); ?></td>
157
  </tr>
158
  <tr>
159
+ <td><?php esc_html_e('Status', 'duplicator') ?></td>
160
  <td><?php echo ($package->Status >= 100) ? esc_html__('completed', 'duplicator') : esc_html__('in-complete', 'duplicator') ?></td>
161
  </tr>
162
  <tr>
163
+ <td><?php esc_html_e('User', 'duplicator') ?></td>
164
  <td><?php echo strlen($package->WPUser) ? esc_html($package->WPUser) : esc_html__('- unknown -', 'duplicator') ?></td>
165
  </tr>
166
  <tr>
167
+ <td><?php esc_html_e('Files', 'duplicator') ?> </td>
168
  <td>
169
  <div id="dup-downloads-area">
170
  <?php if (!$err_found) :?>
202
  <?php if (!$err_found) :?>
203
  <table class="dup-sub-list">
204
  <tr>
205
+ <td><?php esc_html_e('Archive', 'duplicator') ?> </td>
206
  <td>
207
  <a href="<?php echo esc_url($archiveDownloadInfo["url"]); ?>" class="link-style">
208
  <?php echo esc_html($package->Archive->File); ?>
210
  </td>
211
  </tr>
212
  <tr>
213
+ <td><?php esc_html_e("Build Log", 'duplicator') ?> </td>
214
  <td>
215
  <a href="<?php echo $logDownloadInfo["url"] ?>" target="file_results" class="link-style">
216
  <?php echo $logDownloadInfo["filename"]; ?>
218
  </td>
219
  </tr>
220
  <tr>
221
+ <td><?php esc_html_e('Installer', 'duplicator') ?> </td>
222
  <td><?php echo "{$installerSecureName}"; ?></td>
223
  </tr>
224
  <tr>
354
  </div>
355
  <table class='dup-dtl-data-tbl'>
356
  <tr>
357
+ <td><?php esc_html_e('Build Mode', 'duplicator') ?> </td>
358
 
359
  <td><?php echo esc_html($archive_build_mode); ?></td>
360
  </tr>
361
 
362
  <?php if ($package->Archive->ExportOnlyDB) : ?>
363
  <tr>
364
+ <td><?php esc_html_e('Database Mode', 'duplicator') ?> </td>
365
  <td><?php esc_html_e('Archive Database Only Enabled', 'duplicator') ?></td>
366
  </tr>
367
  <?php else : ?>
368
  <tr>
369
+ <td><?php esc_html_e('Filters', 'duplicator') ?> </td>
370
  <td>
371
  <?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?>
372
  <div class="sub-section">
373
+ <b><?php esc_html_e('Directories', 'duplicator') ?></b> <br/>
374
  <?php
375
  $txt = strlen($package->Archive->FilterDirs)
376
  ? str_replace(';', ";\n", $package->Archive->FilterDirs)
380
  </div>
381
 
382
  <div class="sub-section">
383
+ <b><?php esc_html_e('Extensions', 'duplicator') ?> </b><br/>
384
  <?php
385
  echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
386
  ? esc_html($package->Archive->FilterExts)
389
  </div>
390
 
391
  <div class="sub-section">
392
+ <b><?php esc_html_e('Files', 'duplicator') ?></b><br/>
393
  <?php
394
  $txt = strlen($package->Archive->FilterFiles)
395
  ? str_replace(';', ";\n", $package->Archive->FilterFiles)
400
  </td>
401
  </tr>
402
  <?php endif; ?>
403
+ </table>
404
+ <br/><br/>
405
 
406
  <!-- DATABASE -->
407
  <div class="dup-box-panel-hdr">
410
  </div>
411
  <table class='dup-dtl-data-tbl'>
412
  <tr>
413
+ <td><?php esc_html_e('Name', 'duplicator') ?> </td>
414
  <td><?php echo esc_html($package->Database->info->name); ?></td>
415
  </tr>
416
  <tr>
417
+ <td><?php esc_html_e('Type', 'duplicator') ?> </td>
418
  <td><?php echo esc_html($package->Database->Type); ?></td>
419
  </tr>
420
  <tr>
421
+ <td><?php esc_html_e('SQL Mode', 'duplicator') ?> </td>
422
  <td>
423
  <a href="?page=duplicator-settings&tab=package" target="_blank" class="link-style"><?php echo esc_html($dbbuild_mode); ?></a>
424
  <?php if ($mysqlcompat_on) : ?>
431
  </td>
432
  </tr>
433
  <tr>
434
+ <td><?php esc_html_e('Filters', 'duplicator') ?> </td>
435
  <td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
436
  </tr>
437
  <tr class="sub-section">
438
  <td>&nbsp;</td>
439
  <td>
440
+ <b><?php esc_html_e('Tables', 'duplicator') ?></b><br/>
441
  <?php
442
  echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
443
  ? str_replace(',', "<br>\n", $package->Database->FilterTables)
461
 
462
  <table class='dup-dtl-data-tbl'>
463
  <tr>
464
+ <td colspan="2">
465
+ <div class="dup-install-hdr-2"><?php esc_html_e("Setup", 'duplicator') ?></div>
466
+ </td>
467
  </tr>
468
  <tr>
469
+ <td>
470
+ <?php esc_html_e("Security", 'duplicator');?>
471
+ </td>
472
+ <td>
473
+ <?php
474
+ if ($dup_install_secure_on ) {
475
+ _e('Password Protection Enabled', 'duplicator');
476
+ } else {
477
+ _e('Password Protection Disabled', 'duplicator');
478
+ }
479
+ ?>
480
  </td>
481
  </tr>
482
  <?php if ($dup_install_secure_on) :?>
483
  <tr>
484
+ <td></td>
485
+ <td>
486
  <div id="dup-pass-toggle">
487
  <input type="password" name="secure-pass" id="secure-pass" readonly="true" value="<?php echo esc_attr($dup_install_secure_pass); ?>" />
488
  <button type="button" id="secure-btn" onclick="Duplicator.Pack.TogglePassword()" title="<?php esc_attr_e('Show/Hide Password', 'duplicator'); ?>">
497
 
498
  <table class='dup-dtl-data-tbl'>
499
  <tr>
500
+ <td colspan="2">
501
+ <div class="dup-install-hdr-2"><?php esc_html_e(" MySQL Server", 'duplicator') ?></div>
502
+ </td>
503
  </tr>
504
  <tr>
505
+ <td><?php esc_html_e('Host', 'duplicator') ?></td>
506
  <td><?php echo strlen($package->Installer->OptsDBHost) ? esc_html($package->Installer->OptsDBHost) : esc_html__('- not set -', 'duplicator') ?></td>
507
  </tr>
508
  <tr>
509
+ <td><?php esc_html_e('Database', 'duplicator') ?></td>
510
  <td><?php echo strlen($package->Installer->OptsDBName) ? esc_html($package->Installer->OptsDBName) : esc_html__('- not set -', 'duplicator') ?></td>
511
  </tr>
512
  <tr>
513
+ <td><?php esc_html_e('User', 'duplicator') ?></td>
514
  <td><?php echo strlen($package->Installer->OptsDBUser) ? esc_html($package->Installer->OptsDBUser) : esc_html__('- not set -', 'duplicator') ?></td>
515
  </tr>
516
  </table>
views/parts/migration-clean-installation-files.php CHANGED
@@ -43,7 +43,7 @@ use Duplicator\Utils\CachesPurge\CachesPurge;
43
  ?>
44
  <p>
45
  <?php _e('Some of the installer files did not get removed, ', 'duplicator'); ?>
46
- <span class="link-style" onclick="DupPro.Tools.removeInstallerFiles();">
47
  <?php _e('please retry the installer cleanup process', 'duplicator'); ?>
48
  </span><br>
49
  <?php _e(' If this process continues please see the previous FAQ link.', 'duplicator'); ?>
43
  ?>
44
  <p>
45
  <?php _e('Some of the installer files did not get removed, ', 'duplicator'); ?>
46
+ <span class="link-style" onclick="Duplicator.Tools.deleteInstallerFiles();">
47
  <?php _e('please retry the installer cleanup process', 'duplicator'); ?>
48
  </span><br>
49
  <?php _e(' If this process continues please see the previous FAQ link.', 'duplicator'); ?>
views/settings/packages.php CHANGED
@@ -22,9 +22,9 @@ if (isset($_POST['action']) && $_POST['action'] == 'save') {
22
  //Package
23
  $mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
24
  if (isset($_POST['package_mysqldump_path'])) {
25
- $mysqldump_exe_file = SnapUtil::sanitizeNSCharsNewlineTrim($_POST['package_mysqldump_path']);
26
  $mysqldump_exe_file = preg_match('/^([A-Za-z]\:)?[\/\\\\]/', $mysqldump_exe_file) ? $mysqldump_exe_file : '';
27
- $mysqldump_exe_file = preg_replace('/[\'";]/m', '', $mysqldump_exe_file);
28
  $mysqldump_exe_file = DUP_Util::safePath($mysqldump_exe_file);
29
  $mysqldump_exe_file = DUP_DB::escSQL(strip_tags($mysqldump_exe_file), true);
30
  }
@@ -264,7 +264,7 @@ $installerNameMode = DUP_Settings::Get('installer_name_mode');
264
  echo '&nbsp; ';
265
  esc_html_e('Duplicator Lite has no fixed size constraints for zip formats. The only constraints are timeouts '
266
  . 'on the server.', 'duplicator');
267
- ?>
268
  </i>
269
  </p>
270
  </div>
@@ -289,9 +289,10 @@ $installerNameMode = DUP_Settings::Get('installer_name_mode');
289
  '%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
290
  'duplicator'
291
  ),
292
- "<a href='{$proURL}' target='_blank'>", '</a>'
 
293
  );
294
- ?>
295
  </i>
296
  </p>
297
  </div>
22
  //Package
23
  $mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
24
  if (isset($_POST['package_mysqldump_path'])) {
25
+ $mysqldump_exe_file = SnapUtil::sanitizeNSCharsNewlineTabs($_POST['package_mysqldump_path']);
26
  $mysqldump_exe_file = preg_match('/^([A-Za-z]\:)?[\/\\\\]/', $mysqldump_exe_file) ? $mysqldump_exe_file : '';
27
+ $mysqldump_exe_file = preg_replace('/[\'"]/m', '', $mysqldump_exe_file);
28
  $mysqldump_exe_file = DUP_Util::safePath($mysqldump_exe_file);
29
  $mysqldump_exe_file = DUP_DB::escSQL(strip_tags($mysqldump_exe_file), true);
30
  }
264
  echo '&nbsp; ';
265
  esc_html_e('Duplicator Lite has no fixed size constraints for zip formats. The only constraints are timeouts '
266
  . 'on the server.', 'duplicator');
267
+ ?>
268
  </i>
269
  </p>
270
  </div>
289
  '%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
290
  'duplicator'
291
  ),
292
+ "<a href='{$proURL}' target='_blank'>",
293
+ '</a>'
294
  );
295
+ ?>
296
  </i>
297
  </p>
298
  </div>