Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 0.5.28 |
Comparing to | |
See all releases |
Code changes from version 0.5.26 to 0.5.28
- define.php +1 -1
- duplicator.php +1 -1
- readme.txt +3 -3
- views/tools/logging.php +197 -196
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.28');
|
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
|
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.28
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: wpduplicator
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: corylamleorg, bobriley
|
3 |
Donate link: www.lifeinthegrid.com/partner
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 0.5.
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
2 |
Contributors: corylamleorg, bobriley
|
3 |
Donate link: www.lifeinthegrid.com/partner
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
|
5 |
+
Requires at least: 3.9
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 0.5.28
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
views/tools/logging.php
CHANGED
@@ -1,197 +1,198 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
4 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
5 |
-
|
6 |
-
$logs = glob(DUPLICATOR_SSDIR_PATH . '/*.log') ;
|
7 |
-
if ($logs != false && count($logs)) {
|
8 |
-
usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
9 |
-
@chmod(DUP_Util::SafePath($logs[0]), 0644);
|
10 |
-
}
|
11 |
-
|
12 |
-
$logname = (isset($_GET['logname'])) ? trim($_GET['logname']) : "";
|
13 |
-
|
14 |
-
$
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
td#dup-log-panel-left
|
39 |
-
td#dup-log-panel-left div.
|
40 |
-
td#dup-log-panel-
|
41 |
-
|
42 |
-
div.dup-log-file-list span
|
43 |
-
div.dup-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
var $
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
$
|
58 |
-
|
59 |
-
|
60 |
-
$
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
$('#
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$(
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
var
|
90 |
-
var
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
$(
|
113 |
-
$(
|
114 |
-
$("#dup-
|
115 |
-
$("#dup-refresh
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$contents.
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
<
|
137 |
-
<input type="hidden" id="
|
138 |
-
<?php
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
- <?php _e("The
|
147 |
-
- <?php _e("The
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
<div class="
|
157 |
-
<
|
158 |
-
<
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<
|
163 |
-
|
164 |
-
<
|
165 |
-
|
166 |
-
<
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
|
181 |
-
|
182 |
-
$
|
183 |
-
$
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
197 |
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
4 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
5 |
+
|
6 |
+
$logs = glob(DUPLICATOR_SSDIR_PATH . '/*.log') ;
|
7 |
+
if ($logs != false && count($logs)) {
|
8 |
+
usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
9 |
+
@chmod(DUP_Util::SafePath($logs[0]), 0644);
|
10 |
+
}
|
11 |
+
|
12 |
+
$logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
|
13 |
+
|
14 |
+
$refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
|
15 |
+
$auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
|
16 |
+
|
17 |
+
//Check for invalid file
|
18 |
+
if (!empty($logname)) {
|
19 |
+
$validFiles = array_map('basename', $logs);
|
20 |
+
if (validate_file($logname, $validFiles) > 0) {
|
21 |
+
unset($logname);
|
22 |
+
}
|
23 |
+
unset($validFiles);
|
24 |
+
}
|
25 |
+
|
26 |
+
if (!isset($logname) || !$logname) {
|
27 |
+
$logname = (count($logs) > 0) ? basename($logs[0]) : "";
|
28 |
+
}
|
29 |
+
|
30 |
+
$logurl = get_site_url(null, '', is_ssl() ? 'https' : 'http') . '/' . DUPLICATOR_SSDIR_NAME . '/' . $logname;
|
31 |
+
$logfound = (strlen($logname) > 0) ? true :false;
|
32 |
+
|
33 |
+
?>
|
34 |
+
|
35 |
+
<style>
|
36 |
+
div#dup-refresh-count {display: inline-block}
|
37 |
+
table#dup-log-panels {width:100%; }
|
38 |
+
td#dup-log-panel-left {width:75%;}
|
39 |
+
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px; font-weight: bold}
|
40 |
+
td#dup-log-panel-left div.opts {float:right;}
|
41 |
+
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
42 |
+
div.dup-log-file-list a, span{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; line-height:20px; overflow:hidden}
|
43 |
+
div.dup-log-file-list span {font-weight: bold}
|
44 |
+
div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
|
45 |
+
label#dup-auto-refresh-lbl {display: inline-block;}
|
46 |
+
iframe#dup-log-content {padding:5px; background: #fff; min-height:500px; width:99%; border:1px solid silver}
|
47 |
+
</style>
|
48 |
+
|
49 |
+
<script type="text/javascript">
|
50 |
+
jQuery(document).ready(function($) {
|
51 |
+
|
52 |
+
Duplicator.Tools.FullLog = function() {
|
53 |
+
var $panelL = $('#dup-log-panel-left');
|
54 |
+
var $panelR = $('#dup-log-panel-right');
|
55 |
+
|
56 |
+
if ($panelR.is(":visible") ) {
|
57 |
+
$panelR.hide(400);
|
58 |
+
$panelL.css({width: '100%'});
|
59 |
+
} else {
|
60 |
+
$panelR.show(200);
|
61 |
+
$panelL.css({width: '75%'});
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
Duplicator.Tools.Refresh = function() {
|
66 |
+
$('#refresh').val(1);
|
67 |
+
$('#dup-form-logs').submit();
|
68 |
+
}
|
69 |
+
|
70 |
+
Duplicator.Tools.RefreshAuto = function() {
|
71 |
+
if ( $("#dup-auto-refresh").is(":checked")) {
|
72 |
+
$('#auto').val(1);
|
73 |
+
startTimer();
|
74 |
+
} else {
|
75 |
+
$('#auto').val(0);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
Duplicator.Tools.GetLog = function(log) {
|
80 |
+
window.location = log;
|
81 |
+
}
|
82 |
+
|
83 |
+
Duplicator.Tools.WinResize = function() {
|
84 |
+
var height = $(window).height() - 170;
|
85 |
+
$("#dup-log-content").css({height: height + 'px'});
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
var duration = 10;
|
90 |
+
var count = duration;
|
91 |
+
var timerInterval;
|
92 |
+
function timer() {
|
93 |
+
count = count - 1;
|
94 |
+
$("#dup-refresh-count").html(count.toString());
|
95 |
+
if (! $("#dup-auto-refresh").is(":checked")) {
|
96 |
+
clearInterval(timerInterval);
|
97 |
+
$("#dup-refresh-count").text(count.toString().trim());
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
|
101 |
+
if (count <= 0) {
|
102 |
+
count = duration + 1;
|
103 |
+
Duplicator.Tools.Refresh();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
function startTimer() {
|
108 |
+
timerInterval = setInterval(timer, 1000);
|
109 |
+
}
|
110 |
+
|
111 |
+
//INIT Events
|
112 |
+
$(window).resize(Duplicator.Tools.WinResize);
|
113 |
+
$('#dup-options').click(Duplicator.Tools.FullLog);
|
114 |
+
$("#dup-refresh").click(Duplicator.Tools.Refresh);
|
115 |
+
$("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
|
116 |
+
$("#dup-refresh-count").html(duration.toString());
|
117 |
+
|
118 |
+
//INIT
|
119 |
+
Duplicator.Tools.WinResize();
|
120 |
+
<?php if ($refresh) : ?>
|
121 |
+
//Scroll to Bottom
|
122 |
+
$("#dup-log-content").load(function () {
|
123 |
+
var $contents = $('#dup-log-content').contents();
|
124 |
+
$contents.scrollTop($contents.height());
|
125 |
+
});
|
126 |
+
<?php if ($auto) : ?>
|
127 |
+
$("#dup-auto-refresh").prop('checked', true);
|
128 |
+
Duplicator.Tools.RefreshAuto();
|
129 |
+
<?php endif; ?>
|
130 |
+
<?php endif; ?>
|
131 |
+
|
132 |
+
});
|
133 |
+
|
134 |
+
</script>
|
135 |
+
|
136 |
+
<form id="dup-form-logs" method="post" action="">
|
137 |
+
<input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
|
138 |
+
<input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
|
139 |
+
<?php if (! $logfound) : ?>
|
140 |
+
<div style="padding:20px">
|
141 |
+
<h2><?php _e("Log file not found or unreadable", 'wpduplicator') ?>.</h2>
|
142 |
+
|
143 |
+
<?php _e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'wpduplicator') ?>.<br/><br/>
|
144 |
+
|
145 |
+
<?php _e("Reasons for log file not showing", 'wpduplicator') ?>: <br/>
|
146 |
+
- <?php _e("The web server does not support returning .log file extentions", 'wpduplicator') ?>. <br/>
|
147 |
+
- <?php _e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'wpduplicator') ?>. <br/>
|
148 |
+
- <?php _e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'wpduplicator') ?>. <br/>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<?php else: ?>
|
152 |
+
|
153 |
+
<table id="dup-log-panels">
|
154 |
+
<tr>
|
155 |
+
<td id="dup-log-panel-left">
|
156 |
+
<div class="name"><i class='fa fa-list-alt'></i> <?php echo basename($logurl); ?></div>
|
157 |
+
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php _e("Options", 'wpduplicator') ?> <i class="fa fa-angle-double-right"></i></a> </div>
|
158 |
+
<br style="clear:both" />
|
159 |
+
<iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
|
160 |
+
</td>
|
161 |
+
<td id="dup-log-panel-right">
|
162 |
+
<h2><?php _e("Options", 'wpduplicator') ?> </h2>
|
163 |
+
<div class="dup-opts-items">
|
164 |
+
<input type="button" class="button" id="dup-refresh" value="<?php _e("Refresh", 'wpduplicator') ?>" />
|
165 |
+
<div style="display:inline-block; margin-top:5px">
|
166 |
+
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
|
167 |
+
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
|
168 |
+
|
169 |
+
<?php _e("Auto Refresh", 'wpduplicator') ?>
|
170 |
+
[<div id="dup-refresh-count"></div>]
|
171 |
+
</label>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<b><?php _e("Last 20 Logs", 'wpduplicator') ?> </b><br/>
|
176 |
+
|
177 |
+
<div class="dup-log-file-list">
|
178 |
+
<?php
|
179 |
+
$count=0;
|
180 |
+
$active = basename($logurl);
|
181 |
+
foreach ($logs as $log) {
|
182 |
+
$time = date('h:i:s m/d/y', filemtime($log));
|
183 |
+
$name = esc_html(basename($log));
|
184 |
+
$url = '?page=duplicator-tools&logname=' . $name;
|
185 |
+
echo ($active == $name)
|
186 |
+
? "<span title='{$name}'>{$time} - {$name}</span><br/>"
|
187 |
+
: "<a href='javascript:void(0)' title='{$name}' onclick='Duplicator.Tools.GetLog(\"{$url}\")'>{$time} - {$name}</a><br/>";
|
188 |
+
if ($count > 20) break;
|
189 |
+
}
|
190 |
+
?>
|
191 |
+
</div>
|
192 |
+
</td>
|
193 |
+
</tr>
|
194 |
+
</table>
|
195 |
+
|
196 |
+
<?php endif; ?>
|
197 |
+
</form>
|
198 |
|