Duplicator – WordPress Migration Plugin - Version 1.2.22

Version Description

Download this release

Release Info

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

Code changes from version 1.2.20 to 1.2.22

assets/css/style.css CHANGED
@@ -22,6 +22,7 @@ div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; c
22
  div.dup-box-title:hover {background-color: #FCFCFC;}
23
  div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
24
  div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
 
25
 
26
  /*PANELS: Boxes that do not exapand */
27
  div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
22
  div.dup-box-title:hover {background-color: #FCFCFC;}
23
  div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
24
  div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
25
+ div.dup-redirect {font-size:16px; font-weight: bold; padding: 10px}
26
 
27
  /*PANELS: Boxes that do not exapand */
28
  div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
classes/class.db.php CHANGED
@@ -66,7 +66,8 @@ class DUP_DB extends wpdb
66
 
67
 
68
  /**
69
- * Returns the mysqldump path if the server is enabled to execute it
 
70
  * @return boolean|string
71
  */
72
  public static function getMySqlDumpPath()
66
 
67
 
68
  /**
69
+ * Returns the mysqldump path if the server is enabled to execute it otherwise false
70
+ *
71
  * @return boolean|string
72
  */
73
  public static function getMySqlDumpPath()
classes/class.settings.php CHANGED
@@ -124,7 +124,7 @@ class DUP_Settings
124
  //Flag used to show debug info
125
  $default['package_debug'] = isset(self::$Data['package_debug']) ? self::$Data['package_debug'] : false;
126
  //Flag used to enable mysqldump
127
- $default['package_mysqldump'] = isset(self::$Data['package_mysqldump']) ? self::$Data['package_mysqldump'] : false;
128
  //Optional mysqldump search path
129
  $default['package_mysqldump_path'] = isset(self::$Data['package_mysqldump_path']) ? self::$Data['package_mysqldump_path'] : '';
130
  //Optional mysql limit size
124
  //Flag used to show debug info
125
  $default['package_debug'] = isset(self::$Data['package_debug']) ? self::$Data['package_debug'] : false;
126
  //Flag used to enable mysqldump
127
+ $default['package_mysqldump'] = isset(self::$Data['package_mysqldump']) ? self::$Data['package_mysqldump'] : true;
128
  //Optional mysqldump search path
129
  $default['package_mysqldump_path'] = isset(self::$Data['package_mysqldump_path']) ? self::$Data['package_mysqldump_path'] : '';
130
  //Optional mysql limit size
classes/package/class.pack.php CHANGED
@@ -297,11 +297,11 @@ class DUP_Package
297
  $name = substr(sanitize_file_name($name), 0, 40);
298
  $name = str_replace(array('.', '-', ';', ':', "'", '"'), '', $name);
299
 
300
- $filter_dirs = isset($post['filter-dirs']) ? $this->Archive->parseDirectoryFilter($post['filter-dirs']) : '';
301
  $filter_files = isset($post['filter-files']) ? $this->Archive->parseFileFilter($post['filter-files']) : '';
302
- $filter_exts = isset($post['filter-exts']) ? $this->Archive->parseExtensionFilter($post['filter-exts']) : '';
303
- $tablelist = isset($post['dbtables']) ? implode(',', $post['dbtables']) : '';
304
- $compatlist = isset($post['dbcompat']) ? implode(',', $post['dbcompat']) : '';
305
  $dbversion = DUP_DB::getVersion();
306
  $dbversion = is_null($dbversion) ? '- unknown -' : $dbversion;
307
  $dbcomments = DUP_DB::getVariable('version_comment');
@@ -315,24 +315,24 @@ class DUP_Package
315
  $this->VersionWP = $wp_version;
316
  $this->VersionPHP = phpversion();
317
  $this->VersionDB = esc_html($dbversion);
318
- $this->Name = $name;
319
  $this->Hash = $this->makeHash();
320
  $this->NameHash = "{$this->Name}_{$this->Hash}";
321
 
322
- $this->Notes = esc_html($post['package-notes']);
323
  //ARCHIVE
324
  $this->Archive->PackDir = rtrim(DUPLICATOR_WPROOTPATH, '/');
325
  $this->Archive->Format = 'ZIP';
326
  $this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
327
  $this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
328
- $this->Archive->FilterDirs = esc_html($filter_dirs);
329
- $this->Archive->FilterFiles = esc_html($filter_files);
330
- $this->Archive->FilterExts = str_replace(array('.', ' '), '', esc_html($filter_exts));
331
  //INSTALLER
332
- $this->Installer->OptsDBHost = esc_html($post['dbhost']);
333
- $this->Installer->OptsDBPort = esc_html($post['dbport']);
334
- $this->Installer->OptsDBName = esc_html($post['dbname']);
335
- $this->Installer->OptsDBUser = esc_html($post['dbuser']);
336
  //DATABASE
337
  $this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
338
  $this->Database->FilterTables = esc_html($tablelist);
@@ -477,7 +477,7 @@ class DUP_Package
477
  /**
478
  * Gets a default name for the package
479
  *
480
- * @return string A default packagename such as 20170218_blogname
481
  */
482
  public static function getDefaultName($preDate = true)
483
  {
297
  $name = substr(sanitize_file_name($name), 0, 40);
298
  $name = str_replace(array('.', '-', ';', ':', "'", '"'), '', $name);
299
 
300
+ $filter_dirs = isset($post['filter-dirs']) ? $this->Archive->parseDirectoryFilter($post['filter-dirs']) : '';
301
  $filter_files = isset($post['filter-files']) ? $this->Archive->parseFileFilter($post['filter-files']) : '';
302
+ $filter_exts = isset($post['filter-exts']) ? $this->Archive->parseExtensionFilter($post['filter-exts']) : '';
303
+ $tablelist = isset($post['dbtables']) ? implode(',', $post['dbtables']) : '';
304
+ $compatlist = isset($post['dbcompat']) ? implode(',', $post['dbcompat']) : '';
305
  $dbversion = DUP_DB::getVersion();
306
  $dbversion = is_null($dbversion) ? '- unknown -' : $dbversion;
307
  $dbcomments = DUP_DB::getVariable('version_comment');
315
  $this->VersionWP = $wp_version;
316
  $this->VersionPHP = phpversion();
317
  $this->VersionDB = esc_html($dbversion);
318
+ $this->Name = sanitize_text_field($name);
319
  $this->Hash = $this->makeHash();
320
  $this->NameHash = "{$this->Name}_{$this->Hash}";
321
 
322
+ $this->Notes = esc_html(sanitize_textarea_field($post['package-notes']));
323
  //ARCHIVE
324
  $this->Archive->PackDir = rtrim(DUPLICATOR_WPROOTPATH, '/');
325
  $this->Archive->Format = 'ZIP';
326
  $this->Archive->FilterOn = isset($post['filter-on']) ? 1 : 0;
327
  $this->Archive->ExportOnlyDB = isset($post['export-onlydb']) ? 1 : 0;
328
+ $this->Archive->FilterDirs = esc_html(sanitize_textarea_field($filter_dirs));
329
+ $this->Archive->FilterFiles = esc_html(sanitize_textarea_field($filter_files));
330
+ $this->Archive->FilterExts = str_replace(array('.', ' '), '', esc_html(sanitize_textarea_field($filter_exts)));
331
  //INSTALLER
332
+ $this->Installer->OptsDBHost = esc_html(sanitize_text_field($post['dbhost']));
333
+ $this->Installer->OptsDBPort = esc_html(sanitize_text_field($post['dbport']));
334
+ $this->Installer->OptsDBName = esc_html(sanitize_text_field($post['dbname']));
335
+ $this->Installer->OptsDBUser = esc_html(sanitize_text_field($post['dbuser']));
336
  //DATABASE
337
  $this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
338
  $this->Database->FilterTables = esc_html($tablelist);
477
  /**
478
  * Gets a default name for the package
479
  *
480
+ * @return string A default package name such as 20170218_blogname
481
  */
482
  public static function getDefaultName($preDate = true)
483
  {
classes/ui/class.ui.notice.php CHANGED
@@ -20,10 +20,8 @@ if (!defined('DUPLICATOR_VERSION')) {
20
 
21
  class DUP_UI_Notice
22
  {
23
-
24
-
25
  /**
26
- * Shows a display message in the wp-admin if any researved files are found
27
  *
28
  * @return string Html formated text notice warnings
29
  */
@@ -75,4 +73,18 @@ class DUP_UI_Notice
75
  echo "</p></div>";
76
  }
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
20
 
21
  class DUP_UI_Notice
22
  {
 
 
23
  /**
24
+ * Shows a display message in the wp-admin if any reserved files are found
25
  *
26
  * @return string Html formated text notice warnings
27
  */
73
  echo "</p></div>";
74
  }
75
  }
76
+
77
+ /**
78
+ * Shows a message for redirecting a page
79
+ *
80
+ * @return string The location to redirect to
81
+ */
82
+ public static function redirect($location)
83
+ {
84
+ echo '<div class="dup-redirect"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i>';
85
+ _e('Redirecting Please Wait...', 'duplicator');
86
+ echo '</div>';
87
+ echo "<script>window.location = '{$location}';</script>";
88
+ die(_e('Invalid token permissions to perform this request.', 'duplicator'));
89
+ }
90
  }
classes/utilities/class.u.php CHANGED
@@ -41,7 +41,7 @@ class DUP_Util
41
  public static $PHP7_plus;
42
 
43
  /**
44
- * Inited on load (see end of file)
45
  */
46
  public static function init()
47
  {
@@ -552,7 +552,7 @@ class DUP_Util
552
  * Returns a GUIDv4 string
553
  *
554
  * Uses the best cryptographically secure method
555
- * for all supported pltforms with fallback to an older,
556
  * less secure version.
557
  *
558
  * @param bool $trim Trim '}{' curly
@@ -605,6 +605,29 @@ class DUP_Util
605
 
606
  return $guidv4;
607
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
  }
609
  DUP_Util::init();
610
  ?>
41
  public static $PHP7_plus;
42
 
43
  /**
44
+ * Initialized on load (see end of file)
45
  */
46
  public static function init()
47
  {
552
  * Returns a GUIDv4 string
553
  *
554
  * Uses the best cryptographically secure method
555
+ * for all supported platforms with fallback to an older,
556
  * less secure version.
557
  *
558
  * @param bool $trim Trim '}{' curly
605
 
606
  return $guidv4;
607
  }
608
+
609
+ /**
610
+ * Returns an array of the WordPress core tables.
611
+ *
612
+ * @return array Returns all WP core tables
613
+ */
614
+ public static function getWPCoreTables()
615
+ {
616
+ global $wpdb;
617
+ return array(
618
+ "{$wpdb->prefix}commentmeta",
619
+ "{$wpdb->prefix}comments",
620
+ "{$wpdb->prefix}links",
621
+ "{$wpdb->prefix}options",
622
+ "{$wpdb->prefix}postmeta",
623
+ "{$wpdb->prefix}posts",
624
+ "{$wpdb->prefix}term_relationships",
625
+ "{$wpdb->prefix}term_taxonomy",
626
+ "{$wpdb->prefix}termmeta",
627
+ "{$wpdb->prefix}terms",
628
+ "{$wpdb->prefix}usermeta",
629
+ "{$wpdb->prefix}users");
630
+ }
631
  }
632
  DUP_Util::init();
633
  ?>
ctrls/ctrl.package.php CHANGED
@@ -70,8 +70,8 @@ function duplicator_package_build() {
70
  $json['ZipSize'] = $Package->ZipSize;
71
  $json_response = json_encode($json);
72
 
73
- //Generate Host Build Interrupt
74
- // die(0);
75
 
76
  error_reporting($errLevel);
77
  die($json_response);
70
  $json['ZipSize'] = $Package->ZipSize;
71
  $json_response = json_encode($json);
72
 
73
+ //Simulate a Host Build Interrupt
74
+ //die(0);
75
 
76
  error_reporting($errLevel);
77
  die($json_response);
ctrls/ctrl.ui.php CHANGED
@@ -21,7 +21,7 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
21
  /**
22
  * Calls the SaveViewState and returns a JSON result
23
  *
24
- * @param string $_POST['key'] A unique key that idetifies the state of the UI element
25
  * @param bool $_POST['value'] The value to store for the state of the UI element
26
  *
27
  * @notes: Testing: See Testing Interface
@@ -95,6 +95,7 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
95
  {
96
  $result->processError($exc);
97
  }
98
- }
 
99
 
100
  }
21
  /**
22
  * Calls the SaveViewState and returns a JSON result
23
  *
24
+ * @param string $_POST['key'] A unique key that identifies the state of the UI element
25
  * @param bool $_POST['value'] The value to store for the state of the UI element
26
  *
27
  * @notes: Testing: See Testing Interface
95
  {
96
  $result->processError($exc);
97
  }
98
+ }
99
+
100
 
101
  }
define.php CHANGED
@@ -2,7 +2,7 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.2.20');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.2.22');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
duplicator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
- Version: 1.2.20
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
+ Version: 1.2.22
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
4
  Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
- Stable tag: 1.2.20
8
  License: GPLv2
9
 
10
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
4
  Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
+ Stable tag: 1.2.22
8
  License: GPLv2
9
 
10
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
views/packages/main/packages.php CHANGED
@@ -35,52 +35,11 @@
35
  td.error-msg a {color:maroon}
36
  td.error-msg a i {color:maroon}
37
  td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
38
- div.dup-vote { position: absolute; top:15px; right:25px; }
39
- div.dup-vote a { font-size:13px; font-style: italic }
40
- div#dup-feedback-form {display:none; height:150px; top:70px; min-width:250px; padding:10px; background-color:#f9f9f9; border:1px solid silver; border-radius:5px;
41
- position:fixed; right:25px; z-index: 2; cursor:pointer; line-height:34px; font-size:14px; box-shadow: 10px 10px 5px -6px #999;}
42
- div#dup-feedback-form i {display: inline-block; width: 15px}
43
-
44
  </style>
45
 
46
  <form id="form-duplicator" method="post">
47
 
48
- <?php
49
- // switch(rand(1,3)) {
50
- // case 1:
51
- // $feed_title = __("Have an idea?", 'duplicator');
52
- // $feed_utm = 'have_idea';
53
- // break;
54
- // case 2:
55
- // $feed_title = __("How can we improve?", 'duplicator');
56
- // $feed_utm = 'improve';
57
- // break;
58
- // case 3:
59
- // $feed_title = __("Have Feedback?", 'duplicator');
60
- // $feed_utm = 'feedback';
61
- // break;
62
- // }
63
- $feed_title = __("Need Help", 'duplicator');
64
- $feed_utm = 'help_pack_screen';
65
- ?>
66
-
67
- <div class="dup-vote">
68
- <a href="javascript:void(0);" onclick="Duplicator.Pack.showFeedbackForm()">
69
- <?php echo $feed_title; ?> <i class="fa fa-question-circle"></i>
70
- </a>
71
- </div>
72
-
73
- <div id="dup-feedback-form">
74
- <!--div style="text-align: center"><b><?php _e("LEAVE FEEDBACK", 'duplicator') ?></b></div-->
75
- <i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_ticket_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Need help with the plugin?", 'duplicator') ?></a> <br/>
76
- <i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_quick_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Visit Quick Start Guide!", 'duplicator') ?></a> <br/>
77
- <i class="fa fa-file-code-o"></i> <a href="https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_faq_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Frequently Asked Questions!", 'duplicator') ?></a> <hr size="1"/>
78
- <i class="fa fa-lightbulb-o"></i> <a href="https://snapcreek.com/support?idea=1&utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=feedback_idea_<?php echo $feed_utm; ?>&utm_campaign=duplicator_free" target="_blank"><?php _e("Have an idea for the plugin?", 'duplicator') ?></a> <br/>
79
- <?php if($statusCount >= 2) : ?>
80
- <!--i class="fa fa-star-o"></i> <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php _e("Help review the plugin!", 'duplicator') ?></a-->
81
- <?php endif; ?>
82
- </div>
83
-
84
  <!-- ====================
85
  TOOL-BAR -->
86
  <table id="dup-toolbar">
@@ -93,7 +52,12 @@ TOOL-BAR -->
93
  <input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.ConfirmDelete()">
94
  </td>
95
  <td align="center" >
96
- <a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
 
 
 
 
 
97
  </td>
98
  <td>
99
  <span><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></span>
@@ -121,7 +85,6 @@ TOOL-BAR -->
121
  <?php _e("Check out the 'Quick Start' guide!", 'duplicator'); ?>
122
  </a>
123
  </div>
124
-
125
  <div style="height:75px">&nbsp;</div>
126
  </div>
127
  </td>
@@ -261,8 +224,32 @@ THICK-BOX DIALOGS: -->
261
  $confirm1->progressText = __('Removing Packages, Please Wait...', 'duplicator');
262
  $confirm1->jscallback = 'Duplicator.Pack.Delete()';
263
  $confirm1->initConfirm();
 
 
 
 
 
 
 
264
  ?>
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  <script>
267
  jQuery(document).ready(function($)
268
  {
@@ -332,9 +319,10 @@ jQuery(document).ready(function($)
332
  }
333
 
334
  /* Toggles the feedback form */
335
- Duplicator.Pack.showFeedbackForm = function ()
336
  {
337
- $("div#dup-feedback-form").toggle(300);
 
338
  }
339
 
340
  });
35
  td.error-msg a {color:maroon}
36
  td.error-msg a i {color:maroon}
37
  td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
38
+ div#dup-help-dlg i {display: inline-block; width: 15px; padding:2px;line-height:28px; font-size:14px;}
 
 
 
 
 
39
  </style>
40
 
41
  <form id="form-duplicator" method="post">
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  <!-- ====================
44
  TOOL-BAR -->
45
  <table id="dup-toolbar">
52
  <input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.ConfirmDelete()">
53
  </td>
54
  <td align="center" >
55
+ <a href="javascript:void(0)" id="btn-logs-dialog" class="button" title="<?php _e("Get Help", 'duplicator') ?>" onclick="Duplicator.Pack.showHelp()">
56
+ <?php echo ($statusCount == 1)
57
+ ? '<i class="fa fa-question-circle" style="color:green"></i>'
58
+ : '<i class="fa fa-question-circle"></i>';
59
+ ?>
60
+ </a>
61
  </td>
62
  <td>
63
  <span><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></span>
85
  <?php _e("Check out the 'Quick Start' guide!", 'duplicator'); ?>
86
  </a>
87
  </div>
 
88
  <div style="height:75px">&nbsp;</div>
89
  </div>
90
  </td>
224
  $confirm1->progressText = __('Removing Packages, Please Wait...', 'duplicator');
225
  $confirm1->jscallback = 'Duplicator.Pack.Delete()';
226
  $confirm1->initConfirm();
227
+
228
+ $alert3 = new DUP_UI_Dialog();
229
+ $alert3->height = 350;
230
+ $alert3->width = 350;
231
+ $alert3->title = __('Duplicator Help', 'duplicator');
232
+ $alert3->message = "<div id='dup-help-dlg'></div>";
233
+ $alert3->initAlert();
234
  ?>
235
 
236
+ <!-- =======================
237
+ DIALOG: HELP DIALOG -->
238
+ <div id="dup-help-dlg-info" style="display:none">
239
+ <b><?php _e("Common Questions:", 'duplicator') ?></b><hr size='1'/>
240
+ <i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_pack_help&utm_campaign=duplicator_free#quick-010-q" target="_blank"><?php _e("How do I create a package", 'duplicator') ?></a> <br/>
241
+ <i class="fa fa-file-text-o"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank"><?php _e('How do I install a package?', 'duplicator'); ?></a> <br/>
242
+ <i class="fa fa-file-code-o"></i> <a href="https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_faq&utm_campaign=duplicator_free" target="_blank"><?php _e("Frequently Asked Questions!", 'duplicator') ?></a>
243
+ <br/><br/>
244
+
245
+ <b><?php _e("Other Resources:", 'duplicator') ?></b><hr size='1'/>
246
+ <i class="fa fa-question-circle"></i> <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_ticket&utm_campaign=duplicator_free" target="_blank"><?php _e("Need help with the plugin?", 'duplicator') ?></a> <br/>
247
+ <i class="fa fa-lightbulb-o"></i> <a href="https://snapcreek.com/support?idea=1&utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=help_btn_idea&utm_campaign=duplicator_free" target="_blank"><?php _e("Have an idea for the plugin?", 'duplicator') ?></a> <br/>
248
+ <?php if($statusCount >= 3) : ?>
249
+ <i class="fa fa-star-o"></i> <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php _e("Help review the plugin!", 'duplicator') ?></a>
250
+ <?php endif; ?>
251
+ </div>
252
+
253
  <script>
254
  jQuery(document).ready(function($)
255
  {
319
  }
320
 
321
  /* Toggles the feedback form */
322
+ Duplicator.Pack.showHelp = function ()
323
  {
324
+ $('#dup-help-dlg').html($('#dup-help-dlg-info').html());
325
+ <?php $alert3->showAlert(); ?>
326
  }
327
 
328
  });
