Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.2.36 |
Comparing to | |
See all releases |
Code changes from version 1.2.34 to 1.2.36
- ctrls/ctrl.tools.php +106 -105
- ctrls/ctrl.ui.php +1 -1
- define.php +1 -1
- duplicator.php +1 -1
- installer/build/classes/class.engine.php +7 -17
- installer/build/view.step1.php +777 -774
- readme.txt +105 -105
- views/help/gopro.php +1 -1
- views/packages/main/packages.php +329 -329
- views/settings/packages.php +232 -232
- views/tools/controller.php +7 -4
- views/tools/templates.php +25 -0
ctrls/ctrl.tools.php
CHANGED
@@ -1,105 +1,106 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
|
3 |
-
|
4 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php');
|
5 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Controller for Tools
|
9 |
-
* @package Dupicator\ctrls
|
10 |
-
*/
|
11 |
-
class DUP_CTRL_Tools extends DUP_CTRL_Base
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* Init this instance of the object
|
15 |
-
*/
|
16 |
-
function __construct()
|
17 |
-
{
|
18 |
-
add_action('wp_ajax_DUP_CTRL_Tools_runScanValidator', array($this, 'runScanValidator'));
|
19 |
-
add_action('wp_ajax_DUP_CTRL_Tools_deleteInstallerFiles', array($this, 'deleteInstallerFiles'));
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Calls the ScanValidator and returns a JSON result
|
24 |
-
*
|
25 |
-
* @param string $_POST['scan-path'] The path to start scanning from, defaults to DUPLICATOR_WPROOTPATH
|
26 |
-
* @param bool $_POST['scan-recursive'] Recursivly search the path
|
27 |
-
*
|
28 |
-
* @notes: Testing = /wp-admin/admin-ajax.php?action=DUP_CTRL_Tools_runScanValidator
|
29 |
-
*/
|
30 |
-
public function runScanValidator($post)
|
31 |
-
{
|
32 |
-
@set_time_limit(0);
|
33 |
-
$post = $this->postParamMerge($post);
|
34 |
-
check_ajax_referer($post['action'], 'nonce');
|
35 |
-
|
36 |
-
$result = new DUP_CTRL_Result($this);
|
37 |
-
|
38 |
-
try
|
39 |
-
{
|
40 |
-
//CONTROLLER LOGIC
|
41 |
-
$path = isset($post['scan-path']) ? $post['scan-path'] : DUPLICATOR_WPROOTPATH;
|
42 |
-
if (!is_dir($path)) {
|
43 |
-
throw new Exception("Invalid directory provided '{$path}'!");
|
44 |
-
}
|
45 |
-
$scanner = new DUP_ScanCheck();
|
46 |
-
$scanner->recursion = (isset($post['scan-recursive']) && $post['scan-recursive'] != 'false') ? true : false;
|
47 |
-
$payload = $scanner->run($path);
|
48 |
-
|
49 |
-
//RETURN RESULT
|
50 |
-
$test = ($payload->fileCount > 0)
|
51 |
-
? DUP_CTRL_Status::SUCCESS
|
52 |
-
: DUP_CTRL_Status::FAILED;
|
53 |
-
$result->process($payload, $test);
|
54 |
-
}
|
55 |
-
catch (Exception $exc)
|
56 |
-
{
|
57 |
-
$result->processError($exc);
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Removed all reserved installer files names
|
64 |
-
*
|
65 |
-
* @param string $_POST['archive-name'] The name of the archive file used to create this site
|
66 |
-
*
|
67 |
-
* @notes: Testing = /wp-admin/admin-ajax.php?action=DUP_CTRL_Tools_deleteInstallerFiles
|
68 |
-
*/
|
69 |
-
public function deleteInstallerFiles($post)
|
70 |
-
{
|
71 |
-
$post = $this->postParamMerge($post);
|
72 |
-
check_ajax_referer($post['action'], 'nonce');
|
73 |
-
$result = new DUP_CTRL_Result($this);
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
$
|
84 |
-
|
85 |
-
'
|
86 |
-
'
|
87 |
-
'
|
88 |
-
'
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php');
|
5 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Controller for Tools
|
9 |
+
* @package Dupicator\ctrls
|
10 |
+
*/
|
11 |
+
class DUP_CTRL_Tools extends DUP_CTRL_Base
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Init this instance of the object
|
15 |
+
*/
|
16 |
+
function __construct()
|
17 |
+
{
|
18 |
+
add_action('wp_ajax_DUP_CTRL_Tools_runScanValidator', array($this, 'runScanValidator'));
|
19 |
+
add_action('wp_ajax_DUP_CTRL_Tools_deleteInstallerFiles', array($this, 'deleteInstallerFiles'));
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Calls the ScanValidator and returns a JSON result
|
24 |
+
*
|
25 |
+
* @param string $_POST['scan-path'] The path to start scanning from, defaults to DUPLICATOR_WPROOTPATH
|
26 |
+
* @param bool $_POST['scan-recursive'] Recursivly search the path
|
27 |
+
*
|
28 |
+
* @notes: Testing = /wp-admin/admin-ajax.php?action=DUP_CTRL_Tools_runScanValidator
|
29 |
+
*/
|
30 |
+
public function runScanValidator($post)
|
31 |
+
{
|
32 |
+
@set_time_limit(0);
|
33 |
+
$post = $this->postParamMerge($post);
|
34 |
+
check_ajax_referer($post['action'], 'nonce');
|
35 |
+
|
36 |
+
$result = new DUP_CTRL_Result($this);
|
37 |
+
|
38 |
+
try
|
39 |
+
{
|
40 |
+
//CONTROLLER LOGIC
|
41 |
+
$path = isset($post['scan-path']) ? $post['scan-path'] : DUPLICATOR_WPROOTPATH;
|
42 |
+
if (!is_dir($path)) {
|
43 |
+
throw new Exception("Invalid directory provided '{$path}'!");
|
44 |
+
}
|
45 |
+
$scanner = new DUP_ScanCheck();
|
46 |
+
$scanner->recursion = (isset($post['scan-recursive']) && $post['scan-recursive'] != 'false') ? true : false;
|
47 |
+
$payload = $scanner->run($path);
|
48 |
+
|
49 |
+
//RETURN RESULT
|
50 |
+
$test = ($payload->fileCount > 0)
|
51 |
+
? DUP_CTRL_Status::SUCCESS
|
52 |
+
: DUP_CTRL_Status::FAILED;
|
53 |
+
$result->process($payload, $test);
|
54 |
+
}
|
55 |
+
catch (Exception $exc)
|
56 |
+
{
|
57 |
+
$result->processError($exc);
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Removed all reserved installer files names
|
64 |
+
*
|
65 |
+
* @param string $_POST['archive-name'] The name of the archive file used to create this site
|
66 |
+
*
|
67 |
+
* @notes: Testing = /wp-admin/admin-ajax.php?action=DUP_CTRL_Tools_deleteInstallerFiles
|
68 |
+
*/
|
69 |
+
public function deleteInstallerFiles($post)
|
70 |
+
{
|
71 |
+
$post = $this->postParamMerge($post);
|
72 |
+
check_ajax_referer($post['action'], 'nonce');
|
73 |
+
$result = new DUP_CTRL_Result($this);
|
74 |
+
$payload = array();
|
75 |
+
try
|
76 |
+
{
|
77 |
+
//CONTROLLER LOGIC
|
78 |
+
$installer_files = DUP_Server::getInstallerFiles();
|
79 |
+
//array_push($installer_files, $package_path);
|
80 |
+
foreach($installer_files as $file => $path) {
|
81 |
+
if (! is_dir($path)) {
|
82 |
+
@chmod($path, 0777);
|
83 |
+
$status = (@unlink($path) === false) ? false : true;
|
84 |
+
$payload[] = array(
|
85 |
+
'file' => $path,
|
86 |
+
'removed' => $status,
|
87 |
+
'writable' => is_writable($path),
|
88 |
+
'readable' => is_readable($path),
|
89 |
+
'exists' => file_exists($path)
|
90 |
+
);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
//RETURN RESULT
|
95 |
+
$test = (in_array(true, $payload['exists']))
|
96 |
+
? DUP_CTRL_Status::FAILED
|
97 |
+
: DUP_CTRL_Status::SUCCESS;
|
98 |
+
$result->process($payload, $test);
|
99 |
+
}
|
100 |
+
catch (Exception $exc)
|
101 |
+
{
|
102 |
+
$result->processError($exc);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
ctrls/ctrl.ui.php
CHANGED
@@ -86,7 +86,7 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
|
|
86 |
$payload = DUP_UI_ViewState::getArray();
|
87 |
|
88 |
//RETURN RESULT
|
89 |
-
$test = (count($payload))
|
90 |
? DUP_CTRL_Status::SUCCESS
|
91 |
: DUP_CTRL_Status::FAILED;
|
92 |
return $result->process($payload, $test);
|
86 |
$payload = DUP_UI_ViewState::getArray();
|
87 |
|
88 |
//RETURN RESULT
|
89 |
+
$test = (is_array($payload) && count($payload))
|
90 |
? DUP_CTRL_Status::SUCCESS
|
91 |
: DUP_CTRL_Status::FAILED;
|
92 |
return $result->process($payload, $test);
|
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.
|
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.36');
|
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.
|
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.36
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
installer/build/classes/class.engine.php
CHANGED
@@ -146,19 +146,9 @@ class DUPX_UpdateEngine
|
|
146 |
'err_all' => 0
|
147 |
);
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
// Use "try catch" to avoid PHP notice or error below PHP5.3.0
|
153 |
-
try {
|
154 |
-
$walk_function = function () use (&$str) {
|
155 |
-
$str = "`$str`";
|
156 |
-
};
|
157 |
-
}
|
158 |
-
catch (Exception $exc) {}
|
159 |
-
} else {
|
160 |
-
$walk_function = create_function('&$str', '$str = "`$str`";');
|
161 |
-
}
|
162 |
|
163 |
$profile_start = DUPX_U::getMicrotime();
|
164 |
if (is_array($tables) && !empty($tables)) {
|
@@ -194,7 +184,7 @@ class DUPX_UpdateEngine
|
|
194 |
if (!$fullsearch) {
|
195 |
$colList = self::getTextColumns($dbh, $table);
|
196 |
if ($colList != null && is_array($colList)) {
|
197 |
-
array_walk($colList,
|
198 |
$colList = implode(',', $colList);
|
199 |
}
|
200 |
$colMsg = (empty($colList)) ? '*' : '~';
|
@@ -339,13 +329,13 @@ class DUPX_UpdateEngine
|
|
339 |
}
|
340 |
|
341 |
/**
|
342 |
-
* Take a
|
343 |
-
*
|
344 |
*
|
345 |
* @param string $from String we're looking to replace.
|
346 |
* @param string $to What we want it to be replaced with
|
347 |
* @param array $data Used to pass any subordinate arrays back to in.
|
348 |
-
* @param bool $serialised Does the array passed via $data need
|
349 |
*
|
350 |
* @return array The original array with all elements replaced as needed.
|
351 |
*/
|
146 |
'err_all' => 0
|
147 |
);
|
148 |
|
149 |
+
function set_sql_column_safe(&$str) {
|
150 |
+
$str = "`$str`";
|
151 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
$profile_start = DUPX_U::getMicrotime();
|
154 |
if (is_array($tables) && !empty($tables)) {
|
184 |
if (!$fullsearch) {
|
185 |
$colList = self::getTextColumns($dbh, $table);
|
186 |
if ($colList != null && is_array($colList)) {
|
187 |
+
array_walk($colList, set_sql_column_safe);
|
188 |
$colList = implode(',', $colList);
|
189 |
}
|
190 |
$colMsg = (empty($colList)) ? '*' : '~';
|
329 |
}
|
330 |
|
331 |
/**
|
332 |
+
* Take a serialized array and unserialized it replacing elements and
|
333 |
+
* unserializing any subordinate arrays and performing the replace.
|
334 |
*
|
335 |
* @param string $from String we're looking to replace.
|
336 |
* @param string $to What we want it to be replaced with
|
337 |
* @param array $data Used to pass any subordinate arrays back to in.
|
338 |
+
* @param bool $serialised Does the array passed via $data need serializing.
|
339 |
*
|
340 |
* @return array The original array with all elements replaced as needed.
|
341 |
*/
|
installer/build/view.step1.php
CHANGED
@@ -1,774 +1,777 @@
|
|
1 |
-
<?php
|
2 |
-
//VIEW: STEP 1- INPUT
|
3 |
-
|
4 |
-
//ARCHIVE FILE
|
5 |
-
$arcStatus = (file_exists($GLOBALS['ARCHIVE_PATH'])) ? 'Pass' : 'Fail';
|
6 |
-
$arcFormat = ($arcStatus == 'Pass') ? 'Pass' : 'StatusFailed';
|
7 |
-
$arcSize = @filesize($GLOBALS['ARCHIVE_PATH']);
|
8 |
-
$arcSize = is_numeric($arcSize) ? $arcSize : 0;
|
9 |
-
$zip_archive_enabled = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
|
10 |
-
|
11 |
-
$arcSizeRatio = (((1.0) * $arcSize) / $GLOBALS['FW_PACKAGE_EST_SIZE']) * 100;
|
12 |
-
$arcSizeStatus = ($arcSizeRatio > 90) ? 'Pass' : 'Fail';
|
13 |
-
|
14 |
-
//ARCHIVE FORMAT
|
15 |
-
if ($arcStatus) {
|
16 |
-
if (class_exists('ZipArchive')){
|
17 |
-
$zip = new ZipArchive();
|
18 |
-
if($zip->open($GLOBALS['ARCHIVE_PATH']) === TRUE ) {
|
19 |
-
|
20 |
-
$arcFilePath = basename($GLOBALS['ARCHIVE_PATH']);
|
21 |
-
$arcFilePath = substr($arcFilePath, 0, strrpos($arcFilePath, "."));
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
$
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
$
|
51 |
-
|
52 |
-
|
53 |
-
$req
|
54 |
-
$req['
|
55 |
-
$req['
|
56 |
-
$
|
57 |
-
|
58 |
-
|
59 |
-
$
|
60 |
-
|
61 |
-
|
62 |
-
$
|
63 |
-
$
|
64 |
-
$
|
65 |
-
$
|
66 |
-
$
|
67 |
-
$
|
68 |
-
$
|
69 |
-
$
|
70 |
-
$
|
71 |
-
|
72 |
-
|
73 |
-
$
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$notice['
|
79 |
-
$notice['
|
80 |
-
|
81 |
-
$notice['
|
82 |
-
$notice['
|
83 |
-
$
|
84 |
-
|
85 |
-
|
86 |
-
$
|
87 |
-
|
88 |
-
|
89 |
-
$
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<input
|
97 |
-
|
98 |
-
<
|
99 |
-
|
100 |
-
|
101 |
-
<
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
<td
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
echo "
|
151 |
-
. "
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
<td
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<br
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
<
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
</
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
</
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
<div class=
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
<td><
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
<td
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
PHP
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
<div class="
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
<div class="
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
<
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
. "
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
</li>
|
406 |
-
<li>
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
<br
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
<
|
425 |
-
|
426 |
-
|
427 |
-
<
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
</
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
<div
|
445 |
-
<
|
446 |
-
|
447 |
-
|
448 |
-
<
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
<
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
<
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
</div>
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
<
|
539 |
-
|
540 |
-
|
541 |
-
<
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
<
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
<li>installer
|
560 |
-
<li>
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
</
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
=========================================
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
<input type="hidden" name="
|
633 |
-
<input type="hidden" name="
|
634 |
-
|
635 |
-
<input type=
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
</
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
$(
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
$("#ajax-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
$
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
}
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
status += "
|
712 |
-
status += "
|
713 |
-
status += "
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
$("#s1-deploy-btn").
|
729 |
-
$("#s1-deploy-btn").
|
730 |
-
}
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//VIEW: STEP 1- INPUT
|
3 |
+
|
4 |
+
//ARCHIVE FILE
|
5 |
+
$arcStatus = (file_exists($GLOBALS['ARCHIVE_PATH'])) ? 'Pass' : 'Fail';
|
6 |
+
$arcFormat = ($arcStatus == 'Pass') ? 'Pass' : 'StatusFailed';
|
7 |
+
$arcSize = @filesize($GLOBALS['ARCHIVE_PATH']);
|
8 |
+
$arcSize = is_numeric($arcSize) ? $arcSize : 0;
|
9 |
+
$zip_archive_enabled = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
|
10 |
+
|
11 |
+
$arcSizeRatio = (((1.0) * $arcSize) / $GLOBALS['FW_PACKAGE_EST_SIZE']) * 100;
|
12 |
+
$arcSizeStatus = ($arcSizeRatio > 90) ? 'Pass' : 'Fail';
|
13 |
+
|
14 |
+
//ARCHIVE FORMAT
|
15 |
+
if ($arcStatus) {
|
16 |
+
if (class_exists('ZipArchive')){
|
17 |
+
$zip = new ZipArchive();
|
18 |
+
if($zip->open($GLOBALS['ARCHIVE_PATH']) === TRUE ) {
|
19 |
+
|
20 |
+
$arcFilePath = basename($GLOBALS['ARCHIVE_PATH']);
|
21 |
+
$arcFilePath = substr($arcFilePath, 0, strrpos($arcFilePath, "."));
|
22 |
+
//Some systems the __MACOSX folder can cause issues on others it works fine removing
|
23 |
+
//until further reports are discovered, removed on 04-06-2018
|
24 |
+
//$badFiles = array('__MACOSX', $arcFilePath);
|
25 |
+
$badFiles = array('', $arcFilePath);
|
26 |
+
$goodFiles = array('database.sql', 'installer-backup.php');
|
27 |
+
$goodFilesFound = true;
|
28 |
+
$badFilesFound = false;
|
29 |
+
|
30 |
+
foreach ($badFiles as $val) {
|
31 |
+
if (is_numeric($zip->locateName("{$val}/"))) {
|
32 |
+
$badFilesFound = true;
|
33 |
+
break;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
foreach ($goodFiles as $val) {
|
38 |
+
if ($zip->locateName($val) !== true) {
|
39 |
+
$goodFilesFound = false;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
$arcFormat = ($goodFilesFound == false && $badFilesFound == true) ? 'Fail' : 'Pass';
|
44 |
+
}
|
45 |
+
} else {
|
46 |
+
$arcFormat = 'NoZipArchive';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
$all_arc = ($arcStatus == 'Pass' && $arcFormat != 'Fail' && $arcSizeStatus == 'Pass') ? 'Pass' : 'Fail';
|
51 |
+
|
52 |
+
//REQUIRMENTS
|
53 |
+
$req = array();
|
54 |
+
$req['01'] = DUPX_Server::isDirWritable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
|
55 |
+
$req['02'] = 'Pass'; //Place-holder for future check
|
56 |
+
$req['03'] = 'Pass'; //Place-holder for future check;
|
57 |
+
$req['04'] = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
|
58 |
+
$req['05'] = DUPX_Server::$php_version_safe ? 'Pass' : 'Fail';
|
59 |
+
$all_req = in_array('Fail', $req) ? 'Fail' : 'Pass';
|
60 |
+
|
61 |
+
//NOTICES
|
62 |
+
$openbase = ini_get("open_basedir");
|
63 |
+
$scanfiles = @scandir($GLOBALS["CURRENT_ROOT_PATH"]);
|
64 |
+
$scancount = is_array($scanfiles) ? (count($scanfiles)) : -1;
|
65 |
+
$datetime1 = $GLOBALS['FW_CREATED'];
|
66 |
+
$datetime2 = date("Y-m-d H:i:s");
|
67 |
+
$fulldays = round(abs(strtotime($datetime1) - strtotime($datetime2))/86400);
|
68 |
+
$root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
|
69 |
+
$wpconf_path = "{$root_path}/wp-config.php";
|
70 |
+
$max_time_zero = @set_time_limit(0);
|
71 |
+
$max_time_size = 314572800; //300MB
|
72 |
+
$max_time_ini = ini_get('max_execution_time');
|
73 |
+
$max_time_warn = (is_numeric($max_time_ini) && $max_time_ini < 31 && $max_time_ini > 0) && $arcSize > $max_time_size;
|
74 |
+
|
75 |
+
|
76 |
+
$notice = array();
|
77 |
+
if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) {
|
78 |
+
$notice['01'] = ! file_exists($wpconf_path) ? 'Good' : 'Warn';
|
79 |
+
$notice['02'] = $scancount <= 35 ? 'Good' : 'Warn';
|
80 |
+
}
|
81 |
+
$notice['03'] = $fulldays <= 120 ? 'Good' : 'Warn';
|
82 |
+
$notice['04'] = 'Good'; //Place-holder for future check
|
83 |
+
$notice['05'] = DUPX_Server::$php_version_53_plus ? 'Good' : 'Warn';
|
84 |
+
$notice['06'] = empty($openbase) ? 'Good' : 'Warn';
|
85 |
+
$notice['07'] = ! $max_time_warn ? 'Good' : 'Warn';
|
86 |
+
$all_notice = in_array('Warn', $notice) ? 'Warn' : 'Good';
|
87 |
+
|
88 |
+
//SUMMATION
|
89 |
+
$req_success = ($all_req == 'Pass');
|
90 |
+
$req_notice = ($all_notice == 'Good');
|
91 |
+
$all_success = ($req_success && $req_notice);
|
92 |
+
$agree_msg = "To enable this button the checkbox above under the 'Terms & Notices' must be checked.";
|
93 |
+
?>
|
94 |
+
|
95 |
+
|
96 |
+
<form id='s1-input-form' method="post" class="content-form" >
|
97 |
+
<input type="hidden" name="action_ajax" value="1" />
|
98 |
+
<input type="hidden" name="action_step" value="1" />
|
99 |
+
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
100 |
+
|
101 |
+
<div class="hdr-main">
|
102 |
+
Step <span class="step">1</span> of 4: Deployment
|
103 |
+
</div>
|
104 |
+
<br/>
|
105 |
+
|
106 |
+
|
107 |
+
<!-- ====================================
|
108 |
+
ARCHIVE
|
109 |
+
==================================== -->
|
110 |
+
<div class="hdr-sub1" id="s1-area-archive-file-link" data-type="toggle" data-target="#s1-area-archive-file">
|
111 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Archive</a>
|
112 |
+
<div class="<?php echo ($all_arc == 'Pass') ? 'status-badge-pass' : 'status-badge-fail'; ?>" style="float:right">
|
113 |
+
<?php echo ($all_arc == 'Pass') ? 'Pass' : 'Fail'; ?>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<div id="s1-area-archive-file" style="display:none">
|
117 |
+
|
118 |
+
<table class="s1-archive-local">
|
119 |
+
<tr>
|
120 |
+
<td colspan="2"><div class="hdr-sub3">Site Details</div></td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td>Site:</td>
|
124 |
+
<td><?php echo $GLOBALS['FW_BLOGNAME'];?> </td>
|
125 |
+
</tr>
|
126 |
+
<tr>
|
127 |
+
<td>Notes:</td>
|
128 |
+
<td><?php echo strlen($GLOBALS['FW_PACKAGE_NOTES']) ? "{$GLOBALS['FW_PACKAGE_NOTES']}" : " - no notes - ";?></td>
|
129 |
+
</tr>
|
130 |
+
<?php if ($GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
131 |
+
<tr>
|
132 |
+
<td>Mode:</td>
|
133 |
+
<td>Archive only database was enabled during package package creation.</td>
|
134 |
+
</tr>
|
135 |
+
<?php endif; ?>
|
136 |
+
</table>
|
137 |
+
|
138 |
+
<table class="s1-archive-local">
|
139 |
+
<tr>
|
140 |
+
<td colspan="2"><div class="hdr-sub3">File Details</div></td>
|
141 |
+
</tr>
|
142 |
+
<tr style="vertical-align:top">
|
143 |
+
<td>Size:</td>
|
144 |
+
<td>
|
145 |
+
<?php
|
146 |
+
$projectedSize = DUPX_U::readableByteSize($GLOBALS['FW_PACKAGE_EST_SIZE']);
|
147 |
+
$actualSize = DUPX_U::readableByteSize($arcSize);
|
148 |
+
echo "{$actualSize}<br/>";
|
149 |
+
if ($arcSizeStatus == 'Fail' ) {
|
150 |
+
echo "<span class='dupx-fail'>The archive file size is currently <b>{$actualSize}</b> and its estimated file size should be around <b>{$projectedSize}</b>. "
|
151 |
+
. "The archive file may not have been fully downloaded to the server. If so please wait for the file to completely download and then refresh this page.<br/><br/>";
|
152 |
+
|
153 |
+
echo "This warning is only shown when the file has more than a 10% size ratio difference from when it was originally built. Please review the file sizes "
|
154 |
+
. "to make sure the archive was downloaded to this server correctly if the download is complete.</span>";
|
155 |
+
}
|
156 |
+
?>
|
157 |
+
</td>
|
158 |
+
</tr>
|
159 |
+
<tr>
|
160 |
+
<td>Name:</td>
|
161 |
+
<td><?php echo "{$GLOBALS['FW_PACKAGE_NAME']}";?> </td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<td>Path:</td>
|
165 |
+
<td><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}";?> </td>
|
166 |
+
</tr>
|
167 |
+
<tr>
|
168 |
+
<td>Status:</td>
|
169 |
+
<td>
|
170 |
+
<?php if ($arcStatus != 'Fail') : ?>
|
171 |
+
<span class="dupx-pass">File Found</span>
|
172 |
+
<?php else : ?>
|
173 |
+
<div class="s1-archive-failed-msg">
|
174 |
+
<b class="dupx-fail">Archive File Not Found!</b><br/>
|
175 |
+
The archive file name below must be the <u>exact</u> name of the archive file placed in the deployment path (character for character).
|
176 |
+
If the file does not have the same name then rename it to the name above.
|
177 |
+
<br/><br/>
|
178 |
+
|
179 |
+
When downloading the package files make sure both files are from the same package line in the packages view. The archive file also
|
180 |
+
must be completely downloaded to the server before starting the install. The following zip files were found at the deployment path:
|
181 |
+
<?php
|
182 |
+
//DETECT ARCHIVE FILES
|
183 |
+
$zip_files = DUPX_Server::getZipFiles();
|
184 |
+
$zip_count = count($zip_files);
|
185 |
+
|
186 |
+
if ($zip_count >= 1) {
|
187 |
+
echo "<ol style='padding:10px 20px 0 20px; font-style:italic'>";
|
188 |
+
foreach($zip_files as $file) {
|
189 |
+
echo "<li> '{$file}'</li>";
|
190 |
+
}
|
191 |
+
echo "</ol>";
|
192 |
+
} else {
|
193 |
+
echo "<br/><br/> <i>- No zip files found -</i>";
|
194 |
+
}
|
195 |
+
?>
|
196 |
+
</div>
|
197 |
+
<?php endif; ?>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
<tr>
|
201 |
+
<td>Format:</td>
|
202 |
+
<td>
|
203 |
+
<?php if ($arcFormat == 'Pass') : ?>
|
204 |
+
<span class="dupx-pass">Good structure</span>
|
205 |
+
<?php elseif ($arcFormat == 'StatusFailed') : ?>
|
206 |
+
<span class="dupx-fail">Unable to validate format</span><br/>
|
207 |
+
<?php elseif ($arcFormat == 'NoZipArchive') : ?>
|
208 |
+
<div class="s1-archive-failed-msg">
|
209 |
+
The PHP extraction library <a href="http://php.net/manual/en/book.zip.php" target="_help">ZipArchive</a> was not found on this server. There are a few options:
|
210 |
+
<ol>
|
211 |
+
<li>Contact your host to enable the this PHP library. <a href="http://php.net/manual/en/zip.installation.php" target="_help">[more info]</a></li>
|
212 |
+
<li>Enable 'Manual package extraction' in the options menu and <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-015-q" target="_help">Manually extract the archive</a></li>
|
213 |
+
</ol>
|
214 |
+
</div>
|
215 |
+
<?php else : ?>
|
216 |
+
<div class="s1-archive-failed-msg">
|
217 |
+
<b class="dupx-fail">Invalid Archive Format Detected!</b><br/>
|
218 |
+
The archive files contents must be laid out in a specific format. If the format has been changed the install process will error out.
|
219 |
+
<br/><br/>
|
220 |
+
|
221 |
+
This scenario is rare but can happen on some systems during the download and upload process of the zip without a user being aware of
|
222 |
+
the issue. Please check the contents of the zip archive and be sure its contents match the layout of your site.
|
223 |
+
<br/><br/>
|
224 |
+
|
225 |
+
Files such as database.sql and wp-config.php should be at the root of the archive. For more details see the FAQ article
|
226 |
+
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=invalid_ar_fmt#faq-installer-020-q" target="_help">The archive format is changing on my Mac what might be the problem?</a>
|
227 |
+
</div>
|
228 |
+
<?php endif; ?>
|
229 |
+
</td>
|
230 |
+
</tr>
|
231 |
+
</table>
|
232 |
+
|
233 |
+
</div>
|
234 |
+
<br/><br/>
|
235 |
+
|
236 |
+
|
237 |
+
<!-- ====================================
|
238 |
+
VALIDATION
|
239 |
+
==================================== -->
|
240 |
+
<div class="hdr-sub1" id="s1-area-sys-setup-link" data-type="toggle" data-target="#s1-area-sys-setup">
|
241 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Validation</a>
|
242 |
+
<div class="<?php echo ($req_success) ? 'status-badge-pass' : 'status-badge-fail'; ?>" style="float:right">
|
243 |
+
<?php echo ($req_success) ? 'Pass' : 'Fail'; ?>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
<div id="s1-area-sys-setup" style="display:none">
|
247 |
+
<div class='info-top'>The system validation checks help to make sure the system is ready for install.</div>
|
248 |
+
|
249 |
+
<!-- *** REQUIREMENTS *** -->
|
250 |
+
<div class="s1-reqs" id="s1-reqs-all">
|
251 |
+
<div class="header">
|
252 |
+
<table class="s1-checks-area">
|
253 |
+
<tr>
|
254 |
+
<td class="title">Requirements <small>(must pass)</small></td>
|
255 |
+
<td class="toggle"><a href="javascript:void(0)" onclick="DUPX.toggleAll('#s1-reqs-all')">[toggle]</a></td>
|
256 |
+
</tr>
|
257 |
+
</table>
|
258 |
+
</div>
|
259 |
+
|
260 |
+
<!-- REQ 1 -->
|
261 |
+
<div class="status <?php echo strtolower($req['01']); ?>"><?php echo $req['01']; ?></div>
|
262 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs01">+ Permissions</div>
|
263 |
+
<div class="info" id="s1-reqs01">
|
264 |
+
<table>
|
265 |
+
<tr>
|
266 |
+
<td><b>Deployment Path:</b> </td>
|
267 |
+
<td><i><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}"; ?></i> </td>
|
268 |
+
</tr>
|
269 |
+
<tr>
|
270 |
+
<td><b>Suhosin Extension:</b> </td>
|
271 |
+
<td><?php echo extension_loaded('suhosin') ? "<i class='dupx-fail'>Enabled</i>" : "<i class='dupx-pass'>Disabled</i>"; ?> </td>
|
272 |
+
</tr>
|
273 |
+
<tr>
|
274 |
+
<td><b>PHP Safe Mode:</b> </td>
|
275 |
+
<td><?php echo (DUPX_Server::$php_safe_mode_on) ? "<i class='dupx-fail'>Enabled</i>" : "<i class='dupx-pass'>Disabled</i>"; ?> </td>
|
276 |
+
</tr>
|
277 |
+
</table><br/>
|
278 |
+
|
279 |
+
The deployment path above must be writable by PHP in order to extract the archive file. Incorrect permissions and extension such as
|
280 |
+
<a href="https://suhosin.org/stories/index.html" target="_blank">suhosin</a> can sometimes interfere with PHP being able to write/extract files.
|
281 |
+
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_perms#faq-trouble-055-q" target="_blank">FAQ permission</a> help link for complete details.
|
282 |
+
PHP with <a href='http://php.net/manual/en/features.safe-mode.php' target='_blank'>safe mode</a> should be disabled. If this test fails
|
283 |
+
please contact your hosting provider or server administrator to disable PHP safe mode.
|
284 |
+
</div>
|
285 |
+
|
286 |
+
<!-- REQ 2
|
287 |
+
<div class="status <?php echo strtolower($req['02']); ?>"><?php echo $req['02']; ?></div>
|
288 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
|
289 |
+
<div class="info" id="s1-reqs02"></div>-->
|
290 |
+
|
291 |
+
<!-- REQ 3
|
292 |
+
<div class="status <?php echo strtolower($req['03']); ?>"><?php echo $req['03']; ?></div>
|
293 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs03">+ Place Holder</div>
|
294 |
+
<div class="info" id="s1-reqs03"></div> -->
|
295 |
+
|
296 |
+
<!-- REQ 4 -->
|
297 |
+
<div class="status <?php echo strtolower($req['04']); ?>"><?php echo $req['04']; ?></div>
|
298 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP Mysqli</div>
|
299 |
+
<div class="info" id="s1-reqs04">
|
300 |
+
Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
|
301 |
+
Please contact your hosting provider or server administrator to enable the mysqli extension. <i>The detection for this call uses
|
302 |
+
the function_exists('mysqli_connect') call.</i>
|
303 |
+
</div>
|
304 |
+
|
305 |
+
<!-- REQ 5 -->
|
306 |
+
<div class="status <?php echo strtolower($req['05']); ?>"><?php echo $req['05']; ?></div>
|
307 |
+
<div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Min Version</div>
|
308 |
+
<div class="info" id="s1-reqs05">
|
309 |
+
This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
|
310 |
+
Contact your hosting provider or server administrator and let them know you would like to upgrade your PHP version.
|
311 |
+
</div>
|
312 |
+
</div><br/>
|
313 |
+
|
314 |
+
|
315 |
+
<!-- *** NOTICES *** -->
|
316 |
+
<div class="s1-reqs" id="s1-notice-all">
|
317 |
+
<div class="header">
|
318 |
+
<table class="s1-checks-area">
|
319 |
+
<tr>
|
320 |
+
<td class="title">Notices <small>(optional)</small></td>
|
321 |
+
<td class="toggle"><a href="javascript:void(0)" onclick="DUPX.toggleAll('#s1-notice-all')">[toggle]</a></td>
|
322 |
+
</tr>
|
323 |
+
</table>
|
324 |
+
</div>
|
325 |
+
|
326 |
+
<?php if (!$GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
|
327 |
+
|
328 |
+
<!-- NOTICE 1 -->
|
329 |
+
<div class="status <?php echo ($notice['01'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['01']; ?></div>
|
330 |
+
<div class="title" data-type="toggle" data-target="#s1-notice01">+ Configuration File</div>
|
331 |
+
<div class="info" id="s1-notice01">
|
332 |
+
Duplicator works best by placing the installer and archive files into an empty directory. If a wp-config.php file is found in the extraction
|
333 |
+
directory it might indicate that a pre-existing WordPress site exists which can lead to a bad install.
|
334 |
+
<br/><br/>
|
335 |
+
<b>Options:</b>
|
336 |
+
<ul style="margin-bottom: 0">
|
337 |
+
<li>If the archive was already manually extracted then <a href="javascript:void(0)" onclick="DUPX.getManaualArchiveOpt()">[Enable Manual Archive Extraction]</a></li>
|
338 |
+
<li>If the wp-config file is not needed then remove it.</li>
|
339 |
+
</ul>
|
340 |
+
</div>
|
341 |
+
|
342 |
+
<!-- NOTICE 2 -->
|
343 |
+
<div class="status <?php echo ($notice['02'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['02']; ?></div>
|
344 |
+
<div class="title" data-type="toggle" data-target="#s1-notice02">+ Directory Setup</div>
|
345 |
+
<div class="info" id="s1-notice02">
|
346 |
+
<b>Deployment Path:</b> <i><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}"; ?></i>
|
347 |
+
<br/><br/>
|
348 |
+
There are currently <?php echo "<b>[{$scancount}]</b>";?> items in the deployment path. These items will be overwritten if they also exist
|
349 |
+
inside the archive file. The notice is to prevent overwriting an existing site or trying to install on-top of one which
|
350 |
+
can have un-intended results. <i>This notice shows if it detects more than 40 items.</i>
|
351 |
+
|
352 |
+
<br/><br/>
|
353 |
+
<b>Options:</b>
|
354 |
+
<ul style="margin-bottom: 0">
|
355 |
+
<li>If the archive was already manually extracted then <a href="javascript:void(0)" onclick="DUPX.getManaualArchiveOpt()">[Enable Manual Archive Extraction]</a></li>
|
356 |
+
<li>If the files/directories are not the same as those in the archive then this notice can be ignored.</li>
|
357 |
+
<li>Remove the files if they are not needed and refresh this page.</li>
|
358 |
+
</ul>
|
359 |
+
</div>
|
360 |
+
|
361 |
+
<?php endif; ?>
|
362 |
+
|
363 |
+
<!-- NOTICE 3 -->
|
364 |
+
<div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['03']; ?></div>
|
365 |
+
<div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
|
366 |
+
<div class="info" id="s1-notice03">
|
367 |
+
<?php echo "The package is {$fulldays} day(s) old. Packages older than 120 days might be considered stale. If you are comfortable with a package that that was created over "
|
368 |
+
. "four months ago please ignore this notice."; ?>
|
369 |
+
</div>
|
370 |
+
|
371 |
+
<!-- NOTICE 4
|
372 |
+
<div class="status <?php echo ($notice['04'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['04']; ?></div>
|
373 |
+
<div class="title" data-type="toggle" data-target="#s1-notice04">+ Placeholder</div>
|
374 |
+
<div class="info" id="s1-notice04">
|
375 |
+
</div>-->
|
376 |
+
|
377 |
+
<!-- NOTICE 5 -->
|
378 |
+
<div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['05']; ?></div>
|
379 |
+
<div class="title" data-type="toggle" data-target="#s1-notice05">+ PHP Version 5.2</div>
|
380 |
+
<div class="info" id="s1-notice05">
|
381 |
+
<?php
|
382 |
+
$currentPHP = DUPX_Server::$php_version;
|
383 |
+
$cssStyle = DUPX_Server::$php_version_53_plus ? 'color:green' : 'color:red';
|
384 |
+
echo "<b style='{$cssStyle}'>This server is currently running PHP version [{$currentPHP}]</b>.<br/>"
|
385 |
+
. "Duplicator allows PHP 5.2 to be used during install but does not officially support it. If your using PHP 5.2 we strongly recommend NOT using it and having your "
|
386 |
+
. "host upgrade to a newer more stable, secure and widely supported version. The <a href='http://php.net/eol.php' target='_blank'>end of life for PHP 5.2</a> "
|
387 |
+
. "was in January of 2011 and is not recommended for use.<br/><br/>";
|
388 |
+
|
389 |
+
echo "Many plugin and theme authors are no longer supporting PHP 5.2 and trying to use it can result in site wide problems and compatibility warnings and errors. "
|
390 |
+
. "Please note if you continue with the install using PHP 5.2 the Duplicator support team will not be able to help with issues or troubleshooting your site. "
|
391 |
+
. "If your server is running <b>PHP 5.3+</b> please feel free to reach out for help if you run into issues with your migration/install.";
|
392 |
+
?>
|
393 |
+
</div>
|
394 |
+
|
395 |
+
<!-- NOTICE 6 -->
|
396 |
+
<div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['06']; ?></div>
|
397 |
+
<div class="title" data-type="toggle" data-target="#s1-notice06">+ PHP Open Base</div>
|
398 |
+
<div class="info" id="s1-notice06">
|
399 |
+
<b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
|
400 |
+
<br/><br/>
|
401 |
+
|
402 |
+
If <a href="http://www.php.net/manual/en/ini.core.php#ini.open-basedir" target="_blank">open_basedir</a> is enabled and you're
|
403 |
+
having issues getting your site to install properly; please work with your host and follow these steps to prevent issues:
|
404 |
+
<ol style="margin:7px; line-height:19px">
|
405 |
+
<li>Disable the open_basedir setting in the php.ini file</li>
|
406 |
+
<li>If the host will not disable, then add the path below to the open_basedir setting in the php.ini<br/>
|
407 |
+
<i style="color:maroon">"<?php echo str_replace('\\', '/', dirname( __FILE__ )); ?>"</i>
|
408 |
+
</li>
|
409 |
+
<li>Save the settings and restart the web server</li>
|
410 |
+
</ol>
|
411 |
+
Note: This warning will still show if you choose option #2 and open_basedir is enabled, but should allow the installer to run properly. Please work with your
|
412 |
+
hosting provider or server administrator to set this up correctly.
|
413 |
+
</div>
|
414 |
+
|
415 |
+
<!-- NOTICE 7 -->
|
416 |
+
<div class="status <?php echo ($notice['07'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['07']; ?></div>
|
417 |
+
<div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
|
418 |
+
<div class="info" id="s1-notice07">
|
419 |
+
<b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
|
420 |
+
<b>PHP max_execution_time:</b> <?php echo "{$max_time_ini}"; ?> <small>(zero means no limit)</small> <br/>
|
421 |
+
<b>PHP set_time_limit:</b> <?php echo ($max_time_zero) ? '<i style="color:green">Success</i>' : '<i style="color:maroon">Failed</i>' ?>
|
422 |
+
<br/><br/>
|
423 |
+
|
424 |
+
The PHP <a href="http://php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank">max_execution_time</a> setting is used to
|
425 |
+
determine how long a PHP process is allowed to run. If the setting is too small and the archive file size is too large then PHP may not have enough
|
426 |
+
time to finish running before the process is killed causing a timeout.
|
427 |
+
<br/><br/>
|
428 |
+
|
429 |
+
Duplicator attempts to turn off the timeout by using the
|
430 |
+
<a href="http://php.net/manual/en/function.set-time-limit.php" target="_blank">set_time_limit</a> setting. If this notice shows as a warning then it is
|
431 |
+
still safe to continue with the install. However, if a timeout occurs then you will need to consider working with the max_execution_time setting or extracting the
|
432 |
+
archive file using the 'Manual package extraction' method.
|
433 |
+
Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_timeout#faq-trouble-100-q" target="_blank">FAQ timeout</a> help link for more details.
|
434 |
+
|
435 |
+
</div>
|
436 |
+
</div>
|
437 |
+
</div>
|
438 |
+
<br/><br/>
|
439 |
+
|
440 |
+
|
441 |
+
<!-- ====================================
|
442 |
+
OPTIONS
|
443 |
+
==================================== -->
|
444 |
+
<div class="hdr-sub1" data-type="toggle" data-target="#s1-area-adv-opts">
|
445 |
+
<a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
|
446 |
+
</div>
|
447 |
+
<div id="s1-area-adv-opts" style="display:none">
|
448 |
+
<div class="help-target"><a href="?help#help-s1" target="_blank">[help]</a></div>
|
449 |
+
<br/>
|
450 |
+
<div class="hdr-sub3">General</div>
|
451 |
+
<table class="dupx-opts dupx-advopts">
|
452 |
+
<tr>
|
453 |
+
<td>Extraction:</td>
|
454 |
+
<td>
|
455 |
+
|
456 |
+
<select id="archive_engine" name="archive_engine" size="2">
|
457 |
+
<option value="manual">Manual Archive Extraction</option>
|
458 |
+
<?php
|
459 |
+
//ZIP-ARCHIVE
|
460 |
+
echo (! $zip_archive_enabled)
|
461 |
+
? '<option disabled="true">PHP ZipArchive (not detected on server)</option>'
|
462 |
+
: '<option value="ziparchive" selected="true">PHP ZipArchive</option>';
|
463 |
+
?>
|
464 |
+
</select>
|
465 |
+
</td>
|
466 |
+
</tr>
|
467 |
+
</table>
|
468 |
+
<br>
|
469 |
+
<br>
|
470 |
+
<div class="hdr-sub3">Advanced</div>
|
471 |
+
<table class="dupx-opts dupx-advopts">
|
472 |
+
<tr>
|
473 |
+
<td>Safe Mode:</td>
|
474 |
+
<td>
|
475 |
+
<select name="exe_safe_mode" id="exe_safe_mode" onchange="DUPX.onSafeModeSwitch();" style="width:200px;">
|
476 |
+
<option value="0">Off</option>
|
477 |
+
<option value="1">Basic</option>
|
478 |
+
<option value="2">Advance</option>
|
479 |
+
</select>
|
480 |
+
</td>
|
481 |
+
</tr>
|
482 |
+
<tr>
|
483 |
+
<td>Config Files:</td>
|
484 |
+
<td>
|
485 |
+
<input type="checkbox" name="retain_config" id="retain_config" value="1" />
|
486 |
+
<label for="retain_config" style="font-weight: normal">Retain original .htaccess, .user.ini and web.config</label>
|
487 |
+
</td>
|
488 |
+
</tr>
|
489 |
+
<tr>
|
490 |
+
<td>File Times:</td>
|
491 |
+
<td>
|
492 |
+
<input type="radio" name="archive_filetime" id="archive_filetime_now" value="current" checked="checked" /> <label class="radio" for="archive_filetime_now" title='Set the files current date time to now'>Current</label>
|
493 |
+
<input type="radio" name="archive_filetime" id="archive_filetime_orginal" value="original" /> <label class="radio" for="archive_filetime_orginal" title="Keep the files date time the same">Original</label>
|
494 |
+
</td>
|
495 |
+
</tr>
|
496 |
+
<tr>
|
497 |
+
<td>Logging:</td>
|
498 |
+
<td>
|
499 |
+
<input type="radio" name="logging" id="logging-light" value="1" checked="true"> <label for="logging-light">Light</label>
|
500 |
+
<input type="radio" name="logging" id="logging-detailed" value="2"> <label for="logging-detailed">Detailed</label>
|
501 |
+
<input type="radio" name="logging" id="logging-debug" value="3"> <label for="logging-debug">Debug</label>
|
502 |
+
</td>
|
503 |
+
</tr>
|
504 |
+
</table>
|
505 |
+
<br/><br/>
|
506 |
+
|
507 |
+
<!-- *** SETUP HELP *** -->
|
508 |
+
<div class="hdr-sub3">Setup Help</div>
|
509 |
+
<div id='s1-area-setup-help'>
|
510 |
+
<div style="padding:10px 0px 0px 10px;line-height:22px">
|
511 |
+
<table style='width:100%'>
|
512 |
+
<tr>
|
513 |
+
<td style="width:200px">
|
514 |
+
» Watch the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_vid_tutor#faq-resource-070-q" target="_blank">video tutorials</a> <br/>
|
515 |
+
» Read helpful <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_help_art" target="_blank">articles</a> <br/>
|
516 |
+
</td>
|
517 |
+
<td>
|
518 |
+
» Visit the <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_quickstart" target="_blank">quick start guides</a> <br/>
|
519 |
+
» Browse the <a href="https://snapcreek.com/duplicator/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=installer_online_docs" target="_blank">online docs</a> <br/>
|
520 |
+
</td>
|
521 |
+
</tr>
|
522 |
+
</table>
|
523 |
+
</div>
|
524 |
+
</div><br/>
|
525 |
+
|
526 |
+
</div>
|
527 |
+
<br/><br/>
|
528 |
+
|
529 |
+
<!-- ====================================
|
530 |
+
NOTICES
|
531 |
+
==================================== -->
|
532 |
+
<div id="dialog-server-notice" style="display:none">
|
533 |
+
<div id="s1-warning-msg">
|
534 |
+
<b>TERMS & NOTICES</b> <br/><br/>
|
535 |
+
|
536 |
+
<b>Disclaimer:</b>
|
537 |
+
The Duplicator software and installer should be used at your own risk. Users should always back up or have backups of your database and files before running this installer.
|
538 |
+
If you're not sure about how to use this tool then please enlist the guidance of a technical professional. <u>Always</u> test this installer in a sandbox environment
|
539 |
+
before trying to deploy into a production environment. Be sure that if anything happens during the install that you have a backup recovery plan in place. By accepting
|
540 |
+
this agreement the users of this software do not hold liable Snapcreek LLC or any of its affiliates/members liable for any issues that might occur during use of this software.
|
541 |
+
<br/><br/>
|
542 |
+
|
543 |
+
|
544 |
+
<b>Database:</b>
|
545 |
+
Do not connect to an existing database unless you are 100% sure you want to remove all of it's data. Connecting to a database that already exists will permanently
|
546 |
+
DELETE all data in that database. This tool is designed to populate and fill a database with NEW data from a duplicated database using the SQL script in the
|
547 |
+
package name above.
|
548 |
+
<br/><br/>
|
549 |
+
|
550 |
+
<b>Setup:</b>
|
551 |
+
Only the archive and installer file should be in the install directory, unless you have manually extracted the package and checked the
|
552 |
+
'Manual Package Extraction' checkbox. All other files will be OVERWRITTEN during install. Make sure you have full backups of all your databases and files
|
553 |
+
before continuing with an installation. Manual extraction requires that all contents in the package are extracted to the same directory as the installer file.
|
554 |
+
Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
|
555 |
+
<br/><br/>
|
556 |
+
|
557 |
+
<b>After Install:</b> When you are done with the installation you must remove the these files/directories:
|
558 |
+
<ul>
|
559 |
+
<li>installer.php</li>
|
560 |
+
<li>installer-data.sql</li>
|
561 |
+
<li>installer-backup.php</li>
|
562 |
+
<li>installer-log.txt</li>
|
563 |
+
<li>database.sql</li>
|
564 |
+
</ul>
|
565 |
+
|
566 |
+
These files contain sensitive information and should not remain on a production system for system integrity and security protection.
|
567 |
+
<br/><br/>
|
568 |
+
|
569 |
+
<b>License Overview</b><br/>
|
570 |
+
Duplicator is licensed under the GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html including the following disclaimers and limitation of liability.
|
571 |
+
<br/><br/>
|
572 |
+
|
573 |
+
<b>Disclaimer of Warranty</b><br/>
|
574 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
575 |
+
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
576 |
+
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
577 |
+
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
578 |
+
<br/><br/>
|
579 |
+
|
580 |
+
<b>Limitation of Liability</b><br/>
|
581 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
|
582 |
+
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
583 |
+
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
|
584 |
+
OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
585 |
+
<br/><br/>
|
586 |
+
</div>
|
587 |
+
</div>
|
588 |
+
|
589 |
+
<div id="s1-warning-check">
|
590 |
+
<input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="DUPX.acceptWarning()" />
|
591 |
+
<label for="accept-warnings">I have read and accept all <a href="javascript:void(0)" onclick="DUPX.showNotices()">terms & notices</a> <small style="font-style:italic">(required to continue)</small></label><br/>
|
592 |
+
</div>
|
593 |
+
|
594 |
+
|
595 |
+
<?php if (! $req_success || $all_arc == 'Fail') :?>
|
596 |
+
<div class="s1-err-msg">
|
597 |
+
<i>
|
598 |
+
This installation will not be able to proceed until the 'Archive' and 'Validation' sections pass. Please adjust your servers settings or contact your
|
599 |
+
server administrator, hosting provider or visit the resources below for additional help.
|
600 |
+
</i>
|
601 |
+
<div style="padding:10px">
|
602 |
+
» <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_validfail_techfaq" target="_blank">Technical FAQs</a> <br/>
|
603 |
+
» <a href="https://snapcreek.com/support/docs/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_validfail_onlinedocs" target="_blank">Online Documentation</a> <br/>
|
604 |
+
</div>
|
605 |
+
</div> <br/><br/>
|
606 |
+
<?php else : ?>
|
607 |
+
<br/><br/><br/>
|
608 |
+
<br/><br/><br/>
|
609 |
+
<div class="dupx-footer-buttons">
|
610 |
+
<button id="s1-deploy-btn" type="button" class="default-btn" onclick="DUPX.runExtraction()" title="<?php echo $agree_msg; ?>"> Next </button>
|
611 |
+
</div>
|
612 |
+
<?php endif; ?>
|
613 |
+
|
614 |
+
</form>
|
615 |
+
|
616 |
+
|
617 |
+
|
618 |
+
<!-- =========================================
|
619 |
+
VIEW: STEP 1 - AJAX RESULT
|
620 |
+
Auto Posts to view.step2.php
|
621 |
+
========================================= -->
|
622 |
+
<form id='s1-result-form' method="post" class="content-form" style="display:none">
|
623 |
+
|
624 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
|
625 |
+
<div class="hdr-main">
|
626 |
+
Step <span class="step">1</span> of 4: Deployment
|
627 |
+
</div>
|
628 |
+
|
629 |
+
<!-- POST PARAMS -->
|
630 |
+
<div class="dupx-debug">
|
631 |
+
<input type="hidden" name="action_step" value="2" />
|
632 |
+
<input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
|
633 |
+
<input type="hidden" name="logging" id="ajax-logging" />
|
634 |
+
<input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="0" />
|
635 |
+
<input type="hidden" name="retain_config" id="ajax-retain-config" />
|
636 |
+
<input type="hidden" name="json" id="ajax-json" />
|
637 |
+
<textarea id='ajax-json-debug' name='json_debug_view'></textarea>
|
638 |
+
<input type='submit' value='manual submit'>
|
639 |
+
</div>
|
640 |
+
|
641 |
+
<!-- PROGRESS BAR -->
|
642 |
+
<div id="progress-area">
|
643 |
+
<div style="width:500px; margin:auto">
|
644 |
+
<h3>Running Deployment Processes Please Wait...</h3>
|
645 |
+
<div id="progress-bar"></div>
|
646 |
+
<i>This may take several minutes</i>
|
647 |
+
</div>
|
648 |
+
</div>
|
649 |
+
|
650 |
+
<!-- AJAX SYSTEM ERROR -->
|
651 |
+
<div id="ajaxerr-area" style="display:none">
|
652 |
+
<p>Please try again an issue has occurred.</p>
|
653 |
+
<div style="padding: 0px 10px 10px 0px;">
|
654 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the installer-log.txt file for more details.</div>
|
655 |
+
<div style="text-align:center; margin:10px auto 0px auto">
|
656 |
+
<input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="« Try Again" /><br/><br/>
|
657 |
+
<i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxerr_ticket' target='_blank'>snapcreek.com</a></i>
|
658 |
+
</div>
|
659 |
+
</div>
|
660 |
+
</div>
|
661 |
+
</form>
|
662 |
+
|
663 |
+
<script>
|
664 |
+
DUPX.getManaualArchiveOpt = function ()
|
665 |
+
{
|
666 |
+
$("html, body").animate({scrollTop: $(document).height()}, 1500);
|
667 |
+
$("a[data-target='#s1-area-adv-opts']").find('i').removeClass('dupx-plus-square').addClass('dupx-minus-square');
|
668 |
+
$('#s1-area-adv-opts').show(1000);
|
669 |
+
$('select#archive_engine').val('manual').focus();
|
670 |
+
};
|
671 |
+
|
672 |
+
/** Performs Ajax post to extract files and create db
|
673 |
+
* Timeout (10000000 = 166 minutes) */
|
674 |
+
DUPX.runExtraction = function()
|
675 |
+
{
|
676 |
+
var $form = $('#s1-input-form');
|
677 |
+
|
678 |
+
//1800000 = 30 minutes
|
679 |
+
//If the extraction takes longer than 30 minutes then user
|
680 |
+
//will probably want to do a manual extraction or even FTP
|
681 |
+
$.ajax({
|
682 |
+
type: "POST",
|
683 |
+
timeout:1800000,
|
684 |
+
dataType: "json",
|
685 |
+
url: window.location.href,
|
686 |
+
data: $form.serialize(),
|
687 |
+
beforeSend: function() {
|
688 |
+
DUPX.showProgressBar();
|
689 |
+
$form.hide();
|
690 |
+
$('#s1-result-form').show();
|
691 |
+
},
|
692 |
+
success: function(data) {
|
693 |
+
var dataJSON = JSON.stringify(data);
|
694 |
+
$("#ajax-json-debug").val(dataJSON);
|
695 |
+
if (typeof(data) != 'undefined' && data.pass == 1) {
|
696 |
+
$("#ajax-logging").val($("input:radio[name=logging]:checked").val());
|
697 |
+
$("#ajax-retain-config").val($("#retain_config").is(":checked") ? 1 : 0);
|
698 |
+
$("#exe-safe-mode").val($("#exe_safe_mode").val());
|
699 |
+
$("#ajax-json").val(escape(dataJSON));
|
700 |
+
<?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
|
701 |
+
setTimeout(function() {$('#s1-result-form').submit();}, 500);
|
702 |
+
<?php endif; ?>
|
703 |
+
$('#progress-area').fadeOut(1000);
|
704 |
+
} else {
|
705 |
+
$('#ajaxerr-data').html('Error Processing Step 1');
|
706 |
+
DUPX.hideProgressBar();
|
707 |
+
}
|
708 |
+
},
|
709 |
+
error: function(xhr) {
|
710 |
+
var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
|
711 |
+
status += "<b>Status:</b> " + xhr.statusText + "<br/>";
|
712 |
+
status += "<b>Response:</b> " + xhr.responseText + "";
|
713 |
+
status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
|
714 |
+
status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
|
715 |
+
status += "- Check the web server and PHP error logs. <br/>";
|
716 |
+
status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxextract_tofaq#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
|
717 |
+
$('#ajaxerr-data').html(status);
|
718 |
+
DUPX.hideProgressBar();
|
719 |
+
}
|
720 |
+
});
|
721 |
+
|
722 |
+
};
|
723 |
+
|
724 |
+
/** Accetps Useage Warning */
|
725 |
+
DUPX.acceptWarning = function()
|
726 |
+
{
|
727 |
+
if ($("#accept-warnings").is(':checked')) {
|
728 |
+
$("#s1-deploy-btn").removeAttr("disabled");
|
729 |
+
$("#s1-deploy-btn").removeAttr("title");
|
730 |
+
} else {
|
731 |
+
$("#s1-deploy-btn").attr("disabled", "true");
|
732 |
+
$("#s1-deploy-btn").attr("title", "<?php echo $agree_msg; ?>");
|
733 |
+
}
|
734 |
+
}
|
735 |
+
|
736 |
+
/** Server Terms Dialog*/
|
737 |
+
DUPX.showNotices = function()
|
738 |
+
{
|
739 |
+
modal({
|
740 |
+
type: 'alert',
|
741 |
+
title: 'Terms and Notices',
|
742 |
+
text: $('#dialog-server-notice').html()
|
743 |
+
});
|
744 |
+
}
|
745 |
+
|
746 |
+
|
747 |
+
/** Go back on AJAX result view */
|
748 |
+
DUPX.hideErrorResult = function()
|
749 |
+
{
|
750 |
+
$('#s1-result-form').hide();
|
751 |
+
$('#s1-input-form').show(200);
|
752 |
+
}
|
753 |
+
|
754 |
+
DUPX.onSafeModeSwitch = function ()
|
755 |
+
{
|
756 |
+
var mode = $('#exe_safe_mode').val();
|
757 |
+
if(mode == 0){
|
758 |
+
$("#retain_config").removeAttr("disabled");
|
759 |
+
}else if(mode == 1 || mode ==2){
|
760 |
+
if($("#retain_config").is(':checked'))
|
761 |
+
$("#retain_config").removeAttr("checked");
|
762 |
+
$("#retain_config").attr("disabled", true);
|
763 |
+
}
|
764 |
+
|
765 |
+
$('#exe-safe-mode').val(mode);
|
766 |
+
console.log("mode set to"+mode);
|
767 |
+
}
|
768 |
+
|
769 |
+
//DOCUMENT LOAD
|
770 |
+
$(document).ready(function()
|
771 |
+
{
|
772 |
+
DUPX.acceptWarning();
|
773 |
+
$("*[data-type='toggle']").click(DUPX.toggleClick);
|
774 |
+
<?php echo ($all_arc == 'Fail') ? "$('#s1-area-archive-file-link').trigger('click');" : ""; ?>
|
775 |
+
<?php echo (! $all_success) ? "$('#s1-area-sys-setup-link').trigger('click');" : ""; ?>
|
776 |
+
})
|
777 |
+
</script>
|
readme.txt
CHANGED
@@ -1,106 +1,106 @@
|
|
1 |
-
=== Duplicator - WordPress Migration Plugin ===
|
2 |
-
Contributors: corylamleorg, bobriley
|
3 |
-
Donate link: www.lifeinthegrid.com/partner
|
4 |
-
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
-
Requires at least: 4.0
|
6 |
-
Tested up to: 4.9
|
7 |
-
Requires PHP: 5.2.17
|
8 |
-
Stable tag: 1.2.
|
9 |
-
License: GPLv2
|
10 |
-
|
11 |
-
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
12 |
-
|
13 |
-
== Description ==
|
14 |
-
|
15 |
-
> Duplicator gives WordPress users the ability to migrate, copy, move or clone a site from one location to another and also serves as a simple backup utility. Duplicator handles
|
16 |
-
|
17 |
-
For complete details visit [snapcreek.com](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=desc_details&utm_campaign=duplicator_free).
|
18 |
-
|
19 |
-
= Quick Video Demo =
|
20 |
-
http://www.youtube.com/watch?v=oc73jtvHWYQ
|
21 |
-
|
22 |
-
= Overview =
|
23 |
-
Duplicator enables you to:
|
24 |
-
|
25 |
-
* Move, migrate or clone a WordPress site between domains or hosts with **zero downtime**
|
26 |
-
* Pull down a live site to localhost for development
|
27 |
-
* Manually backup a WordPress site or parts of a site
|
28 |
-
* Duplicate a live site to a staging area or vice versa
|
29 |
-
* Bundle up an entire WordPress site for easy reuse or distribution
|
30 |
-
* Perform a full WordPress migration without struggling with messy import/export sql scripts
|
31 |
-
|
32 |
-
= Migrate WordPress and Run WordPress Backups =
|
33 |
-
Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
|
34 |
-
|
35 |
-
= Improve Your Workflow with Pre-Bundled Sites =
|
36 |
-
Duplicator lets you make your own pre-configured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many pre-configured sites!
|
37 |
-
|
38 |
-
= Duplicator Pro =
|
39 |
-
Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
|
40 |
-
|
41 |
-
* Scheduled backups
|
42 |
-
* Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
|
43 |
-
* Multi-threaded to support larger web sites & databases
|
44 |
-
* Migrate an entire multisite WordPress network in one shot
|
45 |
-
* Install a multisite subsite as a new standalone website
|
46 |
-
* Database and user creation *in the installer* with cPanel API
|
47 |
-
* Connect to cPanel directly from installer
|
48 |
-
* Email notifications
|
49 |
-
* Professional support
|
50 |
-
* ... and much more!
|
51 |
-
|
52 |
-
Check out [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=wpo_premium&utm_campaign=duplicator_pro) today!
|
53 |
-
|
54 |
-
= Please Note =
|
55 |
-
The underlying logic to backup WordPress, move WordPress and transfer WordPress are complex and it's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
|
56 |
-
|
57 |
-
= Disclaimer =
|
58 |
-
This plugin does require some technical knowledge. If you plan to migrate WordPress or backup WordPress please use it at your own risk and don't forget to back up your files and databases beforehand. If you need to move or backup WordPress and would like additional help please visit the Duplicator [resources section](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=free_disclaimer&utm_campaign=duplicator_free#faq-resource-030-q) .
|
59 |
-
|
60 |
-
= Active Contributors =
|
61 |
-
<li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
|
62 |
-
<li>[Hans-M. Herbrand](http://www.web266.de) (German) </li>
|
63 |
-
<li>[Nicolas Richer](http://nicolasricher.fr) (French)</li>
|
64 |
-
|
65 |
-
== Screenshots ==
|
66 |
-
|
67 |
-
1. Main Interface for all Packages
|
68 |
-
2. Create Package Step 1
|
69 |
-
3. Create Package Step 2
|
70 |
-
4. Build Process
|
71 |
-
5. Installer Screen
|
72 |
-
|
73 |
-
== Frequently Asked Questions ==
|
74 |
-
|
75 |
-
= Does Duplicator have a knowledge base or FAQ? =
|
76 |
-
Yes. Please see [all documents](https://snapcreek.com/duplicator/docs/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_docs&utm_campaign=duplicator_free) at snapcreek.com.
|
77 |
-
|
78 |
-
= Installation Instructions =
|
79 |
-
1. Upload `duplicator` folder to the `/wp-content/plugins/` directory
|
80 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress
|
81 |
-
3. Click on the Duplicator link from the main menu
|
82 |
-
4. Check out the help by clicking the help icon and create your first package.
|
83 |
-
|
84 |
-
The Duplicator requires php 5.3 or higher.
|
85 |
-
|
86 |
-
|
87 |
-
= Are there any videos I can watch? =
|
88 |
-
Yes. Please see the [video section](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_videos&utm_campaign=duplicator_free#faq-resource-070-q) on the FAQ.
|
89 |
-
|
90 |
-
= Is this plugin compatible with WordPress multisite (MU)? =
|
91 |
-
Duplicator isn't, however [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_dpro_multisiteinfo&utm_campaign=duplicator_pro) supports full multisite network migrations/backups and also can install a multisite subsite as a standalone site.
|
92 |
-
|
93 |
-
= Where can I get more help and support for this plugin? =
|
94 |
-
Visit the [Duplicator support](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_support&utm_campaign=duplicator_free#faq-resource-030-q) section at snapcreek.com
|
95 |
-
|
96 |
-
|
97 |
-
== Changelog ==
|
98 |
-
|
99 |
-
Please see the following url:
|
100 |
-
[https://snapcreek.com/duplicator/docs/changelog?lite](https://snapcreek.com/duplicator/docs/changelog?lite&utm_source=duplicator_free&utm_medium=wp_org&utm_content=changelog_support&utm_campaign=duplicator_free)
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
== Upgrade Notice ==
|
105 |
-
|
106 |
Please use our ticketing system when submitting your logs. Please do not post to the forums.
|
1 |
+
=== Duplicator - WordPress Migration Plugin ===
|
2 |
+
Contributors: corylamleorg, bobriley
|
3 |
+
Donate link: www.lifeinthegrid.com/partner
|
4 |
+
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9
|
7 |
+
Requires PHP: 5.2.17
|
8 |
+
Stable tag: 1.2.36
|
9 |
+
License: GPLv2
|
10 |
+
|
11 |
+
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
> With over **10 million downloads** Duplicator successfully gives WordPress users the ability to migrate, copy, move or clone a site from one location to another and also serves as a simple backup utility. Duplicator handles serialized and base64 serialized replacements. Standard WordPress migration and WordPress backups are easily handled by this plugin as are **zero downtime migrations**.
|
16 |
+
|
17 |
+
For complete details visit [snapcreek.com](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=desc_details&utm_campaign=duplicator_free).
|
18 |
+
|
19 |
+
= Quick Video Demo =
|
20 |
+
http://www.youtube.com/watch?v=oc73jtvHWYQ
|
21 |
+
|
22 |
+
= Overview =
|
23 |
+
Duplicator enables you to:
|
24 |
+
|
25 |
+
* Move, migrate or clone a WordPress site between domains or hosts with **zero downtime**
|
26 |
+
* Pull down a live site to localhost for development
|
27 |
+
* Manually backup a WordPress site or parts of a site
|
28 |
+
* Duplicate a live site to a staging area or vice versa
|
29 |
+
* Bundle up an entire WordPress site for easy reuse or distribution
|
30 |
+
* Perform a full WordPress migration without struggling with messy import/export sql scripts
|
31 |
+
|
32 |
+
= Migrate WordPress and Run WordPress Backups =
|
33 |
+
Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
|
34 |
+
|
35 |
+
= Improve Your Workflow with Pre-Bundled Sites =
|
36 |
+
Duplicator lets you make your own pre-configured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many pre-configured sites!
|
37 |
+
|
38 |
+
= Duplicator Pro =
|
39 |
+
Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
|
40 |
+
|
41 |
+
* Scheduled backups
|
42 |
+
* Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
|
43 |
+
* Multi-threaded to support larger web sites & databases
|
44 |
+
* Migrate an entire multisite WordPress network in one shot
|
45 |
+
* Install a multisite subsite as a new standalone website
|
46 |
+
* Database and user creation *in the installer* with cPanel API
|
47 |
+
* Connect to cPanel directly from installer
|
48 |
+
* Email notifications
|
49 |
+
* Professional support
|
50 |
+
* ... and much more!
|
51 |
+
|
52 |
+
Check out [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=wpo_premium&utm_campaign=duplicator_pro) today!
|
53 |
+
|
54 |
+
= Please Note =
|
55 |
+
The underlying logic to backup WordPress, move WordPress and transfer WordPress are complex and it's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
|
56 |
+
|
57 |
+
= Disclaimer =
|
58 |
+
This plugin does require some technical knowledge. If you plan to migrate WordPress or backup WordPress please use it at your own risk and don't forget to back up your files and databases beforehand. If you need to move or backup WordPress and would like additional help please visit the Duplicator [resources section](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=free_disclaimer&utm_campaign=duplicator_free#faq-resource-030-q) .
|
59 |
+
|
60 |
+
= Active Contributors =
|
61 |
+
<li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
|
62 |
+
<li>[Hans-M. Herbrand](http://www.web266.de) (German) </li>
|
63 |
+
<li>[Nicolas Richer](http://nicolasricher.fr) (French)</li>
|
64 |
+
|
65 |
+
== Screenshots ==
|
66 |
+
|
67 |
+
1. Main Interface for all Packages
|
68 |
+
2. Create Package Step 1
|
69 |
+
3. Create Package Step 2
|
70 |
+
4. Build Process
|
71 |
+
5. Installer Screen
|
72 |
+
|
73 |
+
== Frequently Asked Questions ==
|
74 |
+
|
75 |
+
= Does Duplicator have a knowledge base or FAQ? =
|
76 |
+
Yes. Please see [all documents](https://snapcreek.com/duplicator/docs/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_docs&utm_campaign=duplicator_free) at snapcreek.com.
|
77 |
+
|
78 |
+
= Installation Instructions =
|
79 |
+
1. Upload `duplicator` folder to the `/wp-content/plugins/` directory
|
80 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
81 |
+
3. Click on the Duplicator link from the main menu
|
82 |
+
4. Check out the help by clicking the help icon and create your first package.
|
83 |
+
|
84 |
+
The Duplicator requires php 5.3 or higher.
|
85 |
+
|
86 |
+
|
87 |
+
= Are there any videos I can watch? =
|
88 |
+
Yes. Please see the [video section](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_videos&utm_campaign=duplicator_free#faq-resource-070-q) on the FAQ.
|
89 |
+
|
90 |
+
= Is this plugin compatible with WordPress multisite (MU)? =
|
91 |
+
Duplicator isn't, however [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_dpro_multisiteinfo&utm_campaign=duplicator_pro) supports full multisite network migrations/backups and also can install a multisite subsite as a standalone site.
|
92 |
+
|
93 |
+
= Where can I get more help and support for this plugin? =
|
94 |
+
Visit the [Duplicator support](https://snapcreek.com/duplicator/docs/faqs-tech?utm_source=duplicator_free&utm_medium=wp_org&utm_content=faq_support&utm_campaign=duplicator_free#faq-resource-030-q) section at snapcreek.com
|
95 |
+
|
96 |
+
|
97 |
+
== Changelog ==
|
98 |
+
|
99 |
+
Please see the following url:
|
100 |
+
[https://snapcreek.com/duplicator/docs/changelog?lite](https://snapcreek.com/duplicator/docs/changelog?lite&utm_source=duplicator_free&utm_medium=wp_org&utm_content=changelog_support&utm_campaign=duplicator_free)
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
== Upgrade Notice ==
|
105 |
+
|
106 |
Please use our ticketing system when submitting your logs. Please do not post to the forums.
|
views/help/gopro.php
CHANGED
@@ -181,7 +181,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
181 |
<td class="feature-column"><?php _e('Multisite Subsite > Standalone', 'duplicator') ?><sup>
|
182 |
<i class="fa fa-question-circle dup-gopro-help"
|
183 |
data-tooltip-title="<?php _e("Multisite", 'duplicator'); ?>"
|
184 |
-
data-tooltip="<?php _e('Install an individual subsite from a Multisite as a standalone site.', 'duplicator'); ?>"/></i></sup>
|
185 |
</td>
|
186 |
<td class="check-column"></td>
|
187 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
181 |
<td class="feature-column"><?php _e('Multisite Subsite > Standalone', 'duplicator') ?><sup>
|
182 |
<i class="fa fa-question-circle dup-gopro-help"
|
183 |
data-tooltip-title="<?php _e("Multisite", 'duplicator'); ?>"
|
184 |
+
data-tooltip="<?php _e('Install an individual subsite from a Multisite as a standalone site. This feature is only available with a business license purchase.', 'duplicator'); ?>"/></i></sup>
|
185 |
</td>
|
186 |
<td class="check-column"></td>
|
187 |
<td class="check-column"><i class="fa fa-check"></i></td>
|
views/packages/main/packages.php
CHANGED
@@ -1,330 +1,330 @@
|
|
1 |
-
<?php
|
2 |
-
$qryResult = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}duplicator_packages` ORDER BY id DESC", ARRAY_A);
|
3 |
-
$qryStatus = $wpdb->get_results("SELECT status FROM `{$wpdb->prefix}duplicator_packages` WHERE status >= 100", ARRAY_A);
|
4 |
-
$totalElements = count($qryResult);
|
5 |
-
$statusCount = count($qryStatus);
|
6 |
-
$package_debug = DUP_Settings::Get('package_debug');
|
7 |
-
$ajax_nonce = wp_create_nonce('package_list');
|
8 |
-
$ui_create_frmt = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<style>
|
12 |
-
div#dup-list-alert-nodata {padding:70px 20px;text-align:center; font-size:20px; line-height:26px}
|
13 |
-
div.dup-notice-msg {border:1px solid silver; padding: 10px; border-radius: 5px; width: 550px;
|
14 |
-
margin:40px auto 0px auto; font-size:12px; text-align: left; word-break:normal;
|
15 |
-
background: #fefcea;
|
16 |
-
background: -moz-linear-gradient(top, #fefcea 0%, #efe5a2 100%);
|
17 |
-
background: -ms-linear-gradient(top, #fefcea 0%,#efe5a2 100%);
|
18 |
-
background: linear-gradient(to bottom, #fefcea 0%,#efe5a2 100%);
|
19 |
-
}
|
20 |
-
input#dup-bulk-action-all {margin:0px;padding:0px 0px 0px 5px;}
|
21 |
-
button.dup-button-selected {border:1px solid #000 !important; background-color:#dfdfdf !important;}
|
22 |
-
div.dup-quick-start {font-style:italic; font-size: 13px; line-height: 18px; margin-top: 15px}
|
23 |
-
|
24 |
-
/* Table package details */
|
25 |
-
table.dup-pack-table {word-break:break-all;}
|
26 |
-
table.dup-pack-table th {white-space:nowrap !important;}
|
27 |
-
table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
|
28 |
-
table.dup-pack-table td.pack-name sup {font-style:italic;font-size:10px; cursor: pointer }
|
29 |
-
table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
|
30 |
-
table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
|
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}
|
38 |
-
td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
|
39 |
-
div#dup-help-dlg i {display: inline-block; width: 15px; padding:2px;line-height:28px; font-size:14px;}
|
40 |
-
</style>
|
41 |
-
|
42 |
-
<form id="form-duplicator" method="post">
|
43 |
-
|
44 |
-
<!-- ====================
|
45 |
-
TOOL-BAR -->
|
46 |
-
<table id="dup-toolbar">
|
47 |
-
<tr valign="top">
|
48 |
-
<td style="white-space: nowrap">
|
49 |
-
<select id="dup-pack-bulk-actions">
|
50 |
-
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
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)"
|
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>
|
65 |
-
<a href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
66 |
-
</td>
|
67 |
-
</tr>
|
68 |
-
</table>
|
69 |
-
|
70 |
-
|
71 |
-
<?php if($totalElements == 0) : ?>
|
72 |
-
<!-- ====================
|
73 |
-
NO-DATA MESSAGES-->
|
74 |
-
<table class="widefat dup-pack-table">
|
75 |
-
<thead><tr><th> </th></tr></thead>
|
76 |
-
<tbody>
|
77 |
-
<tr>
|
78 |
-
<td>
|
79 |
-
<div id='dup-list-alert-nodata'>
|
80 |
-
<i class="fa fa-archive"></i>
|
81 |
-
<?php _e("No Packages Found.", 'duplicator'); ?><br/>
|
82 |
-
<?php _e("Click the 'Create New' button to build a package.", 'duplicator'); ?><br/>
|
83 |
-
<div class="dup-quick-start">
|
84 |
-
<?php _e("New to Duplicator?", 'duplicator'); ?><br/>
|
85 |
-
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=packages_empty&utm_campaign=quick_start" target="_blank">
|
86 |
-
<?php _e("Check out the 'Quick Start' guide!", 'duplicator'); ?>
|
87 |
-
</a>
|
88 |
-
</div>
|
89 |
-
<div style="height:75px"> </div>
|
90 |
-
</div>
|
91 |
-
</td>
|
92 |
-
</tr>
|
93 |
-
</tbody>
|
94 |
-
<tfoot><tr><th> </th></tr></tfoot>
|
95 |
-
</table>
|
96 |
-
<?php else : ?>
|
97 |
-
<!-- ====================
|
98 |
-
LIST ALL PACKAGES -->
|
99 |
-
<table class="widefat dup-pack-table">
|
100 |
-
<thead>
|
101 |
-
<tr>
|
102 |
-
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php _e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
103 |
-
<th><?php _e("Created", 'duplicator') ?></th>
|
104 |
-
<th><?php _e("Size", 'duplicator') ?></th>
|
105 |
-
<th style="width:90%;"><?php _e("Name", 'duplicator') ?></th>
|
106 |
-
<th style="text-align:center;" colspan="2">
|
107 |
-
<?php _e("Package", 'duplicator')?>
|
108 |
-
</th>
|
109 |
-
</tr>
|
110 |
-
</thead>
|
111 |
-
<?php
|
112 |
-
$rowCount = 0;
|
113 |
-
$totalSize = 0;
|
114 |
-
$txt_dbonly = __('Database Only', 'duplicator');
|
115 |
-
$rows = $qryResult;
|
116 |
-
foreach ($rows as $row) {
|
117 |
-
$Package = unserialize($row['package']);
|
118 |
-
$pack_dbonly = false;
|
119 |
-
|
120 |
-
if (is_object($Package)) {
|
121 |
-
$pack_name = $Package->Name;
|
122 |
-
$pack_archive_size = $Package->Archive->Size;
|
123 |
-
$pack_storeurl = $Package->StoreURL;
|
124 |
-
$pack_namehash = $Package->NameHash;
|
125 |
-
$pack_dbonly = $Package->Archive->ExportOnlyDB;
|
126 |
-
} else {
|
127 |
-
$pack_archive_size = 0;
|
128 |
-
$pack_storeurl = 'unknown';
|
129 |
-
$pack_name = 'unknown';
|
130 |
-
$pack_namehash = 'unknown';
|
131 |
-
}
|
132 |
-
|
133 |
-
//Links
|
134 |
-
$uniqueid = "{$row['name']}_{$row['hash']}";
|
135 |
-
$packagepath = $pack_storeurl . "{$uniqueid}_archive.zip";
|
136 |
-
$installerpath = $pack_storeurl . "{$uniqueid}_installer.php";
|
137 |
-
$installfilelink = "{$installerpath}?get=1&file={$uniqueid}_installer.php";
|
138 |
-
$css_alt = ($rowCount % 2 != 0) ? '' : 'alternate';
|
139 |
-
?>
|
140 |
-
|
141 |
-
<!-- COMPLETE -->
|
142 |
-
<?php if ($row['status'] >= 100) : ?>
|
143 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
144 |
-
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
145 |
-
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt);?></td>
|
146 |
-
<td><?php echo DUP_Util::byteSize($pack_archive_size); ?></td>
|
147 |
-
<td class='pack-name'>
|
148 |
-
<?php echo ($pack_dbonly) ? "{$pack_name} <sup title='{$txt_dbonly}'>DB</sup>" : $pack_name ; ?>
|
149 |
-
</td>
|
150 |
-
<td class="get-btns">
|
151 |
-
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;">
|
152 |
-
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
153 |
-
</button>
|
154 |
-
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;">
|
155 |
-
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
156 |
-
</button>
|
157 |
-
<button type="button" class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" onclick="Duplicator.Pack.OpenPackageDetails(<?php echo "{$row['id']}"; ?>);">
|
158 |
-
<i class="fa fa-archive" ></i>
|
159 |
-
</button>
|
160 |
-
</td>
|
161 |
-
</tr>
|
162 |
-
|
163 |
-
<!-- NOT COMPLETE -->
|
164 |
-
<?php else : ?>
|
165 |
-
|
166 |
-
<?php
|
167 |
-
$size = 0;
|
168 |
-
$tmpSearch = glob(DUPLICATOR_SSDIR_PATH_TMP . "/{$pack_namehash}_*");
|
169 |
-
if (is_array($tmpSearch)) {
|
170 |
-
$result = array_map('filesize', $tmpSearch);
|
171 |
-
$size = array_sum($result);
|
172 |
-
}
|
173 |
-
$pack_archive_size = $size;
|
174 |
-
$error_url = "?page=duplicator&action=detail&tab=detail&id={$row['id']}";
|
175 |
-
?>
|
176 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
177 |
-
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
178 |
-
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt);?></td>
|
179 |
-
<td><?php echo DUP_Util::byteSize($size); ?></td>
|
180 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
181 |
-
<td class="get-btns error-msg" colspan="2">
|
182 |
-
<span>
|
183 |
-
<i class="fa fa-exclamation-triangle"></i>
|
184 |
-
<a href="<?php echo $error_url; ?>"><?php _e("Error Processing", 'duplicator') ?></a>
|
185 |
-
</span>
|
186 |
-
<a class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" href="<?php echo $error_url; ?>">
|
187 |
-
<i class="fa fa-archive"></i>
|
188 |
-
</a>
|
189 |
-
</td>
|
190 |
-
</tr>
|
191 |
-
<?php endif; ?>
|
192 |
-
<?php
|
193 |
-
$totalSize = $totalSize + $pack_archive_size;
|
194 |
-
$rowCount++;
|
195 |
-
}
|
196 |
-
?>
|
197 |
-
<tfoot>
|
198 |
-
<tr>
|
199 |
-
<th colspan="11" style='text-align:right; font-size:12px'>
|
200 |
-
<?php echo _e("Packages", 'duplicator') . ': ' . $totalElements; ?> |
|
201 |
-
<?php echo _e("Total Size", 'duplicator') . ': ' . DUP_Util::byteSize($totalSize); ?>
|
202 |
-
</th>
|
203 |
-
</tr>
|
204 |
-
</tfoot>
|
205 |
-
</table>
|
206 |
-
<?php endif; ?>
|
207 |
-
</form>
|
208 |
-
|
209 |
-
<!-- ==========================================
|
210 |
-
THICK-BOX DIALOGS: -->
|
211 |
-
<?php
|
212 |
-
$alert1 = new DUP_UI_Dialog();
|
213 |
-
$alert1->title = __('Bulk Action Required', 'duplicator');
|
214 |
-
$alert1->message = __('Please select an action from the "Bulk Actions" drop down menu!', 'duplicator');
|
215 |
-
$alert1->initAlert();
|
216 |
-
|
217 |
-
$alert2 = new DUP_UI_Dialog();
|
218 |
-
$alert2->title = __('Selection Required', 'duplicator', 'duplicator');
|
219 |
-
$alert2->message = __('Please select at least one package to delete!', 'duplicator');
|
220 |
-
$alert2->initAlert();
|
221 |
-
|
222 |
-
$confirm1 = new DUP_UI_Dialog();
|
223 |
-
$confirm1->title = __('Delete Packages?', 'duplicator');
|
224 |
-
$confirm1->message = __('Are you sure, you want to delete the selected package(s)?', 'duplicator');
|
225 |
-
$confirm1->progressText = __('Removing Packages, Please Wait...', 'duplicator');
|
226 |
-
$confirm1->jscallback = 'Duplicator.Pack.Delete()';
|
227 |
-
$confirm1->initConfirm();
|
228 |
-
|
229 |
-
$alert3 = new DUP_UI_Dialog();
|
230 |
-
$alert3->height = 350;
|
231 |
-
$alert3->width = 350;
|
232 |
-
$alert3->title = __('Duplicator Help', 'duplicator');
|
233 |
-
$alert3->message = "<div id='dup-help-dlg'></div>";
|
234 |
-
$alert3->initAlert();
|
235 |
-
?>
|
236 |
-
|
237 |
-
<!-- =======================
|
238 |
-
DIALOG: HELP DIALOG -->
|
239 |
-
<div id="dup-help-dlg-info" style="display:none">
|
240 |
-
<b><?php _e("Common Questions:", 'duplicator') ?></b><hr size='1'/>
|
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_pack_help&utm_campaign=duplicator_free#quick-010-q" target="_blank"><?php _e("How do I create a package", 'duplicator') ?></a> <br/>
|
242 |
-
<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/>
|
243 |
-
<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>
|
244 |
-
<br/><br/>
|
245 |
-
|
246 |
-
<b><?php _e("Other Resources:", 'duplicator') ?></b><hr size='1'/>
|
247 |
-
<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/>
|
248 |
-
<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/>
|
249 |
-
<?php if($statusCount >= 3) : ?>
|
250 |
-
<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>
|
251 |
-
<?php endif; ?>
|
252 |
-
</div>
|
253 |
-
|
254 |
-
<script>
|
255 |
-
jQuery(document).ready(function($)
|
256 |
-
{
|
257 |
-
|
258 |
-
/* Creats a comma seperate list of all selected package ids */
|
259 |
-
Duplicator.Pack.GetDeleteList = function ()
|
260 |
-
{
|
261 |
-
var arr = new Array;
|
262 |
-
var count = 0;
|
263 |
-
$("input[name=delete_confirm]").each(function () {
|
264 |
-
if (this.checked) {
|
265 |
-
arr[count++] = this.id;
|
266 |
-
}
|
267 |
-
});
|
268 |
-
var list = arr.join(',');
|
269 |
-
return list;
|
270 |
-
}
|
271 |
-
|
272 |
-
/* Provides the correct confirmation items when deleting packages */
|
273 |
-
Duplicator.Pack.ConfirmDelete = function ()
|
274 |
-
{
|
275 |
-
if ($("#dup-pack-bulk-actions").val() != "delete") {
|
276 |
-
<?php $alert1->showAlert(); ?>
|
277 |
-
return;
|
278 |
-
}
|
279 |
-
|
280 |
-
var list = Duplicator.Pack.GetDeleteList();
|
281 |
-
if (list.length == 0) {
|
282 |
-
<?php $alert2->showAlert(); ?>
|
283 |
-
return;
|
284 |
-
}
|
285 |
-
<?php $confirm1->showConfirm(); ?>
|
286 |
-
}
|
287 |
-
|
288 |
-
|
289 |
-
/* Removes all selected package sets
|
290 |
-
* @param event To prevent bubbling */
|
291 |
-
Duplicator.Pack.Delete = function (event)
|
292 |
-
{
|
293 |
-
var list = Duplicator.Pack.GetDeleteList();
|
294 |
-
|
295 |
-
$.ajax({
|
296 |
-
type: "POST",
|
297 |
-
url: ajaxurl,
|
298 |
-
dataType: "json",
|
299 |
-
data: {action : 'duplicator_package_delete', duplicator_delid : list, nonce: '<?php echo $ajax_nonce; ?>' },
|
300 |
-
complete: function(data) {
|
301 |
-
Duplicator.ReloadWindow(data);
|
302 |
-
}
|
303 |
-
});
|
304 |
-
|
305 |
-
};
|
306 |
-
|
307 |
-
/* Toogles the Bulk Action Check boxes */
|
308 |
-
Duplicator.Pack.SetDeleteAll = function()
|
309 |
-
{
|
310 |
-
var state = $('input#dup-bulk-action-all').is(':checked') ? 1 : 0;
|
311 |
-
$("input[name=delete_confirm]").each(function() {
|
312 |
-
this.checked = (state) ? true : false;
|
313 |
-
});
|
314 |
-
}
|
315 |
-
|
316 |
-
/* Opens detail screen */
|
317 |
-
Duplicator.Pack.OpenPackageDetails = function (package_id)
|
318 |
-
{
|
319 |
-
window.location.href = '?page=duplicator&action=detail&tab=detail&id=' + package_id;
|
320 |
-
}
|
321 |
-
|
322 |
-
/* Toggles the feedback form */
|
323 |
-
Duplicator.Pack.showHelp = function ()
|
324 |
-
{
|
325 |
-
$('#dup-help-dlg').html($('#dup-help-dlg-info').html());
|
326 |
-
<?php $alert3->showAlert(); ?>
|
327 |
-
}
|
328 |
-
|
329 |
-
});
|
330 |
</script>
|
1 |
+
<?php
|
2 |
+
$qryResult = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}duplicator_packages` ORDER BY id DESC", ARRAY_A);
|
3 |
+
$qryStatus = $wpdb->get_results("SELECT status FROM `{$wpdb->prefix}duplicator_packages` WHERE status >= 100", ARRAY_A);
|
4 |
+
$totalElements = count($qryResult);
|
5 |
+
$statusCount = count($qryStatus);
|
6 |
+
$package_debug = DUP_Settings::Get('package_debug');
|
7 |
+
$ajax_nonce = wp_create_nonce('package_list');
|
8 |
+
$ui_create_frmt = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
|
9 |
+
?>
|
10 |
+
|
11 |
+
<style>
|
12 |
+
div#dup-list-alert-nodata {padding:70px 20px;text-align:center; font-size:20px; line-height:26px}
|
13 |
+
div.dup-notice-msg {border:1px solid silver; padding: 10px; border-radius: 5px; width: 550px;
|
14 |
+
margin:40px auto 0px auto; font-size:12px; text-align: left; word-break:normal;
|
15 |
+
background: #fefcea;
|
16 |
+
background: -moz-linear-gradient(top, #fefcea 0%, #efe5a2 100%);
|
17 |
+
background: -ms-linear-gradient(top, #fefcea 0%,#efe5a2 100%);
|
18 |
+
background: linear-gradient(to bottom, #fefcea 0%,#efe5a2 100%);
|
19 |
+
}
|
20 |
+
input#dup-bulk-action-all {margin:0px;padding:0px 0px 0px 5px;}
|
21 |
+
button.dup-button-selected {border:1px solid #000 !important; background-color:#dfdfdf !important;}
|
22 |
+
div.dup-quick-start {font-style:italic; font-size: 13px; line-height: 18px; margin-top: 15px}
|
23 |
+
|
24 |
+
/* Table package details */
|
25 |
+
table.dup-pack-table {word-break:break-all;}
|
26 |
+
table.dup-pack-table th {white-space:nowrap !important;}
|
27 |
+
table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
|
28 |
+
table.dup-pack-table td.pack-name sup {font-style:italic;font-size:10px; cursor: pointer }
|
29 |
+
table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
|
30 |
+
table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
|
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}
|
38 |
+
td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
|
39 |
+
div#dup-help-dlg i {display: inline-block; width: 15px; padding:2px;line-height:28px; font-size:14px;}
|
40 |
+
</style>
|
41 |
+
|
42 |
+
<form id="form-duplicator" method="post">
|
43 |
+
|
44 |
+
<!-- ====================
|
45 |
+
TOOL-BAR -->
|
46 |
+
<table id="dup-toolbar">
|
47 |
+
<tr valign="top">
|
48 |
+
<td style="white-space: nowrap">
|
49 |
+
<select id="dup-pack-bulk-actions">
|
50 |
+
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
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)" 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>
|
65 |
+
<a href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
</table>
|
69 |
+
|
70 |
+
|
71 |
+
<?php if($totalElements == 0) : ?>
|
72 |
+
<!-- ====================
|
73 |
+
NO-DATA MESSAGES-->
|
74 |
+
<table class="widefat dup-pack-table">
|
75 |
+
<thead><tr><th> </th></tr></thead>
|
76 |
+
<tbody>
|
77 |
+
<tr>
|
78 |
+
<td>
|
79 |
+
<div id='dup-list-alert-nodata'>
|
80 |
+
<i class="fa fa-archive"></i>
|
81 |
+
<?php _e("No Packages Found.", 'duplicator'); ?><br/>
|
82 |
+
<?php _e("Click the 'Create New' button to build a package.", 'duplicator'); ?><br/>
|
83 |
+
<div class="dup-quick-start">
|
84 |
+
<?php _e("New to Duplicator?", 'duplicator'); ?><br/>
|
85 |
+
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=packages_empty&utm_campaign=quick_start" target="_blank">
|
86 |
+
<?php _e("Check out the 'Quick Start' guide!", 'duplicator'); ?>
|
87 |
+
</a>
|
88 |
+
</div>
|
89 |
+
<div style="height:75px"> </div>
|
90 |
+
</div>
|
91 |
+
</td>
|
92 |
+
</tr>
|
93 |
+
</tbody>
|
94 |
+
<tfoot><tr><th> </th></tr></tfoot>
|
95 |
+
</table>
|
96 |
+
<?php else : ?>
|
97 |
+
<!-- ====================
|
98 |
+
LIST ALL PACKAGES -->
|
99 |
+
<table class="widefat dup-pack-table">
|
100 |
+
<thead>
|
101 |
+
<tr>
|
102 |
+
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php _e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
103 |
+
<th><?php _e("Created", 'duplicator') ?></th>
|
104 |
+
<th><?php _e("Size", 'duplicator') ?></th>
|
105 |
+
<th style="width:90%;"><?php _e("Name", 'duplicator') ?></th>
|
106 |
+
<th style="text-align:center;" colspan="2">
|
107 |
+
<?php _e("Package", 'duplicator')?>
|
108 |
+
</th>
|
109 |
+
</tr>
|
110 |
+
</thead>
|
111 |
+
<?php
|
112 |
+
$rowCount = 0;
|
113 |
+
$totalSize = 0;
|
114 |
+
$txt_dbonly = __('Database Only', 'duplicator');
|
115 |
+
$rows = $qryResult;
|
116 |
+
foreach ($rows as $row) {
|
117 |
+
$Package = unserialize($row['package']);
|
118 |
+
$pack_dbonly = false;
|
119 |
+
|
120 |
+
if (is_object($Package)) {
|
121 |
+
$pack_name = $Package->Name;
|
122 |
+
$pack_archive_size = $Package->Archive->Size;
|
123 |
+
$pack_storeurl = $Package->StoreURL;
|
124 |
+
$pack_namehash = $Package->NameHash;
|
125 |
+
$pack_dbonly = $Package->Archive->ExportOnlyDB;
|
126 |
+
} else {
|
127 |
+
$pack_archive_size = 0;
|
128 |
+
$pack_storeurl = 'unknown';
|
129 |
+
$pack_name = 'unknown';
|
130 |
+
$pack_namehash = 'unknown';
|
131 |
+
}
|
132 |
+
|
133 |
+
//Links
|
134 |
+
$uniqueid = "{$row['name']}_{$row['hash']}";
|
135 |
+
$packagepath = $pack_storeurl . "{$uniqueid}_archive.zip";
|
136 |
+
$installerpath = $pack_storeurl . "{$uniqueid}_installer.php";
|
137 |
+
$installfilelink = "{$installerpath}?get=1&file={$uniqueid}_installer.php";
|
138 |
+
$css_alt = ($rowCount % 2 != 0) ? '' : 'alternate';
|
139 |
+
?>
|
140 |
+
|
141 |
+
<!-- COMPLETE -->
|
142 |
+
<?php if ($row['status'] >= 100) : ?>
|
143 |
+
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
144 |
+
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
145 |
+
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt);?></td>
|
146 |
+
<td><?php echo DUP_Util::byteSize($pack_archive_size); ?></td>
|
147 |
+
<td class='pack-name'>
|
148 |
+
<?php echo ($pack_dbonly) ? "{$pack_name} <sup title='{$txt_dbonly}'>DB</sup>" : $pack_name ; ?>
|
149 |
+
</td>
|
150 |
+
<td class="get-btns">
|
151 |
+
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;">
|
152 |
+
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
153 |
+
</button>
|
154 |
+
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;">
|
155 |
+
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
156 |
+
</button>
|
157 |
+
<button type="button" class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" onclick="Duplicator.Pack.OpenPackageDetails(<?php echo "{$row['id']}"; ?>);">
|
158 |
+
<i class="fa fa-archive" ></i>
|
159 |
+
</button>
|
160 |
+
</td>
|
161 |
+
</tr>
|
162 |
+
|
163 |
+
<!-- NOT COMPLETE -->
|
164 |
+
<?php else : ?>
|
165 |
+
|
166 |
+
<?php
|
167 |
+
$size = 0;
|
168 |
+
$tmpSearch = glob(DUPLICATOR_SSDIR_PATH_TMP . "/{$pack_namehash}_*");
|
169 |
+
if (is_array($tmpSearch)) {
|
170 |
+
$result = array_map('filesize', $tmpSearch);
|
171 |
+
$size = array_sum($result);
|
172 |
+
}
|
173 |
+
$pack_archive_size = $size;
|
174 |
+
$error_url = "?page=duplicator&action=detail&tab=detail&id={$row['id']}";
|
175 |
+
?>
|
176 |
+
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
177 |
+
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
178 |
+
<td><?php echo DUP_Package::getCreatedDateFormat($row['created'], $ui_create_frmt);?></td>
|
179 |
+
<td><?php echo DUP_Util::byteSize($size); ?></td>
|
180 |
+
<td class='pack-name'><?php echo $pack_name ;?></td>
|
181 |
+
<td class="get-btns error-msg" colspan="2">
|
182 |
+
<span>
|
183 |
+
<i class="fa fa-exclamation-triangle"></i>
|
184 |
+
<a href="<?php echo $error_url; ?>"><?php _e("Error Processing", 'duplicator') ?></a>
|
185 |
+
</span>
|
186 |
+
<a class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" href="<?php echo $error_url; ?>">
|
187 |
+
<i class="fa fa-archive"></i>
|
188 |
+
</a>
|
189 |
+
</td>
|
190 |
+
</tr>
|
191 |
+
<?php endif; ?>
|
192 |
+
<?php
|
193 |
+
$totalSize = $totalSize + $pack_archive_size;
|
194 |
+
$rowCount++;
|
195 |
+
}
|
196 |
+
?>
|
197 |
+
<tfoot>
|
198 |
+
<tr>
|
199 |
+
<th colspan="11" style='text-align:right; font-size:12px'>
|
200 |
+
<?php echo _e("Packages", 'duplicator') . ': ' . $totalElements; ?> |
|
201 |
+
<?php echo _e("Total Size", 'duplicator') . ': ' . DUP_Util::byteSize($totalSize); ?>
|
202 |
+
</th>
|
203 |
+
</tr>
|
204 |
+
</tfoot>
|
205 |
+
</table>
|
206 |
+
<?php endif; ?>
|
207 |
+
</form>
|
208 |
+
|
209 |
+
<!-- ==========================================
|
210 |
+
THICK-BOX DIALOGS: -->
|
211 |
+
<?php
|
212 |
+
$alert1 = new DUP_UI_Dialog();
|
213 |
+
$alert1->title = __('Bulk Action Required', 'duplicator');
|
214 |
+
$alert1->message = __('Please select an action from the "Bulk Actions" drop down menu!', 'duplicator');
|
215 |
+
$alert1->initAlert();
|
216 |
+
|
217 |
+
$alert2 = new DUP_UI_Dialog();
|
218 |
+
$alert2->title = __('Selection Required', 'duplicator', 'duplicator');
|
219 |
+
$alert2->message = __('Please select at least one package to delete!', 'duplicator');
|
220 |
+
$alert2->initAlert();
|
221 |
+
|
222 |
+
$confirm1 = new DUP_UI_Dialog();
|
223 |
+
$confirm1->title = __('Delete Packages?', 'duplicator');
|
224 |
+
$confirm1->message = __('Are you sure, you want to delete the selected package(s)?', 'duplicator');
|
225 |
+
$confirm1->progressText = __('Removing Packages, Please Wait...', 'duplicator');
|
226 |
+
$confirm1->jscallback = 'Duplicator.Pack.Delete()';
|
227 |
+
$confirm1->initConfirm();
|
228 |
+
|
229 |
+
$alert3 = new DUP_UI_Dialog();
|
230 |
+
$alert3->height = 350;
|
231 |
+
$alert3->width = 350;
|
232 |
+
$alert3->title = __('Duplicator Help', 'duplicator');
|
233 |
+
$alert3->message = "<div id='dup-help-dlg'></div>";
|
234 |
+
$alert3->initAlert();
|
235 |
+
?>
|
236 |
+
|
237 |
+
<!-- =======================
|
238 |
+
DIALOG: HELP DIALOG -->
|
239 |
+
<div id="dup-help-dlg-info" style="display:none">
|
240 |
+
<b><?php _e("Common Questions:", 'duplicator') ?></b><hr size='1'/>
|
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_pack_help&utm_campaign=duplicator_free#quick-010-q" target="_blank"><?php _e("How do I create a package", 'duplicator') ?></a> <br/>
|
242 |
+
<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/>
|
243 |
+
<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>
|
244 |
+
<br/><br/>
|
245 |
+
|
246 |
+
<b><?php _e("Other Resources:", 'duplicator') ?></b><hr size='1'/>
|
247 |
+
<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/>
|
248 |
+
<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/>
|
249 |
+
<?php if($statusCount >= 3) : ?>
|
250 |
+
<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>
|
251 |
+
<?php endif; ?>
|
252 |
+
</div>
|
253 |
+
|
254 |
+
<script>
|
255 |
+
jQuery(document).ready(function($)
|
256 |
+
{
|
257 |
+
|
258 |
+
/* Creats a comma seperate list of all selected package ids */
|
259 |
+
Duplicator.Pack.GetDeleteList = function ()
|
260 |
+
{
|
261 |
+
var arr = new Array;
|
262 |
+
var count = 0;
|
263 |
+
$("input[name=delete_confirm]").each(function () {
|
264 |
+
if (this.checked) {
|
265 |
+
arr[count++] = this.id;
|
266 |
+
}
|
267 |
+
});
|
268 |
+
var list = arr.join(',');
|
269 |
+
return list;
|
270 |
+
}
|
271 |
+
|
272 |
+
/* Provides the correct confirmation items when deleting packages */
|
273 |
+
Duplicator.Pack.ConfirmDelete = function ()
|
274 |
+
{
|
275 |
+
if ($("#dup-pack-bulk-actions").val() != "delete") {
|
276 |
+
<?php $alert1->showAlert(); ?>
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
|
280 |
+
var list = Duplicator.Pack.GetDeleteList();
|
281 |
+
if (list.length == 0) {
|
282 |
+
<?php $alert2->showAlert(); ?>
|
283 |
+
return;
|
284 |
+
}
|
285 |
+
<?php $confirm1->showConfirm(); ?>
|
286 |
+
}
|
287 |
+
|
288 |
+
|
289 |
+
/* Removes all selected package sets
|
290 |
+
* @param event To prevent bubbling */
|
291 |
+
Duplicator.Pack.Delete = function (event)
|
292 |
+
{
|
293 |
+
var list = Duplicator.Pack.GetDeleteList();
|
294 |
+
|
295 |
+
$.ajax({
|
296 |
+
type: "POST",
|
297 |
+
url: ajaxurl,
|
298 |
+
dataType: "json",
|
299 |
+
data: {action : 'duplicator_package_delete', duplicator_delid : list, nonce: '<?php echo $ajax_nonce; ?>' },
|
300 |
+
complete: function(data) {
|
301 |
+
Duplicator.ReloadWindow(data);
|
302 |
+
}
|
303 |
+
});
|
304 |
+
|
305 |
+
};
|
306 |
+
|
307 |
+
/* Toogles the Bulk Action Check boxes */
|
308 |
+
Duplicator.Pack.SetDeleteAll = function()
|
309 |
+
{
|
310 |
+
var state = $('input#dup-bulk-action-all').is(':checked') ? 1 : 0;
|
311 |
+
$("input[name=delete_confirm]").each(function() {
|
312 |
+
this.checked = (state) ? true : false;
|
313 |
+
});
|
314 |
+
}
|
315 |
+
|
316 |
+
/* Opens detail screen */
|
317 |
+
Duplicator.Pack.OpenPackageDetails = function (package_id)
|
318 |
+
{
|
319 |
+
window.location.href = '?page=duplicator&action=detail&tab=detail&id=' + package_id;
|
320 |
+
}
|
321 |
+
|
322 |
+
/* Toggles the feedback form */
|
323 |
+
Duplicator.Pack.showHelp = function ()
|
324 |
+
{
|
325 |
+
$('#dup-help-dlg').html($('#dup-help-dlg-info').html());
|
326 |
+
<?php $alert3->showAlert(); ?>
|
327 |
+
}
|
328 |
+
|
329 |
+
});
|
330 |
</script>
|
views/settings/packages.php
CHANGED
@@ -1,233 +1,233 @@
|
|
1 |
-
<?php
|
2 |
-
global $wp_version;
|
3 |
-
global $wpdb;
|
4 |
-
|
5 |
-
$action_updated = null;
|
6 |
-
$action_response = __("Package Settings Saved", 'duplicator');
|
7 |
-
|
8 |
-
//SAVE RESULTS
|
9 |
-
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
10 |
-
|
11 |
-
//Nonce Check
|
12 |
-
if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' )) {
|
13 |
-
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'])
|
19 |
-
? trim(DUP_DB::escSQL(strip_tags($_POST['package_mysqldump_path']), true))
|
20 |
-
: null;
|
21 |
-
$mysqldump_path_valid = is_file($mysqldump_exe_file) ? true : false;
|
22 |
-
|
23 |
-
DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
|
24 |
-
DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
|
25 |
-
DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
|
26 |
-
DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
|
27 |
-
if ($mysqldump_path_valid) {
|
28 |
-
$mysqldump_exe_file = DUP_Util::isWindows() ? realpath($mysqldump_exe_file) : $mysqldump_exe_file;
|
29 |
-
DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
|
30 |
-
}
|
31 |
-
DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
|
32 |
-
|
33 |
-
$action_updated = DUP_Settings::Save();
|
34 |
-
DUP_Util::initSnapshotDirectory();
|
35 |
-
}
|
36 |
-
|
37 |
-
$package_zip_flush = DUP_Settings::Get('package_zip_flush');
|
38 |
-
$phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
|
39 |
-
$phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
40 |
-
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
41 |
-
$package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
|
42 |
-
$package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
|
43 |
-
$mysqlDumpPath = DUP_DB::getMySqlDumpPath();
|
44 |
-
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
45 |
-
|
46 |
-
?>
|
47 |
-
|
48 |
-
<style>
|
49 |
-
form#dup-settings-form input[type=text] {width:500px; }
|
50 |
-
div.dup-feature-found {padding:10px 0 5px 0; color:green;}
|
51 |
-
div.dup-feature-notfound {color:maroon; width:600px; line-height: 18px}
|
52 |
-
select#package_ui_created {font-family: monospace}
|
53 |
-
</style>
|
54 |
-
|
55 |
-
<form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=package'); ?>" method="post">
|
56 |
-
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
|
57 |
-
<input type="hidden" name="action" value="save">
|
58 |
-
<input type="hidden" name="page" value="duplicator-settings">
|
59 |
-
|
60 |
-
<?php if ($action_updated) : ?>
|
61 |
-
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
62 |
-
<?php endif; ?>
|
63 |
-
|
64 |
-
<h3 class="title"><?php _e("Visual", 'duplicator') ?> </h3>
|
65 |
-
<hr size="1" />
|
66 |
-
<table class="form-table">
|
67 |
-
<tr>
|
68 |
-
<th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
|
69 |
-
<td>
|
70 |
-
<select name="package_ui_created" id="package_ui_created">
|
71 |
-
<!-- YEAR -->
|
72 |
-
<optgroup label="<?php _e("By Year", 'duplicator'); ?>">
|
73 |
-
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
74 |
-
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
75 |
-
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
76 |
-
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
77 |
-
</optgroup>
|
78 |
-
<!-- MONTH -->
|
79 |
-
<optgroup label="<?php _e("By Month", 'duplicator'); ?>">
|
80 |
-
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
81 |
-
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
82 |
-
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
83 |
-
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
84 |
-
</optgroup>
|
85 |
-
<!-- DAY -->
|
86 |
-
<optgroup label="<?php _e("By Day", 'duplicator'); ?>">
|
87 |
-
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
88 |
-
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
89 |
-
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
90 |
-
<option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
|
91 |
-
</optgroup>
|
92 |
-
</select>
|
93 |
-
<p class="description">
|
94 |
-
<?php _e("The date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?>
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
<h3 class="title"><?php _e("Processing", 'duplicator') ?> </h3>
|
102 |
-
<hr size="1" />
|
103 |
-
<table class="form-table">
|
104 |
-
<tr>
|
105 |
-
<th scope="row"><label><?php _e("SQL Script", 'duplicator'); ?></label></th>
|
106 |
-
<td>
|
107 |
-
<?php if (!DUP_Util::hasShellExec()) : ?>
|
108 |
-
<input type="radio" disabled="true" />
|
109 |
-
<label><?php _e("Mysqldump", 'duplicator'); ?> <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i></label>
|
110 |
-
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
111 |
-
<?php
|
112 |
-
_e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
|
113 |
-
_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
114 |
-
?>
|
115 |
-
<br/>
|
116 |
-
<small>
|
117 |
-
<i style="cursor: pointer"
|
118 |
-
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
119 |
-
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
120 |
-
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
121 |
-
<?php
|
122 |
-
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
123 |
-
__("Please visit our recommended", 'duplicator'),
|
124 |
-
__("host list", 'duplicator'),
|
125 |
-
__("for reliable access to mysqldump", 'duplicator'));
|
126 |
-
?>
|
127 |
-
</i>
|
128 |
-
</small>
|
129 |
-
<br/><br/>
|
130 |
-
</p>
|
131 |
-
<?php else : ?>
|
132 |
-
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
133 |
-
<label for="package_mysqldump"><?php _e("Mysqldump", 'duplicator'); ?></label>
|
134 |
-
<i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i> <br/>
|
135 |
-
|
136 |
-
<div style="margin:5px 0px 0px 25px">
|
137 |
-
<?php if ($mysqlDumpFound) : ?>
|
138 |
-
<div class="dup-feature-found">
|
139 |
-
<i class="fa fa-check-circle"></i>
|
140 |
-
<?php _e("Successfully Found:", 'duplicator'); ?>
|
141 |
-
<i><?php echo $mysqlDumpPath ?></i>
|
142 |
-
</div><br/>
|
143 |
-
<?php else : ?>
|
144 |
-
<div class="dup-feature-notfound">
|
145 |
-
<i class="fa fa-exclamation-triangle"></i>
|
146 |
-
<?php
|
147 |
-
_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. '
|
148 |
-
. 'If the problem persist contact your host or server administrator. ', 'duplicator');
|
149 |
-
|
150 |
-
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
151 |
-
__("See the", 'duplicator'),
|
152 |
-
__("host list", 'duplicator'),
|
153 |
-
__("for reliable access to mysqldump.", 'duplicator'));
|
154 |
-
|
155 |
-
?>
|
156 |
-
</div><br/>
|
157 |
-
|
158 |
-
<?php endif; ?>
|
159 |
-
|
160 |
-
<i class="fa fa-question-circle"
|
161 |
-
data-tooltip-title="<?php _e("mysqldump path:", 'duplicator'); ?>"
|
162 |
-
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>
|
163 |
-
<label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
|
164 |
-
<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'); ?>" />
|
165 |
-
<div class="dup-feature-notfound">
|
166 |
-
<?php
|
167 |
-
if ($action_updated && $mysqldump_path_valid === false) {
|
168 |
-
$mysqldump_path = DUP_Util::isWindows() ? stripslashes($_POST['package_mysqldump_path']) : $_POST['package_mysqldump_path'];
|
169 |
-
if (strlen($mysqldump_path)) {
|
170 |
-
_e('<i class="fa fa-exclamation-triangle"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
|
171 |
-
$mysqldump_path = esc_html($mysqldump_path);
|
172 |
-
echo "'{$mysqldump_path}'";
|
173 |
-
}
|
174 |
-
}
|
175 |
-
?>
|
176 |
-
</div>
|
177 |
-
<br/><br/>
|
178 |
-
</div>
|
179 |
-
|
180 |
-
<?php endif; ?>
|
181 |
-
|
182 |
-
<!-- PHP MODE -->
|
183 |
-
<?php if (! $mysqlDumpFound) : ?>
|
184 |
-
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
|
185 |
-
<?php else : ?>
|
186 |
-
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
187 |
-
<?php endif; ?>
|
188 |
-
|
189 |
-
<label for="package_phpdump"><?php _e("PHP Code", 'duplicator'); ?></label>
|
190 |
-
|
191 |
-
<div style="margin:5px 0px 0px 25px">
|
192 |
-
<i class="fa fa-question-circle"
|
193 |
-
data-tooltip-title="<?php _e("PHP Query Limit Size", 'duplicator'); ?>"
|
194 |
-
data-tooltip="<?php _e('A higher limit size will speed up the database build time, however it will use more memory. If your host has memory caps start off low.', 'duplicator'); ?>"></i>
|
195 |
-
<label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label>
|
196 |
-
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
197 |
-
<?php
|
198 |
-
foreach($phpdump_chunkopts as $value) {
|
199 |
-
$selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
200 |
-
echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
|
201 |
-
}
|
202 |
-
?>
|
203 |
-
</select>
|
204 |
-
</div><br/>
|
205 |
-
</td>
|
206 |
-
</tr>
|
207 |
-
<tr>
|
208 |
-
<th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
|
209 |
-
<td>
|
210 |
-
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
211 |
-
<label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
212 |
-
<i style="font-size:12px">(<?php _e("enable only for large archives", 'duplicator'); ?>)</i>
|
213 |
-
<p class="description">
|
214 |
-
<?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
|
215 |
-
</p>
|
216 |
-
</td>
|
217 |
-
</tr>
|
218 |
-
</table>
|
219 |
-
|
220 |
-
|
221 |
-
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
222 |
-
<br/>
|
223 |
-
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e("Save Package Settings", 'duplicator') ?>" style="display: inline-block;" />
|
224 |
-
</p>
|
225 |
-
|
226 |
-
</form>
|
227 |
-
|
228 |
-
<script>
|
229 |
-
jQuery(document).ready(function($)
|
230 |
-
{
|
231 |
-
$('#package_ui_created').val(<?php echo $package_ui_created ?> );
|
232 |
-
});
|
233 |
</script>
|
1 |
+
<?php
|
2 |
+
global $wp_version;
|
3 |
+
global $wpdb;
|
4 |
+
|
5 |
+
$action_updated = null;
|
6 |
+
$action_response = __("Package Settings Saved", 'duplicator');
|
7 |
+
|
8 |
+
//SAVE RESULTS
|
9 |
+
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
10 |
+
|
11 |
+
//Nonce Check
|
12 |
+
if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' )) {
|
13 |
+
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'])
|
19 |
+
? trim(DUP_DB::escSQL(strip_tags($_POST['package_mysqldump_path']), true))
|
20 |
+
: null;
|
21 |
+
$mysqldump_path_valid = is_file($mysqldump_exe_file) ? true : false;
|
22 |
+
|
23 |
+
DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
|
24 |
+
DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
|
25 |
+
DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
|
26 |
+
DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
|
27 |
+
if ($mysqldump_path_valid) {
|
28 |
+
$mysqldump_exe_file = DUP_Util::isWindows() ? realpath($mysqldump_exe_file) : $mysqldump_exe_file;
|
29 |
+
DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
|
30 |
+
}
|
31 |
+
DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
|
32 |
+
|
33 |
+
$action_updated = DUP_Settings::Save();
|
34 |
+
DUP_Util::initSnapshotDirectory();
|
35 |
+
}
|
36 |
+
|
37 |
+
$package_zip_flush = DUP_Settings::Get('package_zip_flush');
|
38 |
+
$phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
|
39 |
+
$phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
40 |
+
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
41 |
+
$package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
|
42 |
+
$package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
|
43 |
+
$mysqlDumpPath = DUP_DB::getMySqlDumpPath();
|
44 |
+
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
45 |
+
|
46 |
+
?>
|
47 |
+
|
48 |
+
<style>
|
49 |
+
form#dup-settings-form input[type=text] {width:500px; }
|
50 |
+
div.dup-feature-found {padding:10px 0 5px 0; color:green;}
|
51 |
+
div.dup-feature-notfound {color:maroon; width:600px; line-height: 18px}
|
52 |
+
select#package_ui_created {font-family: monospace}
|
53 |
+
</style>
|
54 |
+
|
55 |
+
<form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=package'); ?>" method="post">
|
56 |
+
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
|
57 |
+
<input type="hidden" name="action" value="save">
|
58 |
+
<input type="hidden" name="page" value="duplicator-settings">
|
59 |
+
|
60 |
+
<?php if ($action_updated) : ?>
|
61 |
+
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
62 |
+
<?php endif; ?>
|
63 |
+
|
64 |
+
<h3 class="title"><?php _e("Visual", 'duplicator') ?> </h3>
|
65 |
+
<hr size="1" />
|
66 |
+
<table class="form-table">
|
67 |
+
<tr>
|
68 |
+
<th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
|
69 |
+
<td>
|
70 |
+
<select name="package_ui_created" id="package_ui_created">
|
71 |
+
<!-- YEAR -->
|
72 |
+
<optgroup label="<?php _e("By Year", 'duplicator'); ?>">
|
73 |
+
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
74 |
+
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
75 |
+
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
76 |
+
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
77 |
+
</optgroup>
|
78 |
+
<!-- MONTH -->
|
79 |
+
<optgroup label="<?php _e("By Month", 'duplicator'); ?>">
|
80 |
+
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
81 |
+
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
82 |
+
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
83 |
+
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
84 |
+
</optgroup>
|
85 |
+
<!-- DAY -->
|
86 |
+
<optgroup label="<?php _e("By Day", 'duplicator'); ?>">
|
87 |
+
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
88 |
+
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
89 |
+
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
90 |
+
<option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
|
91 |
+
</optgroup>
|
92 |
+
</select>
|
93 |
+
<p class="description">
|
94 |
+
<?php _e("The UTC date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?> <br/>
|
95 |
+
<small><?php _e("To use WordPress timezone formats consider an upgrade to Duplicator Pro.", 'duplicator'); ?></small>
|
96 |
+
</p>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
</table>
|
100 |
+
|
101 |
+
<h3 class="title"><?php _e("Processing", 'duplicator') ?> </h3>
|
102 |
+
<hr size="1" />
|
103 |
+
<table class="form-table">
|
104 |
+
<tr>
|
105 |
+
<th scope="row"><label><?php _e("SQL Script", 'duplicator'); ?></label></th>
|
106 |
+
<td>
|
107 |
+
<?php if (!DUP_Util::hasShellExec()) : ?>
|
108 |
+
<input type="radio" disabled="true" />
|
109 |
+
<label><?php _e("Mysqldump", 'duplicator'); ?> <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i></label>
|
110 |
+
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
111 |
+
<?php
|
112 |
+
_e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
|
113 |
+
_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
114 |
+
?>
|
115 |
+
<br/>
|
116 |
+
<small>
|
117 |
+
<i style="cursor: pointer"
|
118 |
+
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
119 |
+
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
120 |
+
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
121 |
+
<?php
|
122 |
+
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
123 |
+
__("Please visit our recommended", 'duplicator'),
|
124 |
+
__("host list", 'duplicator'),
|
125 |
+
__("for reliable access to mysqldump", 'duplicator'));
|
126 |
+
?>
|
127 |
+
</i>
|
128 |
+
</small>
|
129 |
+
<br/><br/>
|
130 |
+
</p>
|
131 |
+
<?php else : ?>
|
132 |
+
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
133 |
+
<label for="package_mysqldump"><?php _e("Mysqldump", 'duplicator'); ?></label>
|
134 |
+
<i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i> <br/>
|
135 |
+
|
136 |
+
<div style="margin:5px 0px 0px 25px">
|
137 |
+
<?php if ($mysqlDumpFound) : ?>
|
138 |
+
<div class="dup-feature-found">
|
139 |
+
<i class="fa fa-check-circle"></i>
|
140 |
+
<?php _e("Successfully Found:", 'duplicator'); ?>
|
141 |
+
<i><?php echo $mysqlDumpPath ?></i>
|
142 |
+
</div><br/>
|
143 |
+
<?php else : ?>
|
144 |
+
<div class="dup-feature-notfound">
|
145 |
+
<i class="fa fa-exclamation-triangle"></i>
|
146 |
+
<?php
|
147 |
+
_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. '
|
148 |
+
. 'If the problem persist contact your host or server administrator. ', 'duplicator');
|
149 |
+
|
150 |
+
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
151 |
+
__("See the", 'duplicator'),
|
152 |
+
__("host list", 'duplicator'),
|
153 |
+
__("for reliable access to mysqldump.", 'duplicator'));
|
154 |
+
|
155 |
+
?>
|
156 |
+
</div><br/>
|
157 |
+
|
158 |
+
<?php endif; ?>
|
159 |
+
|
160 |
+
<i class="fa fa-question-circle"
|
161 |
+
data-tooltip-title="<?php _e("mysqldump path:", 'duplicator'); ?>"
|
162 |
+
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>
|
163 |
+
<label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
|
164 |
+
<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'); ?>" />
|
165 |
+
<div class="dup-feature-notfound">
|
166 |
+
<?php
|
167 |
+
if ($action_updated && $mysqldump_path_valid === false) {
|
168 |
+
$mysqldump_path = DUP_Util::isWindows() ? stripslashes($_POST['package_mysqldump_path']) : $_POST['package_mysqldump_path'];
|
169 |
+
if (strlen($mysqldump_path)) {
|
170 |
+
_e('<i class="fa fa-exclamation-triangle"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
|
171 |
+
$mysqldump_path = esc_html($mysqldump_path);
|
172 |
+
echo "'{$mysqldump_path}'";
|
173 |
+
}
|
174 |
+
}
|
175 |
+
?>
|
176 |
+
</div>
|
177 |
+
<br/><br/>
|
178 |
+
</div>
|
179 |
+
|
180 |
+
<?php endif; ?>
|
181 |
+
|
182 |
+
<!-- PHP MODE -->
|
183 |
+
<?php if (! $mysqlDumpFound) : ?>
|
184 |
+
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
|
185 |
+
<?php else : ?>
|
186 |
+
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
187 |
+
<?php endif; ?>
|
188 |
+
|
189 |
+
<label for="package_phpdump"><?php _e("PHP Code", 'duplicator'); ?></label>
|
190 |
+
|
191 |
+
<div style="margin:5px 0px 0px 25px">
|
192 |
+
<i class="fa fa-question-circle"
|
193 |
+
data-tooltip-title="<?php _e("PHP Query Limit Size", 'duplicator'); ?>"
|
194 |
+
data-tooltip="<?php _e('A higher limit size will speed up the database build time, however it will use more memory. If your host has memory caps start off low.', 'duplicator'); ?>"></i>
|
195 |
+
<label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label>
|
196 |
+
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
197 |
+
<?php
|
198 |
+
foreach($phpdump_chunkopts as $value) {
|
199 |
+
$selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
200 |
+
echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
|
201 |
+
}
|
202 |
+
?>
|
203 |
+
</select>
|
204 |
+
</div><br/>
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
<tr>
|
208 |
+
<th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
|
209 |
+
<td>
|
210 |
+
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
211 |
+
<label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
212 |
+
<i style="font-size:12px">(<?php _e("enable only for large archives", 'duplicator'); ?>)</i>
|
213 |
+
<p class="description">
|
214 |
+
<?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
|
215 |
+
</p>
|
216 |
+
</td>
|
217 |
+
</tr>
|
218 |
+
</table>
|
219 |
+
|
220 |
+
|
221 |
+
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
222 |
+
<br/>
|
223 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e("Save Package Settings", 'duplicator') ?>" style="display: inline-block;" />
|
224 |
+
</p>
|
225 |
+
|
226 |
+
</form>
|
227 |
+
|
228 |
+
<script>
|
229 |
+
jQuery(document).ready(function($)
|
230 |
+
{
|
231 |
+
$('#package_ui_created').val(<?php echo $package_ui_created ?> );
|
232 |
+
});
|
233 |
</script>
|
views/tools/controller.php
CHANGED
@@ -149,12 +149,15 @@ if($current_tab == "diagnostics" && ($section == "info" || $section == '')){
|
|
149 |
|
150 |
<h2 class="nav-tab-wrapper">
|
151 |
<a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php _e('Diagnostics', 'duplicator'); ?></a>
|
|
|
152 |
</h2>
|
153 |
|
154 |
<?php
|
155 |
switch ($current_tab) {
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
|
|
|
|
160 |
</div>
|
149 |
|
150 |
<h2 class="nav-tab-wrapper">
|
151 |
<a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php _e('Diagnostics', 'duplicator'); ?></a>
|
152 |
+
<a href="?page=duplicator-tools&tab=templates" class="nav-tab <?php echo ($current_tab == 'templates') ? 'nav-tab-active' : '' ?>"> <?php _e('Templates', 'duplicator'); ?></a>
|
153 |
</h2>
|
154 |
|
155 |
<?php
|
156 |
switch ($current_tab) {
|
157 |
+
case 'diagnostics': include('diagnostics/main.php');
|
158 |
+
break;
|
159 |
+
case 'templates': include('templates.php');
|
160 |
+
break;
|
161 |
+
}
|
162 |
+
?>
|
163 |
</div>
|
views/tools/templates.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
div.panel {padding: 20px 5px 10px 10px;}
|
3 |
+
div.area {font-size:16px; text-align: center; line-height: 30px}
|
4 |
+
</style>
|
5 |
+
|
6 |
+
<div class="panel">
|
7 |
+
|
8 |
+
<br/>
|
9 |
+
<div class="area">
|
10 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
11 |
+
<?php
|
12 |
+
echo '<h2><i class="fa fa-clone"></i> ' . __('This option is available in Duplicator Pro.', 'duplicator') . '</h2>';
|
13 |
+
_e('Templates allow you to customize what you want to include in your site and store it as a re-usable profile.', 'duplicator');
|
14 |
+
echo '<br/>';
|
15 |
+
_e('Save time and create a template that can be applied to a schedule or a custom package setup.', 'duplicator');
|
16 |
+
?>
|
17 |
+
</div>
|
18 |
+
<p style="text-align:center">
|
19 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_tools_templates&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
20 |
+
<?php _e('Learn More', 'duplicator') ?>
|
21 |
+
</a>
|
22 |
+
</p>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
|