Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.1.32 |
Comparing to | |
See all releases |
Code changes from version 1.1.30 to 1.1.32
- assets/css/style.css +8 -0
- classes/package.php +21 -19
- classes/server.php +7 -2
- classes/ui/class.dialog.php +165 -0
- classes/ui/ui.php +92 -0
- views/actions.php → ctrls/ctrl.package.php +0 -0
- ctrls/ctrl.ui.php +1 -1
- define.php +1 -1
- duplicator.php +143 -83
- readme.txt +2 -2
- views/packages/main/controller.php +1 -0
- views/packages/main/new1.inc.form.php +15 -4
- views/packages/main/new2.scan.php +51 -15
- views/packages/main/packages.php +63 -26
- views/settings/general.php +21 -4
- views/tools/cleanup.php +44 -27
- views/tools/controller.php +1 -0
- views/tools/diagnostics/inc.data.php +23 -6
- views/tools/diagnostics/inc.validator.php +19 -5
assets/css/style.css
CHANGED
@@ -44,6 +44,14 @@ div#dup-progress-bar-area h2 {margin-bottom:15px}
|
|
44 |
div.dup-hdr-success {color:green; font-size:20px; font-weight:bold}
|
45 |
div.dup-hdr-error {color:#A62426; font-size:20px; font-weight:bold}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
/*================================================
|
49 |
PARSLEY:Overrides*/
|
44 |
div.dup-hdr-success {color:green; font-size:20px; font-weight:bold}
|
45 |
div.dup-hdr-error {color:#A62426; font-size:20px; font-weight:bold}
|
46 |
|
47 |
+
/*DIALOGS: THICKBOX */
|
48 |
+
#TB_title { padding-bottom: 3px!important; margin-bottom:5px!important; font-size:16px!important;}
|
49 |
+
div.dup-dlg-alert-txt {padding:10px 0; font-size:16px}
|
50 |
+
div.dup-dlg-alert-btns {position:absolute; bottom:20px; right:20px;}
|
51 |
+
div.dup-dlg-confirm-txt {padding:10px 0; font-size:16px}
|
52 |
+
div.dup-dlg-confirm-btns {position:absolute; bottom:20px; right:20px;}
|
53 |
+
div.dup-dlg-confirm-progress {display:none}
|
54 |
+
|
55 |
|
56 |
/*================================================
|
57 |
PARSLEY:Overrides*/
|
classes/package.php
CHANGED
@@ -93,18 +93,7 @@ class DUP_Package {
|
|
93 |
|
94 |
//SERVER
|
95 |
$srv = DUP_Server::GetChecks();
|
96 |
-
$report['SRV']
|
97 |
-
$report['SRV']['WEB']['model'] = $srv['SRV']['WEB']['model'];
|
98 |
-
|
99 |
-
$report['SRV']['PHP']['ALL'] = $srv['SRV']['PHP']['ALL'];
|
100 |
-
$report['SRV']['PHP']['openbase'] = $srv['SRV']['PHP']['openbase'];
|
101 |
-
$report['SRV']['PHP']['maxtime'] = $srv['SRV']['PHP']['maxtime'];
|
102 |
-
$report['SRV']['PHP']['mysqli'] = $srv['SRV']['PHP']['mysqli'];
|
103 |
-
|
104 |
-
$report['SRV']['WP']['ALL'] = $srv['SRV']['WP']['ALL'];
|
105 |
-
$report['SRV']['WP']['version'] = $srv['SRV']['WP']['version'];
|
106 |
-
$report['SRV']['WP']['core'] = $srv['SRV']['WP']['core'];
|
107 |
-
$report['SRV']['WP']['cache'] = $srv['SRV']['WP']['cache'];
|
108 |
|
109 |
//FILES
|
110 |
$this->Archive->Stats();
|
@@ -217,9 +206,10 @@ class DUP_Package {
|
|
217 |
'owner' => isset($current_user->user_login) ? $current_user->user_login : 'unknown',
|
218 |
'package' => $packageObj)
|
219 |
);
|
220 |
-
if ($results
|
221 |
-
|
222 |
-
|
|
|
223 |
}
|
224 |
$this->ID = $wpdb->insert_id;
|
225 |
}
|
@@ -488,11 +478,23 @@ class DUP_Package {
|
|
488 |
public static function FormatCreatedDate($date, $format = 1)
|
489 |
{
|
490 |
$date = new DateTime($date);
|
491 |
-
switch ($format)
|
|
|
|
|
492 |
case 1: return $date->format('Y-m-d H:i'); break;
|
493 |
case 2: return $date->format('Y-m-d H:i:s'); break;
|
494 |
-
case 3: return $date->format('m-d
|
495 |
-
case 4: return $date->format('m-d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
}
|
497 |
}
|
498 |
|
@@ -542,4 +544,4 @@ class DUP_Package {
|
|
542 |
}
|
543 |
|
544 |
}
|
545 |
-
?>
|
93 |
|
94 |
//SERVER
|
95 |
$srv = DUP_Server::GetChecks();
|
96 |
+
$report['SRV'] = $srv['SRV'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
//FILES
|
99 |
$this->Archive->Stats();
|
206 |
'owner' => isset($current_user->user_login) ? $current_user->user_login : 'unknown',
|
207 |
'package' => $packageObj)
|
208 |
);
|
209 |
+
if ($results === false) {
|
210 |
+
|
211 |
+
$wpdb->print_error();
|
212 |
+
DUP_Log::Error("Duplicator is unable to insert a package record into the database table.", "'{$wpdb->last_error}'");
|
213 |
}
|
214 |
$this->ID = $wpdb->insert_id;
|
215 |
}
|
478 |
public static function FormatCreatedDate($date, $format = 1)
|
479 |
{
|
480 |
$date = new DateTime($date);
|
481 |
+
switch ($format)
|
482 |
+
{
|
483 |
+
//YEAR
|
484 |
case 1: return $date->format('Y-m-d H:i'); break;
|
485 |
case 2: return $date->format('Y-m-d H:i:s'); break;
|
486 |
+
case 3: return $date->format('y-m-d H:i'); break;
|
487 |
+
case 4: return $date->format('y-m-d H:i:s'); break;
|
488 |
+
//MONTH
|
489 |
+
case 5: return $date->format('m-d-Y H:i'); break;
|
490 |
+
case 6: return $date->format('m-d-Y H:i:s'); break;
|
491 |
+
case 7: return $date->format('m-d-y H:i'); break;
|
492 |
+
case 8: return $date->format('m-d-y H:i:s'); break;
|
493 |
+
//DAY
|
494 |
+
case 9: return $date->format('d-m-Y H:i'); break;
|
495 |
+
case 10: return $date->format('d-m-Y H:i:s'); break;
|
496 |
+
case 11: return $date->format('d-m-y H:i'); break;
|
497 |
+
case 12: return $date->format('d-m-y H:i:s'); break;
|
498 |
}
|
499 |
}
|
500 |
|
544 |
}
|
545 |
|
546 |
}
|
547 |
+
?>
|
classes/server.php
CHANGED
@@ -86,11 +86,14 @@ class DUP_Server
|
|
86 |
$php_test2 = ini_get("max_execution_time");
|
87 |
$php_test2 = ($php_test2 > DUPLICATOR_SCAN_TIMEOUT) || (strcmp($php_test2 , 'Off') == 0 || $php_test2 == 0) ? true : false;
|
88 |
$php_test3 = function_exists('mysqli_connect');
|
|
|
89 |
|
90 |
$checks['SRV']['PHP']['openbase'] = $php_test1;
|
91 |
$checks['SRV']['PHP']['maxtime'] = $php_test2;
|
92 |
$checks['SRV']['PHP']['mysqli'] = $php_test3;
|
93 |
-
$checks['SRV']['PHP']['
|
|
|
|
|
94 |
|
95 |
//WORDPRESS SETTINGS
|
96 |
global $wp_version;
|
@@ -108,11 +111,13 @@ class DUP_Server
|
|
108 |
$dirSize = DUP_Util::GetDirectorySize($cache_path);
|
109 |
$cach_filtered = in_array($cache_path, explode(';', $Package->Archive->FilterDirs));
|
110 |
$wp_test3 = ($cach_filtered || $dirEmpty || $dirSize < DUPLICATOR_SCAN_CACHESIZE ) ? true : false;
|
|
|
111 |
|
112 |
$checks['SRV']['WP']['version'] = $wp_test1;
|
113 |
$checks['SRV']['WP']['core'] = $wp_test2;
|
114 |
$checks['SRV']['WP']['cache'] = $wp_test3;
|
115 |
-
$checks['SRV']['WP']['
|
|
|
116 |
|
117 |
return $checks;
|
118 |
}
|
86 |
$php_test2 = ini_get("max_execution_time");
|
87 |
$php_test2 = ($php_test2 > DUPLICATOR_SCAN_TIMEOUT) || (strcmp($php_test2 , 'Off') == 0 || $php_test2 == 0) ? true : false;
|
88 |
$php_test3 = function_exists('mysqli_connect');
|
89 |
+
$php_test4 = DUP_Util::$on_php_53_plus ? true : false;
|
90 |
|
91 |
$checks['SRV']['PHP']['openbase'] = $php_test1;
|
92 |
$checks['SRV']['PHP']['maxtime'] = $php_test2;
|
93 |
$checks['SRV']['PHP']['mysqli'] = $php_test3;
|
94 |
+
$checks['SRV']['PHP']['version'] = $php_test4;
|
95 |
+
$checks['SRV']['PHP']['ALL'] = ($php_test1 && $php_test2 && $php_test3 && $php_test4) ? 'Good' : 'Warn';
|
96 |
+
|
97 |
|
98 |
//WORDPRESS SETTINGS
|
99 |
global $wp_version;
|
111 |
$dirSize = DUP_Util::GetDirectorySize($cache_path);
|
112 |
$cach_filtered = in_array($cache_path, explode(';', $Package->Archive->FilterDirs));
|
113 |
$wp_test3 = ($cach_filtered || $dirEmpty || $dirSize < DUPLICATOR_SCAN_CACHESIZE ) ? true : false;
|
114 |
+
$wp_test4 = is_multisite();
|
115 |
|
116 |
$checks['SRV']['WP']['version'] = $wp_test1;
|
117 |
$checks['SRV']['WP']['core'] = $wp_test2;
|
118 |
$checks['SRV']['WP']['cache'] = $wp_test3;
|
119 |
+
$checks['SRV']['WP']['ismu'] = $wp_test4;
|
120 |
+
$checks['SRV']['WP']['ALL'] = $wp_test1 && $wp_test2 && $wp_test3 && ! $wp_test4 ? 'Good' : 'Warn';
|
121 |
|
122 |
return $checks;
|
123 |
}
|
classes/ui/class.dialog.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Inline Dialog:
|
5 |
+
* Used to generate a thinkbox inline dialog.
|
6 |
+
*/
|
7 |
+
class DUP_Dialog
|
8 |
+
{
|
9 |
+
//All Dialogs
|
10 |
+
public $title;
|
11 |
+
public $message;
|
12 |
+
public $width;
|
13 |
+
public $height;
|
14 |
+
|
15 |
+
//Confirm Only
|
16 |
+
public $progress_text;
|
17 |
+
public $progress_on = true;
|
18 |
+
public $jscallback;
|
19 |
+
|
20 |
+
private $id;
|
21 |
+
private $uniqid;
|
22 |
+
|
23 |
+
public function __construct()
|
24 |
+
{
|
25 |
+
add_thickbox();
|
26 |
+
$this->progress_text = __('Processing please wait...', 'duplicator');
|
27 |
+
$this->uniqid = uniqid();
|
28 |
+
$this->id = 'dup-dlg-' . $this->uniqid;
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Gets unique ID:
|
34 |
+
* Get the unique id that is assigned to each instance of a dialog
|
35 |
+
*
|
36 |
+
* @access public
|
37 |
+
* @return int
|
38 |
+
*/
|
39 |
+
public function get_id()
|
40 |
+
{
|
41 |
+
return $this->id;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Gets unique ID:
|
46 |
+
* Get the unique id that is assigned to each instance of a dialog
|
47 |
+
*
|
48 |
+
* @access public
|
49 |
+
* @return int
|
50 |
+
*/
|
51 |
+
public function get_message_id()
|
52 |
+
{
|
53 |
+
return "{$this->id}_message";
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Init Alert:
|
59 |
+
* Initilizes the alert base html code used to display when needed
|
60 |
+
*
|
61 |
+
* @access public
|
62 |
+
* @return string The html content used for the alert dialog
|
63 |
+
*/
|
64 |
+
public function init_alert()
|
65 |
+
{
|
66 |
+
$ok = __('OK', 'duplicator');
|
67 |
+
|
68 |
+
$html = <<<HTML
|
69 |
+
<div id="{$this->id}" style="display:none">
|
70 |
+
<div class="dup-dlg-alert-txt">
|
71 |
+
{$this->message}
|
72 |
+
<br/><br/>
|
73 |
+
</div>
|
74 |
+
<div class="dup-dlg-alert-btns">
|
75 |
+
<input type="button" class="button button-large" value="{$ok}" onclick="tb_remove()" />
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
HTML;
|
79 |
+
|
80 |
+
echo $html;
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Show Alert:
|
86 |
+
* Shows the alert base js code used to display when needed
|
87 |
+
*
|
88 |
+
* @access public
|
89 |
+
* @return string The javascript content used for the alert dialog
|
90 |
+
*/
|
91 |
+
public function show_alert()
|
92 |
+
{
|
93 |
+
$this->width = is_numeric($this->width) ? $this->width : 475;
|
94 |
+
$this->height = is_numeric($this->height) ? $this->height : 125;
|
95 |
+
|
96 |
+
echo "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');";
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Init Confirm:
|
102 |
+
* Shows the confirm base js code used to display when needed
|
103 |
+
*
|
104 |
+
* @access public
|
105 |
+
* @return string The javascript content used for the confirm dialog
|
106 |
+
*/
|
107 |
+
public function init_confirm()
|
108 |
+
{
|
109 |
+
$ok = __('OK', 'duplicator');
|
110 |
+
$cancel = __('Cancel', 'duplicator');
|
111 |
+
|
112 |
+
$progress_data = '';
|
113 |
+
$progress_func2 = '';
|
114 |
+
|
115 |
+
//Enable the progress spinner
|
116 |
+
if ($this->progress_on)
|
117 |
+
{
|
118 |
+
$progress_func1 = "__dup_dialog_" . $this->uniqid;
|
119 |
+
$progress_func2 = ";{$progress_func1}(this)";
|
120 |
+
$progress_data = <<<HTML
|
121 |
+
<div class='dup-dlg-confirm-progress'><i class='fa fa-circle-o-notch fa-spin fa-lg fa-fw'></i> {$this->progress_text}</div>
|
122 |
+
<script>
|
123 |
+
function {$progress_func1}(obj)
|
124 |
+
{
|
125 |
+
jQuery(obj).parent().parent().find('.dup-dlg-confirm-progress').show();
|
126 |
+
jQuery(obj).closest('.dup-dlg-confirm-btns').find('input').attr('disabled', 'true');
|
127 |
+
}
|
128 |
+
</script>
|
129 |
+
HTML;
|
130 |
+
}
|
131 |
+
|
132 |
+
$html = <<<HTML
|
133 |
+
<div id="{$this->id}" style="display:none">
|
134 |
+
<div class="dup-dlg-confirm-txt">
|
135 |
+
<span id="{$this->id}_message">{$this->message}</span>
|
136 |
+
<br/><br/>
|
137 |
+
{$progress_data}
|
138 |
+
</div>
|
139 |
+
<div class="dup-dlg-confirm-btns">
|
140 |
+
<input type="button" class="button button-large" value="{$ok}" onclick="{$this->jscallback}{$progress_func2}" />
|
141 |
+
<input type="button" class="button button-large" value="{$cancel}" onclick="tb_remove()" />
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
HTML;
|
145 |
+
|
146 |
+
echo $html;
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Show Confirm:
|
152 |
+
* Shows the confirm base js code used to display when needed
|
153 |
+
*
|
154 |
+
* @access public
|
155 |
+
* @return string The javascript content used for the confirm dialog
|
156 |
+
*/
|
157 |
+
public function show_confirm()
|
158 |
+
{
|
159 |
+
$this->width = is_numeric($this->width) ? $this->width : 500;
|
160 |
+
$this->height = is_numeric($this->height) ? $this->height : 150;
|
161 |
+
echo "tb_show('{$this->title}', '#TB_inline?width={$this->width}&height={$this->height}&inlineId={$this->id}');";
|
162 |
+
}
|
163 |
+
|
164 |
+
}
|
165 |
+
|
classes/ui/ui.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Helper Class for UI internactions
|
6 |
+
* @package Dupicator\classes
|
7 |
+
*/
|
8 |
+
class DUP_UI
|
9 |
+
{
|
10 |
+
|
11 |
+
/**
|
12 |
+
* The key used in the wp_options table
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
private static $OptionsViewStateKey = 'duplicator_ui_view_state';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Save the view state of UI elements
|
19 |
+
* @param string $key A unique key to define the ui element
|
20 |
+
* @param string $value A generic value to use for the view state
|
21 |
+
*/
|
22 |
+
public static function SaveViewState($key, $value)
|
23 |
+
{
|
24 |
+
$view_state = array();
|
25 |
+
$view_state = get_option(self::$OptionsViewStateKey);
|
26 |
+
$view_state[$key] = $value;
|
27 |
+
$success = update_option(self::$OptionsViewStateKey, $view_state);
|
28 |
+
return $success;
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Gets all the values from the settings array
|
34 |
+
* @return array Returns and array of all the values stored in the settings array
|
35 |
+
*/
|
36 |
+
public static function GetViewStateArray()
|
37 |
+
{
|
38 |
+
return get_option(self::$OptionsViewStateKey);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Return the value of the of view state item
|
43 |
+
* @param type $searchKey The key to search on
|
44 |
+
* @return string Returns the value of the key searched or null if key is not found
|
45 |
+
*/
|
46 |
+
public static function GetViewStateValue($searchKey)
|
47 |
+
{
|
48 |
+
$view_state = get_option(self::$OptionsViewStateKey);
|
49 |
+
if (is_array($view_state)) {
|
50 |
+
foreach ($view_state as $key => $value) {
|
51 |
+
if ($key == $searchKey) {
|
52 |
+
return $value;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
return null;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Shows a display message in the wp-admin if any researved files are found
|
61 |
+
* @return type void
|
62 |
+
*/
|
63 |
+
public static function ShowReservedFilesNotice()
|
64 |
+
{
|
65 |
+
//Show only on Duplicator pages and Dashboard when plugin is active
|
66 |
+
$dup_active = is_plugin_active('duplicator/duplicator.php');
|
67 |
+
$dup_perm = current_user_can( 'manage_options' );
|
68 |
+
if (! $dup_active || ! $dup_perm)
|
69 |
+
return;
|
70 |
+
|
71 |
+
if (DUP_Server::InstallerFilesFound())
|
72 |
+
{
|
73 |
+
$screen = get_current_screen();
|
74 |
+
$on_active_tab = isset($_GET['tab']) && $_GET['tab'] == 'cleanup' ? true : false;
|
75 |
+
|
76 |
+
echo '<div class="error" id="dup-global-error-reserved-files"><p>';
|
77 |
+
if ($screen->id == 'duplicator_page_duplicator-tools' && $on_active_tab)
|
78 |
+
{
|
79 |
+
_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.', 'duplicator');
|
80 |
+
}
|
81 |
+
else
|
82 |
+
{
|
83 |
+
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
84 |
+
_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.', 'duplicator');
|
85 |
+
@printf("<br/><a href='admin.php?page=duplicator-tools&tab=cleanup&_wpnonce=%s'>%s</a>", $duplicator_nonce, __('Take me to the cleanup page!', 'duplicator'));
|
86 |
+
}
|
87 |
+
echo "</p></div>";
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
92 |
+
?>
|
views/actions.php → ctrls/ctrl.package.php
RENAMED
File without changes
|
ctrls/ctrl.ui.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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/ui.php');
|
6 |
|
7 |
/**
|
8 |
* Controller for Tools
|
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/ui/ui.php');
|
6 |
|
7 |
/**
|
8 |
* Controller for Tools
|
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.1.
|
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.1.32');
|
6 |
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
define('DUPLICATOR_SITE_URL', get_site_url());
|
duplicator.php
CHANGED
@@ -1,16 +1,14 @@
|
|
1 |
<?php
|
2 |
-
/*
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
-
Description: Create a
|
6 |
-
Version: 1.1.
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
10 |
License: GPLv2 or later
|
11 |
-
*/
|
12 |
|
13 |
-
/* ================================================================================
|
14 |
Copyright 2011-2017 SnapCreek LLC
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
@@ -25,11 +23,6 @@
|
|
25 |
You should have received a copy of the GNU General Public License
|
26 |
along with this program; if not, write to the Free Software
|
27 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
28 |
-
|
29 |
-
SOURCE CONTRIBUTORS:
|
30 |
-
Robert Riley
|
31 |
-
Gaurav Aggarwal
|
32 |
-
Jonathan Foote
|
33 |
================================================================================ */
|
34 |
|
35 |
require_once("define.php");
|
@@ -42,16 +35,25 @@ if (is_admin() == true)
|
|
42 |
require_once 'classes/settings.php';
|
43 |
require_once 'classes/server.php';
|
44 |
require_once 'classes/package.php';
|
45 |
-
require_once 'classes/ui.php';
|
46 |
|
47 |
//Controllers
|
48 |
-
require_once '
|
49 |
require_once 'ctrls/ctrl.tools.php';
|
50 |
require_once 'ctrls/ctrl.ui.php';
|
51 |
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
function duplicator_activate()
|
56 |
{
|
57 |
global $wpdb;
|
@@ -85,42 +87,39 @@ if (is_admin() == true)
|
|
85 |
DUP_Util::InitSnapshotDirectory();
|
86 |
}
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
|
93 |
duplicator_activate();
|
94 |
}
|
95 |
-
//load_plugin_textdomain('duplicator', false, dirname(plugin_basename(__FILE__)) . '/lang/');
|
96 |
load_plugin_textdomain( 'duplicator' );
|
97 |
}
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
*
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
function
|
109 |
-
|
110 |
-
//
|
111 |
-
if ($file == $plugin) {
|
112 |
-
$links[] = '<a href="admin.php?page=duplicator-help" title="' . __('Get Help', 'duplicator') . '" >' . __('Help', 'duplicator') . '</a>';
|
113 |
-
$links[] = '<a href="admin.php?page=duplicator-about" title="' . __('Support the Plugin', 'duplicator') . '">' . __('About', 'duplicator') . '</a>';
|
114 |
-
return $links;
|
115 |
-
}
|
116 |
-
return $links;
|
117 |
}
|
118 |
|
119 |
-
//HOOKS
|
120 |
-
register_activation_hook(__FILE__, 'duplicator_activate');
|
121 |
-
register_deactivation_hook(__FILE__, 'duplicator_deactivate');
|
122 |
|
123 |
-
|
|
|
124 |
add_action('plugins_loaded', 'duplicator_update');
|
125 |
add_action('plugins_loaded', 'duplicator_wpfront_integrate');
|
126 |
add_action('admin_init', 'duplicator_init');
|
@@ -134,20 +133,31 @@ if (is_admin() == true)
|
|
134 |
$GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
|
135 |
$GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
142 |
if (DUP_Settings::Get('wpfront_integrate')) {
|
143 |
do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
|
144 |
}
|
145 |
}
|
|
|
146 |
|
147 |
-
|
148 |
-
*
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
151 |
/* CSS */
|
152 |
wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
|
153 |
wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.1.0');
|
@@ -158,33 +168,40 @@ if (is_admin() == true)
|
|
158 |
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
159 |
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
160 |
}
|
|
|
161 |
|
162 |
-
|
163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
$current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
|
165 |
-
switch ($current_page)
|
166 |
-
|
167 |
-
|
168 |
-
case 'duplicator-settings': include('views/settings/controller.php');
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
case 'duplicator-help': include('views/help/help.php');
|
175 |
-
break;
|
176 |
-
case 'duplicator-about': include('views/help/about.php');
|
177 |
-
break;
|
178 |
-
case 'duplicator-gopro': include('views/help/gopro.php');
|
179 |
-
break;
|
180 |
-
|
181 |
}
|
182 |
}
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
*
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
|
189 |
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
|
190 |
|
@@ -254,10 +271,16 @@ if (is_admin() == true)
|
|
254 |
|
255 |
}
|
256 |
|
|
|
257 |
/**
|
258 |
-
*
|
259 |
-
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
261 |
wp_enqueue_script('jquery');
|
262 |
wp_enqueue_script('jquery-ui-core');
|
263 |
wp_enqueue_script('jquery-ui-progressbar');
|
@@ -266,20 +289,37 @@ if (is_admin() == true)
|
|
266 |
|
267 |
}
|
268 |
|
|
|
269 |
/**
|
270 |
-
*
|
271 |
-
|
272 |
-
|
|
|
|
|
|
|
|
|
|
|
273 |
wp_enqueue_style('dup-jquery-ui');
|
274 |
wp_enqueue_style('dup-font-awesome');
|
275 |
wp_enqueue_style('dup-plugin-style');
|
276 |
wp_enqueue_style('dup-jquery-qtip');
|
277 |
}
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
static $this_plugin;
|
284 |
if (!$this_plugin)
|
285 |
$this_plugin = plugin_basename(__FILE__);
|
@@ -290,6 +330,26 @@ if (is_admin() == true)
|
|
290 |
}
|
291 |
return $links;
|
292 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
|
294 |
}
|
295 |
-
?>
|
1 |
<?php
|
2 |
+
/* ===============================================================================
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
+
Description: Create and transfer a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
+
Version: 1.1.32
|
7 |
Author: Snap Creek
|
8 |
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
Text Domain: duplicator
|
10 |
License: GPLv2 or later
|
|
|
11 |
|
|
|
12 |
Copyright 2011-2017 SnapCreek LLC
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
23 |
You should have received a copy of the GNU General Public License
|
24 |
along with this program; if not, write to the Free Software
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
|
|
|
26 |
================================================================================ */
|
27 |
|
28 |
require_once("define.php");
|
35 |
require_once 'classes/settings.php';
|
36 |
require_once 'classes/server.php';
|
37 |
require_once 'classes/package.php';
|
38 |
+
require_once 'classes/ui/ui.php';
|
39 |
|
40 |
//Controllers
|
41 |
+
require_once 'ctrls/ctrl.package.php';
|
42 |
require_once 'ctrls/ctrl.tools.php';
|
43 |
require_once 'ctrls/ctrl.ui.php';
|
44 |
|
45 |
+
/* =====================================
|
46 |
+
* ACTIVATE/DEACTIVE/UPDATE HOOKS */
|
47 |
+
register_activation_hook(__FILE__, 'duplicator_activate');
|
48 |
+
register_deactivation_hook(__FILE__, 'duplicator_deactivate');
|
49 |
|
50 |
+
/**
|
51 |
+
* Activation Hook:
|
52 |
+
* Hooked into `register_activation_hook`. Routines used to activate the plugin
|
53 |
+
*
|
54 |
+
* @access global
|
55 |
+
* @return null
|
56 |
+
*/
|
57 |
function duplicator_activate()
|
58 |
{
|
59 |
global $wpdb;
|
87 |
DUP_Util::InitSnapshotDirectory();
|
88 |
}
|
89 |
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Activation Hook:
|
93 |
+
* Hooked into `plugins_loaded`. Routines used to update the plugin
|
94 |
+
*
|
95 |
+
* @access global
|
96 |
+
* @return null
|
97 |
+
*/
|
98 |
+
function duplicator_update()
|
99 |
+
{
|
100 |
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
|
101 |
duplicator_activate();
|
102 |
}
|
|
|
103 |
load_plugin_textdomain( 'duplicator' );
|
104 |
}
|
105 |
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Deactivation Hook:
|
109 |
+
* Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
|
110 |
+
* For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
|
111 |
+
*
|
112 |
+
* @access global
|
113 |
+
* @return null
|
114 |
+
*/
|
115 |
+
function duplicator_deactivate()
|
116 |
+
{
|
117 |
+
//Logic has been added to uninstall.php
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
|
|
|
|
|
|
120 |
|
121 |
+
/* =====================================
|
122 |
+
* ACTION HOOKS */
|
123 |
add_action('plugins_loaded', 'duplicator_update');
|
124 |
add_action('plugins_loaded', 'duplicator_wpfront_integrate');
|
125 |
add_action('admin_init', 'duplicator_init');
|
133 |
$GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
|
134 |
$GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
|
135 |
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Action Hook:
|
139 |
+
* User role editor integration
|
140 |
+
*
|
141 |
+
* @access global
|
142 |
+
* @return null
|
143 |
+
*/
|
144 |
+
function duplicator_wpfront_integrate()
|
145 |
+
{
|
146 |
if (DUP_Settings::Get('wpfront_integrate')) {
|
147 |
do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
|
148 |
}
|
149 |
}
|
150 |
+
|
151 |
|
152 |
+
/**
|
153 |
+
* Action Hook:
|
154 |
+
* Hooked into `admin_init`. Init routines for all admin pages
|
155 |
+
*
|
156 |
+
* @access global
|
157 |
+
* @return null
|
158 |
+
*/
|
159 |
+
function duplicator_init()
|
160 |
+
{
|
161 |
/* CSS */
|
162 |
wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
|
163 |
wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.1.0');
|
168 |
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
169 |
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
170 |
}
|
171 |
+
|
172 |
|
173 |
+
/**
|
174 |
+
* Menu Redirect:
|
175 |
+
* Redirects the clicked menu item to the correct location
|
176 |
+
*
|
177 |
+
* @access global
|
178 |
+
* @return null
|
179 |
+
*/
|
180 |
+
function duplicator_get_menu()
|
181 |
+
{
|
182 |
$current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
|
183 |
+
switch ($current_page)
|
184 |
+
{
|
185 |
+
case 'duplicator': include('views/packages/controller.php'); break;
|
186 |
+
case 'duplicator-settings': include('views/settings/controller.php'); break;
|
187 |
+
case 'duplicator-tools': include('views/tools/controller.php'); break;
|
188 |
+
case 'duplicator-debug': include('debug/main.php'); break;
|
189 |
+
case 'duplicator-help': include('views/help/help.php'); break;
|
190 |
+
case 'duplicator-about': include('views/help/about.php'); break;
|
191 |
+
case 'duplicator-gopro': include('views/help/gopro.php'); break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
}
|
194 |
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Action Hook:
|
198 |
+
* Hooked into `admin_menu`. Loads all of the wp left nav admin menus for Duplicator
|
199 |
+
*
|
200 |
+
* @access global
|
201 |
+
* @return null
|
202 |
+
*/
|
203 |
+
function duplicator_menu()
|
204 |
+
{
|
205 |
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
|
206 |
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
|
207 |
|
271 |
|
272 |
}
|
273 |
|
274 |
+
|
275 |
/**
|
276 |
+
* Enqueue Scripts:
|
277 |
+
* Loads all required javascript libs/source for DupPro
|
278 |
+
*
|
279 |
+
* @access global
|
280 |
+
* @return null
|
281 |
+
*/
|
282 |
+
function duplicator_scripts()
|
283 |
+
{
|
284 |
wp_enqueue_script('jquery');
|
285 |
wp_enqueue_script('jquery-ui-core');
|
286 |
wp_enqueue_script('jquery-ui-progressbar');
|
289 |
|
290 |
}
|
291 |
|
292 |
+
|
293 |
/**
|
294 |
+
* Enqueue CSS Styles:
|
295 |
+
* Loads all CSS style libs/source for DupPro
|
296 |
+
*
|
297 |
+
* @access global
|
298 |
+
* @return null
|
299 |
+
*/
|
300 |
+
function duplicator_styles()
|
301 |
+
{
|
302 |
wp_enqueue_style('dup-jquery-ui');
|
303 |
wp_enqueue_style('dup-font-awesome');
|
304 |
wp_enqueue_style('dup-plugin-style');
|
305 |
wp_enqueue_style('dup-jquery-qtip');
|
306 |
}
|
307 |
|
308 |
+
|
309 |
+
/* =====================================
|
310 |
+
* FILTERS */
|
311 |
+
add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
|
312 |
+
add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Plugin MetaData:
|
316 |
+
* Adds the manage link in the plugins list
|
317 |
+
*
|
318 |
+
* @access global
|
319 |
+
* @return string The manage link in the plugins list
|
320 |
+
*/
|
321 |
+
function duplicator_manage_link($links, $file)
|
322 |
+
{
|
323 |
static $this_plugin;
|
324 |
if (!$this_plugin)
|
325 |
$this_plugin = plugin_basename(__FILE__);
|
330 |
}
|
331 |
return $links;
|
332 |
}
|
333 |
+
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Plugin MetaData:
|
337 |
+
* Adds links to the plugins manager page
|
338 |
+
*
|
339 |
+
* @access global
|
340 |
+
* @return string The meta help link data for the plugins manager
|
341 |
+
*/
|
342 |
+
function duplicator_meta_links($links, $file)
|
343 |
+
{
|
344 |
+
$plugin = plugin_basename(__FILE__);
|
345 |
+
// create link
|
346 |
+
if ($file == $plugin) {
|
347 |
+
$links[] = '<a href="admin.php?page=duplicator-help" title="' . __('Get Help', 'duplicator') . '" >' . __('Help', 'duplicator') . '</a>';
|
348 |
+
$links[] = '<a href="admin.php?page=duplicator-about" title="' . __('Support the Plugin', 'duplicator') . '">' . __('About', 'duplicator') . '</a>';
|
349 |
+
return $links;
|
350 |
+
}
|
351 |
+
return $links;
|
352 |
+
}
|
353 |
|
354 |
}
|
355 |
+
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
|
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
@@ -38,7 +38,7 @@ Duplicator Pro takes Duplicator to the next level with features you'll really ap
|
|
38 |
|
39 |
* Scheduled backups
|
40 |
* Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
|
41 |
-
* MultiThreaded to
|
42 |
* Multisite (MU) support
|
43 |
* Database creation *in the installer*
|
44 |
* Connect to cPanel directly from installer
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche site
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 1.1.32
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
38 |
|
39 |
* Scheduled backups
|
40 |
* Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
|
41 |
+
* MultiThreaded to support larger web sites & databases
|
42 |
* Multisite (MU) support
|
43 |
* Database creation *in the installer*
|
44 |
* Connect to cPanel directly from installer
|
views/packages/main/controller.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
$current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
|
3 |
?>
|
4 |
|
1 |
<?php
|
2 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.dialog.php');
|
3 |
$current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
|
4 |
?>
|
5 |
|
views/packages/main/new1.inc.form.php
CHANGED
@@ -376,12 +376,22 @@ INSTALLER -->
|
|
376 |
|
377 |
|
378 |
<div class="dup-button-footer">
|
379 |
-
<input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.
|
380 |
<input type="submit" value="<?php _e("Next", 'duplicator') ?> ▶" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
|
381 |
</div>
|
382 |
|
383 |
</form>
|
384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
<script>
|
386 |
jQuery(document).ready(function ($)
|
387 |
{
|
@@ -433,13 +443,14 @@ jQuery(document).ready(function ($)
|
|
433 |
$("#filter-exts").val(text);
|
434 |
};
|
435 |
|
|
|
|
|
|
|
|
|
436 |
|
437 |
Duplicator.Pack.ResetSettings = function ()
|
438 |
{
|
439 |
var key = 'duplicator_package_active';
|
440 |
-
var result = confirm('<?php _e("This will reset all of the current package settings. Would you like to continue?", "duplicator"); ?>');
|
441 |
-
if (!result)
|
442 |
-
return;
|
443 |
|
444 |
jQuery('#dup-form-opts-action').val(key);
|
445 |
jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
|
376 |
|
377 |
|
378 |
<div class="dup-button-footer">
|
379 |
+
<input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ConfirmReset()" />
|
380 |
<input type="submit" value="<?php _e("Next", 'duplicator') ?> ▶" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
|
381 |
</div>
|
382 |
|
383 |
</form>
|
384 |
|
385 |
+
<!-- ==========================================
|
386 |
+
THICK-BOX DIALOGS: -->
|
387 |
+
<?php
|
388 |
+
|
389 |
+
$confirm1 = new DUP_Dialog();
|
390 |
+
$confirm1->title = __('Reset Package Settings?', 'duplicator');
|
391 |
+
$confirm1->message = __('This will clear and reset all of the current package settings. Would you like to continue?', 'duplicator');
|
392 |
+
$confirm1->jscallback = 'Duplicator.Pack.ResetSettings()';
|
393 |
+
$confirm1->init_confirm();
|
394 |
+
?>
|
395 |
<script>
|
396 |
jQuery(document).ready(function ($)
|
397 |
{
|
443 |
$("#filter-exts").val(text);
|
444 |
};
|
445 |
|
446 |
+
Duplicator.Pack.ConfirmReset = function ()
|
447 |
+
{
|
448 |
+
<?php $confirm1->show_confirm(); ?>
|
449 |
+
}
|
450 |
|
451 |
Duplicator.Pack.ResetSettings = function ()
|
452 |
{
|
453 |
var key = 'duplicator_package_active';
|
|
|
|
|
|
|
454 |
|
455 |
jQuery('#dup-form-opts-action').val(key);
|
456 |
jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
|
views/packages/main/new2.scan.php
CHANGED
@@ -60,9 +60,10 @@
|
|
60 |
div#data-db-tablelist {max-height: 300px; overflow-y: scroll; border: 1px dashed silver; padding: 5px; margin-top:5px}
|
61 |
div#data-db-tablelist div{padding:0px 0px 0px 15px;}
|
62 |
div#data-db-tablelist span{display:inline-block; min-width: 75px}
|
63 |
-
div#data-db-size1 {display: inline-block; float:right; font-size:11px; margin-right:
|
64 |
/*FILES */
|
65 |
-
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right:
|
|
|
66 |
div#data-arc-names-data, div#data-arc-big-data {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
67 |
|
68 |
div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
|
@@ -155,14 +156,29 @@ TOOL BAR: STEPS -->
|
|
155 |
</div>
|
156 |
<div class='dup-scan-info dup-info-box'>
|
157 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
//OPEN_BASEDIR
|
159 |
$test = ini_get("open_basedir");
|
160 |
-
echo '<span id="data-srv-php-openbase"></span> <b>' . __('Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
161 |
echo '<small>';
|
162 |
_e('Issues might occur when [open_basedir] is enabled. Work with your server admin to disable this value in the php.ini file if you’re having issues building a package.', 'duplicator');
|
163 |
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
164 |
echo '</small>';
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
//MAX_EXECUTION_TIME
|
167 |
$test = (set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
168 |
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
@@ -173,21 +189,16 @@ TOOL BAR: STEPS -->
|
|
173 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
174 |
|
175 |
if ($zip_check != null) {
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
}
|
182 |
|
183 |
echo '</small>';
|
184 |
|
185 |
-
|
186 |
-
echo '<hr size="1" /><span id="data-srv-php-mysqli"></span> <b>' . __('MySQLi', 'duplicator') . "</b> <br/>";
|
187 |
-
echo '<small>';
|
188 |
-
_e('Creating the package does not require the mysqli module. However the installer.php file requires that the PHP module mysqli be installed on the server it is deployed on.', 'duplicator');
|
189 |
-
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
190 |
-
echo '</small>';
|
191 |
?>
|
192 |
</div>
|
193 |
</div>
|
@@ -219,6 +230,24 @@ TOOL BAR: STEPS -->
|
|
219 |
_e("Cached data will lead to issues at install time and increases your archive size. It is recommended to empty your cache directory at build time. Use caution when removing data from the cache directory. If you have a cache plugin review the documentation for how to empty it; simply removing files might cause errors on your site. The cache size minimum threshold is currently set at ", 'duplicator');
|
220 |
echo DUP_Util::ByteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
221 |
echo '</small>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
?>
|
224 |
</div>
|
@@ -235,6 +264,9 @@ TOOL BAR: STEPS -->
|
|
235 |
<div class="dup-panel-title">
|
236 |
<i class="fa fa-files-o"></i>
|
237 |
<?php _e("Files", 'duplicator'); ?>
|
|
|
|
|
|
|
238 |
<div id="data-arc-size1"></div>
|
239 |
<div class="dup-scan-filter-status">
|
240 |
<?php
|
@@ -358,6 +390,9 @@ TOOL BAR: STEPS -->
|
|
358 |
<div class="dup-panel-title">
|
359 |
<i class="fa fa-table"></i>
|
360 |
<?php _e("Database", 'duplicator'); ?>
|
|
|
|
|
|
|
361 |
<div id="data-db-size1"></div>
|
362 |
<div class="dup-scan-filter-status">
|
363 |
<?php
|
@@ -610,6 +645,7 @@ jQuery(document).ready(function($) {
|
|
610 |
$('#data-srv-php-openbase').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openbase));
|
611 |
$('#data-srv-php-maxtime').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.maxtime));
|
612 |
$('#data-srv-php-mysqli').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.mysqli));
|
|
|
613 |
$('#data-srv-php-openssl').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openssl));
|
614 |
$('#data-srv-php-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.ALL));
|
615 |
|
60 |
div#data-db-tablelist {max-height: 300px; overflow-y: scroll; border: 1px dashed silver; padding: 5px; margin-top:5px}
|
61 |
div#data-db-tablelist div{padding:0px 0px 0px 15px;}
|
62 |
div#data-db-tablelist span{display:inline-block; min-width: 75px}
|
63 |
+
div#data-db-size1 {display: inline-block; float:right; font-size:11px; margin-right:5px; font-style: italic}
|
64 |
/*FILES */
|
65 |
+
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right:5px; font-style: italic}
|
66 |
+
i.data-size-help { float:right; margin-right:5px; display: block; font-size: 11px}
|
67 |
div#data-arc-names-data, div#data-arc-big-data {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
68 |
|
69 |
div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
|
156 |
</div>
|
157 |
<div class='dup-scan-info dup-info-box'>
|
158 |
<?php
|
159 |
+
|
160 |
+
//PHP VERSION
|
161 |
+
echo '<span id="data-srv-php-version"></span> <b>' . __('PHP Version', 'duplicator') . "</b> <br/>";
|
162 |
+
echo '<small>';
|
163 |
+
_e('The minium PHP version supported by Duplicator is 5.2.9, however it is highly recommended to use PHP 5.3 or higher for improved stability.', 'duplicator');
|
164 |
+
echo " <i><a href='http://php.net/ChangeLog-5.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
165 |
+
echo '</small>';
|
166 |
+
|
167 |
//OPEN_BASEDIR
|
168 |
$test = ini_get("open_basedir");
|
169 |
+
echo '<hr size="1" /><span id="data-srv-php-openbase"></span> <b>' . __('Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
170 |
echo '<small>';
|
171 |
_e('Issues might occur when [open_basedir] is enabled. Work with your server admin to disable this value in the php.ini file if you’re having issues building a package.', 'duplicator');
|
172 |
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
173 |
echo '</small>';
|
174 |
+
|
175 |
+
//MYSQLI
|
176 |
+
echo '<hr size="1" /><span id="data-srv-php-mysqli"></span> <b>' . __('MySQLi', 'duplicator') . "</b> <br/>";
|
177 |
+
echo '<small>';
|
178 |
+
_e('Creating the package does not require the mysqli module. However the installer.php file requires that the PHP module mysqli be installed on the server it is deployed on.', 'duplicator');
|
179 |
+
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
180 |
+
echo '</small>';
|
181 |
+
|
182 |
//MAX_EXECUTION_TIME
|
183 |
$test = (set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
184 |
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
189 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
190 |
|
191 |
if ($zip_check != null) {
|
192 |
+
echo '<br/><br/>';
|
193 |
+
echo '<span style="font-weight:bold">';
|
194 |
+
_e('Get faster builds with Duplicator Pro with access to shell_exec zip.', 'duplicator');
|
195 |
+
echo '</span>';
|
196 |
+
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_max_execution_time_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
197 |
}
|
198 |
|
199 |
echo '</small>';
|
200 |
|
201 |
+
|
|
|
|
|
|
|
|
|
|
|
202 |
?>
|
203 |
</div>
|
204 |
</div>
|
230 |
_e("Cached data will lead to issues at install time and increases your archive size. It is recommended to empty your cache directory at build time. Use caution when removing data from the cache directory. If you have a cache plugin review the documentation for how to empty it; simply removing files might cause errors on your site. The cache size minimum threshold is currently set at ", 'duplicator');
|
231 |
echo DUP_Util::ByteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
232 |
echo '</small>';
|
233 |
+
|
234 |
+
//MU SITE
|
235 |
+
if (is_multisite())
|
236 |
+
{
|
237 |
+
echo '<hr size="1" /><span><div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i></div></span> <b>' . __('Multisite: Unsupported', 'duplicator') . "</b> <br/>";
|
238 |
+
echo '<small>';
|
239 |
+
_e('Duplicator does not officially support Multisite. However, Duplicator Pro supports duplication of a full Multisite network and also has the ability to install a Multisite subsite as a standalone site.', 'duplicator');
|
240 |
+
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
241 |
+
echo '</small>';
|
242 |
+
}
|
243 |
+
else
|
244 |
+
{
|
245 |
+
echo '<hr size="1" /><span><div class="dup-scan-good"><i class="fa fa-check"></i></div></span> <b>' . __('Multisite: N/A', 'duplicator') . "</b> <br/>";
|
246 |
+
echo '<small>';
|
247 |
+
_e('This is not a Multisite install so duplication will proceed without issue. Duplicator does not officially support Multisite. However, Duplicator Pro supports duplication of a full Multisite network and also has the ability to install a Multisite subsite as a standalone site.', 'duplicator');
|
248 |
+
echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn&utm_campaign=duplicator_pro' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
249 |
+
echo '</small>';
|
250 |
+
}
|
251 |
|
252 |
?>
|
253 |
</div>
|
264 |
<div class="dup-panel-title">
|
265 |
<i class="fa fa-files-o"></i>
|
266 |
<?php _e("Files", 'duplicator'); ?>
|
267 |
+
<i class="fa fa-question-circle data-size-help"
|
268 |
+
data-tooltip-title="<?php _e("File Size:", 'duplicator'); ?>"
|
269 |
+
data-tooltip="<?php _e('The files size represents only the included files before compression is applied. It does not include the size of the database script and in most cases the package size once completed will be smaller than this number.', 'duplicator'); ?>"></i>
|
270 |
<div id="data-arc-size1"></div>
|
271 |
<div class="dup-scan-filter-status">
|
272 |
<?php
|
390 |
<div class="dup-panel-title">
|
391 |
<i class="fa fa-table"></i>
|
392 |
<?php _e("Database", 'duplicator'); ?>
|
393 |
+
<i class="fa fa-question-circle data-size-help"
|
394 |
+
data-tooltip-title="<?php _e("Database Size:", 'duplicator'); ?>"
|
395 |
+
data-tooltip="<?php _e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i>
|
396 |
<div id="data-db-size1"></div>
|
397 |
<div class="dup-scan-filter-status">
|
398 |
<?php
|
645 |
$('#data-srv-php-openbase').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openbase));
|
646 |
$('#data-srv-php-maxtime').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.maxtime));
|
647 |
$('#data-srv-php-mysqli').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.mysqli));
|
648 |
+
$('#data-srv-php-version').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.version));
|
649 |
$('#data-srv-php-openssl').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openssl));
|
650 |
$('#data-srv-php-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.ALL));
|
651 |
|
views/packages/main/packages.php
CHANGED
@@ -53,7 +53,7 @@ TOOL-BAR -->
|
|
53 |
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
54 |
<option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
|
55 |
</select>
|
56 |
-
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.
|
57 |
</td>
|
58 |
<td align="center" >
|
59 |
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
@@ -193,43 +193,80 @@ TOOL-BAR -->
|
|
193 |
<?php endif; ?>
|
194 |
</form>
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
<script type="text/javascript">
|
197 |
jQuery(document).ready(function($)
|
198 |
{
|
199 |
-
|
200 |
-
|
201 |
-
Duplicator.Pack.
|
202 |
{
|
203 |
var arr = new Array;
|
204 |
var count = 0;
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
}
|
210 |
-
$("input[name=delete_confirm]").each(function() {
|
211 |
-
if (this.checked) { arr[count++] = this.id; }
|
212 |
});
|
213 |
var list = arr.join(',');
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
return;
|
217 |
}
|
218 |
|
219 |
-
|
|
|
220 |
{
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
};
|
234 |
|
235 |
/* Toogles the Bulk Action Check boxes */
|
53 |
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
54 |
<option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
|
55 |
</select>
|
56 |
+
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.ConfirmDelete()">
|
57 |
</td>
|
58 |
<td align="center" >
|
59 |
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
193 |
<?php endif; ?>
|
194 |
</form>
|
195 |
|
196 |
+
<!-- ==========================================
|
197 |
+
THICK-BOX DIALOGS: -->
|
198 |
+
<?php
|
199 |
+
$alert1 = new DUP_Dialog();
|
200 |
+
$alert1->title = __('Bulk Action Required', 'duplicator');
|
201 |
+
$alert1->message = __('Please select an action from the "Bulk Actions" drop down menu!', 'duplicator');
|
202 |
+
$alert1->init_alert();
|
203 |
+
|
204 |
+
$alert2 = new DUP_Dialog();
|
205 |
+
$alert2->title = __('Selection Required', 'duplicator', 'duplicator');
|
206 |
+
$alert2->message = __('Please select at least one package to delete!', 'duplicator');
|
207 |
+
$alert2->init_alert();
|
208 |
+
|
209 |
+
$confirm1 = new DUP_Dialog();
|
210 |
+
$confirm1->title = __('Delete Packages?', 'duplicator');
|
211 |
+
$confirm1->message = __('Are you sure, you want to delete the selected package(s)?', 'duplicator');
|
212 |
+
$confirm1->progress_text = __('Removing Packages, Please Wait...', 'duplicator');
|
213 |
+
$confirm1->jscallback = 'Duplicator.Pack.Delete()';
|
214 |
+
$confirm1->init_confirm();
|
215 |
+
?>
|
216 |
+
|
217 |
<script type="text/javascript">
|
218 |
jQuery(document).ready(function($)
|
219 |
{
|
220 |
+
|
221 |
+
/* Creats a comma seperate list of all selected package ids */
|
222 |
+
Duplicator.Pack.GetDeleteList = function ()
|
223 |
{
|
224 |
var arr = new Array;
|
225 |
var count = 0;
|
226 |
+
$("input[name=delete_confirm]").each(function () {
|
227 |
+
if (this.checked) {
|
228 |
+
arr[count++] = this.id;
|
229 |
+
}
|
|
|
|
|
|
|
230 |
});
|
231 |
var list = arr.join(',');
|
232 |
+
return list;
|
233 |
+
}
|
234 |
+
|
235 |
+
/* Provides the correct confirmation items when deleting packages */
|
236 |
+
Duplicator.Pack.ConfirmDelete = function ()
|
237 |
+
{
|
238 |
+
if ($("#dup-pack-bulk-actions").val() != "delete")
|
239 |
+
{
|
240 |
+
<?php $alert1->show_alert(); ?>
|
241 |
return;
|
242 |
}
|
243 |
|
244 |
+
var list = Duplicator.Pack.GetDeleteList();
|
245 |
+
if (list.length == 0)
|
246 |
{
|
247 |
+
<?php $alert2->show_alert(); ?>
|
248 |
+
return;
|
249 |
+
}
|
250 |
+
<?php $confirm1->show_confirm(); ?>
|
251 |
+
}
|
252 |
+
|
253 |
+
|
254 |
+
/* Removes all selected package sets
|
255 |
+
* @param event To prevent bubbling */
|
256 |
+
Duplicator.Pack.Delete = function (event)
|
257 |
+
{
|
258 |
+
var list = Duplicator.Pack.GetDeleteList();
|
259 |
+
|
260 |
+
$.ajax({
|
261 |
+
type: "POST",
|
262 |
+
url: ajaxurl,
|
263 |
+
dataType: "json",
|
264 |
+
data: {action : 'duplicator_package_delete', duplicator_delid : list, nonce: '<?php echo $ajax_nonce; ?>' },
|
265 |
+
success: function(data) {
|
266 |
+
Duplicator.ReloadWindow(data);
|
267 |
+
}
|
268 |
+
});
|
269 |
+
|
270 |
};
|
271 |
|
272 |
/* Toogles the Bulk Action Check boxes */
|
views/settings/general.php
CHANGED
@@ -124,10 +124,27 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
|
124 |
<th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
|
125 |
<td>
|
126 |
<select name="package_ui_created" id="package_ui_created">
|
127 |
-
|
128 |
-
<
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</select>
|
132 |
<p class="description">
|
133 |
<?php _e("The date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?>
|
124 |
<th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
|
125 |
<td>
|
126 |
<select name="package_ui_created" id="package_ui_created">
|
127 |
+
<!-- YEAR -->
|
128 |
+
<optgroup label="<?php _e("By Year", 'duplicator'); ?>">
|
129 |
+
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
130 |
+
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
131 |
+
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
132 |
+
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
133 |
+
</optgroup>
|
134 |
+
<!-- MONTH -->
|
135 |
+
<optgroup label="<?php _e("By Month", 'duplicator'); ?>">
|
136 |
+
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
137 |
+
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
138 |
+
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
139 |
+
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
140 |
+
</optgroup>
|
141 |
+
<!-- DAY -->
|
142 |
+
<optgroup label="<?php _e("By Day", 'duplicator'); ?>">
|
143 |
+
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
144 |
+
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
145 |
+
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
146 |
+
<option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
|
147 |
+
</optgroup>
|
148 |
</select>
|
149 |
<p class="description">
|
150 |
<?php _e("The date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?>
|
views/tools/cleanup.php
CHANGED
@@ -135,42 +135,59 @@
|
|
135 |
</td>
|
136 |
</tr>
|
137 |
<tr>
|
138 |
-
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.
|
139 |
<td><?php _e("Removes all legacy data and settings prior to version", 'duplicator'); ?> [<?php echo DUPLICATOR_VERSION ?>].</td>
|
140 |
</tr>
|
141 |
<tr>
|
142 |
-
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.
|
143 |
<td><?php _e("Removes all build data from:", 'duplicator'); ?> [<?php echo DUPLICATOR_SSDIR_PATH_TMP ?>].</td>
|
144 |
</tr>
|
145 |
</table>
|
146 |
</form>
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
<script>
|
149 |
-
jQuery(document).ready(function($)
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
}
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
});
|
175 |
</script>
|
176 |
|
135 |
</td>
|
136 |
</tr>
|
137 |
<tr>
|
138 |
+
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.ConfirmDeleteLegacy()"><?php _e("Delete Legacy Data", 'duplicator'); ?></a></td>
|
139 |
<td><?php _e("Removes all legacy data and settings prior to version", 'duplicator'); ?> [<?php echo DUPLICATOR_VERSION ?>].</td>
|
140 |
</tr>
|
141 |
<tr>
|
142 |
+
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.ConfirmClearBuildCache()"><?php _e("Clear Build Cache", 'duplicator'); ?></a></td>
|
143 |
<td><?php _e("Removes all build data from:", 'duplicator'); ?> [<?php echo DUPLICATOR_SSDIR_PATH_TMP ?>].</td>
|
144 |
</tr>
|
145 |
</table>
|
146 |
</form>
|
147 |
|
148 |
+
<!-- ==========================================
|
149 |
+
THICK-BOX DIALOGS: -->
|
150 |
+
<?php
|
151 |
+
$msg = __('This action will remove all legacy settings prior to version %1$s. ', 'duplicator');
|
152 |
+
$msg .= __('Legacy settings are only needed if you plan to migrate back to an older version of this plugin.', 'duplicator');
|
153 |
+
|
154 |
+
$confirm1 = new DUP_Dialog();
|
155 |
+
$confirm1->title = __('Delete Packages?', 'duplicator');
|
156 |
+
$confirm1->message = sprintf(__($msg, 'duplicator'), DUPLICATOR_VERSION);
|
157 |
+
$confirm1->jscallback = 'Duplicator.Tools.DeleteLegacy()';
|
158 |
+
$confirm1->init_confirm();
|
159 |
+
|
160 |
+
$confirm2 = new DUP_Dialog();
|
161 |
+
$confirm2->title = __('Clear Build Cache?', 'duplicator');
|
162 |
+
$confirm2->message = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.', 'duplicator');
|
163 |
+
$confirm2->jscallback = 'Duplicator.Tools.ClearBuildCache()';
|
164 |
+
$confirm2->init_confirm();
|
165 |
+
?>
|
166 |
+
|
167 |
<script>
|
168 |
+
jQuery(document).ready(function($)
|
169 |
+
{
|
170 |
+
Duplicator.Tools.ConfirmDeleteLegacy = function ()
|
171 |
+
{
|
172 |
+
<?php $confirm1->show_confirm(); ?>
|
173 |
+
}
|
174 |
+
|
175 |
+
|
176 |
+
Duplicator.Tools.DeleteLegacy = function ()
|
177 |
+
{
|
178 |
+
window.location = '?page=duplicator-tools&tab=cleanup&action=legacy&_wpnonce=<?php echo $nonce; ?>';
|
179 |
+
}
|
|
|
180 |
|
181 |
+
|
182 |
+
Duplicator.Tools.ConfirmClearBuildCache = function ()
|
183 |
+
{
|
184 |
+
<?php $confirm2->show_confirm(); ?>
|
185 |
+
}
|
186 |
+
|
187 |
+
Duplicator.Tools.ClearBuildCache = function ()
|
188 |
+
{
|
189 |
+
window.location = '?page=duplicator-tools&tab=cleanup&action=tmp-cache&_wpnonce=<?php echo $nonce; ?>';
|
190 |
+
}
|
191 |
+
})
|
|
|
192 |
</script>
|
193 |
|
views/tools/controller.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
DUP_Util::CheckPermissions('manage_options');
|
4 |
|
1 |
<?php
|
2 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.dialog.php');
|
3 |
|
4 |
DUP_Util::CheckPermissions('manage_options');
|
5 |
|
views/tools/diagnostics/inc.data.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
|
4 |
|
5 |
?>
|
6 |
|
@@ -27,7 +27,7 @@ OPTIONS DATA -->
|
|
27 |
<td>
|
28 |
<?php
|
29 |
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
30 |
-
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.
|
31 |
: $row->option_name;
|
32 |
?>
|
33 |
</td>
|
@@ -41,16 +41,33 @@ OPTIONS DATA -->
|
|
41 |
</div>
|
42 |
<br/>
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<script>
|
45 |
jQuery(document).ready(function($)
|
46 |
{
|
47 |
-
Duplicator.Settings.
|
48 |
{
|
49 |
var key = $(anchor).text();
|
50 |
-
var
|
51 |
-
|
52 |
-
|
53 |
jQuery('#dup-settings-form-action').val(key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
jQuery('#dup-settings-form').submit();
|
55 |
}
|
56 |
});
|
1 |
<?php
|
2 |
|
3 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' AND `option_name` NOT LIKE '%duplicator_pro%' ORDER BY option_name";
|
4 |
|
5 |
?>
|
6 |
|
27 |
<td>
|
28 |
<?php
|
29 |
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
30 |
+
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.ConfirmDeleteOption(this)'>{$row->option_name}</a>"
|
31 |
: $row->option_name;
|
32 |
?>
|
33 |
</td>
|
41 |
</div>
|
42 |
<br/>
|
43 |
|
44 |
+
<!-- ==========================================
|
45 |
+
THICK-BOX DIALOGS: -->
|
46 |
+
<?php
|
47 |
+
$confirm1 = new DUP_Dialog();
|
48 |
+
$confirm1->title = __('Delete Option?', 'duplicator');
|
49 |
+
$confirm1->message = __('Delete the option value just selected?', 'duplicator');
|
50 |
+
$confirm1->progress_text = __('Removing Option, Please Wait...', 'duplicator');
|
51 |
+
$confirm1->jscallback = 'Duplicator.Settings.DeleteOption()';
|
52 |
+
$confirm1->init_confirm();
|
53 |
+
?>
|
54 |
+
|
55 |
<script>
|
56 |
jQuery(document).ready(function($)
|
57 |
{
|
58 |
+
Duplicator.Settings.ConfirmDeleteOption = function (anchor)
|
59 |
{
|
60 |
var key = $(anchor).text();
|
61 |
+
var msg_id = '<?php echo $confirm1->get_message_id() ?>';
|
62 |
+
var msg = '<?php _e('Delete the option value', 'duplicator');?>' + ' [' + key + '] ?';
|
|
|
63 |
jQuery('#dup-settings-form-action').val(key);
|
64 |
+
jQuery('#' + msg_id).html(msg)
|
65 |
+
<?php $confirm1->show_confirm(); ?>
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
Duplicator.Settings.DeleteOption = function ()
|
70 |
+
{
|
71 |
jQuery('#dup-settings-form').submit();
|
72 |
}
|
73 |
});
|
views/tools/diagnostics/inc.validator.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
div#hb-result {padding: 10px 5px 0 5px; line-height: 22px}
|
8 |
</style>
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<!-- ==============================
|
11 |
SCAN VALIDATOR -->
|
12 |
<div class="dup-box">
|
@@ -25,7 +36,7 @@ SCAN VALIDATOR -->
|
|
25 |
<br/><br/>
|
26 |
|
27 |
|
28 |
-
<button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.
|
29 |
<?php _e("Run Scan Integrity Validation", "duplicator"); ?>
|
30 |
</button>
|
31 |
|
@@ -71,15 +82,18 @@ SCAN VALIDATOR -->
|
|
71 |
<script>
|
72 |
jQuery(document).ready(function($)
|
73 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
//Run request to: admin-ajax.php?action=DUP_CTRL_Tools_RunScanValidator
|
75 |
Duplicator.Tools.RunScanValidator = function()
|
76 |
{
|
77 |
-
|
78 |
var data = {action : 'DUP_CTRL_Tools_RunScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
|
79 |
|
80 |
-
if (! result)
|
81 |
-
return;
|
82 |
-
|
83 |
$('#hb-result').html('<?php _e("Scanning Enviroment... This may take a few minutes.", "duplicator"); ?>');
|
84 |
$('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
85 |
|
7 |
div#hb-result {padding: 10px 5px 0 5px; line-height: 22px}
|
8 |
</style>
|
9 |
|
10 |
+
<!-- ==========================================
|
11 |
+
THICK-BOX DIALOGS: -->
|
12 |
+
<?php
|
13 |
+
$confirm1 = new DUP_Dialog();
|
14 |
+
$confirm1->title = __('Run Validator', 'duplicator');
|
15 |
+
$confirm1->message = __('This will run the scan validation check. This may take several minutes. Do you want to Continue?', 'duplicator');
|
16 |
+
$confirm1->progress_on = false;
|
17 |
+
$confirm1->jscallback = 'Duplicator.Tools.RunScanValidator()';
|
18 |
+
$confirm1->init_confirm();
|
19 |
+
?>
|
20 |
+
|
21 |
<!-- ==============================
|
22 |
SCAN VALIDATOR -->
|
23 |
<div class="dup-box">
|
36 |
<br/><br/>
|
37 |
|
38 |
|
39 |
+
<button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.ConfirmScanValidator()">
|
40 |
<?php _e("Run Scan Integrity Validation", "duplicator"); ?>
|
41 |
</button>
|
42 |
|
82 |
<script>
|
83 |
jQuery(document).ready(function($)
|
84 |
{
|
85 |
+
Duplicator.Tools.ConfirmScanValidator = function()
|
86 |
+
{
|
87 |
+
<?php $confirm1->show_confirm(); ?>
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
//Run request to: admin-ajax.php?action=DUP_CTRL_Tools_RunScanValidator
|
92 |
Duplicator.Tools.RunScanValidator = function()
|
93 |
{
|
94 |
+
tb_remove();
|
95 |
var data = {action : 'DUP_CTRL_Tools_RunScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
|
96 |
|
|
|
|
|
|
|
97 |
$('#hb-result').html('<?php _e("Scanning Enviroment... This may take a few minutes.", "duplicator"); ?>');
|
98 |
$('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
99 |
|