views/packages/main/s1.setup2.php CHANGED
@@ -12,7 +12,7 @@
12
  input#package-name {padding:4px; height: 2em; font-size: 1.2em; line-height: 100%; width: 100%; margin: 0 0 3px;}
13
  label.lbl-larger {font-size:1.2em}
14
  /*ARCHIVE SECTION*/
15
- form#dup-form-opts div.tabs-panel{max-height:550px; padding:10px; min-height:280px}
16
  form#dup-form-opts ul li.tabs{font-weight:bold}
17
  ul.category-tabs li {padding:4px 15px 4px 15px}
18
  select#archive-format {min-width:100px; margin:1px 0 4px 0}
@@ -23,7 +23,12 @@
23
  form#dup-form-opts textarea#filter-files {height:85px}
24
  div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
25
  div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
26
- table#dup-dbtables td {padding:1px 15px 1px 4px}
 
 
 
 
 
27
  table.dbmysql-compatibility td{padding:2px 20px 2px 2px}
28
  div.dup-store-pro {font-size:12px; font-style:italic;}
29
  div.dup-store-pro img {height:14px; width:14px; vertical-align:text-top}
@@ -45,6 +50,8 @@
45
 
46
  <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo $retry_enabled ? '&retry=1' : '';?>" data-validate="parsley">
