Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 0.5.26 |
Comparing to | |
See all releases |
Code changes from version 0.5.24 to 0.5.26
- assets/css/style.css +1 -1
- classes/package.php +10 -0
- classes/utility.php +37 -1
- define.php +1 -1
- duplicator.php +2 -1
- installer/build/view.step1.php +1 -1
- readme.txt +5 -2
- views/help/gopro.php +3 -3
- views/packages/new1.inc.form.php +292 -291
- views/packages/new2.base.php +75 -11
- views/tools/diagnostics.php +313 -309
assets/css/style.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
|
9 |
input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
|
10 |
fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
|
11 |
-
label {font-size:13px
|
12 |
.no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
|
13 |
hr {border: 0; border-top: 1px solid #ddd; border-bottom: 1px solid #fafafa; margin: 10px 0px 2px 0px;}
|
14 |
|
8 |
input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
|
9 |
input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
|
10 |
fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
|
11 |
+
label {font-size:13px}
|
12 |
.no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
|
13 |
hr {border: 0; border-top: 1px solid #ddd; border-bottom: 1px solid #fafafa; margin: 10px 0px 2px 0px;}
|
14 |
|
classes/package.php
CHANGED
@@ -126,6 +126,16 @@ class DUP_Package {
|
|
126 |
$report['DB']['TableCount'] = $db['TableCount'] or "unknown";
|
127 |
$report['DB']['TableList'] = $db['TableList'] or "unknown";
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
$report['RPT']['ScanTime'] = DUP_Util::ElapsedTime(DUP_Util::GetMicrotime(), $timerStart);
|
130 |
$fp = fopen(DUPLICATOR_SSDIR_PATH_TMP . "/{$this->ScanFile}", 'w');
|
131 |
fwrite($fp, json_encode($report));
|
126 |
$report['DB']['TableCount'] = $db['TableCount'] or "unknown";
|
127 |
$report['DB']['TableList'] = $db['TableList'] or "unknown";
|
128 |
|
129 |
+
$warnings = array($report['SRV']['WEB']['ALL'],
|
130 |
+
$report['SRV']['PHP']['ALL'],
|
131 |
+
$report['SRV']['WP']['ALL'],
|
132 |
+
$report['ARC']['Status']['Size'],
|
133 |
+
$report['ARC']['Status']['Names'],
|
134 |
+
$report['ARC']['Status']['Big'],
|
135 |
+
$db['Status']);
|
136 |
+
|
137 |
+
$warn_counts = array_count_values($warnings);
|
138 |
+
$report['RPT']['Warnings'] = $warn_counts['Warn'];
|
139 |
$report['RPT']['ScanTime'] = DUP_Util::ElapsedTime(DUP_Util::GetMicrotime(), $timerStart);
|
140 |
$fp = fopen(DUPLICATOR_SSDIR_PATH_TMP . "/{$this->ScanFile}", 'w');
|
141 |
fwrite($fp, json_encode($report));
|
classes/utility.php
CHANGED
@@ -289,7 +289,7 @@ class DUP_Util {
|
|
289 |
/**
|
290 |
* Creates the snapshot directory if it doesn't already exisit
|
291 |
*/
|
292 |
-
static
|
293 |
$path_wproot = DUP_Util::SafePath(DUPLICATOR_WPROOTPATH);
|
294 |
$path_ssdir = DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH);
|
295 |
$path_plugin = DUP_Util::SafePath(DUPLICATOR_PLUGIN_PATH);
|
@@ -344,6 +344,42 @@ class DUP_Util {
|
|
344 |
@fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTTP/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>');
|
345 |
@fclose($tokenfile2);
|
346 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
|
348 |
}
|
349 |
?>
|
289 |
/**
|
290 |
* Creates the snapshot directory if it doesn't already exisit
|
291 |
*/
|
292 |
+
public static function InitSnapshotDirectory() {
|
293 |
$path_wproot = DUP_Util::SafePath(DUPLICATOR_WPROOTPATH);
|
294 |
$path_ssdir = DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH);
|
295 |
$path_plugin = DUP_Util::SafePath(DUPLICATOR_PLUGIN_PATH);
|
344 |
@fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTTP/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>');
|
345 |
@fclose($tokenfile2);
|
346 |
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Attempts to file zip on a users system
|
350 |
+
*/
|
351 |
+
public static function GetZipPath()
|
352 |
+
{
|
353 |
+
$filepath = null;
|
354 |
+
|
355 |
+
if(self::IsShellExecAvailable())
|
356 |
+
{
|
357 |
+
if (shell_exec('hash zip 2>&1') == NULL)
|
358 |
+
{
|
359 |
+
$filepath = 'zip';
|
360 |
+
}
|
361 |
+
else
|
362 |
+
{
|
363 |
+
$possible_paths = array(
|
364 |
+
'/usr/bin/zip',
|
365 |
+
'/opt/local/bin/zip'
|
366 |
+
//'C:/Program\ Files\ (x86)/GnuWin32/bin/zip.exe');
|
367 |
+
);
|
368 |
+
|
369 |
+
foreach ($possible_paths as $path)
|
370 |
+
{
|
371 |
+
if (file_exists($path))
|
372 |
+
{
|
373 |
+
$filepath = $path;
|
374 |
+
break;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
return $filepath;
|
381 |
+
}
|
382 |
+
|
383 |
|
384 |
}
|
385 |
?>
|
define.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url')) {
|
4 |
-
define('DUPLICATOR_VERSION', '0.5.
|
5 |
define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
|
6 |
define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
|
7 |
define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
|
1 |
<?php
|
2 |
//Prevent directly browsing to the file
|
3 |
if (function_exists('plugin_dir_url')) {
|
4 |
+
define('DUPLICATOR_VERSION', '0.5.26');
|
5 |
define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
|
6 |
define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
|
7 |
define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
|
duplicator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
|
6 |
-
Version: 0.5.
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: wpduplicator
|
@@ -28,6 +28,7 @@
|
|
28 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29 |
|
30 |
SOURCE CONTRIBUTORS:
|
|
|
31 |
Gaurav Aggarwal
|
32 |
Jonathan Foote
|
33 |
================================================================================ */
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
|
6 |
+
Version: 0.5.26
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: wpduplicator
|
28 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29 |
|
30 |
SOURCE CONTRIBUTORS:
|
31 |
+
Robert Riley
|
32 |
Gaurav Aggarwal
|
33 |
Jonathan Foote
|
34 |
================================================================================ */
|
installer/build/view.step1.php
CHANGED
@@ -120,7 +120,7 @@
|
|
120 |
url: window.location.href + '?' + 'dbtest=1',
|
121 |
data: $('#dup-step1-input-form').serialize(),
|
122 |
success: function(data){ $('#dbconn-test-msg').html(data); },
|
123 |
-
error: function(data){ alert('An error occurred while testing the database connection!
|
124 |
});
|
125 |
|
126 |
$('#dbconn-test-msg').html("Attempting Connection. Please wait...");
|
120 |
url: window.location.href + '?' + 'dbtest=1',
|
121 |
data: $('#dup-step1-input-form').serialize(),
|
122 |
success: function(data){ $('#dbconn-test-msg').html(data); },
|
123 |
+
error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
|
124 |
});
|
125 |
|
126 |
$('#dbconn-test-msg').html("Attempting Connection. Please wait...");
|
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
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 0.5.
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
@@ -24,7 +24,10 @@ http://www.youtube.com/watch?v=yZ7pHmR9JC8
|
|
24 |
This tool is great to move WordPress or backup Wordpress sites and for pulling a production site down onto your local machine for testing and validation. It also works good for developing locally and then pushing up to a production server for a first time site release.
|
25 |
|
26 |
= Please Note =
|
27 |
-
|
|
|
|
|
|
|
28 |
|
29 |
= Active Contributors =
|
30 |
<li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 0.5.26
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
24 |
This tool is great to move WordPress or backup Wordpress sites and for pulling a production site down onto your local machine for testing and validation. It also works good for developing locally and then pushing up to a production server for a first time site release.
|
25 |
|
26 |
= Please Note =
|
27 |
+
The underlying logic to backup WordPress, move WordPress and transfer WordPress are very complex. 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.
|
28 |
+
|
29 |
+
= Duplicator Pro =
|
30 |
+
Take Duplicator to the next level with the [premium version](http://snapcreek.com/duplicator) of the plugin.
|
31 |
|
32 |
= Active Contributors =
|
33 |
<li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
|
views/help/gopro.php
CHANGED
@@ -106,11 +106,11 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
106 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Scheduled Backups') ?></a>
|
107 |
<div class="info"><?php DUP_Util::_e('Automate the creation of your packages to run at various scheduled intervals.') ?></div>
|
108 |
</div>
|
109 |
-
|
110 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Dropbox Support') ?></a>
|
111 |
<div class="info"><?php DUP_Util::_e('Backup up your entire site to Dropbox.') ?></div>
|
112 |
</div>
|
113 |
-
|
114 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('FTP Support') ?></a>
|
115 |
<div class="info"><?php DUP_Util::_e('Backup up your entire site to an FTP server.') ?></div>
|
116 |
</div>
|
@@ -130,7 +130,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
|
130 |
</div>
|
131 |
<br style="clear:both" />
|
132 |
<p style="text-align:center">
|
133 |
-
<a href="http://snapcreek.com/duplicator?go-pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
134 |
<?php DUP_Util::_e('Check It Out!') ?>
|
135 |
</a>
|
136 |
</p>
|
106 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Scheduled Backups') ?></a>
|
107 |
<div class="info"><?php DUP_Util::_e('Automate the creation of your packages to run at various scheduled intervals.') ?></div>
|
108 |
</div>
|
109 |
+
<div class="feature">
|
110 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Dropbox Support') ?></a>
|
111 |
<div class="info"><?php DUP_Util::_e('Backup up your entire site to Dropbox.') ?></div>
|
112 |
</div>
|
113 |
+
<div class="feature">
|
114 |
<a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('FTP Support') ?></a>
|
115 |
<div class="info"><?php DUP_Util::_e('Backup up your entire site to an FTP server.') ?></div>
|
116 |
</div>
|
130 |
</div>
|
131 |
<br style="clear:both" />
|
132 |
<p style="text-align:center">
|
133 |
+
<a href="http://snapcreek.com/duplicator?free-go-pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
134 |
<?php DUP_Util::_e('Check It Out!') ?>
|
135 |
</a>
|
136 |
</p>
|
views/packages/new1.inc.form.php
CHANGED
@@ -1,291 +1,292 @@
|
|
1 |
-
|
2 |
-
<form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
|
3 |
-
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
4 |
-
<input type="hidden" id="dup-form-opts-hash" name="package-hash" value="<?php echo $package_hash; ?>">
|
5 |
-
<div>
|
6 |
-
<label for="package-name"><b><?php _e('Name', 'wpduplicator') ?>:</b> </label>
|
7 |
-
<div class="dup-notes-add">
|
8 |
-
<button class="button button-small" type="button" onclick="jQuery('#dup-notes-area').toggle()"><i class="fa fa-pencil-square-o"></i> <?php _e('Notes', 'wpduplicator') ?></button>
|
9 |
-
</div>
|
10 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Create a new default name', 'wpduplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
|
11 |
-
<input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
|
12 |
-
<div id="dup-notes-area">
|
13 |
-
<label><b><?php _e('Notes', 'wpduplicator') ?>:</b></label> <br/>
|
14 |
-
<textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
|
15 |
-
</div>
|
16 |
-
</div>
|
17 |
-
<br/>
|
18 |
-
|
19 |
-
<!-- ===================
|
20 |
-
META-BOX: STORAGE -->
|
21 |
-
<div class="dup-box">
|
22 |
-
<div class="dup-box-title">
|
23 |
-
<i class="fa fa-database"></i> <?php _e("Storage", 'wpduplicator'); ?>
|
24 |
-
<div class="dup-box-arrow"></div>
|
25 |
-
</div>
|
26 |
-
|
27 |
-
<div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
|
28 |
-
<table class="widefat package-tbl">
|
29 |
-
<thead>
|
30 |
-
<tr>
|
31 |
-
<th style='width:275px'><?php _e("Name", 'wpduplicator'); ?></th>
|
32 |
-
<th style='width:100px'><?php _e("Type", 'wpduplicator'); ?></th>
|
33 |
-
<th style="white-space: nowrap"><?php _e("Location", 'wpduplicator'); ?></th>
|
34 |
-
</tr>
|
35 |
-
</thead>
|
36 |
-
<tbody>
|
37 |
-
<tr class="package-row">
|
38 |
-
<td><i class="fa fa-server"></i> <?php _e('Default', 'wpduplicator');?></td>
|
39 |
-
<td><?php _e("Local", 'wpduplicator'); ?></td>
|
40 |
-
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
41 |
-
</tr>
|
42 |
-
<tr>
|
43 |
-
<td colspan="4">
|
44 |
-
<p class="description">
|
45 |
-
<?php _e("All packages including the archive, installer and SQL script are stored in the location above. ", 'wpduplicator'); ?>
|
46 |
-
<br/>
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
</div
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<
|
67 |
-
|
68 |
-
<span id="dup-archive-filter-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
<li><a href="javascript:void(0)"onclick="Duplicator.Pack.ToggleOptTabs(
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
$
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
<
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<
|
96 |
-
|
97 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(
|
98 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo
|
99 |
-
<a href="javascript:void(0)" onclick="
|
100 |
-
|
101 |
-
|
102 |
-
<
|
103 |
-
<
|
104 |
-
|
105 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('
|
106 |
-
<a href="javascript:void(0)" onclick="
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
<?php _e("
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<td><
|
124 |
-
<td><
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
<a href="javascript:void(0)" id="
|
131 |
-
<
|
132 |
-
|
133 |
-
|
134 |
-
$
|
135 |
-
|
136 |
-
|
137 |
-
$
|
138 |
-
$
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
$
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
$
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
</div
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
<
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
<
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
<td
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
<td
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
<td
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
<td
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
<td style="
|
211 |
-
|
212 |
-
<
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
<
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
<td
|
222 |
-
|
223 |
-
<
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
<
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
<td
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
</div
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
<input type="
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
var
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
var
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
jQuery('#dup-form-opts').
|
273 |
-
jQuery('#dup-form-opts').
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
$('#package-name').val(
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
|
1 |
+
|
2 |
+
<form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
|
3 |
+
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
4 |
+
<input type="hidden" id="dup-form-opts-hash" name="package-hash" value="<?php echo $package_hash; ?>">
|
5 |
+
<div>
|
6 |
+
<label for="package-name"><b><?php _e('Name', 'wpduplicator') ?>:</b> </label>
|
7 |
+
<div class="dup-notes-add">
|
8 |
+
<button class="button button-small" type="button" onclick="jQuery('#dup-notes-area').toggle()"><i class="fa fa-pencil-square-o"></i> <?php _e('Notes', 'wpduplicator') ?></button>
|
9 |
+
</div>
|
10 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Create a new default name', 'wpduplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
|
11 |
+
<input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
|
12 |
+
<div id="dup-notes-area">
|
13 |
+
<label><b><?php _e('Notes', 'wpduplicator') ?>:</b></label> <br/>
|
14 |
+
<textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
<br/>
|
18 |
+
|
19 |
+
<!-- ===================
|
20 |
+
META-BOX: STORAGE -->
|
21 |
+
<div class="dup-box">
|
22 |
+
<div class="dup-box-title">
|
23 |
+
<i class="fa fa-database"></i> <?php _e("Storage", 'wpduplicator'); ?>
|
24 |
+
<div class="dup-box-arrow"></div>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
<div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
|
28 |
+
<table class="widefat package-tbl">
|
29 |
+
<thead>
|
30 |
+
<tr>
|
31 |
+
<th style='width:275px'><?php _e("Name", 'wpduplicator'); ?></th>
|
32 |
+
<th style='width:100px'><?php _e("Type", 'wpduplicator'); ?></th>
|
33 |
+
<th style="white-space: nowrap"><?php _e("Location", 'wpduplicator'); ?></th>
|
34 |
+
</tr>
|
35 |
+
</thead>
|
36 |
+
<tbody>
|
37 |
+
<tr class="package-row">
|
38 |
+
<td><i class="fa fa-server"></i> <?php _e('Default', 'wpduplicator');?></td>
|
39 |
+
<td><?php _e("Local", 'wpduplicator'); ?></td>
|
40 |
+
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td colspan="4">
|
44 |
+
<!-- <p class="description">
|
45 |
+
<?php _e("All packages including the archive, installer and SQL script are stored in the location above. ", 'wpduplicator'); ?>
|
46 |
+
<br/>
|
47 |
+
</p>-->
|
48 |
+
<p style="font-size:12px;">
|
49 |
+
<i class="fa fa-dropbox"></i>
|
50 |
+
<span style="font-style:italic; ">
|
51 |
+
<?php echo sprintf(__('%1$s, %2$s, and other storage options available in', 'wpduplicator'), 'Dropbox', 'FTP'); ?>
|
52 |
+
<a href="http://snapcreek.com/duplicator/?free-storage" target="_blank">Duplicator Pro</a>
|
53 |
+
</span>
|
54 |
+
</p>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
</tbody>
|
58 |
+
</table>
|
59 |
+
</div>
|
60 |
+
</div><br/>
|
61 |
+
<!-- end meta-box storage -->
|
62 |
+
|
63 |
+
<!-- META-BOX: ARCHIVE -->
|
64 |
+
<div class="dup-box">
|
65 |
+
<div class="dup-box-title">
|
66 |
+
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'wpduplicator') ?>
|
67 |
+
<span style="font-size:13px">
|
68 |
+
<span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'wpduplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> </span>
|
69 |
+
<span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'wpduplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
|
70 |
+
</span>
|
71 |
+
<div class="dup-box-arrow"></div>
|
72 |
+
</div>
|
73 |
+
<div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
|
74 |
+
<input type="hidden" name="archive-format" value="ZIP" />
|
75 |
+
<!-- NESTED TABS -->
|
76 |
+
<div class="categorydiv" id="dup-pack-opts-tabs">
|
77 |
+
<ul class="category-tabs">
|
78 |
+
<li class="tabs"><a href="javascript:void(0)" onclick="Duplicator.Pack.ToggleOptTabs(1, this)"><?php _e('Files', 'wpduplicator') ?></a></li>
|
79 |
+
<li><a href="javascript:void(0)"onclick="Duplicator.Pack.ToggleOptTabs(2, this)"><?php _e('Database', 'wpduplicator') ?></a></li>
|
80 |
+
</ul>
|
81 |
+
|
82 |
+
<!-- TAB1: PACKAGE -->
|
83 |
+
<div class="tabs-panel" id="dup-pack-opts-tabs-panel-1">
|
84 |
+
<!-- FILTERS -->
|
85 |
+
<?php
|
86 |
+
$uploads = wp_upload_dir();
|
87 |
+
$upload_dir = DUP_Util::SafePath($uploads['basedir']);
|
88 |
+
?>
|
89 |
+
<div class="dup-enable-filters">
|
90 |
+
<input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" : ""; ?> />
|
91 |
+
<label for="filter-on"><?php _e("Enable File Filters", 'wpduplicator') ?></label>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<div id="dup-file-filter-items">
|
95 |
+
<label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("Directories", 'wpduplicator') ?>: </label>
|
96 |
+
<div class='dup-quick-links'>
|
97 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'wpduplicator') ?>]</a>
|
98 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'wpduplicator') ?>]</a>
|
99 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::SafePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'wpduplicator') ?>]</a>
|
100 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
|
101 |
+
</div>
|
102 |
+
<textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
|
103 |
+
<label class="no-select" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("File extensions", 'wpduplicator') ?>:</label>
|
104 |
+
<div class='dup-quick-links'>
|
105 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'wpduplicator') ?>]</a>
|
106 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'wpduplicator') ?>]</a>
|
107 |
+
<a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
|
108 |
+
</div>
|
109 |
+
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
110 |
+
|
111 |
+
<div class="dup-tabs-opts-help">
|
112 |
+
<?php _e("The directory paths and extensions above will be be excluded from the archive file if enabled is checked.", 'wpduplicator'); ?> <br/>
|
113 |
+
<?php _e("Use the full path for directories and semicolons to separate all items.", 'wpduplicator'); ?>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
|
118 |
+
<!-- TAB2: DATABASE -->
|
119 |
+
<div class="tabs-panel" id="dup-pack-opts-tabs-panel-2" style="display: none;">
|
120 |
+
<div class="dup-enable-filters">
|
121 |
+
<table>
|
122 |
+
<tr>
|
123 |
+
<td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" : ""; ?> /></td>
|
124 |
+
<td><label for="dbfilter-on"><?php _e("Enable Table Filters", 'wpduplicator') ?> </label> </td>
|
125 |
+
<td><div class="dup-tabs-opts-help" style="margin:5px 0px 0px 0px"><?php _e("checked tables are excluded", 'wpduplicator') ?></div></td>
|
126 |
+
</tr>
|
127 |
+
</table>
|
128 |
+
</div>
|
129 |
+
<div id="dup-db-filter-items">
|
130 |
+
<a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'wpduplicator'); ?> ]</a>
|
131 |
+
<a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'wpduplicator'); ?> ]</a>
|
132 |
+
<div style="font-stretch:ultra-condensed; font-family: Calibri; white-space: nowrap">
|
133 |
+
<?php
|
134 |
+
$tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
|
135 |
+
$num_rows = count($tables);
|
136 |
+
echo '<table id="dup-dbtables"><tr><td valign="top">';
|
137 |
+
$next_row = round($num_rows / 3, 0);
|
138 |
+
$counter = 0;
|
139 |
+
$tableList = explode(',', $Package->Database->FilterTables);
|
140 |
+
foreach ($tables as $table)
|
141 |
+
{
|
142 |
+
if (in_array($table[0], $tableList))
|
143 |
+
{
|
144 |
+
$checked = 'checked="checked"';
|
145 |
+
$css = 'text-decoration:line-through';
|
146 |
+
}
|
147 |
+
else
|
148 |
+
{
|
149 |
+
$checked = '';
|
150 |
+
$css = '';
|
151 |
+
}
|
152 |
+
echo "<label for='dbtables-{$table[0]}' style='{$css}'><input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' /> {$table[0]}</label><br />";
|
153 |
+
$counter++;
|
154 |
+
if ($next_row <= $counter)
|
155 |
+
{
|
156 |
+
echo '</td><td valign="top">';
|
157 |
+
$counter = 0;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
echo '</td></tr></table>';
|
161 |
+
?>
|
162 |
+
</div>
|
163 |
+
<div class="dup-tabs-opts-help">
|
164 |
+
<?php _e("Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!", 'wpduplicator'); ?>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
</div><br/>
|
171 |
+
<!-- end meta-box options -->
|
172 |
+
|
173 |
+
|
174 |
+
<!-- META-BOX: INSTALLER -->
|
175 |
+
<div class="dup-box">
|
176 |
+
<div class="dup-box-title">
|
177 |
+
<i class="fa fa-bolt"></i> <?php _e('Installer', 'wpduplicator') ?>
|
178 |
+
<div class="dup-box-arrow"></div>
|
179 |
+
</div>
|
180 |
+
|
181 |
+
<div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
|
182 |
+
<div class="dup-installer-header-1"><?php echo _e('STEP 1 - INPUTS', 'wpduplicator'); ?></div><br/>
|
183 |
+
<table class="dup-installer-tbl">
|
184 |
+
<tr>
|
185 |
+
<td colspan="2"><div class="dup-installer-header-2"><?php _e("MySQL Server", 'wpduplicator') ?></div></td>
|
186 |
+
</tr>
|
187 |
+
<tr>
|
188 |
+
<td style="width:130px"><?php _e("Host", 'wpduplicator') ?></td>
|
189 |
+
<td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="localhost"/></td>
|
190 |
+
</tr>
|
191 |
+
<tr>
|
192 |
+
<td style="width:130px"><?php _e("Host Port", 'wpduplicator') ?></td>
|
193 |
+
<td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="3306"/></td>
|
194 |
+
</tr>
|
195 |
+
<tr>
|
196 |
+
<td><?php _e("Database", 'wpduplicator') ?></td>
|
197 |
+
<td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="mydatabaseName" /></td>
|
198 |
+
</tr>
|
199 |
+
<tr>
|
200 |
+
<td><?php _e("User", 'wpduplicator') ?></td>
|
201 |
+
<td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="databaseUserName" /></td>
|
202 |
+
</tr>
|
203 |
+
<tr>
|
204 |
+
<td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'wpduplicator') ?></div></td>
|
205 |
+
</tr>
|
206 |
+
<tr>
|
207 |
+
<td colspan="2">
|
208 |
+
<table>
|
209 |
+
<tr>
|
210 |
+
<td style="width:130px"><?php _e("SSL", 'wpduplicator') ?></td>
|
211 |
+
<td style="padding-right: 20px; white-space: nowrap">
|
212 |
+
<input type="checkbox" name="ssl-admin" id="ssl-admin" <?php echo ($Package->Installer->OptsSSLAdmin) ? "checked='checked'" : ""; ?> />
|
213 |
+
<label class="chk-labels" for="ssl-admin"><?php _e("Enforce on Admin", 'wpduplicator') ?></label>
|
214 |
+
</td>
|
215 |
+
<td>
|
216 |
+
<input type="checkbox" name="ssl-login" id="ssl-login" <?php echo ($Package->Installer->OptsSSLLogin) ? "checked='checked'" : ""; ?> />
|
217 |
+
<label class="chk-labels" for="ssl-login"><?php _e("Enforce on Logins", 'wpduplicator') ?></label>
|
218 |
+
</td>
|
219 |
+
</tr>
|
220 |
+
<tr>
|
221 |
+
<td><?php _e("Cache", 'wpduplicator') ?></td>
|
222 |
+
<td style="padding-right: 20px; white-space: nowrap">
|
223 |
+
<input type="checkbox" name="cache-wp" id="cache-wp" <?php echo ($Package->Installer->OptsCacheWP) ? "checked='checked'" : ""; ?> />
|
224 |
+
<label class="chk-labels" for="cache-wp"><?php _e("Keep Enabled", 'wpduplicator') ?></label>
|
225 |
+
</td>
|
226 |
+
<td>
|
227 |
+
<input type="checkbox" name="cache-path" id="cache-path" <?php echo ($Package->Installer->OptsCachePath) ? "checked='checked'" : ""; ?> />
|
228 |
+
<label class="chk-labels" for="cache-path"><?php _e("Keep Home Path", 'wpduplicator') ?></label>
|
229 |
+
</td>
|
230 |
+
</tr>
|
231 |
+
</table>
|
232 |
+
</td>
|
233 |
+
</tr>
|
234 |
+
</table><br />
|
235 |
+
|
236 |
+
<div class="dup-installer-header-1"><?php echo _e('STEP 2 - INPUTS', 'wpduplicator'); ?></div>
|
237 |
+
|
238 |
+
<table class="dup-installer-tbl">
|
239 |
+
<tr>
|
240 |
+
<td style="width:130px"><?php _e("New URL", 'wpduplicator') ?></td>
|
241 |
+
<td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
|
242 |
+
</tr>
|
243 |
+
</table>
|
244 |
+
|
245 |
+
<div class="dup-tabs-opts-help">
|
246 |
+
<?php _e("The installer can have these fields pre-filled at install time.", 'wpduplicator'); ?> <b><?php _e('All values are optional.', 'wpduplicator'); ?></b>
|
247 |
+
</div>
|
248 |
+
|
249 |
+
</div>
|
250 |
+
</div><br/>
|
251 |
+
<!-- end meta-box: installer -->
|
252 |
+
|
253 |
+
|
254 |
+
<div class="dup-button-footer">
|
255 |
+
<input type="button" value="<?php _e("Reset", 'wpduplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
|
256 |
+
<input type="submit" value="<?php _e("Next", 'wpduplicator') ?> ►" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> />
|
257 |
+
</div>
|
258 |
+
|
259 |
+
</form>
|
260 |
+
|
261 |
+
<script>
|
262 |
+
jQuery(document).ready(function ($) {
|
263 |
+
var DUP_NAMEDEFAULT = '<?php echo $default_name ?>';
|
264 |
+
var DUP_NAMELAST = $('#package-name').val();
|
265 |
+
|
266 |
+
Duplicator.Pack.ResetSettings = function () {
|
267 |
+
var key = 'duplicator_package_active';
|
268 |
+
var result = confirm('<?php _e("This will reset all of the current package settings. Would you like to continue?", "wpduplicator"); ?>');
|
269 |
+
if (!result)
|
270 |
+
return;
|
271 |
+
|
272 |
+
jQuery('#dup-form-opts-action').val(key);
|
273 |
+
jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
|
274 |
+
jQuery('#dup-form-opts').submit();
|
275 |
+
}
|
276 |
+
|
277 |
+
Duplicator.Pack.ResetName = function () {
|
278 |
+
var current = $('#package-name').val();
|
279 |
+
$('#package-name').val((current == DUP_NAMELAST) ? DUP_NAMEDEFAULT : DUP_NAMELAST)
|
280 |
+
}
|
281 |
+
|
282 |
+
Duplicator.Pack.ExcludeTable = function (check) {
|
283 |
+
var $cb = $(check);
|
284 |
+
if ($cb.is(":checked")) {
|
285 |
+
$cb.closest("label").css('textDecoration', 'line-through');
|
286 |
+
} else {
|
287 |
+
$cb.closest("label").css('textDecoration', 'none');
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
});
|
292 |
+
</script>
|
views/packages/new2.base.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
|
|
3 |
global $wp_version;
|
4 |
$Package = new DUP_Package();
|
5 |
$Package->SaveActive($_POST);
|
@@ -8,6 +9,8 @@
|
|
8 |
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
9 |
$mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
|
10 |
$build_mode = ($mysqlDumpPath && $package_mysqldump) ? 'mysqldump (fast)' : 'PHP (slow)';
|
|
|
|
|
11 |
?>
|
12 |
|
13 |
<style>
|
@@ -43,6 +46,11 @@
|
|
43 |
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
|
44 |
div#data-arc-names-data, div#data-arc-big-data
|
45 |
{word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
/*Footer*/
|
48 |
div.dup-button-footer {text-align:center; margin:0}
|
@@ -88,7 +96,6 @@ TOOL BAR: STEPS -->
|
|
88 |
<div style="text-align:center">
|
89 |
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php DUP_Util::_e('Scan Complete'); ?></div>
|
90 |
<div id="dup-msg-success-subtitle">
|
91 |
-
<?php DUP_Util::_e("Scan checks are not required to pass, however they could cause issues on some systems."); ?><br/>
|
92 |
<?php DUP_Util::_e("Process Time:"); ?> <span id="data-rpt-scantime"></span>
|
93 |
</div>
|
94 |
</div><br/>
|
@@ -146,6 +153,15 @@ TOOL BAR: STEPS -->
|
|
146 |
echo '<br/><br/>';
|
147 |
DUP_Util::_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.');
|
148 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" .DUP_Util::__('details') . "]</a></i>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
echo '</small>';
|
150 |
|
151 |
//MYSQLI
|
@@ -224,9 +240,18 @@ TOOL BAR: STEPS -->
|
|
224 |
<b><?php DUP_Util::_e('Directory Count');?>:</b> <span id="data-arc-dirs"></span>
|
225 |
<small>
|
226 |
<?php
|
227 |
-
printf(DUP_Util::__('Total size represents all files minus any filters that have been setup. The current thresholds that
|
228 |
DUP_Util::ByteSize(DUPLICATOR_SCAN_SITE),
|
229 |
DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
?>
|
231 |
</small>
|
232 |
</div>
|
@@ -272,10 +297,14 @@ TOOL BAR: STEPS -->
|
|
272 |
<?php if ($Package->Archive->FilterOn) : ?>
|
273 |
<div>
|
274 |
<div class='dup-scan-title'>
|
275 |
-
<a><?php DUP_Util::_e('
|
276 |
</div>
|
277 |
-
<div class='dup-scan-info dup-info-box'>
|
278 |
-
<b>[<?php DUP_Util::_e('
|
|
|
|
|
|
|
|
|
279 |
<?php
|
280 |
if (strlen( $Package->Archive->FilterDirs)) {
|
281 |
echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
|
@@ -285,7 +314,7 @@ TOOL BAR: STEPS -->
|
|
285 |
?>
|
286 |
<br/>
|
287 |
|
288 |
-
<b>[<?php DUP_Util::_e('File Extensions');?>]</b><br/>
|
289 |
<?php
|
290 |
if (strlen( $Package->Archive->FilterExts)) {
|
291 |
echo $Package->Archive->FilterExts;
|
@@ -294,7 +323,7 @@ TOOL BAR: STEPS -->
|
|
294 |
}
|
295 |
?>
|
296 |
<small>
|
297 |
-
<?php DUP_Util::_e('The
|
298 |
</small><br/>
|
299 |
</div>
|
300 |
|
@@ -365,8 +394,26 @@ TOOL BAR: STEPS -->
|
|
365 |
</div><!-- end .dup-panel -->
|
366 |
</div><!-- end .dup-panel-panel -->
|
367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
|
369 |
</div>
|
|
|
|
|
370 |
|
371 |
<!-- ERROR MESSAGE -->
|
372 |
<div id="dup-msg-error" style="display:none">
|
@@ -394,8 +441,7 @@ TOOL BAR: STEPS -->
|
|
394 |
<script type="text/javascript">
|
395 |
jQuery(document).ready(function($) {
|
396 |
|
397 |
-
/*
|
398 |
-
* METHOD: Performs Ajax post to create check system */
|
399 |
Duplicator.Pack.Scan = function() {
|
400 |
var data = {action : 'duplicator_package_scan'}
|
401 |
|
@@ -428,6 +474,13 @@ jQuery(document).ready(function($) {
|
|
428 |
Duplicator.Pack.Scan();
|
429 |
}
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
Duplicator.Pack.LoadScanStatus = function(status) {
|
432 |
var result;
|
433 |
switch (status) {
|
@@ -441,8 +494,7 @@ jQuery(document).ready(function($) {
|
|
441 |
return result;
|
442 |
}
|
443 |
|
444 |
-
/*
|
445 |
-
* METHOD: */
|
446 |
Duplicator.Pack.LoadScanData = function(data) {
|
447 |
|
448 |
var errMsg = "unable to read";
|
@@ -506,6 +558,8 @@ jQuery(document).ready(function($) {
|
|
506 |
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
507 |
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
508 |
|
|
|
|
|
509 |
//Name Checks
|
510 |
html = '';
|
511 |
//Dirs
|
@@ -536,6 +590,16 @@ jQuery(document).ready(function($) {
|
|
536 |
$('#data-arc-big-data').html(html);
|
537 |
$('#dup-msg-success').show();
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
}
|
540 |
|
541 |
//Page Init:
|
1 |
<?php
|
2 |
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
3 |
+
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/utility.php');
|
4 |
global $wp_version;
|
5 |
$Package = new DUP_Package();
|
6 |
$Package->SaveActive($_POST);
|
9 |
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
10 |
$mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
|
11 |
$build_mode = ($mysqlDumpPath && $package_mysqldump) ? 'mysqldump (fast)' : 'PHP (slow)';
|
12 |
+
|
13 |
+
$zip_check = DUP_Util::GetZipPath();
|
14 |
?>
|
15 |
|
16 |
<style>
|
46 |
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
|
47 |
div#data-arc-names-data, div#data-arc-big-data
|
48 |
{word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
49 |
+
|
50 |
+
div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
|
51 |
+
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:maroon}
|
52 |
+
div#dup-scan-warning-continue div.msg2 {padding:2px}
|
53 |
+
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
54 |
|
55 |
/*Footer*/
|
56 |
div.dup-button-footer {text-align:center; margin:0}
|
96 |
<div style="text-align:center">
|
97 |
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php DUP_Util::_e('Scan Complete'); ?></div>
|
98 |
<div id="dup-msg-success-subtitle">
|
|
|
99 |
<?php DUP_Util::_e("Process Time:"); ?> <span id="data-rpt-scantime"></span>
|
100 |
</div>
|
101 |
</div><br/>
|
153 |
echo '<br/><br/>';
|
154 |
DUP_Util::_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.');
|
155 |
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" .DUP_Util::__('details') . "]</a></i>";
|
156 |
+
|
157 |
+
if ($zip_check != null) {
|
158 |
+
echo '<br/><br/>';
|
159 |
+
echo '<span style="font-weight:bold">';
|
160 |
+
DUP_Util::_e('Get faster builds with Duplicator Pro.');
|
161 |
+
echo '</span>';
|
162 |
+
echo " <i><a href='http://snapcreek.com/duplicator?free-max-execution-time-warn' target='_blank'>[" . DUP_Util::__('details') . "]</a></i>";
|
163 |
+
}
|
164 |
+
|
165 |
echo '</small>';
|
166 |
|
167 |
//MYSQLI
|
240 |
<b><?php DUP_Util::_e('Directory Count');?>:</b> <span id="data-arc-dirs"></span>
|
241 |
<small>
|
242 |
<?php
|
243 |
+
printf(DUP_Util::__('Total size represents all files minus any filters that have been setup. The current thresholds that triggers a warning is %1$s for the total size. Some budget hosts limit the amount of time a PHP/Web request process can run. When working with larger sites this can cause timeout issues. Consider using a file filter in step 1 to shrink and filter the overall size of your package.'),
|
244 |
DUP_Util::ByteSize(DUPLICATOR_SCAN_SITE),
|
245 |
DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
246 |
+
|
247 |
+
if ($zip_check != null) {
|
248 |
+
echo '<br/><br/>';
|
249 |
+
echo '<span style="font-weight:bold">';
|
250 |
+
DUP_Util::_e('Package support up to 2GB available in Duplicator Pro.');
|
251 |
+
echo '</span>';
|
252 |
+
echo " <i><a href='http://snapcreek.com/duplicator?free-size-warn' target='_blank'>[" . DUP_Util::__('details') . "]</a></i>";
|
253 |
+
}
|
254 |
+
|
255 |
?>
|
256 |
</small>
|
257 |
</div>
|
297 |
<?php if ($Package->Archive->FilterOn) : ?>
|
298 |
<div>
|
299 |
<div class='dup-scan-title'>
|
300 |
+
<a style='font-weight: normal'><?php DUP_Util::_e('Archive Details');?></a>
|
301 |
</div>
|
302 |
+
<div class='dup-scan-info dup-info-box'>
|
303 |
+
<b>[<?php DUP_Util::_e('Root Directory');?>]</b><br/>
|
304 |
+
<?php echo DUPLICATOR_WPROOTPATH;?>
|
305 |
+
<br/><br/>
|
306 |
+
|
307 |
+
<b>[<?php DUP_Util::_e('Excluded Directories');?>]</b><br/>
|
308 |
<?php
|
309 |
if (strlen( $Package->Archive->FilterDirs)) {
|
310 |
echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
|
314 |
?>
|
315 |
<br/>
|
316 |
|
317 |
+
<b>[<?php DUP_Util::_e('Excluded File Extensions');?>]</b><br/>
|
318 |
<?php
|
319 |
if (strlen( $Package->Archive->FilterExts)) {
|
320 |
echo $Package->Archive->FilterExts;
|
323 |
}
|
324 |
?>
|
325 |
<small>
|
326 |
+
<?php DUP_Util::_e('The root directory above is where Duplicator will start archiving files. The excluded directories and file extension will be skipped during the archive process.'); ?>
|
327 |
</small><br/>
|
328 |
</div>
|
329 |
|
394 |
</div><!-- end .dup-panel -->
|
395 |
</div><!-- end .dup-panel-panel -->
|
396 |
|
397 |
+
<!-- WARNING CONTINUE -->
|
398 |
+
<div id="dup-scan-warning-continue">
|
399 |
+
<div class="msg1">
|
400 |
+
<input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.WarningContinue(this)"/>
|
401 |
+
<label for="dup-scan-warning-continue-checkbox"><?php DUP_Util::_e('A warning status was detected, are you sure you want to continue?');?></label>
|
402 |
+
</div>
|
403 |
+
<div class="msg2">
|
404 |
+
<label for="dup-scan-warning-continue-checkbox">
|
405 |
+
<?php
|
406 |
+
DUP_Util::_e("Scan checks are not required to pass, however they could cause issues on some systems.");
|
407 |
+
echo '<br/>';
|
408 |
+
DUP_Util::_e("Please review the details for each warning by clicking on the detail link.");
|
409 |
+
?>
|
410 |
+
</label>
|
411 |
+
</div>
|
412 |
+
</div>
|
413 |
|
414 |
</div>
|
415 |
+
|
416 |
+
|
417 |
|
418 |
<!-- ERROR MESSAGE -->
|
419 |
<div id="dup-msg-error" style="display:none">
|
441 |
<script type="text/javascript">
|
442 |
jQuery(document).ready(function($) {
|
443 |
|
444 |
+
/* Performs Ajax post to create check system */
|
|
|
445 |
Duplicator.Pack.Scan = function() {
|
446 |
var data = {action : 'duplicator_package_scan'}
|
447 |
|
474 |
Duplicator.Pack.Scan();
|
475 |
}
|
476 |
|
477 |
+
Duplicator.Pack.WarningContinue = function(checkbox) {
|
478 |
+
($(checkbox).is(':checked'))
|
479 |
+
? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
|
480 |
+
: $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
|
481 |
+
|
482 |
+
}
|
483 |
+
|
484 |
Duplicator.Pack.LoadScanStatus = function(status) {
|
485 |
var result;
|
486 |
switch (status) {
|
494 |
return result;
|
495 |
}
|
496 |
|
497 |
+
/* Load Scan Data */
|
|
|
498 |
Duplicator.Pack.LoadScanData = function(data) {
|
499 |
|
500 |
var errMsg = "unable to read";
|
558 |
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
559 |
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
560 |
|
561 |
+
|
562 |
+
|
563 |
//Name Checks
|
564 |
html = '';
|
565 |
//Dirs
|
590 |
$('#data-arc-big-data').html(html);
|
591 |
$('#dup-msg-success').show();
|
592 |
|
593 |
+
//Waring Check
|
594 |
+
var warnCount = data.RPT.Warnings || 0;
|
595 |
+
if (warnCount > 0) {
|
596 |
+
$('#dup-scan-warning-continue').show();
|
597 |
+
$('#dup-build-button').prop("disabled",true).removeClass('button-primary');
|
598 |
+
} else {
|
599 |
+
$('#dup-scan-warning-continue').hide();
|
600 |
+
$('#dup-build-button').prop("disabled",false).addClass('button-primary');
|
601 |
+
}
|
602 |
+
|
603 |
}
|
604 |
|
605 |
//Page Init:
|
views/tools/diagnostics.php
CHANGED
@@ -1,309 +1,313 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
-
|
5 |
-
global $wp_version;
|
6 |
-
global $wpdb;
|
7 |
-
|
8 |
-
ob_start();
|
9 |
-
phpinfo();
|
10 |
-
$serverinfo = ob_get_contents();
|
11 |
-
ob_end_clean();
|
12 |
-
|
13 |
-
$serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
|
14 |
-
$serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
|
15 |
-
$action_response = null;
|
16 |
-
$dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
|
17 |
-
$dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
|
18 |
-
$dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'wpduplicator') : $dbvar_maxtime;
|
19 |
-
$dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'wpduplicator') : $dbvar_maxpacks;
|
20 |
-
|
21 |
-
$space = @disk_total_space(DUPLICATOR_WPROOTPATH);
|
22 |
-
$space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
|
23 |
-
$perc = @round((100/$space)*$space_free,2);
|
24 |
-
$mysqldumpPath = DUP_Database::GetMySqlDumpPath();
|
25 |
-
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
|
26 |
-
|
27 |
-
$view_state = DUP_UI::GetViewStateArray();
|
28 |
-
$ui_css_srv_panel = (isset($view_state['dup-settings-diag-srv-panel']) && $view_state['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
|
29 |
-
$ui_css_opts_panel = (isset($view_state['dup-settings-diag-opts-panel']) && $view_state['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
|
30 |
-
|
31 |
-
|
32 |
-
$client_ip_address = DUP_Server::GetClientIP();
|
33 |
-
|
34 |
-
//POST BACK
|
35 |
-
$action_updated = null;
|
36 |
-
if (isset($_POST['action'])) {
|
37 |
-
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
38 |
-
switch ($_POST['action']) {
|
39 |
-
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'wpduplicator'); break;
|
40 |
-
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'wpduplicator'); break;
|
41 |
-
case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'wpduplicator'); break;
|
42 |
-
case 'clear_legacy_data':
|
43 |
-
DUP_Settings::LegacyClean();
|
44 |
-
$action_response = __('Legacy data removed.', 'wpduplicator');
|
45 |
-
break;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
?>
|
49 |
-
|
50 |
-
<style>
|
51 |
-
div#message {margin:0px 0px 10px 0px}
|
52 |
-
div#dup-server-info-area { padding:10px 5px; }
|
53 |
-
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
|
54 |
-
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
|
55 |
-
div#dup-server-info-area tr.h img { display:none; }
|
56 |
-
div#dup-server-info-area tr.h td{ background:none; }
|
57 |
-
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
|
58 |
-
div#dup-server-info-area td.e{ font-weight:bold }
|
59 |
-
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
|
60 |
-
.widefat th {font-weight:bold; }
|
61 |
-
.widefat td {padding:2px 2px 2px 8px}
|
62 |
-
.widefat td:nth-child(1) {width:10px;}
|
63 |
-
.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
|
64 |
-
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
|
65 |
-
</style>
|
66 |
-
|
67 |
-
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
|
68 |
-
<?php wp_nonce_field( 'duplicator_settings_page' ); ?>
|
69 |
-
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
70 |
-
<br/>
|
71 |
-
|
72 |
-
<?php if (! empty($action_response)) : ?>
|
73 |
-
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
74 |
-
<?php endif; ?>
|
75 |
-
|
76 |
-
<!-- ==============================
|
77 |
-
SERVER SETTINGS -->
|
78 |
-
<div class="dup-box">
|
79 |
-
<div class="dup-box-title">
|
80 |
-
<i class="fa fa-tachometer"></i>
|
81 |
-
<?php _e("Server Settings", 'wpduplicator') ?>
|
82 |
-
<div class="dup-box-arrow"></div>
|
83 |
-
</div>
|
84 |
-
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
|
85 |
-
<table class="widefat" cellspacing="0">
|
86 |
-
<tr>
|
87 |
-
<td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'wpduplicator'); ?></td>
|
88 |
-
</tr>
|
89 |
-
<tr>
|
90 |
-
<td><?php _e("Duplicator Version", 'wpduplicator'); ?></td>
|
91 |
-
<td><?php echo DUPLICATOR_VERSION ?></td>
|
92 |
-
</tr>
|
93 |
-
<tr>
|
94 |
-
<td><?php _e("Operating System", 'wpduplicator'); ?></td>
|
95 |
-
<td><?php echo PHP_OS ?></td>
|
96 |
-
</tr>
|
97 |
-
<tr>
|
98 |
-
<td><?php _e("Timezone", 'wpduplicator'); ?></td>
|
99 |
-
<td><?php echo date_default_timezone_get() ; ?> <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
|
100 |
-
</tr>
|
101 |
-
<tr>
|
102 |
-
<td><?php _e("Server Time", 'wpduplicator'); ?></td>
|
103 |
-
<td><?php echo date("Y-m-d H:i:s"); ?></td>
|
104 |
-
</tr>
|
105 |
-
<tr>
|
106 |
-
<td><?php _e("Web Server", 'wpduplicator'); ?></td>
|
107 |
-
<td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
|
108 |
-
</tr>
|
109 |
-
<tr>
|
110 |
-
<td><?php _e("APC Enabled", 'wpduplicator'); ?></td>
|
111 |
-
<td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
|
112 |
-
</tr>
|
113 |
-
<tr>
|
114 |
-
<td><?php _e("Root Path", 'wpduplicator'); ?></td>
|
115 |
-
<td><?php echo DUPLICATOR_WPROOTPATH ?></td>
|
116 |
-
</tr>
|
117 |
-
<tr>
|
118 |
-
<td><?php _e("ABSPATH", 'wpduplicator'); ?></td>
|
119 |
-
<td><?php echo ABSPATH ?></td>
|
120 |
-
</tr>
|
121 |
-
<tr>
|
122 |
-
<td><?php _e("Plugins Path", 'wpduplicator'); ?></td>
|
123 |
-
<td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
|
124 |
-
</tr>
|
125 |
-
<tr>
|
126 |
-
<td><?php _e("Loaded PHP INI", 'wpduplicator'); ?></td>
|
127 |
-
<td><?php echo php_ini_loaded_file() ;?></td>
|
128 |
-
</tr>
|
129 |
-
<tr>
|
130 |
-
<td><?php _e("Server IP", 'wpduplicator'); ?></td>
|
131 |
-
<td><?php echo $_SERVER['SERVER_ADDR'];?></td>
|
132 |
-
</tr>
|
133 |
-
<tr>
|
134 |
-
<td><?php _e("Client IP", 'wpduplicator'); ?></td>
|
135 |
-
<td><?php echo $client_ip_address;?></td>
|
136 |
-
</tr>
|
137 |
-
<tr>
|
138 |
-
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
|
139 |
-
</tr>
|
140 |
-
<tr>
|
141 |
-
<td><?php _e("Version", 'wpduplicator'); ?></td>
|
142 |
-
<td><?php echo $wp_version ?></td>
|
143 |
-
</tr>
|
144 |
-
<tr>
|
145 |
-
<td><?php _e("Langugage", 'wpduplicator'); ?></td>
|
146 |
-
<td><?php echo get_bloginfo('language') ?></td>
|
147 |
-
</tr>
|
148 |
-
<tr>
|
149 |
-
<td><?php _e("Charset", 'wpduplicator'); ?></td>
|
150 |
-
<td><?php echo get_bloginfo('charset') ?></td>
|
151 |
-
</tr>
|
152 |
-
<tr>
|
153 |
-
<td><?php _e("Memory Limit ", 'wpduplicator'); ?></td>
|
154 |
-
<td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'wpduplicator'); echo ' ' . WP_MAX_MEMORY_LIMIT; ?>)</td>
|
155 |
-
</tr>
|
156 |
-
<tr>
|
157 |
-
<td class='dup-settings-diag-header' colspan="2">PHP</td>
|
158 |
-
</tr>
|
159 |
-
<tr>
|
160 |
-
<td><?php _e("Version", 'wpduplicator'); ?></td>
|
161 |
-
<td><?php echo phpversion() ?></td>
|
162 |
-
</tr>
|
163 |
-
<tr>
|
164 |
-
<td>SAPI</td>
|
165 |
-
<td><?php echo PHP_SAPI ?></td>
|
166 |
-
</tr>
|
167 |
-
<tr>
|
168 |
-
<td><?php _e("User", 'wpduplicator'); ?></td>
|
169 |
-
<td><?php echo DUP_Util::GetCurrentUser(); ?></td>
|
170 |
-
</tr>
|
171 |
-
<tr>
|
172 |
-
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'wpduplicator'); ?></a></td>
|
173 |
-
<td>
|
174 |
-
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
|
175 |
-
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
|
176 |
-
? __('On', 'wpduplicator') : __('Off', 'wpduplicator');
|
177 |
-
?>
|
178 |
-
</td>
|
179 |
-
</tr>
|
180 |
-
<tr>
|
181 |
-
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'wpduplicator'); ?></a></td>
|
182 |
-
<td><?php echo @ini_get('memory_limit') ?></td>
|
183 |
-
</tr>
|
184 |
-
<tr>
|
185 |
-
<td><?php _e("Memory In Use", 'wpduplicator'); ?></td>
|
186 |
-
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
|
187 |
-
</tr>
|
188 |
-
<tr>
|
189 |
-
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'wpduplicator'); ?></a></td>
|
190 |
-
<td><?php echo @ini_get( 'max_execution_time' ); ?></td>
|
191 |
-
</tr>
|
192 |
-
<tr>
|
193 |
-
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'wpduplicator'); ?></a></td>
|
194 |
-
<td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
|
195 |
-
</tr>
|
196 |
-
|
197 |
-
<td
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
<td
|
202 |
-
</tr>
|
203 |
-
<tr>
|
204 |
-
<td><?php _e("
|
205 |
-
<td><?php echo
|
206 |
-
</tr>
|
207 |
-
<tr>
|
208 |
-
<td
|
209 |
-
<td><?php echo
|
210 |
-
</tr>
|
211 |
-
<tr>
|
212 |
-
<td
|
213 |
-
<td><?php echo $
|
214 |
-
</tr>
|
215 |
-
<tr>
|
216 |
-
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/
|
217 |
-
<td><?php echo $
|
218 |
-
</tr>
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
<td
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
<!--
|
239 |
-
|
240 |
-
<
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
<
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
3 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
+
|
5 |
+
global $wp_version;
|
6 |
+
global $wpdb;
|
7 |
+
|
8 |
+
ob_start();
|
9 |
+
phpinfo();
|
10 |
+
$serverinfo = ob_get_contents();
|
11 |
+
ob_end_clean();
|
12 |
+
|
13 |
+
$serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
|
14 |
+
$serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
|
15 |
+
$action_response = null;
|
16 |
+
$dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
|
17 |
+
$dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
|
18 |
+
$dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'wpduplicator') : $dbvar_maxtime;
|
19 |
+
$dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'wpduplicator') : $dbvar_maxpacks;
|
20 |
+
|
21 |
+
$space = @disk_total_space(DUPLICATOR_WPROOTPATH);
|
22 |
+
$space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
|
23 |
+
$perc = @round((100/$space)*$space_free,2);
|
24 |
+
$mysqldumpPath = DUP_Database::GetMySqlDumpPath();
|
25 |
+
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
|
26 |
+
|
27 |
+
$view_state = DUP_UI::GetViewStateArray();
|
28 |
+
$ui_css_srv_panel = (isset($view_state['dup-settings-diag-srv-panel']) && $view_state['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
|
29 |
+
$ui_css_opts_panel = (isset($view_state['dup-settings-diag-opts-panel']) && $view_state['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
|
30 |
+
|
31 |
+
|
32 |
+
$client_ip_address = DUP_Server::GetClientIP();
|
33 |
+
|
34 |
+
//POST BACK
|
35 |
+
$action_updated = null;
|
36 |
+
if (isset($_POST['action'])) {
|
37 |
+
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
38 |
+
switch ($_POST['action']) {
|
39 |
+
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'wpduplicator'); break;
|
40 |
+
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'wpduplicator'); break;
|
41 |
+
case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'wpduplicator'); break;
|
42 |
+
case 'clear_legacy_data':
|
43 |
+
DUP_Settings::LegacyClean();
|
44 |
+
$action_response = __('Legacy data removed.', 'wpduplicator');
|
45 |
+
break;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
?>
|
49 |
+
|
50 |
+
<style>
|
51 |
+
div#message {margin:0px 0px 10px 0px}
|
52 |
+
div#dup-server-info-area { padding:10px 5px; }
|
53 |
+
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
|
54 |
+
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
|
55 |
+
div#dup-server-info-area tr.h img { display:none; }
|
56 |
+
div#dup-server-info-area tr.h td{ background:none; }
|
57 |
+
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
|
58 |
+
div#dup-server-info-area td.e{ font-weight:bold }
|
59 |
+
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
|
60 |
+
.widefat th {font-weight:bold; }
|
61 |
+
.widefat td {padding:2px 2px 2px 8px}
|
62 |
+
.widefat td:nth-child(1) {width:10px;}
|
63 |
+
.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
|
64 |
+
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
|
65 |
+
</style>
|
66 |
+
|
67 |
+
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
|
68 |
+
<?php wp_nonce_field( 'duplicator_settings_page' ); ?>
|
69 |
+
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
70 |
+
<br/>
|
71 |
+
|
72 |
+
<?php if (! empty($action_response)) : ?>
|
73 |
+
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
74 |
+
<?php endif; ?>
|
75 |
+
|
76 |
+
<!-- ==============================
|
77 |
+
SERVER SETTINGS -->
|
78 |
+
<div class="dup-box">
|
79 |
+
<div class="dup-box-title">
|
80 |
+
<i class="fa fa-tachometer"></i>
|
81 |
+
<?php _e("Server Settings", 'wpduplicator') ?>
|
82 |
+
<div class="dup-box-arrow"></div>
|
83 |
+
</div>
|
84 |
+
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
|
85 |
+
<table class="widefat" cellspacing="0">
|
86 |
+
<tr>
|
87 |
+
<td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'wpduplicator'); ?></td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td><?php _e("Duplicator Version", 'wpduplicator'); ?></td>
|
91 |
+
<td><?php echo DUPLICATOR_VERSION ?></td>
|
92 |
+
</tr>
|
93 |
+
<tr>
|
94 |
+
<td><?php _e("Operating System", 'wpduplicator'); ?></td>
|
95 |
+
<td><?php echo PHP_OS ?></td>
|
96 |
+
</tr>
|
97 |
+
<tr>
|
98 |
+
<td><?php _e("Timezone", 'wpduplicator'); ?></td>
|
99 |
+
<td><?php echo date_default_timezone_get() ; ?> <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
|
100 |
+
</tr>
|
101 |
+
<tr>
|
102 |
+
<td><?php _e("Server Time", 'wpduplicator'); ?></td>
|
103 |
+
<td><?php echo date("Y-m-d H:i:s"); ?></td>
|
104 |
+
</tr>
|
105 |
+
<tr>
|
106 |
+
<td><?php _e("Web Server", 'wpduplicator'); ?></td>
|
107 |
+
<td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
|
108 |
+
</tr>
|
109 |
+
<tr>
|
110 |
+
<td><?php _e("APC Enabled", 'wpduplicator'); ?></td>
|
111 |
+
<td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
|
112 |
+
</tr>
|
113 |
+
<tr>
|
114 |
+
<td><?php _e("Root Path", 'wpduplicator'); ?></td>
|
115 |
+
<td><?php echo DUPLICATOR_WPROOTPATH ?></td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td><?php _e("ABSPATH", 'wpduplicator'); ?></td>
|
119 |
+
<td><?php echo ABSPATH ?></td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td><?php _e("Plugins Path", 'wpduplicator'); ?></td>
|
123 |
+
<td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
|
124 |
+
</tr>
|
125 |
+
<tr>
|
126 |
+
<td><?php _e("Loaded PHP INI", 'wpduplicator'); ?></td>
|
127 |
+
<td><?php echo php_ini_loaded_file() ;?></td>
|
128 |
+
</tr>
|
129 |
+
<tr>
|
130 |
+
<td><?php _e("Server IP", 'wpduplicator'); ?></td>
|
131 |
+
<td><?php echo $_SERVER['SERVER_ADDR'];?></td>
|
132 |
+
</tr>
|
133 |
+
<tr>
|
134 |
+
<td><?php _e("Client IP", 'wpduplicator'); ?></td>
|
135 |
+
<td><?php echo $client_ip_address;?></td>
|
136 |
+
</tr>
|
137 |
+
<tr>
|
138 |
+
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
|
139 |
+
</tr>
|
140 |
+
<tr>
|
141 |
+
<td><?php _e("Version", 'wpduplicator'); ?></td>
|
142 |
+
<td><?php echo $wp_version ?></td>
|
143 |
+
</tr>
|
144 |
+
<tr>
|
145 |
+
<td><?php _e("Langugage", 'wpduplicator'); ?></td>
|
146 |
+
<td><?php echo get_bloginfo('language') ?></td>
|
147 |
+
</tr>
|
148 |
+
<tr>
|
149 |
+
<td><?php _e("Charset", 'wpduplicator'); ?></td>
|
150 |
+
<td><?php echo get_bloginfo('charset') ?></td>
|
151 |
+
</tr>
|
152 |
+
<tr>
|
153 |
+
<td><?php _e("Memory Limit ", 'wpduplicator'); ?></td>
|
154 |
+
<td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'wpduplicator'); echo ' ' . WP_MAX_MEMORY_LIMIT; ?>)</td>
|
155 |
+
</tr>
|
156 |
+
<tr>
|
157 |
+
<td class='dup-settings-diag-header' colspan="2">PHP</td>
|
158 |
+
</tr>
|
159 |
+
<tr>
|
160 |
+
<td><?php _e("Version", 'wpduplicator'); ?></td>
|
161 |
+
<td><?php echo phpversion() ?></td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<td>SAPI</td>
|
165 |
+
<td><?php echo PHP_SAPI ?></td>
|
166 |
+
</tr>
|
167 |
+
<tr>
|
168 |
+
<td><?php _e("User", 'wpduplicator'); ?></td>
|
169 |
+
<td><?php echo DUP_Util::GetCurrentUser(); ?></td>
|
170 |
+
</tr>
|
171 |
+
<tr>
|
172 |
+
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'wpduplicator'); ?></a></td>
|
173 |
+
<td>
|
174 |
+
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
|
175 |
+
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
|
176 |
+
? __('On', 'wpduplicator') : __('Off', 'wpduplicator');
|
177 |
+
?>
|
178 |
+
</td>
|
179 |
+
</tr>
|
180 |
+
<tr>
|
181 |
+
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'wpduplicator'); ?></a></td>
|
182 |
+
<td><?php echo @ini_get('memory_limit') ?></td>
|
183 |
+
</tr>
|
184 |
+
<tr>
|
185 |
+
<td><?php _e("Memory In Use", 'wpduplicator'); ?></td>
|
186 |
+
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
|
187 |
+
</tr>
|
188 |
+
<tr>
|
189 |
+
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'wpduplicator'); ?></a></td>
|
190 |
+
<td><?php echo @ini_get( 'max_execution_time' ); ?></td>
|
191 |
+
</tr>
|
192 |
+
<tr>
|
193 |
+
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'wpduplicator'); ?></a></td>
|
194 |
+
<td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
|
195 |
+
</tr>
|
196 |
+
<tr>
|
197 |
+
<td><?php _e("Shell Exec Zip", 'wpduplicator'); ?></td>
|
198 |
+
<td><?php echo (DUP_Util::GetZipPath() != null) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
|
199 |
+
</tr>
|
200 |
+
<tr>
|
201 |
+
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
202 |
+
</tr>
|
203 |
+
<tr>
|
204 |
+
<td><?php _e("Version", 'wpduplicator'); ?></td>
|
205 |
+
<td><?php echo $wpdb->db_version() ?></td>
|
206 |
+
</tr>
|
207 |
+
<tr>
|
208 |
+
<td><?php _e("Charset", 'wpduplicator'); ?></td>
|
209 |
+
<td><?php echo DB_CHARSET ?></td>
|
210 |
+
</tr>
|
211 |
+
<tr>
|
212 |
+
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php _e("Wait Timeout", 'wpduplicator'); ?></a></td>
|
213 |
+
<td><?php echo $dbvar_maxtime ?></td>
|
214 |
+
</tr>
|
215 |
+
<tr>
|
216 |
+
<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php _e("Max Allowed Packets", 'wpduplicator'); ?></a></td>
|
217 |
+
<td><?php echo $dbvar_maxpacks ?></td>
|
218 |
+
</tr>
|
219 |
+
<tr>
|
220 |
+
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php _e("msyqldump Path", 'wpduplicator'); ?></a></td>
|
221 |
+
<td><?php echo $mysqlDumpSupport ?></td>
|
222 |
+
</tr>
|
223 |
+
<tr>
|
224 |
+
<td class='dup-settings-diag-header' colspan="2"><?php _e("Server Disk", 'wpduplicator'); ?></td>
|
225 |
+
</tr>
|
226 |
+
<tr valign="top">
|
227 |
+
<td><?php _e('Free space', 'hyper-cache'); ?></td>
|
228 |
+
<td><?php echo $perc;?>% -- <?php echo DUP_Util::ByteSize($space_free);?> from <?php echo DUP_Util::ByteSize($space);?><br/>
|
229 |
+
<small>
|
230 |
+
<?php _e("Note: This value is the physical servers hard-drive allocation.", 'wpduplicator'); ?> <br/>
|
231 |
+
<?php _e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'wpduplicator'); ?>
|
232 |
+
</small>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
|
236 |
+
</table><br/>
|
237 |
+
|
238 |
+
</div> <!-- end .dup-box-panel -->
|
239 |
+
</div> <!-- end .dup-box -->
|
240 |
+
<br/>
|
241 |
+
|
242 |
+
<!-- ==============================
|
243 |
+
OPTIONS DATA -->
|
244 |
+
<div class="dup-box">
|
245 |
+
<div class="dup-box-title">
|
246 |
+
<i class="fa fa-th-list"></i>
|
247 |
+
<?php _e("Stored Data", 'wpduplicator'); ?>
|
248 |
+
<div class="dup-box-arrow"></div>
|
249 |
+
</div>
|
250 |
+
<div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
|
251 |
+
<div style="padding:0px 20px 0px 25px">
|
252 |
+
<h3 class="title" style="margin-left:-15px"><?php _e("Options Values", 'wpduplicator') ?> </h3>
|
253 |
+
|
254 |
+
<table class="widefat" cellspacing="0">
|
255 |
+
<tr>
|
256 |
+
<th>Key</th>
|
257 |
+
<th>Value</th>
|
258 |
+
</tr>
|
259 |
+
<?php
|
260 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
|
261 |
+
foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
|
262 |
+
<tr>
|
263 |
+
<td>
|
264 |
+
<?php
|
265 |
+
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
266 |
+
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.DeleteOption(this)'>{$row->option_name}</a>"
|
267 |
+
: $row->option_name;
|
268 |
+
?>
|
269 |
+
</td>
|
270 |
+
<td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
|
271 |
+
</tr>
|
272 |
+
<?php } ?>
|
273 |
+
</table>
|
274 |
+
</div>
|
275 |
+
|
276 |
+
</div> <!-- end .dup-box-panel -->
|
277 |
+
</div> <!-- end .dup-box -->
|
278 |
+
<br/>
|
279 |
+
|
280 |
+
<!-- ==============================
|
281 |
+
PHP INFORMATION -->
|
282 |
+
<div class="dup-box">
|
283 |
+
<div class="dup-box-title">
|
284 |
+
<i class="fa fa-info-circle"></i>
|
285 |
+
<?php _e("PHP Information", 'wpduplicator'); ?>
|
286 |
+
<div class="dup-box-arrow"></div>
|
287 |
+
</div>
|
288 |
+
<div class="dup-box-panel" style="display:none">
|
289 |
+
|
290 |
+
<div id="dup-phpinfo" style="width:95%">
|
291 |
+
<?php echo "<div id='dup-server-info-area'>{$serverinfo}</div>"; ?>
|
292 |
+
</div><br/>
|
293 |
+
|
294 |
+
</div> <!-- end .dup-box-panel -->
|
295 |
+
</div> <!-- end .dup-box -->
|
296 |
+
|
297 |
+
</form>
|
298 |
+
|
299 |
+
<script>
|
300 |
+
jQuery(document).ready(function($) {
|
301 |
+
|
302 |
+
Duplicator.Settings.DeleteOption = function (anchor) {
|
303 |
+
var key = $(anchor).text();
|
304 |
+
var result = confirm('<?php _e("Delete this option value", "wpduplicator"); ?> [' + key + '] ?');
|
305 |
+
if (! result) return;
|
306 |
+
|
307 |
+
jQuery('#dup-settings-form-action').val(key);
|
308 |
+
jQuery('#dup-settings-form').submit();
|
309 |
+
}
|
310 |
+
|
311 |
+
});
|
312 |
+
</script>
|
313 |
+
|