Duplicator – WordPress Migration Plugin - Version 1.2.32

Version Description

Download this release

Release Info

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

Code changes from version 1.2.30 to 1.2.32

assets/css/style.css CHANGED
@@ -1,69 +1,78 @@
1
- /* ================================================
2
- * DUPLICATOR STYLE
3
- * Common elements shared across the duplicator plugin
4
- * ================================================ */
5
-
6
- /*Global Elements*/
7
- input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
8
- input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
9
- fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
10
- label {font-size:13px}
11
- .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
12
- hr {border:0; border-top:1px solid #ddd; border-bottom:1px solid #fafafa; margin:10px 0px 2px 0px;}
13
- i[data-tooltip].fa-question-circle {cursor:pointer; color:#C3C3C3}
14
- i[data-tooltip].fa-lightbulb-o {cursor:pointer; color:gray}
15
-
16
- /*TABS*/
17
- ul.category-tabs li {cursor: pointer}
18
-
19
- /*BOXES: Expandable sections */
20
- div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
21
- div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; color:#000 }
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);}
29
- div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; color:#000; }
30
- div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
31
-
32
- /*INFO-BOX:Simple box with no title */
33
- div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
34
- div.dup-info-box small {margin-top:10px; display:block}
35
-
36
- /*PACKAGE:Progress Boxes */
37
- div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px; color:#000;}
38
- div#dup-progress-bar-area h2 {margin-bottom:15px}
39
-
40
- /*HEADER MESSAGES*/
41
- div.dup-hdr-success {color:green; font-size:22px; font-weight:bold}
42
- div.dup-hdr-error {color:#A62426; font-size:22px; font-weight:bold}
43
-
44
- /*DIALOGS: THICKBOX */
45
- #TB_title { padding-bottom: 3px!important; margin-bottom:5px!important; font-size:16px!important;}
46
- div.dup-dlg-alert-txt {padding:10px 0; font-size:16px}
47
- div.dup-dlg-alert-btns {position:absolute; bottom:20px; right:20px;}
48
- div.dup-dlg-confirm-txt {padding:10px 0; font-size:16px}
49
- div.dup-dlg-confirm-btns {position:absolute; bottom:20px; right:20px;}
50
- div.dup-dlg-confirm-progress {display:none}
51
-
52
- /*ADMIN: NOTICES */
53
- div#dup-global-error-reserved-files p {font-size:14px}
54
- div#dup-global-error-reserved-files b.pass-msg {color:green; font-size:20px}
55
- div#dup-global-error-reserved-files p.pass-lnks {line-height:24px; margin:-7px 0 0 5px}
56
- div#dup-global-error-reserved-files div.pass-msg {padding:5px 0 0 10px; font-size:11px; color:#999; font-style: italic}
57
- div.dup-wpnotice-box {display:none;}
58
-
59
- /*================================================
60
- PARSLEY:Overrides*/
61
- input.parsley-error, textarea.parsley-error {
62
- color:#B94A48 !important;
63
- background-color:#F2DEDE !important;
64
- border:1px solid #EED3D7 !important;
65
- }
66
- div.qtip-content {line-height:16px}
67
- ul.parsley-error-list {margin:1px 0px -7px 0px}
68
- div.notice-safemode {color: maroon;}
69
- div.cleanup-notice b.title {color: green;font-size: 20px;}
 
 
 
 
 
 
 
 
 
1
+ /* ================================================
2
+ * DUPLICATOR STYLE
3
+ * Common elements shared across the duplicator plugin
4
+ * ================================================ */
5
+
6
+ /*Global Elements*/
7
+ input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
8
+ input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
9
+ fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
10
+ label {font-size:13px}
11
+ .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
12
+ hr {border:0; border-top:1px solid #ddd; border-bottom:1px solid #fafafa; margin:10px 0px 2px 0px;}
13
+ i[data-tooltip].fa-question-circle {cursor:pointer; color:#C3C3C3}
14
+ 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
+
20
+ /*TABS*/
21
+ ul.category-tabs li {cursor: pointer}
22
+
23
+ /*BOXES: Expandable sections */
24
+ div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
25
+ div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; color:#000 }
26
+ div.dup-box-title:hover {background-color: #FCFCFC;}
27
+ 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}
28
+ div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
29
+ div.dup-redirect {font-size:16px; font-weight: bold; padding: 10px}
30
+
31
+ /*PANELS: Boxes that do not exapand */
32
+ div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
33
+ div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; color:#000; }
34
+ div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
35
+
36
+ /*INFO-BOX:Simple box with no title */
37
+ div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
38
+ div.dup-info-box small {margin-top:10px; display:block}
39
+
40
+ /*PACKAGE:Progress Boxes */
41
+ div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px; color:#000;}
42
+ div#dup-progress-bar-area h2 {margin-bottom:15px}
43
+
44
+ /*HEADER MESSAGES*/
45
+ div.dup-hdr-success {color:green; font-size:22px; font-weight:bold}
46
+ div.dup-hdr-error {color:#A62426; font-size:22px; font-weight:bold}
47
+
48
+ /*DIALOGS: THICKBOX */
49
+ #TB_title { padding-bottom: 3px!important; margin-bottom:5px!important; font-size:16px!important;}
50
+ div.dup-dlg-alert-txt {padding:10px 0; font-size:16px}
51
+ div.dup-dlg-alert-btns {position:absolute; bottom:20px; right:20px;}
52
+ div.dup-dlg-confirm-txt {padding:10px 0; font-size:16px}
53
+ div.dup-dlg-confirm-btns {position:absolute; bottom:20px; right:20px;}
54
+ div.dup-dlg-confirm-progress {display:none}
55
+
56
+ /*ADMIN: NOTICES */
57
+ div#dup-global-error-reserved-files p {font-size:14px}
58
+ div#dup-global-error-reserved-files b.pass-msg {color:green; font-size:20px}
59
+ div#dup-global-error-reserved-files p.pass-lnks {line-height:24px; margin:-7px 0 0 5px}
60
+ div#dup-global-error-reserved-files div.pass-msg {padding:5px 0 0 10px; font-size:11px; color:#999; font-style: italic}
61
+ div.dup-wpnotice-box {display:none;}
62
+
63
+ /*================================================
64
+ PARSLEY:Overrides*/
65
+ input.parsley-error, textarea.parsley-error {
66
+ color:#B94A48 !important;
67
+ background-color:#F2DEDE !important;
68
+ border:1px solid #EED3D7 !important;
69
+ }
70
+ div.qtip-content {line-height:16px}
71
+ ul.parsley-error-list {margin:1px 0px -7px 0px}
72
+ div.notice-safemode {color: maroon;}
73
+ div.cleanup-notice b.title {color: green;font-size: 20px;}
74
+
75
+ /*SCREEN TABS*/
76
+ div.dup-screen-hlp-info {line-height:26px; padding:10px 0 10px 0}
77
+ #screen-meta-links .button { font-size:13px !important; height:auto !important;font-weight: normal; padding: 3px 6px 3px 16px !important;min-width:72px !important}
78
+
classes/ui/class.ui.dialog.php CHANGED
@@ -1,197 +1,205 @@
1
- <?php
2
- /**
3
- * Used to generate a thinkbox inline dialog such as an alert or confirm popup
4
- *
5
- * Standard: PSR-2
6
- * @link http://www.php-fig.org/psr/psr-2
7
- *
8
- * @package Duplicator
9
- * @subpackage classes/ui
10
- * @copyright (c) 2017, Snapcreek LLC
11
- * @since 1.1.32
12
- *
13
- */
14
-
15
- // Exit if accessed directly
16
- if (!defined('DUPLICATOR_VERSION')) {
17
- exit;
18
- }
19
-
20
- class DUP_UI_Dialog
21
- {
22
- /**
23
- * The title that shows up in the dialog
24
- */
25
- public $title;
26
-
27
- /**
28
- * The message displayed in the body of the dialog
29
- */
30
- public $message;
31
-
32
- /**
33
- * The width of the dialog the default is used if not set
34
- * Alert = 475px (default) | Confirm = 500px (default)
35
- */
36
- public $width;
37
-
38
- /**
39
- * The height of the dialog the default is used if not set
40
- * Alert = 125px (default) | Confirm = 150px (default)
41
- */
42
- public $height;
43
-
44
- /**
45
- * When the progress meter is running show this text
46
- * Available only on confirm dialogs
47
- */
48
- public $progressText;
49
-
50
- /**
51
- * When true a progress meter will run until page is reloaded
52
- * Available only on confirm dialogs
53
- */
54
- public $progressOn = true;
55
-
56
- /**
57
- * The javascript call back method to call when the 'Yes' button is clicked
58
- * Available only on confirm dialogs
59
- */
60
- public $jscallback;
61
-
62
- /**
63
- * The id given to the full dialog
64
- */
65
- private $id;
66
-
67
- /**
68
- * A unique id that is added to all id elements
69
- */
70
- private $uniqid;
71
-
72
- /**
73
- * Init this object when created
74
- */
75
- public function __construct()
76
- {
77
- add_thickbox();
78
- $this->progressText = __('Processing please wait...', 'duplicator');
79
- $this->uniqid = substr(uniqid('',true),0,14) . rand();
80
- $this->id = 'dup-dlg-'.$this->uniqid;
81
- }
82
-
83
- /**
84
- * Gets the unique id that is assigned to each instance of a dialog
85
- *
86
- * @return int The unique ID of this dialog
87
- */
88
- public function getID()
89
- {
90
- return $this->id;
91
- }
92
-
93
- /**
94
- * Gets the unique id that is assigned to each instance of a dialogs message text
95
- *
96
- * @return int The unique ID of the message
97
- */
98
- public function getMessageID()
99
- {
100
- return "{$this->id}_message";
101
- }
102
-
103
- /**
104
- * Initilizes the alert base html code used to display when needed
105
- *
106
- * @return string The html content used for the alert dialog
107
- */
108
- public function initAlert()
109
- {
110
- $ok = __('OK', 'duplicator');
111
-
112
- $html = <<<HTML
113
- <div id="{$this->id}" style="display:none">
114
- <div class="dup-dlg-alert-txt">
115
- {$this->message}
116
- <br/><br/>
117
- </div>
118
- <div class="dup-dlg-alert-btns">
119
- <input type="button" class="button button-large" value="{$ok}" onclick="tb_remove()" />
120
- </div>
121
- </div>
122
- HTML;
123
-
124
- echo $html;
125
- }
126
-
127
- /**
128
- * Shows the alert base js code used to display when needed
129
- *
130
- * @return string The javascript content used for the alert dialog
131
- */
132
- public function showAlert()
133
- {
134
- $this->width = is_numeric($this->width) ? $this->width : 475;
135
- $this->height = is_numeric($this->height) ? $this->height : 125;
136
-
137
- echo "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');";
138
- }
139
-
140
- /**
141
- * Shows the confirm base js code used to display when needed
142
- *
143
- * @return string The javascript content used for the confirm dialog
144
- */
145
- public function initConfirm()
146
- {
147
- $ok = __('OK', 'duplicator');
148
- $cancel = __('Cancel', 'duplicator');
149
-
150
- $progress_data = '';
151
- $progress_func2 = '';
152
-
153
- //Enable the progress spinner
154
- if ($this->progressOn) {
155
- $progress_func1 = "__DUP_UI_Dialog_".$this->uniqid;
156
- $progress_func2 = ";{$progress_func1}(this)";
157
- $progress_data = <<<HTML
158
- <div class='dup-dlg-confirm-progress'><i class='fa fa-circle-o-notch fa-spin fa-lg fa-fw'></i> {$this->progressText}</div>
159
- <script>
160
- function {$progress_func1}(obj)
161
- {
162
- jQuery(obj).parent().parent().find('.dup-dlg-confirm-progress').show();
163
- jQuery(obj).closest('.dup-dlg-confirm-btns').find('input').attr('disabled', 'true');
164
- }
165
- </script>
166
- HTML;
167
- }
168
-
169
- $html = <<<HTML
170
- <div id="{$this->id}" style="display:none">
171
- <div class="dup-dlg-confirm-txt">
172
- <span id="{$this->id}_message">{$this->message}</span>
173
- <br/><br/>
174
- {$progress_data}
175
- </div>
176
- <div class="dup-dlg-confirm-btns">
177
- <input type="button" class="button button-large" value="{$ok}" onclick="{$this->jscallback}{$progress_func2}" />
178
- <input type="button" class="button button-large" value="{$cancel}" onclick="tb_remove()" />
179
- </div>
180
- </div>
181
- HTML;
182
-
183
- echo $html;
184
- }
185
-
186
- /**
187
- * Shows the confirm base js code used to display when needed
188
- *
189
- * @return string The javascript content used for the confirm dialog
190
- */
191
- public function showConfirm()
192
- {
193
- $this->width = is_numeric($this->width) ? $this->width : 500;
194
- $this->height = is_numeric($this->height) ? $this->height : 150;
195
- echo "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');";
196
- }
 
 
 
 
 
 
 
 
197
  }
1
+ <?php
2
+ /**
3
+ * Used to generate a thinkbox inline dialog such as an alert or confirm popup
4
+ *
5
+ * Standard: PSR-2
6
+ * @link http://www.php-fig.org/psr/psr-2
7
+ *
8
+ * @package Duplicator
9
+ * @subpackage classes/ui
10
+ * @copyright (c) 2017, Snapcreek LLC
11
+ * @since 1.1.32
12
+ *
13
+ */
14
+
15
+ // Exit if accessed directly
16
+ if (!defined('DUPLICATOR_VERSION')) {
17
+ exit;
18
+ }
19
+
20
+ class DUP_UI_Dialog
21
+ {
22
+ /**
23
+ * The title that shows up in the dialog
24
+ */
25
+ public $title;
26
+
27
+ /**
28
+ * The message displayed in the body of the dialog
29
+ */
30
+ public $message;
31
+
32
+ /**
33
+ * The width of the dialog the default is used if not set
34
+ * Alert = 475px (default) | Confirm = 500px (default)
35
+ */
36
+ public $width;
37
+
38
+ /**
39
+ * The height of the dialog the default is used if not set
40
+ * Alert = 125px (default) | Confirm = 150px (default)
41
+ */
42
+ public $height;
43
+
44
+ /**
45
+ * When the progress meter is running show this text
46
+ * Available only on confirm dialogs
47
+ */
48
+ public $progressText;
49
+
50
+ /**
51
+ * When true a progress meter will run until page is reloaded
52
+ * Available only on confirm dialogs
53
+ */
54
+ public $progressOn = true;
55
+
56
+ /**
57
+ * The javascript call back method to call when the 'Yes' button is clicked
58
+ * Available only on confirm dialogs
59
+ */
60
+ public $jscallback;
61
+
62
+ /**
63
+ * The id given to the full dialog
64
+ */
65
+ private $id;
66
+
67
+ /**
68
+ * A unique id that is added to all id elements
69
+ */
70
+ private $uniqid;
71
+
72
+ /**
73
+ * Init this object when created
74
+ */
75
+ public function __construct()
76
+ {
77
+ add_thickbox();
78
+ $this->progressText = __('Processing please wait...', 'duplicator');
79
+ $this->uniqid = substr(uniqid('',true),0,14) . rand();
80
+ $this->id = 'dup-dlg-'.$this->uniqid;
81
+ }
82
+
83
+ /**
84
+ * Gets the unique id that is assigned to each instance of a dialog
85
+ *
86
+ * @return int The unique ID of this dialog
87
+ */
88
+ public function getID()
89
+ {
90
+ return $this->id;
91
+ }
92
+
93
+ /**
94
+ * Gets the unique id that is assigned to each instance of a dialogs message text
95
+ *
96
+ * @return int The unique ID of the message
97
+ */
98
+ public function getMessageID()
99
+ {
100
+ return "{$this->id}_message";
101
+ }
102
+
103
+ /**
104
+ * Initialize the alert base html code used to display when needed
105
+ *
106
+ * @return string The html content used for the alert dialog
107
+ */
108
+ public function initAlert()
109
+ {
110
+ $ok = __('OK', 'duplicator');
111
+
112
+ $html = <<<HTML
113
+ <div id="{$this->id}" style="display:none">
114
+ <div class="dup-dlg-alert-txt">
115
+ {$this->message}
116
+ <br/><br/>
117
+ </div>
118
+ <div class="dup-dlg-alert-btns">
119
+ <input type="button" class="button button-large" value="{$ok}" onclick="tb_remove()" />
120
+ </div>
121
+ </div>
122
+ HTML;
123
+
124
+ echo $html;
125
+ }
126
+
127
+ /**
128
+ * Shows the alert base js code used to display when needed
129
+ *
130
+ * @return string The javascript content used for the alert dialog
131
+ */
132
+ public function showAlert()
133
+ {
134
+ $this->width = is_numeric($this->width) ? $this->width : 500;
135
+ $this->height = is_numeric($this->height) ? $this->height : 175;
136
+
137
+ $html = "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');\n" .
138
+ "var styleData = jQuery('#TB_window').attr('style') + 'height: {$this->height}px !important';\n" .
139
+ "jQuery('#TB_window').attr('style', styleData);";
140
+
141
+ echo $html;
142
+ }
143
+
144
+ /**
145
+ * Shows the confirm base js code used to display when needed
146
+ *
147
+ * @return string The javascript content used for the confirm dialog
148
+ */
149
+ public function initConfirm()
150
+ {
151
+ $ok = __('OK', 'duplicator');
152
+ $cancel = __('Cancel', 'duplicator');
153
+
154
+ $progress_data = '';
155
+ $progress_func2 = '';
156
+
157
+ //Enable the progress spinner
158
+ if ($this->progressOn) {
159
+ $progress_func1 = "__DUP_UI_Dialog_".$this->uniqid;
160
+ $progress_func2 = ";{$progress_func1}(this)";
161
+ $progress_data = <<<HTML
162
+ <div class='dup-dlg-confirm-progress'><i class='fa fa-circle-o-notch fa-spin fa-lg fa-fw'></i> {$this->progressText}</div>
163
+ <script>
164
+ function {$progress_func1}(obj)
165
+ {
166
+ jQuery(obj).parent().parent().find('.dup-dlg-confirm-progress').show();
167
+ jQuery(obj).closest('.dup-dlg-confirm-btns').find('input').attr('disabled', 'true');
168
+ }
169
+ </script>
170
+ HTML;
171
+ }
172
+
173
+ $html = <<<HTML
174
+ <div id="{$this->id}" style="display:none">
175
+ <div class="dup-dlg-confirm-txt">
176
+ <span id="{$this->id}_message">{$this->message}</span>
177
+ <br/><br/>
178
+ {$progress_data}
179
+ </div>
180
+ <div class="dup-dlg-confirm-btns">
181
+ <input type="button" class="button button-large" value="{$ok}" onclick="{$this->jscallback}{$progress_func2}" />
182
+ <input type="button" class="button button-large" value="{$cancel}" onclick="tb_remove()" />
183
+ </div>
184
+ </div>
185
+ HTML;
186
+
187
+ echo $html;
188
+ }
189
+
190
+ /**
191
+ * Shows the confirm base js code used to display when needed
192
+ *
193
+ * @return string The javascript content used for the confirm dialog
194
+ */
195
+ public function showConfirm()
196
+ {
197
+ $this->width = is_numeric($this->width) ? $this->width : 500;
198
+ $this->height = is_numeric($this->height) ? $this->height : 225;
199
+ $html = "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');\n" .
200
+ "var styleData = jQuery('#TB_window').attr('style') + 'height: {$this->height}px !important';\n" .
201
+ "jQuery('#TB_window').attr('style', styleData);";
202
+
203
+ echo $html;
204
+ }
205
  }
classes/ui/class.ui.screen.base.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined("ABSPATH") or die("");
3
+
4
+ /**
5
+ * The base class for all screen.php files. This class is used to control items that are common
6
+ * among all screens, namely the Help tab and Screen Options drop down items. When creating a
7
+ * screen object please extent this class.
8
+ *
9
+ * Standard: PSR-2
10
+ * @link http://www.php-fig.org/psr/psr-2
11
+ *
12
+ * @package Duplicator
13
+ * @subpackage classes/ui
14
+ * @copyright (c) 2017, Snapcreek LLC
15
+ * @since 1.1.0
16
+ *
17
+ */
18
+ class DUP_UI_Screen
19
+ {
20
+ /**
21
+ * Used as a placeholder for the current screen object
22
+ */
23
+ public $screen;
24
+
25
+ /**
26
+ * Init this object when created
27
+ */
28
+ public function __construct()
29
+ {
30
+
31
+ }
32
+
33
+ /**
34
+ * Get the help support tab view content shown in the help system
35
+ *
36
+ * @param string $guide The target URL to navigate to on the online user guide
37
+ * @param string $faq The target URL to navigate to on the online user tech FAQ
38
+ *
39
+ * @return null
40
+ */
41
+ public function getSupportTab($guide, $faq)
42
+ {
43
+ $content = __("<b>Need Help?</b> Please check out these resources first:"
44
+ ."<ul>"
45
+ ."<li><a href='https://snapcreek.com/duplicator/docs/guide{$guide}' target='_sc-faq'>Full Online User Guide</a></li>"
46
+ ."<li><a href='https://snapcreek.com/duplicator/docs/faqs-tech{$faq}' target='_sc-faq'>Frequently Asked Questions</a></li>"
47
+ ."</ul>", 'duplicator');
48
+
49
+ $this->screen->add_help_tab(array(
50
+ 'id' => 'dup_help_tab_callback',
51
+ 'title' => __('Support', 'duplicator'),
52
+ 'content' => "<p>{$content}</p>"
53
+ )
54
+ );
55
+ }
56
+
57
+ /**
58
+ * Get the help support side bar found in the right most part of the help system
59
+ *
60
+ * @return null
61
+ */
62
+ public function getHelpSidbar()
63
+ {
64
+ $txt_title = __("Resources", 'duplicator');
65
+ $txt_home = __("Knowledge Base", 'duplicator');
66
+ $txt_guide = __("Full User Guide", 'duplicator');
67
+ $txt_faq = __("Technical FAQs", 'duplicator');
68
+ $txt_sets = __("Package Settings", 'duplicator');
69
+ $this->screen->set_help_sidebar(
70
+ "<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>"
71
+ ."<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>"
72
+ ."<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>"
73
+ ."<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>"
74
+ ."<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>"
75
+ );
76
+ }
77
+ }
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.30');
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.32');
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
@@ -1,346 +1,348 @@
1
- <?php
2
- /** ===============================================================================
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.30
7
- Author: Snap Creek
8
- Author URI: http://www.snapcreek.com/duplicator/
9
- Text Domain: duplicator
10
- License: GPLv2 or later
11
-
12
- Copyright 2011-2017 SnapCreek LLC
13
-
14
- This program is free software; you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License, version 2, as
16
- published by the Free Software Foundation.
17
-
18
- This program is distributed in the hope that it will be useful,
19
- but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- GNU General Public License for more details.
22
-
23
- You should have received a copy of the GNU General Public License
24
- along with this program; if not, write to the Free Software
25
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
-
27
- SOURCE CONTRIBUTORS:
28
- David Coveney of Interconnect IT Ltd
29
- https://github.com/interconnectit/Search-Replace-DB/
30
- ================================================================================ */
31
-
32
- require_once("define.php");
33
-
34
- if (is_admin() == true)
35
- {
36
- //Classes
37
- require_once 'classes/class.logging.php';
38
- require_once 'classes/class.settings.php';
39
- require_once 'classes/utilities/class.u.php';
40
- require_once 'classes/class.db.php';
41
- require_once 'classes/class.server.php';
42
- require_once 'classes/ui/class.ui.viewstate.php';
43
- require_once 'classes/ui/class.ui.notice.php';
44
- require_once 'classes/package/class.pack.php';
45
-
46
- //Controllers
47
- require_once 'ctrls/ctrl.package.php';
48
- require_once 'ctrls/ctrl.tools.php';
49
- require_once 'ctrls/ctrl.ui.php';
50
-
51
- /** ========================================================
52
- * ACTIVATE/DEACTIVE/UPDATE HOOKS
53
- * ===================================================== */
54
- register_activation_hook(__FILE__, 'duplicator_activate');
55
- register_deactivation_hook(__FILE__, 'duplicator_deactivate');
56
-
57
- /**
58
- * Hooked into `register_activation_hook`. Routines used to activate the plugin
59
- *
60
- * @access global
61
- * @return null
62
- */
63
- function duplicator_activate()
64
- {
65
- global $wpdb;
66
-
67
- //Only update database on version update
68
- if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin"))
69
- {
70
- $table_name = $wpdb->prefix . "duplicator_packages";
71
-
72
- //PRIMARY KEY must have 2 spaces before for dbDelta to work
73
- //see: https://codex.wordpress.org/Creating_Tables_with_Plugins
74
- $sql = "CREATE TABLE `{$table_name}` (
75
- id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
76
- name VARCHAR(250) NOT NULL,
77
- hash VARCHAR(50) NOT NULL,
78
- status INT(11) NOT NULL,
79
- created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
80
- owner VARCHAR(60) NOT NULL,
81
- package MEDIUMBLOB NOT NULL,
82
- PRIMARY KEY (id),
83
- KEY hash (hash))";
84
-
85
- require_once(DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php');
86
- @dbDelta($sql);
87
- }
88
-
89
- //WordPress Options Hooks
90
- update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
91
-
92
- //Setup All Directories
93
- DUP_Util::initSnapshotDirectory();
94
- }
95
-
96
- /**
97
- * Hooked into `plugins_loaded`. Routines used to update the plugin
98
- *
99
- * @access global
100
- * @return null
101
- */
102
- function duplicator_update()
103
- {
104
- if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
105
- duplicator_activate();
106
- }
107
- load_plugin_textdomain( 'duplicator' );
108
- }
109
-
110
- /**
111
- * Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
112
- * For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
113
- *
114
- * @access global
115
- * @return null
116
- */
117
- function duplicator_deactivate()
118
- {
119
- //Logic has been added to uninstall.php
120
- }
121
-
122
- /** ========================================================
123
- * ACTION HOOKS
124
- * ===================================================== */
125
- add_action('plugins_loaded', 'duplicator_update');
126
- add_action('plugins_loaded', 'duplicator_wpfront_integrate');
127
- add_action('admin_init', 'duplicator_init');
128
- add_action('admin_menu', 'duplicator_menu');
129
- add_action('admin_notices', array('DUP_UI_Notice', 'showReservedFilesNotice'));
130
-
131
- //CTRL ACTIONS
132
- add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
133
- add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
134
- add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
135
- $GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
136
- $GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
137
- $GLOBALS['CTRLS_DUP_CTRL_Package'] = new DUP_CTRL_Package();
138
-
139
- /**
140
- * User role editor integration
141
- *
142
- * @access global
143
- * @return null
144
- */
145
- function duplicator_wpfront_integrate()
146
- {
147
- if (DUP_Settings::Get('wpfront_integrate')) {
148
- do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
149
- }
150
- }
151
-
152
- /**
153
- * Hooked into `admin_init`. Init routines for all admin pages
154
- *
155
- * @access global
156
- * @return null
157
- */
158
- function duplicator_init()
159
- {
160
- /* CSS */
161
- wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
162
- wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
163
- wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
164
- wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
165
- /* JS */
166
- wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
167
- wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
168
- wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
169
- }
170
-
171
- /**
172
- * Redirects the clicked menu item to the correct location
173
- *
174
- * @access global
175
- * @return null
176
- */
177
- function duplicator_get_menu()
178
- {
179
- $current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
180
- switch ($current_page)
181
- {
182
- case 'duplicator': include('views/packages/controller.php'); break;
183
- case 'duplicator-settings': include('views/settings/controller.php'); break;
184
- case 'duplicator-tools': include('views/tools/controller.php'); break;
185
- case 'duplicator-debug': include('debug/main.php'); break;
186
- case 'duplicator-gopro': include('views/help/gopro.php'); break;
187
- }
188
- }
189
-
190
- /**
191
- * Hooked into `admin_menu`. Loads all of the wp left nav admin menus for Duplicator
192
- *
193
- * @access global
194
- * @return null
195
- */
196
- function duplicator_menu()
197
- {
198
- $wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
199
- $icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
200
-
201
- //Main Menu
202
- $perms = 'export';
203
- $perms = apply_filters($wpfront_caps_translator, $perms);
204
- $main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', $icon_svg);
205
- //$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/logo-menu.svg'));
206
-
207
- $perms = 'export';
208
- $perms = apply_filters($wpfront_caps_translator, $perms);
209
- $lang_txt = __('Packages', 'duplicator');
210
- $page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
211
-
212
- $perms = 'manage_options';
213
- $perms = apply_filters($wpfront_caps_translator, $perms);
214
- $lang_txt = __('Tools', 'duplicator');
215
- $page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
216
-
217
- $perms = 'manage_options';
218
- $perms = apply_filters($wpfront_caps_translator, $perms);
219
- $lang_txt = __('Settings', 'duplicator');
220
- $page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
221
-
222
- $perms = 'manage_options';
223
- $lang_txt = __('Go Pro!', 'duplicator');
224
- $go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
225
- $perms = apply_filters($wpfront_caps_translator, $perms);
226
- $page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
227
-
228
- $package_debug = DUP_Settings::Get('package_debug');
229
- if ($package_debug != null && $package_debug == true)
230
- {
231
- $perms = 'manage_options';
232
- $perms = apply_filters($wpfront_caps_translator, $perms);
233
- $lang_txt = __('Debug', 'duplicator');
234
- $page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
235
- add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
236
- add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
237
- }
238
-
239
- //Apply Scripts
240
- add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
241
- add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
242
- add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
243
- add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
244
-
245
- //Apply Styles
246
- add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
247
- add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
248
- add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
249
- add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
250
-
251
- }
252
-
253
- /**
254
- * Loads all required javascript libs/source for DupPro
255
- *
256
- * @access global
257
- * @return null
258
- */
259
- function duplicator_scripts()
260
- {
261
- wp_enqueue_script('jquery');
262
- wp_enqueue_script('jquery-ui-core');
263
- wp_enqueue_script('jquery-ui-progressbar');
264
- wp_enqueue_script('dup-parsley');
265
- wp_enqueue_script('dup-jquery-qtip');
266
-
267
- }
268
-
269
- /**
270
- * Loads all CSS style libs/source for DupPro
271
- *
272
- * @access global
273
- * @return null
274
- */
275
- function duplicator_styles()
276
- {
277
- wp_enqueue_style('dup-jquery-ui');
278
- wp_enqueue_style('dup-font-awesome');
279
- wp_enqueue_style('dup-plugin-style');
280
- wp_enqueue_style('dup-jquery-qtip');
281
- }
282
-
283
-
284
- /** ========================================================
285
- * FILTERS
286
- * ===================================================== */
287
- add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
288
- add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
289
-
290
- /**
291
- * Adds the manage link in the plugins list
292
- *
293
- * @access global
294
- * @return string The manage link in the plugins list
295
- */
296
- function duplicator_manage_link($links, $file)
297
- {
298
- static $this_plugin;
299
- if (!$this_plugin)
300
- $this_plugin = plugin_basename(__FILE__);
301
-
302
- if ($file == $this_plugin) {
303
- $settings_link = '<a href="admin.php?page=duplicator">' . __("Manage", 'duplicator') . '</a>';
304
- array_unshift($links, $settings_link);
305
- }
306
- return $links;
307
- }
308
-
309
- /**
310
- * Adds links to the plugins manager page
311
- *
312
- * @access global
313
- * @return string The meta help link data for the plugins manager
314
- */
315
- function duplicator_meta_links($links, $file)
316
- {
317
- $plugin = plugin_basename(__FILE__);
318
- // create link
319
- if ($file == $plugin) {
320
- $links[] = '<a href="admin.php?page=duplicator-gopro" title="' . __('Get Help', 'duplicator') . '" style="">' . __('Go Pro', 'duplicator') . '</a>';
321
- return $links;
322
- }
323
- return $links;
324
- }
325
-
326
-
327
- /** ========================================================
328
- * GENERAL
329
- * ===================================================== */
330
-
331
- /**
332
- * Used for installer files to redirect if accessed directly
333
- *
334
- * @access global
335
- * @return null
336
- */
337
- function duplicator_secure_check()
338
- {
339
- $baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
340
- header("HTTP/1.1 301 Moved Permanently");
341
- header("Location: $baseURL");
342
- exit;
343
- }
344
-
345
- }
 
 
346
  ?>
1
+ <?php
2
+ /** ===============================================================================
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.32
7
+ Author: Snap Creek
8
+ Author URI: http://www.snapcreek.com/duplicator/
9
+ Text Domain: duplicator
10
+ License: GPLv2 or later
11
+
12
+ Copyright 2011-2017 SnapCreek LLC
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License, version 2, as
16
+ published by the Free Software Foundation.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+
27
+ SOURCE CONTRIBUTORS:
28
+ David Coveney of Interconnect IT Ltd
29
+ https://github.com/interconnectit/Search-Replace-DB/
30
+ ================================================================================ */
31
+
32
+ require_once("define.php");
33
+
34
+ if (is_admin() == true)
35
+ {
36
+ //Classes
37
+ require_once 'classes/class.logging.php';
38
+ require_once 'classes/class.settings.php';
39
+ require_once 'classes/utilities/class.u.php';
40
+ require_once 'classes/class.db.php';
41
+ require_once 'classes/class.server.php';
42
+ require_once 'classes/ui/class.ui.viewstate.php';
43
+ require_once 'classes/ui/class.ui.notice.php';
44
+ require_once 'classes/package/class.pack.php';
45
+ require_once 'views/packages/screen.php';
46
+
47
+ //Controllers
48
+ require_once 'ctrls/ctrl.package.php';
49
+ require_once 'ctrls/ctrl.tools.php';
50
+ require_once 'ctrls/ctrl.ui.php';
51
+
52
+ /** ========================================================
53
+ * ACTIVATE/DEACTIVE/UPDATE HOOKS
54
+ * ===================================================== */
55
+ register_activation_hook(__FILE__, 'duplicator_activate');
56
+ register_deactivation_hook(__FILE__, 'duplicator_deactivate');
57
+
58
+ /**
59
+ * Hooked into `register_activation_hook`. Routines used to activate the plugin
60
+ *
61
+ * @access global
62
+ * @return null
63
+ */
64
+ function duplicator_activate()
65
+ {
66
+ global $wpdb;
67
+
68
+ //Only update database on version update
69
+ if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin"))
70
+ {
71
+ $table_name = $wpdb->prefix . "duplicator_packages";
72
+
73
+ //PRIMARY KEY must have 2 spaces before for dbDelta to work
74
+ //see: https://codex.wordpress.org/Creating_Tables_with_Plugins
75
+ $sql = "CREATE TABLE `{$table_name}` (
76
+ id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
77
+ name VARCHAR(250) NOT NULL,
78
+ hash VARCHAR(50) NOT NULL,
79
+ status INT(11) NOT NULL,
80
+ created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
81
+ owner VARCHAR(60) NOT NULL,
82
+ package MEDIUMBLOB NOT NULL,
83
+ PRIMARY KEY (id),
84
+ KEY hash (hash))";
85
+
86
+ require_once(DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php');
87
+ @dbDelta($sql);
88
+ }
89
+
90
+ //WordPress Options Hooks
91
+ update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
92
+
93
+ //Setup All Directories
94
+ DUP_Util::initSnapshotDirectory();
95
+ }
96
+
97
+ /**
98
+ * Hooked into `plugins_loaded`. Routines used to update the plugin
99
+ *
100
+ * @access global
101
+ * @return null
102
+ */
103
+ function duplicator_update()
104
+ {
105
+ if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
106
+ duplicator_activate();
107
+ }
108
+ load_plugin_textdomain( 'duplicator' );
109
+ }
110
+
111
+ /**
112
+ * Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
113
+ * For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
114
+ *
115
+ * @access global
116
+ * @return null
117
+ */
118
+ function duplicator_deactivate()
119
+ {
120
+ //Logic has been added to uninstall.php
121
+ }
122
+
123
+ /** ========================================================
124
+ * ACTION HOOKS
125
+ * ===================================================== */
126
+ add_action('plugins_loaded', 'duplicator_update');
127
+ add_action('plugins_loaded', 'duplicator_wpfront_integrate');
128
+ add_action('admin_init', 'duplicator_init');
129
+ add_action('admin_menu', 'duplicator_menu');
130
+ add_action('admin_notices', array('DUP_UI_Notice', 'showReservedFilesNotice'));
131
+
132
+ //CTRL ACTIONS
133
+ add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
134
+ add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
135
+ add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
136
+ $GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
137
+ $GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
138
+ $GLOBALS['CTRLS_DUP_CTRL_Package'] = new DUP_CTRL_Package();
139
+
140
+ /**
141
+ * User role editor integration
142
+ *
143
+ * @access global
144
+ * @return null
145
+ */
146
+ function duplicator_wpfront_integrate()
147
+ {
148
+ if (DUP_Settings::Get('wpfront_integrate')) {
149
+ do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Hooked into `admin_init`. Init routines for all admin pages
155
+ *
156
+ * @access global
157
+ * @return null
158
+ */
159
+ function duplicator_init()
160
+ {
161
+ /* CSS */
162
+ wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
163
+ wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
164
+ wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
165
+ wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
166
+ /* JS */
167
+ wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
168
+ wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
169
+ wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
170
+ }
171
+
172
+ /**
173
+ * Redirects the clicked menu item to the correct location
174
+ *
175
+ * @access global
176
+ * @return null
177
+ */
178
+ function duplicator_get_menu()
179
+ {
180
+ $current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
181
+ switch ($current_page)
182
+ {
183
+ case 'duplicator': include('views/packages/controller.php'); break;
184
+ case 'duplicator-settings': include('views/settings/controller.php'); break;
185
+ case 'duplicator-tools': include('views/tools/controller.php'); break;
186
+ case 'duplicator-debug': include('debug/main.php'); break;
187
+ case 'duplicator-gopro': include('views/help/gopro.php'); break;
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Hooked into `admin_menu`. Loads all of the wp left nav admin menus for Duplicator
193
+ *
194
+ * @access global
195
+ * @return null
196
+ */
197
+ function duplicator_menu()
198
+ {
199
+ $wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
200
+ $icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
201
+
202
+ //Main Menu
203
+ $perms = 'export';
204
+ $perms = apply_filters($wpfront_caps_translator, $perms);
205
+ $main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', $icon_svg);
206
+ //$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/logo-menu.svg'));
207
+
208
+ $perms = 'export';
209
+ $perms = apply_filters($wpfront_caps_translator, $perms);
210
+ $lang_txt = __('Packages', 'duplicator');
211
+ $page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
212
+ $GLOBALS['DUP_PRO_Package_Screen'] = new DUP_Package_Screen($page_packages);
213
+
214
+ $perms = 'manage_options';
215
+ $perms = apply_filters($wpfront_caps_translator, $perms);
216
+ $lang_txt = __('Tools', 'duplicator');
217
+ $page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
218
+
219
+ $perms = 'manage_options';
220
+ $perms = apply_filters($wpfront_caps_translator, $perms);
221
+ $lang_txt = __('Settings', 'duplicator');
222
+ $page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
223
+
224
+ $perms = 'manage_options';
225
+ $lang_txt = __('Go Pro!', 'duplicator');
226
+ $go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
227
+ $perms = apply_filters($wpfront_caps_translator, $perms);
228
+ $page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
229
+
230
+ $package_debug = DUP_Settings::Get('package_debug');
231
+ if ($package_debug != null && $package_debug == true)
232
+ {
233
+ $perms = 'manage_options';
234
+ $perms = apply_filters($wpfront_caps_translator, $perms);
235
+ $lang_txt = __('Debug', 'duplicator');
236
+ $page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
237
+ add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
238
+ add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
239
+ }
240
+
241
+ //Apply Scripts
242
+ add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
243
+ add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
244
+ add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
245
+ add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
246
+
247
+ //Apply Styles
248
+ add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
249
+ add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
250
+ add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
251
+ add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
252
+
253
+ }
254
+
255
+ /**
256
+ * Loads all required javascript libs/source for DupPro
257
+ *
258
+ * @access global
259
+ * @return null
260
+ */
261
+ function duplicator_scripts()
262
+ {
263
+ wp_enqueue_script('jquery');
264
+ wp_enqueue_script('jquery-ui-core');
265
+ wp_enqueue_script('jquery-ui-progressbar');
266
+ wp_enqueue_script('dup-parsley');
267
+ wp_enqueue_script('dup-jquery-qtip');
268
+
269
+ }
270
+
271
+ /**
272
+ * Loads all CSS style libs/source for DupPro
273
+ *
274
+ * @access global
275
+ * @return null
276
+ */
277
+ function duplicator_styles()
278
+ {
279
+ wp_enqueue_style('dup-jquery-ui');
280
+ wp_enqueue_style('dup-font-awesome');
281
+ wp_enqueue_style('dup-plugin-style');
282
+ wp_enqueue_style('dup-jquery-qtip');
283
+ }
284
+
285
+
286
+ /** ========================================================
287
+ * FILTERS
288
+ * ===================================================== */
289
+ add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
290
+ add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
291
+
292
+ /**
293
+ * Adds the manage link in the plugins list
294
+ *
295
+ * @access global
296
+ * @return string The manage link in the plugins list
297
+ */
298
+ function duplicator_manage_link($links, $file)
299
+ {
300
+ static $this_plugin;
301
+ if (!$this_plugin)
302
+ $this_plugin = plugin_basename(__FILE__);
303
+
304
+ if ($file == $this_plugin) {
305
+ $settings_link = '<a href="admin.php?page=duplicator">' . __("Manage", 'duplicator') . '</a>';
306
+ array_unshift($links, $settings_link);
307
+ }
308
+ return $links;
309
+ }
310
+
311
+ /**
312
+ * Adds links to the plugins manager page
313
+ *
314
+ * @access global
315
+ * @return string The meta help link data for the plugins manager
316
+ */
317
+ function duplicator_meta_links($links, $file)
318
+ {
319
+ $plugin = plugin_basename(__FILE__);
320
+ // create link
321
+ if ($file == $plugin) {
322
+ $links[] = '<a href="admin.php?page=duplicator-gopro" title="' . __('Get Help', 'duplicator') . '" style="">' . __('Go Pro', 'duplicator') . '</a>';
323
+ return $links;
324
+ }
325
+ return $links;
326
+ }
327
+
328
+
329
+ /** ========================================================
330
+ * GENERAL
331
+ * ===================================================== */
332
+
333
+ /**
334
+ * Used for installer files to redirect if accessed directly
335
+ *
336
+ * @access global
337
+ * @return null
338
+ */
339
+ function duplicator_secure_check()
340
+ {
341
+ $baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
342
+ header("HTTP/1.1 301 Moved Permanently");
343
+ header("Location: $baseURL");
344
+ exit;
345
+ }
346
+
347
+ }
348
  ?>
installer/build/ctrls/ctrl.step2.php CHANGED
@@ -7,6 +7,7 @@ $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
7
  $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
8
  $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
9
  $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
 
10
 
11
  //LOGGING
12
  $POST_LOG = $_POST;
@@ -216,6 +217,7 @@ $sql_result_file_data = explode(";\n", $sql_file);
216
  $sql_result_file_length = count($sql_result_file_data);
217
  $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
218
  $sql_file = null;
 
219
 
220
  if($_POST['dbcollatefb']){
221
  $supportedCollations = DUPX_DB::getSupportedCollationsList($dbh);
@@ -240,16 +242,17 @@ if($_POST['dbcollatefb']){
240
  }
241
  }
242
 
243
- //No need to replace if current DB is up to date
244
  if($latest_supported_index != 0){
245
- for($i=0;$i<$latest_supported_index;$i++){
246
  foreach ($sql_result_file_data as $index => $col_sql_query){
247
  if(strpos($col_sql_query,$collation_arr[$i]) !== false){
248
- $sql_result_file_data[$index] = str_replace($collation_arr[$i],$latest_supported_collation,$col_sql_query);
249
  if(strpos($collation_arr[$i],'utf8mb4') !== false && strpos($latest_supported_collation,'utf8mb4') === false){
250
  $sql_result_file_data[$index] = str_replace('utf8mb4','utf8',$sql_result_file_data[$index]);
251
  }
252
- DUPX_Log::info("Collation {$collation_arr[$i]} was changed with {$latest_supported_collation}");
 
253
  }
254
  }
255
  }
@@ -276,19 +279,18 @@ DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
276
  //sql_mode can cause db create issues on some systems
277
  $qry_session_custom = true;
278
  switch ($_POST['dbmysqlmode']) {
279
- case 'DISABLE':
280
- @mysqli_query($dbh, "SET SESSION sql_mode = ''");
281
- break;
282
- case 'CUSTOM':
283
- $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
284
- $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
285
- if ($qry_session_custom == false)
286
- {
287
- $sql_error = mysqli_error($dbh);
288
- $log = "WARNING: A custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
289
- $log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
290
  }
291
- break;
292
  }
293
 
294
  //Set defaults in-case the variable could not be read
@@ -301,6 +303,7 @@ $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
301
  $dbvar_version = DUPX_DB::getVersion($dbh);
302
  $sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
303
  $sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
 
304
 
305
 
306
  DUPX_Log::info("--------------------------------------");
@@ -312,9 +315,9 @@ DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
312
  DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
313
  DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
314
  DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
 
315
 
316
- if ($qry_session_custom == false)
317
- {
318
  DUPX_Log::info("\n{$log}\n");
319
  }
320
 
7
  $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
8
  $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
9
  $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
10
+ $_POST['dbcollatefb'] = isset($_POST['dbcollatefb']) ? $_POST['dbcollatefb'] : false;
11
 
12
  //LOGGING
13
  $POST_LOG = $_POST;
217
  $sql_result_file_length = count($sql_result_file_data);
218
  $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
219
  $sql_file = null;
220
+ $db_collatefb_log = '';
221
 
222
  if($_POST['dbcollatefb']){
223
  $supportedCollations = DUPX_DB::getSupportedCollationsList($dbh);
242
  }
243
  }
244
 
245
+ //No need to replace if current DB is up to date
246
  if($latest_supported_index != 0){
247
+ for($i=0; $i < $latest_supported_index; $i++){
248
  foreach ($sql_result_file_data as $index => $col_sql_query){
249
  if(strpos($col_sql_query,$collation_arr[$i]) !== false){
250
+ $sql_result_file_data[$index] = str_replace($collation_arr[$i], $latest_supported_collation, $col_sql_query);
251
  if(strpos($collation_arr[$i],'utf8mb4') !== false && strpos($latest_supported_collation,'utf8mb4') === false){
252
  $sql_result_file_data[$index] = str_replace('utf8mb4','utf8',$sql_result_file_data[$index]);
253
  }
254
+ $sub_query = str_replace("\n", '', substr($col_sql_query, 0, 75));
255
+ $db_collatefb_log .= " - Collation '{$collation_arr[$i]}' set to '{$latest_supported_collation}' on query [{$sub_query}...]\n";
256
  }
257
  }
258
  }
279
  //sql_mode can cause db create issues on some systems
280
  $qry_session_custom = true;
281
  switch ($_POST['dbmysqlmode']) {
282
+ case 'DISABLE':
283
+ @mysqli_query($dbh, "SET SESSION sql_mode = ''");
284
+ break;
285
+ case 'CUSTOM':
286
+ $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
287
+ $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
288
+ if ($qry_session_custom == false) {
289
+ $sql_error = mysqli_error($dbh);
290
+ $log = "WARNING: Trying to set a custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
291
+ $log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
 
292
  }
293
+ break;
294
  }
295
 
296
  //Set defaults in-case the variable could not be read
303
  $dbvar_version = DUPX_DB::getVersion($dbh);
304
  $sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
305
  $sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
306
+ $db_collatefb = isset($_POST['dbcollatefb']) ? 'On' : 'Off';
307
 
308
 
309
  DUPX_Log::info("--------------------------------------");
315
  DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
316
  DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
317
  DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
318
+ DUPX_Log::info("COLLATE RESET:\t{$db_collatefb}\n{$db_collatefb_log}");
319
 
320
+ if ($qry_session_custom == false) {
 
321
  DUPX_Log::info("\n{$log}\n");
322
  }
323
 
installer/build/main.installer.php CHANGED
@@ -70,7 +70,15 @@ $GLOBALS['REPLACE_LIST']
70
  ================================================================================================= */
71
 
72
  // Some machines don’t have this set so just do it here.
73
- date_default_timezone_set('UTC');
 
 
 
 
 
 
 
 
74
 
75
  //COMPARE VALUES
76
  $GLOBALS['DUPX_DEBUG'] = false;
70
  ================================================================================================= */
71
 
72
  // Some machines don’t have this set so just do it here.
73
+ date_default_timezone_set('UTC');
74
+
75
+ //PATCH FOR IIS: Does not support REQUEST_URI
76
+ if (!isset($_SERVER['REQUEST_URI'])) {
77
+ $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],0);
78
+ if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
79
+ $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
80
+ }
81
+ }
82
 
83
  //COMPARE VALUES
84
  $GLOBALS['DUPX_DEBUG'] = false;
installer/build/view.step4.php CHANGED
@@ -70,8 +70,8 @@ VIEW: STEP 4 - INPUT -->
70
  Additional Notes:
71
  <ul style="margin-top: 1px">
72
  <li>
73
- Review the <a href='<?php echo $url_new_rtrim; ?>' target='_blank'>front-end</a> or
74
- re-run installer at <a href="javascript:history.go(-3)">step 1</a>
75
  </li>
76
  <li>The .htaccess file was reset. Resave plugins that write to this file.</li>
77
  <li>
70
  Additional Notes:
71
  <ul style="margin-top: 1px">
72
  <li>
73
+ Review the <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
74
+ re-run installer at <a href="<?php echo "{$url_new_rtrim}/installer.php"; ?>">step 1</a>
75
  </li>
76
  <li>The .htaccess file was reset. Resave plugins that write to this file.</li>
77
  <li>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, aut
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.17
8
- Stable tag: 1.2.30
9
  License: GPLv2
10
 
11
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
@@ -103,4 +103,4 @@ Please see the following url:
103
 
104
  == Upgrade Notice ==
105
 
106
- Please use our ticketing system when submitting your logs. Please do not post to the forums.
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.17
8
+ Stable tag: 1.2.32
9
  License: GPLv2
10
 
11
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
103
 
104
  == Upgrade Notice ==
105
 
106
+ Please use our ticketing system when submitting your logs. Please do not post to the forums.
views/packages/main/controller.php CHANGED
@@ -1,48 +1,49 @@
1
- <?php
2
- require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
3
- $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
4
- ?>
5
-
6
- <style>
7
- /*TOOLBAR TABLE*/
8
- table#dup-toolbar td {white-space: nowrap !important; padding:10px 0 0 0}
9
- table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:8px 0 4px 0; height: 35px}
10
- table#dup-toolbar td:last-child {font-size:16px; width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
11
- table#dup-toolbar td:last-child a {top:0; font-size:16px !important; margin-top:10px }
12
- table#dup-toolbar td:last-child span {display:inline-block; font-weight: bold; padding:0 12px 5px 5px; color:#000}
13
- hr.dup-toolbar-line {margin:2px 0 10px 0}
14
-
15
- /*WIZARD TABS */
16
- div#dup-wiz {padding:0px; margin:0; }
17
- div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
18
- div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
19
- #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
20
- color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
21
- #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
22
- #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
23
-
24
- /*Footer */
25
- div.dup-button-footer input {min-width: 105px}
26
- div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
27
- </style>
28
-
29
- <?php
30
- switch ($current_tab) {
31
- case 'list':
32
- duplicator_header(__("Packages &raquo; All", 'duplicator'));
33
- include('packages.php');
34
- break;
35
- case 'new1':
36
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
37
- include('s1.setup1.php');
38
- break;
39
- case 'new2':
40
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
41
- include('s2.scan1.php');
42
- break;
43
- case 'new3':
44
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
45
- include('s3.build.php');
46
- break;
47
- }
 
48
  ?>
1
+ <?php
2
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
3
+ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
4
+ ?>
5
+
6
+ <style>
7
+ /*TOOLBAR TABLE*/
8
+ table#dup-toolbar td {white-space: nowrap !important; padding:10px 0 0 0}
9
+ table#dup-toolbar td .button {box-shadow: none !important;}
10
+ table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:8px 0 4px 0; height: 35px}
11
+ table#dup-toolbar td:last-child {font-size:16px; width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
12
+ table#dup-toolbar td:last-child a {top:0; font-size:16px !important; margin-top:10px }
13
+ table#dup-toolbar td:last-child span {display:inline-block; font-weight: bold; padding:0 12px 5px 5px; color:#000}
14
+ hr.dup-toolbar-line {margin:2px 0 10px 0}
15
+
16
+ /*WIZARD TABS */
17
+ div#dup-wiz {padding:0px; margin:0; }
18
+ div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
19
+ div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
20
+ #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
21
+ color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
22
+ #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
23
+ #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
24
+
25
+ /*Footer */
26
+ div.dup-button-footer input {min-width: 105px}
27
+ div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
28
+ </style>
29
+
30
+ <?php
31
+ switch ($current_tab) {
32
+ case 'list':
33
+ duplicator_header(__("Packages &raquo; All", 'duplicator'));
34
+ include('packages.php');
35
+ break;
36
+ case 'new1':
37
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
38
+ include('s1.setup1.php');
39
+ break;
40
+ case 'new2':
41
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
42
+ include('s2.scan1.php');
43
+ break;
44
+ case 'new3':
45
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
46
+ include('s3.build.php');
47
+ break;
48
+ }
49
  ?>
views/packages/main/packages.php CHANGED
@@ -31,6 +31,7 @@
31
  table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
32
  tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
33
  tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
 
34
  textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
35
  td.error-msg a {color:maroon}
36
  td.error-msg a i {color:maroon}
@@ -50,14 +51,14 @@ TOOL-BAR -->
50
  <option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
51
  </select>
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>
31
  table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
32
  tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
33
  tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
34
+ tr.dup-pack-info td.get-btns button {box-shadow:none}
35
  textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
36
  td.error-msg a {color:maroon}
37
  td.error-msg a i {color:maroon}
51
  <option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
52
  </select>
53
  <input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.ConfirmDelete()">
54
+ <span class="btn-separator"></span>
 
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 grey-icon"></i>';
59
  ?>
60
  </a>
61
+ <a href="admin.php?page=duplicator-settings&tab=package" class="button grey-icon" title="<?php _e("Settings", 'duplicator') ?>"><i class="fa fa-gear"></i></a>
62
  </td>
63
  <td>
64
  <span><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></span>
views/packages/main/s1.setup2.php CHANGED
@@ -18,6 +18,7 @@
18
  select#archive-format {min-width:100px; margin:1px 0 4px 0}
19
  span#dup-archive-filter-file {color:#A62426; display:none}
20
  span#dup-archive-filter-db {color:#A62426; display:none}
 
21
  div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
22
  div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
23
  form#dup-form-opts textarea#filter-files {height:85px}
@@ -122,7 +123,8 @@ ARCHIVE -->
122
  <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?> &nbsp;
123
  <span style="font-size:13px">
124
  <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
125
- <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
 
126
  </span>
127
  <div class="dup-box-arrow"></div>
128
  </div>
@@ -144,7 +146,6 @@ ARCHIVE -->
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'" :""; ?> />
@@ -439,9 +440,19 @@ jQuery(document).ready(function ($)
439
  Duplicator.Pack.ExportOnlyDB = function ()
440
  {
441
  $('#dup-exportdb-items-off, #dup-exportdb-items-checked').hide();
442
- $("#export-onlydb").is(':checked')
443
- ? $('#dup-exportdb-items-checked').show()
444
- : $('#dup-exportdb-items-off').show();
 
 
 
 
 
 
 
 
 
 
445
  };
446
 
447
  /* Enable/Disable the file filter elements */
18
  select#archive-format {min-width:100px; margin:1px 0 4px 0}
19
  span#dup-archive-filter-file {color:#A62426; display:none}
20
  span#dup-archive-filter-db {color:#A62426; display:none}
21
+ span#dup-archive-db-only {color:#A62426; display:none}
22
  div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
23
  div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
24
  form#dup-form-opts textarea#filter-files {height:85px}
123
  <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?> &nbsp;
124
  <span style="font-size:13px">
125
  <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
126
+ <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
127
+ <span id="dup-archive-db-only" title="<?php _e('Archive Only the Database', 'duplicator') ?>"> <?php _e('Database Only', 'duplicator') ?> </span>
128
  </span>
129
  <div class="dup-box-arrow"></div>
130
  </div>
146
  $upload_dir = DUP_Util::safePath($uploads['basedir']);
147
  $filter_dir_count = isset($Package->Archive->FilterDirs) ? count(explode(";", $Package->Archive->FilterDirs)) -1 : 0;
148
  $filter_file_count = isset($Package->Archive->FilterFiles) ? count(explode(";", $Package->Archive->FilterFiles)) -1 : 0;
 
149
  ?>
150
 
151
  <input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
440
  Duplicator.Pack.ExportOnlyDB = function ()
441
  {
442
  $('#dup-exportdb-items-off, #dup-exportdb-items-checked').hide();
443
+ if ($("#export-onlydb").is(':checked')) {
444
+ $('#dup-exportdb-items-checked').show();
445
+ $('#dup-archive-db-only').show(100);
446
+ $('#dup-archive-filter-db').hide();
447
+ $('#dup-archive-filter-file').hide();
448
+ } else {
449
+ $('#dup-exportdb-items-off').show();
450
+ $('#dup-exportdb-items-checked').hide();
451
+ $('#dup-archive-db-only').hide();
452
+ Duplicator.Pack.ToggleFileFilters();
453
+ }
454
+
455
+ Duplicator.Pack.ToggleDBFilters();
456
  };
457
 
458
  /* Enable/Disable the file filter elements */
views/packages/main/s2.scan3.php CHANGED
@@ -155,7 +155,7 @@ TOTAL SIZE -->
155
  ADDON SITES -->
156
  <div id="addonsites-block" class="scan-item">
157
  <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
158
- <div class="text"><i class="fa fa-caret-right"></i> <?php _e('Addon Sites');?></div>
159
  <div id="data-arc-status-addonsites"></div>
160
  </div>
161
  <div class="info">
@@ -172,7 +172,7 @@ ADDON SITES -->
172
  <div class="container">
173
  <div class="hdrs">
174
  <span style="font-weight:bold">
175
- <?php _e('Quick Filters'); ?>
176
  </span>
177
  </div>
178
  <div class="data">
155
  ADDON SITES -->
156
  <div id="addonsites-block" class="scan-item">
157
  <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
158
+ <div class="text"><i class="fa fa-caret-right"></i> <?php _e('Addon Sites', 'duplicator');?></div>
159
  <div id="data-arc-status-addonsites"></div>
160
  </div>
161
  <div class="info">
172
  <div class="container">
173
  <div class="hdrs">
174
  <span style="font-weight:bold">
175
+ <?php _e('Quick Filters', 'duplicator'); ?>
176
  </span>
177
  </div>
178
  <div class="data">
views/packages/main/s3.build.php CHANGED
@@ -81,9 +81,9 @@ TOOL BAR: STEPS -->
81
  </div>
82
  </td>
83
  <td style="padding-bottom:4px">
84
- <a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a> &nbsp;
85
  <div id="dup-create-area-nolink"><?php _e("Create New", 'duplicator'); ?></div>
86
  <div id="dup-create-area-link"><a href="admin.php?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a></div>
 
87
  </td>
88
  </tr>
89
  </table>
81
  </div>
82
  </td>
83
  <td style="padding-bottom:4px">
 
84
  <div id="dup-create-area-nolink"><?php _e("Create New", 'duplicator'); ?></div>
85
  <div id="dup-create-area-link"><a href="admin.php?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a></div>
86
+ <div style="float:right;margin: 0px 5px;"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a></div>
87
  </td>
88
  </tr>
89
  </table>
views/packages/screen.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined("ABSPATH") or die("");
3
+
4
+ require_once DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.screen.base.php';
5
+
6
+ /*
7
+ Because the default way is overwriting the option names in the hidden input wp_screen_options[option]
8
+ I added all inputs via one option name and saved them with the update_user_meta function.
9
+ Also, the set-screen-option is not being triggered inside the class, that's why it's here. -TG
10
+ */
11
+ add_filter('set-screen-option', 'dup_packages_set_option', 10, 3);
12
+ function dup_packages_set_option($status, $option, $value) {
13
+ if('package_screen_options' == $option){
14
+ $user_id = get_current_user_id();
15
+ }
16
+ return false;
17
+ }
18
+
19
+ class DUP_Package_Screen extends DUP_UI_Screen
20
+ {
21
+
22
+ public function __construct($page)
23
+ {
24
+ add_action('load-'.$page, array($this, 'Init'));
25
+ }
26
+
27
+ public function Init()
28
+ {
29
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'list';
30
+ $active_tab = isset($_GET['action']) && $_GET['action'] == 'detail' ? 'detail' : $active_tab;
31
+ $this->screen = get_current_screen();
32
+
33
+ switch (strtoupper($active_tab)) {
34
+ case 'LIST': $content = $this->get_list_help(); break;
35
+ case 'NEW1': $content = $this->get_step1_help(); break;
36
+ case 'NEW2': $content = $this->get_step2_help(); break;
37
+ case 'NEW3': $content = $this->get_step3_help(); break;
38
+ case 'DETAIL': $content = $this->get_details_help(); break;
39
+ default:
40
+ $content = $this->get_list_help();
41
+ break;
42
+ }
43
+
44
+ $guide = '#guide-packs';
45
+ $faq = '#faq-package';
46
+ $content .= "<b>References:</b><br/>"
47
+ . "<a href='https://snapcreek.com/duplicator/docs/guide/{$guide}' target='_sc-guide'>User Guide</a> | "
48
+ . "<a href='https://snapcreek.com/duplicator/docs/faqs-tech/{$faq}' target='_sc-guide'>FAQs</a> | "
49
+ . "<a href='https://snapcreek.com/duplicator/docs/quick-start/' target='_sc-guide'>Quick Start</a>";
50
+
51
+ $this->screen->add_help_tab( array(
52
+ 'id' => 'dup_help_package_overview',
53
+ 'title' => __('Overview','duplicator'),
54
+ 'content' => "<p>{$content}</p>"
55
+ )
56
+ );
57
+
58
+ $this->getSupportTab($guide, $faq);
59
+ $this->getHelpSidbar();
60
+ }
61
+
62
+ public function get_list_help()
63
+ {
64
+ return __("<b><i class='fa fa-archive'></i> Packages » All</b><br/> The 'Packages' section is the main interface for managing all the packages that have been created. "
65
+ . "A Package consists of two core files, the 'archive.zip' and the 'installer.php' file. The archive file is a zip file containing all your WordPress files and a "
66
+ . "copy of your WordPress database. The installer file is a php file that when browsed to via a web browser presents a wizard that redeploys/installs the website "
67
+ . "by extracting the archive file and installing the database. To create a package, click the 'Create New' button and follow the prompts. <br/><br/>"
68
+
69
+ . "<b><i class='fa fa-download'></i> Downloads</b><br/>"
70
+ . "To download the package files click on the Installer and Archive buttons after creating a package. The archive file will have a copy of the installer inside of it named "
71
+ . "installer-backup.php in case the original installer file is lost. To see the details of a package click on the <i class='fa fa-archive'></i> details button.<br/><br/>"
72
+ ,'duplicator');
73
+ }
74
+
75
+
76
+ public function get_step1_help()
77
+ {
78
+ return __("<b>Packages New » 1 Setup</b> <br/>"
79
+ . "The setup step allows for optional filtered directory paths, files, file extensions and database tables. To filter specific system files, click the 'Enable File Filters' "
80
+ . "checkbox and add the full path of the file or directory, followed by a semicolon. For a file extension add the name (i.e. 'zip') followed by a semicolon. <br/><br/>"
81
+
82
+ . "To exclude a database table, check the box labeled 'Enable Table Filters' and check the table name to exclude. To include only a copy of your database in the "
83
+ . "archive file check the box labeled 'Archive Only the Database'. The installer.php file can optionally be pre-filled with data at install time but is not "
84
+ . "required. <br/><br/>",'duplicator');
85
+ }
86
+
87
+
88
+ public function get_step2_help()
89
+ {
90
+ return __("<b>Packages » 2 Scan</b> <br/>"
91
+ . "The plugin will scan your system files and database to let you know if there are any concerns or issues that may be present. All items in green mean the checks "
92
+ . "looked good. All items in red indicate a warning. Warnings will not prevent the build from running, however if you do run into issues with the build then investigating "
93
+ . "the warnings should be considered. Click on each section for more details about each scan check. <br/><br/>",'duplicator');
94
+ }
95
+
96
+ public function get_step3_help()
97
+ {
98
+ return __("<b>Packages » 3 Build</b> <br/>"
99
+ . "The final step in the build process where the installer script and archive of the website can be downloaded. To start the install process follow these steps: "
100
+ . "<ol>"
101
+ . "<li>Download the installer.php and archive.zip files to your local computer.</li>"
102
+ . "<li>For localhost installs be sure you have PHP, Apache & MySQL installed on your local computer with software such as XAMPP, Instant WordPress or MAMP for MAC. "
103
+ . "Place the package.zip and installer.php into any empty directory under your webroot then browse to the installer.php via your web browser to launch the install wizard.</li>"
104
+ . "<li>For remote installs use FTP or cPanel to upload both the archive.zip and installer.php to your hosting provider. Place the files in a new empty directory under "
105
+ . "your host's webroot accessible from a valid URL such as http://your-domain/your-wp-directory/installer.php to launch the install wizard. On some hosts the root directory "
106
+ . "will be a something like public_html -or- www. If your're not sure contact your hosting provider. </li>"
107
+ . "</ol>"
108
+ . "For complete instructions see:<br/>
109
+ <a href='https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=package_built_install_help&amp;utm_campaign=duplicator_free#quick-040-q' target='_blank'>
110
+ How do I install this Package?</a><br/><br/>",'duplicator');
111
+ }
112
+
113
+ public function get_details_help()
114
+ {
115
+ return __("<b>Packages » Details</b> <br/>"
116
+ . "The details view will give you a full break-down of the package including any errors that may have occured during the install. <br/><br/>",'duplicator');
117
+ }
118
+
119
+ }
120
+
121
+
views/tools/diagnostics/main.php CHANGED
@@ -53,9 +53,9 @@
53
 
54
  <?php
55
  $section = isset($_GET['section']) ? $_GET['section'] : 'info';
56
- $txt_diagnostic = "Information";
57
- $txt_log = "Logs";
58
- $txt_support = "Support";
59
  $tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
60
 
61
  switch ($section) {
53
 
54
  <?php
55
  $section = isset($_GET['section']) ? $_GET['section'] : 'info';
56
+ $txt_diagnostic = __('Information', 'duplicator');
57
+ $txt_log = __('Logs', 'duplicator');
58
+ $txt_support = __('Support', 'duplicator');;
59
  $tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
60
 
61
  switch ($section) {