47
  <input type="hidden" id="dup-form-opts-action" name="action" value="">
 
 
48
  <div>
49
  <label for="package-name" class="lbl-larger"><b>&nbsp;<?php _e('Name', 'duplicator') ?>:</b> </label>
50
  <div class="dup-notes-add">
@@ -135,6 +142,9 @@ ARCHIVE -->
135
  <?php
136
  $uploads = wp_upload_dir();
137
  $upload_dir = DUP_Util::safePath($uploads['basedir']);
 
 
 
138
  ?>
139
 
140
  <input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
@@ -150,7 +160,12 @@ ARCHIVE -->
150
  </i>
151
 
152
  <div id="dup-file-filter-items">
153
- <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("Directories", 'duplicator') ?>:</label>
 
 
 
 
 
154
  <div class='dup-quick-links'>
155
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'duplicator') ?>]</a>
156
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'duplicator') ?>]</a>
@@ -167,7 +182,12 @@ ARCHIVE -->
167
  </div>
168
  <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
169
 
170
- <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("Files", 'duplicator') ?>:</label>
 
 
 
 
 
171
  <div class='dup-quick-links'>
172
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php _e("(file path)", 'duplicator') ?></a>
173
  <a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php _e("(clear)", 'duplicator') ?></a>
@@ -184,7 +204,7 @@ ARCHIVE -->
184
  <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
185
  <?php
186
  _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
187
- . "will be included in the archive.zip file. The option can be used for backing up and moving only the database. <i>Please note that this option is currently in *Beta*.</i>", 'duplicator');
188
 
189
  echo '<br/><br/>';
190
 
@@ -230,28 +250,36 @@ ARCHIVE -->
230
  <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'duplicator'); ?> ]</a>
231
  <div style="white-space:nowrap">
232
  <?php
 
233
  $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
234
  $num_rows = count($tables);
235
- echo '<table id="dup-dbtables"><tr><td valign="top">';
236
- $next_row = round($num_rows / 3, 0);
237
  $counter = 0;
238
  $tableList = explode(',', $Package->Database->FilterTables);
239
- foreach ($tables as $table)
240
- {
241
- if (in_array($table[0], $tableList))
242
- {
243
- $checked = 'checked="checked"';
244
- $css = 'text-decoration:line-through';
 
 
 
 
245
  }
246
- else
247
- {
 
 
 
248
  $checked = '';
249
- $css = '';
250
  }
251
- echo "<label for='dbtables-{$table[0]}' style='{$css}'><input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />&nbsp;{$table[0]}</label><br />";
 
 
252
  $counter++;
253
- if ($next_row <= $counter)
254
- {
255
  echo '</td><td valign="top">';
256
  $counter = 0;
257
  }
@@ -260,6 +288,15 @@ ARCHIVE -->
260
  ?>
261
  </div>
262
  </div>
 
 
 
 
 
 
 
 
 
263
  <br/>
264
  <?php _e("Compatibility Mode", 'duplicator') ?> &nbsp;
265
  <i class="fa fa-question-circle"
12
  input#package-name {padding:4px; height: 2em; font-size: 1.2em; line-height: 100%; width: 100%; margin: 0 0 3px;}
13
  label.lbl-larger {font-size:1.2em}
14
  /*ARCHIVE SECTION*/
15
+ form#dup-form-opts div.tabs-panel{max-height:800px; padding:10px; min-height:280px}
16
  form#dup-form-opts ul li.tabs{font-weight:bold}
17
  ul.category-tabs li {padding:4px 15px 4px 15px}
18
  select#archive-format {min-width:100px; margin:1px 0 4px 0}
23
  form#dup-form-opts textarea#filter-files {height:85px}
24
  div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
25
  div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
26
+ /* Tab: Database */
27
+ table#dup-dbtables td {padding:1px 7px 1px 4px}
28
+ label.core-table {color:#9A1E26;font-style:italic;font-weight:bold}
29
+ i.core-table-info {color:#9A1E26;font-style:italic;}
30
+ label.non-core-table {color:#000}
31
+ label.non-core-table:hover, label.core-table:hover {text-decoration:line-through}
32
  table.dbmysql-compatibility td{padding:2px 20px 2px 2px}
33
  div.dup-store-pro {font-size:12px; font-style:italic;}
34
  div.dup-store-pro img {height:14px; width:14px; vertical-align:text-top}
50
 
51
  <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo $retry_enabled ? '&retry=1' : '';?>" data-validate="parsley">
52
  <input type="hidden" id="dup-form-opts-action" name="action" value="">
53
+ <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field'); ?>
54
+
55
  <div>
56
  <label for="package-name" class="lbl-larger"><b>&nbsp;<?php _e('Name', 'duplicator') ?>:</b> </label>
57
  <div class="dup-notes-add">
142
  <?php
143
  $uploads = wp_upload_dir();
144
  $upload_dir = DUP_Util::safePath($uploads['basedir']);
145
+ $filter_dir_count = isset($Package->Archive->FilterDirs) ? count(explode(";", $Package->Archive->FilterDirs)) -1 : 0;
146
+ $filter_file_count = isset($Package->Archive->FilterFiles) ? count(explode(";", $Package->Archive->FilterFiles)) -1 : 0;
147
+
148
  ?>
149
 
150
  <input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
160
  </i>
161
 
162
  <div id="dup-file-filter-items">
163
+ <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
164
+ <?php
165
+ _e("Directories:", 'duplicator');
166
+ echo sprintf("<sup title='%s'>({$filter_dir_count})</sup>", __("Number of directories filtered", 'duplicator'));
167
+ ?>
168
+ </label>
169
  <div class='dup-quick-links'>
170
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'duplicator') ?>]</a>
171
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'duplicator') ?>]</a>
182
  </div>
183
  <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
184
 
185
+ <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
186
+ <?php
187
+ _e("Files:", 'duplicator');
188
+ echo sprintf("<sup title='%s'>({$filter_file_count})</sup>", __("Number of files filtered", 'duplicator'));
189
+ ?>
190
+ </label>
191
  <div class='dup-quick-links'>
192
  <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php _e("(file path)", 'duplicator') ?></a>
193
  <a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php _e("(clear)", 'duplicator') ?></a>
204
  <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
205
  <?php
206
  _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
207
+ . "will be included in the archive.zip file. The option can be used for backing up and moving only the database.", 'duplicator');
208
 
209
  echo '<br/><br/>';
210
 
250
  <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'duplicator'); ?> ]</a>
251
  <div style="white-space:nowrap">
252
  <?php
253
+ $coreTables = DUP_Util::getWPCoreTables();
254
  $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
255
  $num_rows = count($tables);
256
+ $next_row = round($num_rows / 4, 0);
 
257
  $counter = 0;
258
  $tableList = explode(',', $Package->Database->FilterTables);
259
+
260
+ echo '<table id="dup-dbtables"><tr><td valign="top">';
261
+ foreach ($tables as $table) {
262
+
263
+ if (in_array($table[0], $coreTables)) {
264
+ $core_css = 'core-table';
265
+ $core_note = '*';
266
+ } else {
267
+ $core_css = 'non-core-table';
268
+ $core_note = '';
269
  }
270
+
271
+ if (in_array($table[0], $tableList)) {
272
+ $checked = 'checked="checked"';
273
+ $css = 'text-decoration:line-through';
274
+ } else {
275
  $checked = '';
276
+ $css = '';
277
  }
278
+ echo "<label for='dbtables-{$table[0]}' style='{$css}' class='{$core_css}'>"
279
+ . "<input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />"
280
+ . "&nbsp;{$table[0]}{$core_note}</label><br />";
281
  $counter++;
282
+ if ($next_row <= $counter) {
 
283
  echo '</td><td valign="top">';
284
  $counter = 0;
285
  }
288
  ?>
289
  </div>
290
  </div>
291
+
292
+ <div class="dup-tabs-opts-help">
293
+ <?php
294
+ _e("Checked tables will be <u>excluded</u> from the database script. ", 'duplicator');
295
+ _e("Excluding certain tables can cause your site or plugins to not work correctly after install!<br/>", 'duplicator');
296
+ _e("<i class='core-table-info'> Use caution when excluding tables! It is highly recommended to not exclude WordPress core tables*, unless you know the impact.</i>", 'duplicator');
297
+ ?>
298
+ </div>
299
+
300
  <br/>
301
  <?php _e("Compatibility Mode", 'duplicator') ?> &nbsp;
302
  <i class="fa fa-question-circle"
views/packages/main/s2.scan1.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  global $wp_version;
3
  wp_enqueue_script('dup-handlebars');
4
 
@@ -76,7 +81,8 @@
76
  div.hb-files-style div.files i.size {font-style:normal; display:inline-block; min-width:50px}
77
  div.hb-files-style div.files label {font-weight: normal; font-size:11px; vertical-align:top;display:inline-block;width:450px; white-space: nowrap; overflow:hidden; text-overflow:ellipsis;}
78
  div.hb-files-style div.files label:hover {color:#025d02; cursor: pointer}
79
- div.hb-files-style div.apply-btn {text-align:right; margin: 1px 0 10px 0}
 
80
 
81
  div#size-more-details {display:none; margin:5px 0 20px 0; border:1px solid #dfdfdf; padding:8px; border-radius: 4px; background-color: #F1F1F1}
82
  div#size-more-details ul {list-style-type:circle; padding-left:20px; margin:0}
@@ -142,6 +148,7 @@ TOOL BAR:STEPS -->
142
 
143
 
144
  <form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
 
145
 
146
  <!-- PROGRESS BAR -->
147
  <div id="dup-progress-bar-area">
1
  <?php
2
+ //Nonce Check
3
+ if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
4
+ DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
5
+ }
6
+
7
  global $wp_version;
8
  wp_enqueue_script('dup-handlebars');
9
 
81
  div.hb-files-style div.files i.size {font-style:normal; display:inline-block; min-width:50px}
82
  div.hb-files-style div.files label {font-weight: normal; font-size:11px; vertical-align:top;display:inline-block;width:450px; white-space: nowrap; overflow:hidden; text-overflow:ellipsis;}
83
  div.hb-files-style div.files label:hover {color:#025d02; cursor: pointer}
84
+ div.hb-files-style div.apply-btn {text-align:right; margin: 1px 0 10px 0; width:100%}
85
+ div.hb-files-style div.apply-warn {float:left; font-size:11px; color:maroon; margin-top:-7px; font-style: italic; display:none; text-align: left}
86
 
87
  div#size-more-details {display:none; margin:5px 0 20px 0; border:1px solid #dfdfdf; padding:8px; border-radius: 4px; background-color: #F1F1F1}
88
  div#size-more-details ul {list-style-type:circle; padding-left:20px; margin:0}
148
 
149
 
150
  <form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
151
+ <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field'); ?>
152
 
153
  <!-- PROGRESS BAR -->
154
  <div id="dup-progress-bar-area">
views/packages/main/s2.scan3.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  function _duplicatorGetRootPath() {
3
  $txt = __('Root Path', 'duplicator');
4
  $root = rtrim(DUPLICATOR_WPROOTPATH, '//');
@@ -115,7 +117,7 @@ TOTAL SIZE -->
115
  } else {
116
  echo "<div style='color:maroon'>";
117
  _e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
118
- . 'adding the following file filters to non-essential files paths like wp-content/uploads. These filtered files can then '
119
  . 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
120
  echo "</div>";
121
  }
@@ -126,6 +128,9 @@ TOTAL SIZE -->
126
 
127
 
128
  <div class="apply-btn" style="margin-bottom:5px;float:right">
 
 
 
129
  <button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'large')">
130
  <i class="fa fa-filter"></i> <?php _e('Add Filters &amp; Rescan', 'duplicator');?>
131
  </button>
@@ -204,6 +209,9 @@ FILE NAME CHECKS -->
204
  </div>
205
  </div>
206
  <div class="apply-btn">
 
 
 
207
  <button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'utf8')">
208
  <i class="fa fa-filter"></i> <?php _e('Add Filters &amp; Rescan', 'duplicator');?>
209
  </button>
@@ -284,15 +292,12 @@ DATABASE -->
284
  ?>
285
  </div>
286
  </div>
287
-
288
  <?php
289
-
290
  echo '<div class="dup-pro-support">&nbsp;';
291
  _e('Package support up to 2GB available in', 'duplicator');
292
  echo '&nbsp;<i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_size_warn&amp;utm_campaign=duplicator_pro" target="_blank">' . __('Duplicator Pro', 'duplicator') . '!</a></i>';
293
  echo '</div>';
294
  ?>
295
-
296
  </div>
297
  <br/><br/>
298
 
@@ -322,8 +327,8 @@ DIALOG: Scan Results -->
322
 
323
  <!-- PACKAGE -->
324
  <h2><i class="fa fa-archive"></i> <?php _e('Package', 'duplicator');?></h2>
325
- <b><?php _e('Name', 'duplicator');?>:</b> <?php echo $_POST['package-name']; ?><br/>
326
- <b><?php _e('Notes', 'duplicator');?>:</b> <?php echo strlen($_POST['package-notes']) ? $_POST['package-notes'] : __('- no notes -', 'duplicator') ; ?>
327
  <br/><br/>
328
 
329
  <!-- DATABASE -->
@@ -453,6 +458,7 @@ jQuery(document).ready(function($)
453
  $(dir).is(':checked')
454
  ? $.each($checks, function() {$(this).attr({disabled : true, checked : false, title : '<?php _e('Directory applied filter set.', 'duplicator');?>'});})
455
  : $.each($checks, function() {$(this).removeAttr('disabled checked title');});
 
456
  }
457
 
458
  //Opens a dialog to show scan details
1
  <?php
2
+ /*IDE Helper*/
3
+ /* @var $Package DUP_Package */
4
  function _duplicatorGetRootPath() {
5
  $txt = __('Root Path', 'duplicator');
6
  $root = rtrim(DUPLICATOR_WPROOTPATH, '//');
117
  } else {
118
  echo "<div style='color:maroon'>";
119
  _e('No large files found during this scan. If you\'re having issues building a package click the back button and try '
120
+ . 'adding a file filter to non-essential files paths like wp-content/uploads. These excluded files can then '
121
  . 'be manually moved to the new location after you have ran the migration installer.', 'duplicator');
122
  echo "</div>";
123
  }
128
 
129
 
130
  <div class="apply-btn" style="margin-bottom:5px;float:right">
131
+ <div class="apply-warn">
132
+ <?php _e('*Checking a directory will exclude all items recursively from that path down.<br/>Please use caution when filtering directories.', 'duplicator'); ?>
133
+ </div>
134
  <button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'large')">
135
  <i class="fa fa-filter"></i> <?php _e('Add Filters &amp; Rescan', 'duplicator');?>
136
  </button>
209
  </div>
210
  </div>
211
  <div class="apply-btn">
212
+ <div class="apply-warn">
213
+ <?php _e('*Checking a directory will exclude all items recursively from that path down.<br/>Please use caution when filtering directories.', 'duplicator'); ?>
214
+ </div>
215
  <button type="button" class="button-small" onclick="Duplicator.Pack.applyFilters(this, 'utf8')">
216
  <i class="fa fa-filter"></i> <?php _e('Add Filters &amp; Rescan', 'duplicator');?>
217
  </button>
292
  ?>
293
  </div>
294
  </div>
 
295
  <?php
 
296
  echo '<div class="dup-pro-support">&nbsp;';
297
  _e('Package support up to 2GB available in', 'duplicator');
298
  echo '&nbsp;<i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_size_warn&amp;utm_campaign=duplicator_pro" target="_blank">' . __('Duplicator Pro', 'duplicator') . '!</a></i>';
299
  echo '</div>';
300
  ?>
 
301
  </div>
302
  <br/><br/>
303
 
327
 
328
  <!-- PACKAGE -->
329
  <h2><i class="fa fa-archive"></i> <?php _e('Package', 'duplicator');?></h2>
330
+ <b><?php _e('Name', 'duplicator');?>:</b> <?php echo $Package->Name; ?><br/>
331
+ <b><?php _e('Notes', 'duplicator');?>:</b> <?php echo $Package->Notes; ; ?>
332
  <br/><br/>
333
 
334
  <!-- DATABASE -->
458
  $(dir).is(':checked')
459
  ? $.each($checks, function() {$(this).attr({disabled : true, checked : false, title : '<?php _e('Directory applied filter set.', 'duplicator');?>'});})
460
  : $.each($checks, function() {$(this).removeAttr('disabled checked title');});
461
+ $('div.apply-warn').show(300);
462
  }
463
 
464
  //Opens a dialog to show scan details
views/packages/main/s3.build.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  $Package = DUP_Package::getActive();
3
  $ajax_nonce = wp_create_nonce('dup_package_build');
4
 
@@ -49,7 +54,7 @@
49
  div.dup-box-panel b.opt-title {font-size:18px}
50
  div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 15px 15px; max-height:170px; width:95%; border: 1px solid silver; border-radius: 4px; line-height: 22px}
51
  div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
52
- div#dup-logs a {font-size:15px; text-decoration:none !important; display:inline-block; margin:20px 0px 5px 0px}
53
  span.sub-data {display: inline-block; padding-left:20px}
54
  </style>
55
 
@@ -79,6 +84,7 @@ TOOL BAR: STEPS -->
79
 
80
 
81
  <form id="form-duplicator" method="post" action="?page=duplicator">
 
82
 
83
  <!-- PROGRESS BAR -->
84
  <div id="dup-progress-bar-area">
@@ -109,7 +115,7 @@ TOOL BAR: STEPS -->
109
  <!-- DOWNLOAD FILES -->
110
  <fieldset class="download-area">
111
  <legend>
112
- &nbsp; <i class="fa fa-download"></i> <?php _e("Download Files", 'duplicator') ?> &nbsp;
113
  </legend>
114
  <button id="dup-btn-installer" class="button button-primary button-large" title="<?php _e("Click to download installer file", 'duplicator') ?>">
115
  <i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?> &nbsp;
@@ -122,9 +128,13 @@ TOOL BAR: STEPS -->
122
  </button>
123
  <div class="one-click-download">
124
  <a href="javascript:void(0)" id="dup-link-download-both" title="<?php _e("Click to download both files", 'duplicator') ?>">
125
- <?php _e("One-Click Download", 'duplicator') ?><i class="fa fa-download" style="padding-left:5px; color:#0073AA"></i>
126
- </a>
127
 
 
 
 
 
 
128
  </div>
129
  </fieldset>
130
  <br/><br/>
@@ -214,9 +224,6 @@ TOOL BAR: STEPS -->
214
  <div style="text-align: center; margin: 10px">
215
  <input type="button" class="button-large button-primary" value="<?php _e('Continue with Two-Part Install', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2'" />
216
  </div><br/>
217
-
218
-
219
-
220
  </div>
221
  </div>
222
 
@@ -227,67 +234,66 @@ TOOL BAR: STEPS -->
227
  <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
228
  </div>
229
  <div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
230
-
231
  <b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
232
- <?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
233
- . 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
 
 
 
 
 
234
 
235
- <div style="text-align: center; margin: 10px">
236
- <input type="button" style="margin-right:10px;" class="button-large button-primary" value="<?php _e('Diagnose Server Setup', 'duplicator'); ?>"
237
- onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q', '_blank');return false;" />
 
 
238
  </div>
239
-
240
- <b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
241
- <div class="dup-msg-error-area">
242
- <div id="dup-msg-error-response-time">
243
- <span class="label"><?php _e("Allowed Runtime:", 'duplicator'); ?></span>
244
- <span class="data"></span>
245
- </div>
246
- <div id="dup-msg-error-response-php">
247
- <span class="label"><?php _e("PHP Max Execution", 'duplicator'); ?></span><br/>
248
- <span class="data sub-data">
249
- <span class="label"><?php _e("Time", 'duplicator'); ?>:</span>
250
- <?php
251
- $try_value = @ini_get('max_execution_time');
252
- $try_update = set_time_limit(0);
253
- echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
254
- ?>
255
- <i class="fa fa-question-circle data-size-help"
256
- data-tooltip-title="<?php _e("PHP Max Execution Time", 'duplicator'); ?>"
257
- data-tooltip="<?php _e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i>
258
- </span><br/>
259
-
260
- <span class="data sub-data">
261
- <span class="label"><?php _e("Mode", 'duplicator'); ?>:</span>
262
- <?php
263
- $try_update = $try_update ? 'is dynamic' : 'value is fixed';
264
- echo "{$try_update}";
265
- ?>
266
- <i class="fa fa-question-circle data-size-help"
267
- data-tooltip-title="<?php _e("PHP Max Execution Mode", 'duplicator'); ?>"
268
- data-tooltip="<?php _e('If the value is [dynamic] then its possible for PHP to run longer than the default. '
269
- . 'If the value is [fixed] then PHP will not be allowed to run longer than the default. <br/><br/> If this value is larger than the [Allowed Runtime] above then '
270
- . 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
271
- </span>
272
- </div>
273
-
274
- <div id="dup-msg-error-response-status">
275
- <span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
276
- <span class="data"></span>
277
- </div>
278
- <div id="dup-msg-error-response-text">
279
- <span class="label"><?php _e("Error Message:", 'duplicator'); ?></span><br/>
280
- <span class="data"></span>
281
- </div>
282
- </div><br/>
283
-
284
- <!-- LOGS -->
285
- <div id="dup-logs">
286
- <div style="font-weight:bold">
287
- <i class="fa fa-list-alt"></i>
288
- <a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php _e('Read Package Log File', 'duplicator');?></a>
289
- </div>
290
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  </div>
292
  </div>
293
  <br/><br/><br/>
1
  <?php
2
+ //Nonce Check
3
+ if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
4
+ DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
5
+ }
6
+
7
  $Package = DUP_Package::getActive();
8
  $ajax_nonce = wp_create_nonce('dup_package_build');
9
 
54
  div.dup-box-panel b.opt-title {font-size:18px}
55
  div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 15px 15px; max-height:170px; width:95%; border: 1px solid silver; border-radius: 4px; line-height: 22px}
56
  div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
57
+ div#dup-logs a {display:inline-block;}
58
  span.sub-data {display: inline-block; padding-left:20px}
59
  </style>
60
 
84
 
85
 
86
  <form id="form-duplicator" method="post" action="?page=duplicator">
87
+ <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field'); ?>
88
 
89
  <!-- PROGRESS BAR -->
90
  <div id="dup-progress-bar-area">
115
  <!-- DOWNLOAD FILES -->
116
  <fieldset class="download-area">
117
  <legend>
118
+ &nbsp; <?php _e("Download Files", 'duplicator') ?> <i class="fa fa-download"></i> &nbsp;
119
  </legend>
120
  <button id="dup-btn-installer" class="button button-primary button-large" title="<?php _e("Click to download installer file", 'duplicator') ?>">
121
  <i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?> &nbsp;
128
  </button>
129
  <div class="one-click-download">
130
  <a href="javascript:void(0)" id="dup-link-download-both" title="<?php _e("Click to download both files", 'duplicator') ?>">
131
+ <i class="fa fa-download" style="padding-left:5px; color:#0073AA">&nbsp;</i><?php _e("One-Click Download", 'duplicator') ?></a>
 
132
 
133
+ <sup><i class="fa fa-question-circle" style='font-size:11px'
134
+ data-tooltip-title="<?php _e("One Click:", 'duplicator'); ?>"
135
+ data-tooltip="<?php _e('Clicking this link will open both the installer and archive download prompts at the same time. '
136
+ . 'On some browsers you may have to disable pop-up warnings on this domain for this to work correctly.', 'duplicator'); ?>">
137
+ </i></sup>
138
  </div>
139
  </fieldset>
140
  <br/><br/>
224
  <div style="text-align: center; margin: 10px">
225
  <input type="button" class="button-large button-primary" value="<?php _e('Continue with Two-Part Install', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2'" />
226
  </div><br/>
 
 
 
227
  </div>
228
  </div>
229
 
234
  <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
235
  </div>
236
  <div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
 
237
  <b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
238
+ <?php _e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an FAQ page that will show '
239
+ . 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
240
+
241
+ <div style="text-align: center; margin: 10px">
242
+ <input type="button" style="margin-right:10px;" class="button-large button-primary" value="<?php _e('Diagnose Server Setup', 'duplicator'); ?>"
243
+ onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q', '_blank');return false;" />
244
+ </div>
245
 
246
+ <b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
247
+ <div class="dup-msg-error-area">
248
+ <div id="dup-msg-error-response-time">
249
+ <span class="label"><?php _e("Allowed Runtime:", 'duplicator'); ?></span>
250
+ <span class="data"></span>
251
  </div>
252
+ <div id="dup-msg-error-response-php">
253
+ <span class="label"><?php _e("PHP Max Execution", 'duplicator'); ?></span><br/>
254
+ <span class="data sub-data">
255
+ <span class="label"><?php _e("Time", 'duplicator'); ?>:</span>
256
+ <?php
257
+ $try_value = @ini_get('max_execution_time');
258
+ $try_update = set_time_limit(0);
259
+ echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
260
+ ?>
261
+ <i class="fa fa-question-circle data-size-help"
262
+ data-tooltip-title="<?php _e("PHP Max Execution Time", 'duplicator'); ?>"
263
+ data-tooltip="<?php _e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i>
264
+ </span><br/>
265
+
266
+ <span class="data sub-data">
267
+ <span class="label"><?php _e("Mode", 'duplicator'); ?>:</span>
268
+ <?php
269
+ $try_update = $try_update ? 'is dynamic' : 'value is fixed';
270
+ echo "{$try_update}";
271
+ ?>
272
+ <i class="fa fa-question-circle data-size-help"
273
+ data-tooltip-title="<?php _e("PHP Max Execution Mode", 'duplicator'); ?>"
274
+ data-tooltip="<?php _e('If the value is [dynamic] then its possible for PHP to run longer than the default. '
275
+ . 'If the value is [fixed] then PHP will not be allowed to run longer than the default. <br/><br/> If this value is larger than the [Allowed Runtime] above then '
276
+ . 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
277
+ </span>
278
+ </div>
279
+
280
+ <div id="dup-msg-error-response-status">
281
+ <span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
282
+ <span class="data"></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  </div>
284
+ <div id="dup-msg-error-response-text">
285
+ <span class="label"><?php _e("Error Message:", 'duplicator'); ?></span><br/>
286
+ <span class="data"></span>
287
+ </div>
288
+ </div>
289
+
290
+ <!-- LOGS -->
291
+ <div id="dup-logs">
292
+ <br/>
293
+ <i class="fa fa-list-alt"></i>
294
+ <a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php _e('Read Package Log File', 'duplicator');?></a>
295
+ <br/><br/>
296
+ </div>
297
  </div>
298
  </div>
299
  <br/><br/><br/>
views/settings/packages.php CHANGED
@@ -9,25 +9,32 @@ $action_response = __("Package Settings Saved", 'duplicator');
9
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
10
 
11
  //Nonce Check
12
- if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' ) )
13
- {
14
  die('Invalid token permissions to perform this request.');
15
  }
16
 
17
  //Package
18
- $enable_mysqldump = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
 
 
 
 
19
  DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
20
- DUP_Settings::Set('package_mysqldump', $enable_mysqldump ? "1" : "0");
21
  DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
22
- DUP_Settings::Set('package_mysqldump_path', trim(esc_sql(strip_tags($_POST['package_mysqldump_path']))));
 
 
 
23
  DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
24
- $action_updated = DUP_Settings::Save();
 
25
  DUP_Util::initSnapshotDirectory();
26
  }
27
 
28
  $package_zip_flush = DUP_Settings::Get('package_zip_flush');
29
  $phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
30
- $package_phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
31
  $package_mysqldump = DUP_Settings::Get('package_mysqldump');
32
  $package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
33
  $package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
@@ -37,10 +44,9 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
37
  ?>
38
 
39
  <style>
40
- form#dup-settings-form input[type=text] {width: 400px; }
41
- input#package_mysqldump_path_found {margin-top:5px}
42
- div.dup-feature-found {padding:3px; border:1px solid silver; background: #f7fcfe; border-radius: 3px; width:400px; font-size: 12px}
43
- div.dup-feature-notfound {padding:5px; border:1px solid silver; background: #fcf3ef; border-radius: 3px; width:500px; font-size: 13px; line-height: 18px}
44
  select#package_ui_created {font-family: monospace}
45
  </style>
46
 
@@ -94,11 +100,11 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
94
  <hr size="1" />
95
  <table class="form-table">
96
  <tr>
97
- <th scope="row"><label><?php _e("Database Script", 'duplicator'); ?></label></th>
98
  <td>
99
  <?php if (!DUP_Util::hasShellExec()) : ?>
100
  <input type="radio" disabled="true" />
101
- <label><?php _e("Use mysqldump", 'duplicator'); ?></label>
102
  <p class="description" style="width:550px; margin:5px 0 0 20px">
103
  <?php
104
  _e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
@@ -122,45 +128,63 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
122
  </p>
123
  <?php else : ?>
124
  <input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
125
- <label for="package_mysqldump"><?php _e("Use mysqldump", 'duplicator'); ?></label>
126
  <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i> <br/>
127
 
128
  <div style="margin:5px 0px 0px 25px">
129
  <?php if ($mysqlDumpFound) : ?>
130
  <div class="dup-feature-found">
131
- <?php _e("Working Path:", 'duplicator'); ?> &nbsp;
 
132
  <i><?php echo $mysqlDumpPath ?></i>
133
  </div><br/>
134
  <?php else : ?>
135
  <div class="dup-feature-notfound">
 
136
  <?php
137
- _e('Mysqldump was not found at its default location or the location provided. Please enter a path to a valid location where mysqldump can run. '
138
- . 'If the problem persist contact your server administrator.', 'duplicator');
139
- ?>
140
-
141
- <?php
142
  printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
143
  __("See the", 'duplicator'),
144
  __("host list", 'duplicator'),
145
- __("for reliable access to mysqldump", 'duplicator'));
 
146
  ?>
147
  </div><br/>
148
 
149
  <?php endif; ?>
150
 
151
  <i class="fa fa-question-circle"
152
- data-tooltip-title="<?php _e("mysqldump", 'duplicator'); ?>"
153
- data-tooltip="<?php _e('An optional path to the mysqldump program. Add a custom path if the path to mysqldump is not properly detected or needs to be changed. For all paths including Windows use a forward slash.', 'duplicator'); ?>"></i>
154
  <label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
155
  <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?>" placeholder="<?php _e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
156
  <br/><br/>
157
  </div>
158
 
159
  <?php endif; ?>
160
 
161
  <!-- PHP MODE -->
162
- <input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
163
- <label for="package_phpdump"><?php _e("Use PHP Code", 'duplicator'); ?></label> &nbsp;
 
 
 
 
 
164
 
165
  <div style="margin:5px 0px 0px 25px">
166
  <i class="fa fa-question-circle"
@@ -170,7 +194,7 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
170
  <select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
171
  <?php
172
  foreach($phpdump_chunkopts as $value) {
173
- $selected = ( $package_phpdump_qrylimit == $value ? "selected='selected'" : '' );
174
  echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
175
  }
176
  ?>
9
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
10
 
11
  //Nonce Check
12
+ if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' )) {
 
13
  die('Invalid token permissions to perform this request.');
14
  }
15
 
16
  //Package
17
+ $mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
18
+ $mysqldump_exe_file = isset($_POST['package_mysqldump_path']) ? trim(esc_sql(strip_tags($_POST['package_mysqldump_path']))) : null;
19
+ $mysqldump_path_valid = is_file($mysqldump_exe_file) ? true : false;
20
+
21
+ DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
22
  DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
23
+ DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
24
  DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
25
+ if ($mysqldump_path_valid) {
26
+ $mysqldump_exe_file = DUP_Util::isWindows() ? realpath($mysqldump_exe_file) : $mysqldump_exe_file;
27
+ DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
28
+ }
29
  DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
30
+
31
+ $action_updated = DUP_Settings::Save();
32
  DUP_Util::initSnapshotDirectory();
33
  }
34
 
35
  $package_zip_flush = DUP_Settings::Get('package_zip_flush');
36
  $phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
37
+ $phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
38
  $package_mysqldump = DUP_Settings::Get('package_mysqldump');
39
  $package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
40
  $package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
44
  ?>
45
 
46
  <style>
47
+ form#dup-settings-form input[type=text] {width:500px; }
48
+ div.dup-feature-found {padding:10px 0 5px 0; color:green;}
49
+ div.dup-feature-notfound {color:maroon; width:600px; line-height: 18px}
 
50
  select#package_ui_created {font-family: monospace}
51
  </style>
52
 
100
  <hr size="1" />
101
  <table class="form-table">
102
  <tr>
103
+ <th scope="row"><label><?php _e("SQL Script", 'duplicator'); ?></label></th>
104
  <td>
105
  <?php if (!DUP_Util::hasShellExec()) : ?>
106
  <input type="radio" disabled="true" />
107
+ <label><?php _e("Mysqldump", 'duplicator'); ?> <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i></label>
108
  <p class="description" style="width:550px; margin:5px 0 0 20px">
109
  <?php
110
  _e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
128
  </p>
129
  <?php else : ?>
130
  <input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
131
+ <label for="package_mysqldump"><?php _e("Mysqldump", 'duplicator'); ?></label>
132
  <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i> <br/>
133
 
134
  <div style="margin:5px 0px 0px 25px">
135
  <?php if ($mysqlDumpFound) : ?>
136
  <div class="dup-feature-found">
137
+ <i class="fa fa-check-circle"></i>
138
+ <?php _e("Successfully Found:", 'duplicator'); ?> &nbsp;
139
  <i><?php echo $mysqlDumpPath ?></i>
140
  </div><br/>
141
  <?php else : ?>
142
  <div class="dup-feature-notfound">
143
+ <i class="fa fa-exclamation-triangle"></i>
144
  <?php
145
+ _e('Mysqldump was not found at its default location or the location provided. Please enter a custom path to a valid location where mysqldump can run. '
146
+ . 'If the problem persist contact your host or server administrator. ', 'duplicator');
147
+
 
 
148
  printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
149
  __("See the", 'duplicator'),
150
  __("host list", 'duplicator'),
151
+ __("for reliable access to mysqldump.", 'duplicator'));
152
+
153
  ?>
154
  </div><br/>
155
 
156
  <?php endif; ?>
157
 
158
  <i class="fa fa-question-circle"
159
+ data-tooltip-title="<?php _e("mysqldump path:", 'duplicator'); ?>"
160
+ data-tooltip="<?php _e('An optional path to the mysqldump program. Add a custom path if the path to mysqldump is not properly detected or needs to be changed.', 'duplicator'); ?>"></i>
161
  <label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
162
  <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?>" placeholder="<?php _e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
163
+ <div class="dup-feature-notfound">
164
+ <?php
165
+ if ($action_updated && $mysqldump_path_valid === false) {
166
+ $mysqldump_path = DUP_Util::isWindows() ? stripslashes($_POST['package_mysqldump_path']) : $_POST['package_mysqldump_path'];
167
+ if (strlen($mysqldump_path)) {
168
+ _e('<i class="fa fa-exclamation-triangle"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
169
+ $mysqldump_path = esc_html($mysqldump_path);
170
+ echo "'{$mysqldump_path}'";
171
+ }
172
+ }
173
+ ?>
174
+ </div>
175
  <br/><br/>
176
  </div>
177
 
178
  <?php endif; ?>
179
 
180
  <!-- PHP MODE -->
181
+ <?php if (! $mysqlDumpFound) : ?>
182
+ <input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
183
+ <?php else : ?>
184
+ <input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
185
+ <?php endif; ?>
186
+
187
+ <label for="package_phpdump"><?php _e("PHP Code", 'duplicator'); ?></label> &nbsp;
188
 
189
  <div style="margin:5px 0px 0px 25px">
190
  <i class="fa fa-question-circle"
194
  <select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
195
  <?php
196
  foreach($phpdump_chunkopts as $value) {
197
+ $selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
198
  echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
199
  }
200
  ?>