Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 0.5.30 |
Comparing to | |
See all releases |
Code changes from version 0.5.28 to 0.5.30
- classes/logging.php +7 -8
- classes/package.archive.zip.php +1 -0
- classes/package.database.php +19 -8
- classes/server.php +5 -5
- classes/ui.php +23 -28
- define.php +61 -59
- duplicator.php +4 -4
- installer/build/view.step3.php +4 -4
- readme.txt +1 -1
- views/packages/new1.base.php +2 -2
- views/packages/new1.inc.form.php +5 -0
- views/packages/new3.base.php +1 -1
- views/tools/cleanup.php +108 -78
classes/logging.php
CHANGED
@@ -53,18 +53,17 @@ class DUP_Log {
|
|
53 |
$source = self::getStack(debug_backtrace());
|
54 |
|
55 |
$err_msg = "\n==================================================================================\n";
|
56 |
-
$err_msg .= "
|
57 |
-
$err_msg .= "Please
|
58 |
$err_msg .= "---------------------------------------------------------------------------------\n";
|
59 |
-
$err_msg .= "MESSAGE:\n{$msg}\n";
|
60 |
if (strlen($detail)) {
|
61 |
-
$err_msg .= "DETAILS:\n{$detail}\n";
|
62 |
}
|
63 |
-
$err_msg .= "---------------------------------------------------------------------------------\n";
|
64 |
$err_msg .= "TRACE:\n{$source}";
|
65 |
$err_msg .= "==================================================================================\n\n";
|
66 |
-
@fwrite(self::$logFileHandle, "
|
67 |
-
die("DUPLICATOR ERROR: Please see the
|
68 |
}
|
69 |
|
70 |
|
@@ -77,7 +76,7 @@ class DUP_Log {
|
|
77 |
$output = "";
|
78 |
$i = 1;
|
79 |
foreach($stacktrace as $node) {
|
80 |
-
$output .= "$i. ".basename($node['file']) ." : " .$node['function'] ." (" .$node['line'].")\n";
|
81 |
$i++;
|
82 |
}
|
83 |
return $output;
|
53 |
$source = self::getStack(debug_backtrace());
|
54 |
|
55 |
$err_msg = "\n==================================================================================\n";
|
56 |
+
$err_msg .= "DUPLICATOR ERROR\n";
|
57 |
+
$err_msg .= "Please try again! If the error persists see the Duplicator 'Help' menu.\n";
|
58 |
$err_msg .= "---------------------------------------------------------------------------------\n";
|
59 |
+
$err_msg .= "MESSAGE:\n\t{$msg}\n";
|
60 |
if (strlen($detail)) {
|
61 |
+
$err_msg .= "DETAILS:\n\t{$detail}\n";
|
62 |
}
|
|
|
63 |
$err_msg .= "TRACE:\n{$source}";
|
64 |
$err_msg .= "==================================================================================\n\n";
|
65 |
+
@fwrite(self::$logFileHandle, "{$err_msg}");
|
66 |
+
die("DUPLICATOR ERROR: Please see the 'Package Log' file link below.");
|
67 |
}
|
68 |
|
69 |
|
76 |
$output = "";
|
77 |
$i = 1;
|
78 |
foreach($stacktrace as $node) {
|
79 |
+
$output .= "\t $i. ".basename($node['file']) ." : " .$node['function'] ." (" .$node['line'].")\n";
|
80 |
$i++;
|
81 |
}
|
82 |
return $output;
|
classes/package.archive.zip.php
CHANGED
@@ -63,6 +63,7 @@ class DUP_Zip extends DUP_Archive {
|
|
63 |
DUP_Log::Info("SIZE:\t" . self::$scanReport->ARC->Size);
|
64 |
DUP_Log::Info("STATS:\tDirs " . self::$scanReport->ARC->DirCount . " | Files " . self::$scanReport->ARC->FileCount);
|
65 |
|
|
|
66 |
//ADD SQL
|
67 |
$isSQLInZip = self::$zipArchive->addFile(self::$sqlPath, "database.sql");
|
68 |
if ($isSQLInZip) {
|
63 |
DUP_Log::Info("SIZE:\t" . self::$scanReport->ARC->Size);
|
64 |
DUP_Log::Info("STATS:\tDirs " . self::$scanReport->ARC->DirCount . " | Files " . self::$scanReport->ARC->FileCount);
|
65 |
|
66 |
+
|
67 |
//ADD SQL
|
68 |
$isSQLInZip = self::$zipArchive->addFile(self::$sqlPath, "database.sql");
|
69 |
if ($isSQLInZip) {
|
classes/package.database.php
CHANGED
@@ -35,25 +35,34 @@ class DUP_Database {
|
|
35 |
|
36 |
$time_start = DUP_Util::GetMicrotime();
|
37 |
$this->Package->SetStatus(DUP_PackageStatus::DBSTART);
|
|
|
38 |
|
39 |
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
40 |
$package_phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
41 |
|
42 |
-
$this->dbStorePath = "{$this->Package->StorePath}/{$this->File}";
|
43 |
$mysqlDumpPath = self::GetMySqlDumpPath();
|
44 |
$mode = ($mysqlDumpPath && $package_mysqldump) ? 'MYSQLDUMP' : 'PHP';
|
45 |
-
$
|
|
|
46 |
|
47 |
$log = "\n********************************************************************************\n";
|
48 |
$log .= "DATABASE:\n";
|
49 |
$log .= "********************************************************************************\n";
|
50 |
-
$log .= "BUILD MODE: {$mode}
|
51 |
$log .= ($mode == 'PHP') ? "(query limit - {$package_phpdump_qrylimit})\n" : "\n";
|
52 |
-
$log .= "
|
53 |
-
$log .= "
|
|
|
54 |
DUP_Log::Info($log);
|
55 |
$log = null;
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
switch ($mode) {
|
58 |
case 'MYSQLDUMP': $this->mysqlDump($mysqlDumpPath); break;
|
59 |
case 'PHP' : $this->phpDump(); break;
|
@@ -62,10 +71,12 @@ class DUP_Database {
|
|
62 |
DUP_Log::Info("SQL CREATED: {$this->File}");
|
63 |
$time_end = DUP_Util::GetMicrotime();
|
64 |
$time_sum = DUP_Util::ElapsedTime($time_end, $time_start);
|
65 |
-
|
|
|
66 |
$sql_file_size = filesize($this->dbStorePath);
|
67 |
-
|
68 |
-
|
|
|
69 |
}
|
70 |
DUP_Log::Info("SQL FILE SIZE: " . DUP_Util::ByteSize($sql_file_size));
|
71 |
DUP_Log::Info("SQL FILE TIME: " . date("Y-m-d H:i:s"));
|
35 |
|
36 |
$time_start = DUP_Util::GetMicrotime();
|
37 |
$this->Package->SetStatus(DUP_PackageStatus::DBSTART);
|
38 |
+
$this->dbStorePath = "{$this->Package->StorePath}/{$this->File}";
|
39 |
|
40 |
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
41 |
$package_phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
42 |
|
|
|
43 |
$mysqlDumpPath = self::GetMySqlDumpPath();
|
44 |
$mode = ($mysqlDumpPath && $package_mysqldump) ? 'MYSQLDUMP' : 'PHP';
|
45 |
+
$reserved_db_filepath = DUPLICATOR_WPROOTPATH . 'database.sql';
|
46 |
+
|
47 |
|
48 |
$log = "\n********************************************************************************\n";
|
49 |
$log .= "DATABASE:\n";
|
50 |
$log .= "********************************************************************************\n";
|
51 |
+
$log .= "BUILD MODE: {$mode}";
|
52 |
$log .= ($mode == 'PHP') ? "(query limit - {$package_phpdump_qrylimit})\n" : "\n";
|
53 |
+
$log .= "MYSQLTIMEOUT: " . DUPLICATOR_DB_MAX_TIME . "\n";
|
54 |
+
$log .= "MYSQLDUMP: ";
|
55 |
+
$log .= ($mysqlDumpPath) ? "Is Supported" : "Not Supported";
|
56 |
DUP_Log::Info($log);
|
57 |
$log = null;
|
58 |
|
59 |
+
//Reserved file found
|
60 |
+
if (file_exists($reserved_db_filepath)) {
|
61 |
+
DUP_Log::Error("Reserverd SQL file detected",
|
62 |
+
"The file database.sql was found at [{$reserved_db_filepath}].\n"
|
63 |
+
. "\tPlease remove/rename this file to continue with the package creation.");
|
64 |
+
}
|
65 |
+
|
66 |
switch ($mode) {
|
67 |
case 'MYSQLDUMP': $this->mysqlDump($mysqlDumpPath); break;
|
68 |
case 'PHP' : $this->phpDump(); break;
|
71 |
DUP_Log::Info("SQL CREATED: {$this->File}");
|
72 |
$time_end = DUP_Util::GetMicrotime();
|
73 |
$time_sum = DUP_Util::ElapsedTime($time_end, $time_start);
|
74 |
+
|
75 |
+
//File below 10k will be incomplete
|
76 |
$sql_file_size = filesize($this->dbStorePath);
|
77 |
+
DUP_Log::Info('file size:' . $sql_file_size);
|
78 |
+
if ($sql_file_size < 10000) {
|
79 |
+
DUP_Log::Error("SQL file size too low.", "File does not look complete. Check permission on file and parent directory at [{$this->dbStorePath}]");
|
80 |
}
|
81 |
DUP_Log::Info("SQL FILE SIZE: " . DUP_Util::ByteSize($sql_file_size));
|
82 |
DUP_Log::Info("SQL FILE TIME: " . date("Y-m-d H:i:s"));
|
classes/server.php
CHANGED
@@ -113,11 +113,11 @@ class DUP_Server
|
|
113 |
*/
|
114 |
public static function InstallerFilesFound()
|
115 |
{
|
116 |
-
|
117 |
-
$
|
118 |
-
$
|
119 |
-
$
|
120 |
-
return ($phpFile || $
|
121 |
}
|
122 |
|
123 |
/**
|
113 |
*/
|
114 |
public static function InstallerFilesFound()
|
115 |
{
|
116 |
+
$phpFile = file_exists(DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_PHP);
|
117 |
+
$logFile = file_exists(DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_LOG);
|
118 |
+
$sqlFile1 = file_exists(DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_SQL);
|
119 |
+
$sqlFile2 = file_exists(DUPLICATOR_WPROOTPATH . 'database.sql');
|
120 |
+
return ($phpFile || $logFile || $sqlFile1 || $sqlFile2);
|
121 |
}
|
122 |
|
123 |
/**
|
classes/ui.php
CHANGED
@@ -88,37 +88,32 @@ class DUP_UI {
|
|
88 |
* Shows a display message in the wp-admin if any researved files are found
|
89 |
* @return type void
|
90 |
*/
|
91 |
-
static public function ShowReservedFilesNotice()
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
$perms = (current_user_can( 'install_plugins' ) && current_user_can( 'import' ));
|
98 |
-
if (! $perms || $hide)
|
99 |
return;
|
100 |
-
|
101 |
-
$metaKey = 'dup-wpnotice01';
|
102 |
-
if ( isset($_GET[$metaKey]) && $_GET[$metaKey] == '1') {
|
103 |
-
self::SaveViewState($metaKey, true);
|
104 |
-
}
|
105 |
-
|
106 |
-
if ( self::GetViewStateValue($metaKey) != null) {
|
107 |
-
if (DUP_Server::InstallerFilesFound()) {
|
108 |
-
$queryStr = $_SERVER['QUERY_STRING'];
|
109 |
-
echo '<div class="updated"><p>';
|
110 |
-
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
120 |
}
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
|
124 |
}
|
88 |
* Shows a display message in the wp-admin if any researved files are found
|
89 |
* @return type void
|
90 |
*/
|
91 |
+
static public function ShowReservedFilesNotice()
|
92 |
+
{
|
93 |
+
//Show only on Duplicator pages and Dashboard when plugin is active
|
94 |
+
$dup_active = is_plugin_active('duplicator/duplicator.php');
|
95 |
+
$dup_perm = current_user_can( 'manage_options' );
|
96 |
+
if (! $dup_active || ! $dup_perm)
|
|
|
|
|
97 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
+
if (DUP_Server::InstallerFilesFound())
|
100 |
+
{
|
101 |
+
$screen = get_current_screen();
|
102 |
+
$on_active_tab = isset($_GET['tab']) && $_GET['tab'] == 'cleanup' ? true : false;
|
103 |
+
|
104 |
+
echo '<div class="error"><p>';
|
105 |
+
if ($screen->id == 'duplicator_page_duplicator-tools' && $on_active_tab)
|
106 |
+
{
|
107 |
+
DUP_Util::_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.');
|
108 |
}
|
109 |
+
else
|
110 |
+
{
|
111 |
+
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
112 |
+
DUP_Util::_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.');
|
113 |
+
@printf("<br/><a href='admin.php?page=duplicator-tools&tab=cleanup&_wpnonce=%s'>%s</a>", $duplicator_nonce, DUP_Util::__('Take me to the cleanup page!'));
|
114 |
+
}
|
115 |
+
echo "</p></div>";
|
116 |
+
}
|
117 |
}
|
118 |
|
119 |
}
|
define.php
CHANGED
@@ -1,59 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
//Prevent directly browsing to the file
|
3 |
-
if (function_exists('plugin_dir_url')) {
|
4 |
-
|
5 |
-
|
6 |
-
define(
|
7 |
-
define("
|
8 |
-
define("
|
9 |
-
define(
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
define("
|
30 |
-
define("
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
define("
|
39 |
-
define("
|
40 |
-
define("
|
41 |
-
define("
|
42 |
-
define("
|
43 |
-
define("
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
//Prevent directly browsing to the file
|
3 |
+
if (function_exists('plugin_dir_url')) {
|
4 |
+
|
5 |
+
|
6 |
+
define('DUPLICATOR_VERSION', '0.5.30');
|
7 |
+
define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
|
8 |
+
define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
|
9 |
+
define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
|
10 |
+
define("DUPLICATOR_CERTIFIED", "http://lifeinthegrid.com/duplicator-hosts");
|
11 |
+
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
12 |
+
define('DUPLICATOR_SITE_URL', get_site_url());
|
13 |
+
define('DUPLICATOR_LANG_SLUG', 'wpduplicator');
|
14 |
+
|
15 |
+
/* Paths should ALWAYS read "/"
|
16 |
+
uni: /home/path/file.txt
|
17 |
+
win: D:/home/path/file.txt
|
18 |
+
SSDIR = SnapShot Directory */
|
19 |
+
if (!defined('ABSPATH')) {
|
20 |
+
define('ABSPATH', dirname(__FILE__));
|
21 |
+
}
|
22 |
+
|
23 |
+
//PATH CONSTANTS
|
24 |
+
define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots');
|
25 |
+
define('DUPLICATOR_PLUGIN_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__)));
|
26 |
+
define('DUPLICATOR_WPROOTPATH', str_replace("\\", "/", ABSPATH));
|
27 |
+
define("DUPLICATOR_SSDIR_PATH", str_replace("\\", "/", DUPLICATOR_WPROOTPATH . DUPLICATOR_SSDIR_NAME));
|
28 |
+
define("DUPLICATOR_SSDIR_PATH_TMP", DUPLICATOR_SSDIR_PATH . '/tmp');
|
29 |
+
define("DUPLICATOR_SSDIR_URL", DUPLICATOR_SITE_URL . "/" . DUPLICATOR_SSDIR_NAME);
|
30 |
+
define("DUPLICATOR_INSTALL_PHP", 'installer.php');
|
31 |
+
define("DUPLICATOR_INSTALL_BAK", 'installer-backup.php');
|
32 |
+
define("DUPLICATOR_INSTALL_SQL", 'installer-data.sql');
|
33 |
+
define("DUPLICATOR_INSTALL_LOG", 'installer-log.txt');
|
34 |
+
|
35 |
+
//RESTRAINT CONSTANTS
|
36 |
+
define("DUPLICATOR_PHP_MAX_MEMORY", '5000M');
|
37 |
+
define("DUPLICATOR_DB_MAX_TIME", 5000);
|
38 |
+
define("DUPLICATOR_DB_EOF_MARKER", 'DUPLICATOR_MYSQLDUMP_EOF');
|
39 |
+
define("DUPLICATOR_SCAN_SITE", 157286400); //150MB
|
40 |
+
define("DUPLICATOR_SCAN_WARNFILESIZE", 3145728);//3MB
|
41 |
+
define("DUPLICATOR_SCAN_CACHESIZE", 524288); //512K
|
42 |
+
define("DUPLICATOR_SCAN_DBSIZE", 52428800); //50MB
|
43 |
+
define("DUPLICATOR_SCAN_DBROWS", 250000);
|
44 |
+
define("DUPLICATOR_SCAN_TIMEOUT", 150); //Seconds
|
45 |
+
define("DUPLICATOR_SCAN_MIN_WP", "3.7.0");
|
46 |
+
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
47 |
+
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
48 |
+
|
49 |
+
/* Used to flush a response every N items.
|
50 |
+
* Note: This value will cause the Zip file to double in size durning the creation process only*/
|
51 |
+
define("DUPLICATOR_ZIP_FLUSH_TRIGGER", 1000);
|
52 |
+
|
53 |
+
} else {
|
54 |
+
error_reporting(0);
|
55 |
+
$port = (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "off") ? "https://" : "http://";
|
56 |
+
$url = $port . $_SERVER["HTTP_HOST"];
|
57 |
+
header("HTTP/1.1 404 Not Found", true, 404);
|
58 |
+
header("Status: 404 Not Found");
|
59 |
+
exit();
|
60 |
+
}
|
61 |
+
?>
|
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
|
@@ -177,15 +177,15 @@ if (is_admin() == true) {
|
|
177 |
|
178 |
$perms = 'export';
|
179 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
180 |
-
$page_packages = add_submenu_page('duplicator', __('Packages'
|
181 |
|
182 |
$perms = 'manage_options';
|
183 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
184 |
-
$page_settings = add_submenu_page('duplicator', __('Settings'
|
185 |
|
186 |
$perms = 'manage_options';
|
187 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
188 |
-
$page_tools = add_submenu_page('duplicator', __('Tools'
|
189 |
|
190 |
$perms = 'manage_options';
|
191 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
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.30
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: wpduplicator
|
177 |
|
178 |
$perms = 'export';
|
179 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
180 |
+
$page_packages = add_submenu_page('duplicator', DUP_Util::__('Packages'), DUP_Util::__('Packages'), $perms, 'duplicator', 'duplicator_get_menu');
|
181 |
|
182 |
$perms = 'manage_options';
|
183 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
184 |
+
$page_settings = add_submenu_page('duplicator', DUP_Util::__('Settings'), DUP_Util::__('Settings'), $perms, 'duplicator-settings', 'duplicator_get_menu');
|
185 |
|
186 |
$perms = 'manage_options';
|
187 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
188 |
+
$page_tools = add_submenu_page('duplicator', DUP_Util::__('Tools'), DUP_Util::__('Tools'), $perms, 'duplicator-tools', 'duplicator_get_menu');
|
189 |
|
190 |
$perms = 'manage_options';
|
191 |
$perms = apply_filters($wpfront_caps_translator, $perms);
|
installer/build/view.step3.php
CHANGED
@@ -30,12 +30,12 @@ VIEW: STEP 3- INPUT -->
|
|
30 |
<hr size="1" /><br />
|
31 |
|
32 |
<div class="title-header">
|
33 |
-
<div class="dup-step3-final-title">IMPORTANT FINAL STEPS!</div>
|
34 |
</div>
|
35 |
|
36 |
<table class="dup-step3-final-step">
|
37 |
<tr>
|
38 |
-
<td>1. <a href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Install Report</a>
|
39 |
</td>
|
40 |
<td>
|
41 |
<i id="dup-step3-install-report-count">
|
@@ -57,8 +57,8 @@ VIEW: STEP 3- INPUT -->
|
|
57 |
<td><i>Validate all pages, links images and plugins</i></td>
|
58 |
</tr>
|
59 |
<tr>
|
60 |
-
<td>4. <a href="javascript:void(0)" onclick="Duplicator.removeInstallerFiles('<?php echo $_POST['package_name'] ?>')">
|
61 |
-
<td><i>
|
62 |
</tr>
|
63 |
</table><br/>
|
64 |
|
30 |
<hr size="1" /><br />
|
31 |
|
32 |
<div class="title-header">
|
33 |
+
<div class="dup-step3-final-title">VERY IMPORTANT FINAL STEPS!</div>
|
34 |
</div>
|
35 |
|
36 |
<table class="dup-step3-final-step">
|
37 |
<tr>
|
38 |
+
<td>1. <a href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Review Install Report</a>
|
39 |
</td>
|
40 |
<td>
|
41 |
<i id="dup-step3-install-report-count">
|
57 |
<td><i>Validate all pages, links images and plugins</i></td>
|
58 |
</tr>
|
59 |
<tr>
|
60 |
+
<td>4. <a href="javascript:void(0)" onclick="Duplicator.removeInstallerFiles('<?php echo $_POST['package_name'] ?>')">Security Cleanup</a></td>
|
61 |
+
<td><i>Validate installer files are removed (requires login)</i></td>
|
62 |
</tr>
|
63 |
</table><br/>
|
64 |
|
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.9
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 0.5.
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
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.30
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
views/packages/new1.base.php
CHANGED
@@ -218,12 +218,12 @@ META-BOX1: SYSTEM REQUIREMENTS -->
|
|
218 |
</div>
|
219 |
<div class="dup-sys-info dup-info-box">
|
220 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
221 |
-
<?php _e('None of the reserved files (installer.php, installer-data.sql and installer-log.txt) where found from a previous install. This means you are clear to create a new package.', 'wpduplicator'); ?>
|
222 |
<?php else:
|
223 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
224 |
?>
|
225 |
<form method="post" action="admin.php?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
|
226 |
-
<?php _e('A reserved file(s) was found in the WordPress root directory. Reserved file names are installer.php, installer-data.sql and installer-log.txt. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.', 'wpduplicator'); ?>
|
227 |
<br/><input type='submit' class='button action' value='<?php _e('Remove Files Now', 'wpduplicator') ?>' style='font-size:10px; margin-top:5px;' />
|
228 |
</form>
|
229 |
<?php endif; ?>
|
218 |
</div>
|
219 |
<div class="dup-sys-info dup-info-box">
|
220 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
221 |
+
<?php _e('None of the reserved files (installer.php, installer-data.sql, database.sql and installer-log.txt) where found from a previous install. This means you are clear to create a new package.', 'wpduplicator'); ?>
|
222 |
<?php else:
|
223 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
224 |
?>
|
225 |
<form method="post" action="admin.php?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
|
226 |
+
<?php _e('A reserved file(s) was found in the WordPress root directory. Reserved file names are installer.php, database.sql installer-data.sql and installer-log.txt. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.', 'wpduplicator'); ?>
|
227 |
<br/><input type='submit' class='button action' value='<?php _e('Remove Files Now', 'wpduplicator') ?>' style='font-size:10px; margin-top:5px;' />
|
228 |
</form>
|
229 |
<?php endif; ?>
|
views/packages/new1.inc.form.php
CHANGED
@@ -112,6 +112,11 @@ META-BOX: STORAGE -->
|
|
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 |
|
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 |
+
<br/>
|
116 |
+
<span style="font-style:italic; font-size:12px ">
|
117 |
+
<?php echo sprintf(DUP_Util::__('%1$s, are available in'), 'Individual file filters'); ?>
|
118 |
+
<a href="http://snapcreek.com/duplicator/?free-file-filters" target="_blank">Duplicator Pro</a>
|
119 |
+
</span>
|
120 |
</div>
|
121 |
</div>
|
122 |
|
views/packages/new3.base.php
CHANGED
@@ -133,7 +133,7 @@ TOOL BAR: STEPS -->
|
|
133 |
<!-- LOGS -->
|
134 |
<div id="dup-logs">
|
135 |
<div style="font-weight:bold">
|
136 |
-
<a href='javascript:void(0)' onclick='Duplicator.OpenLogWindow()'> <?php _e('Package Log', 'wpduplicator');?> </a>
|
137 |
</div>
|
138 |
<br/>
|
139 |
</div>
|
133 |
<!-- LOGS -->
|
134 |
<div id="dup-logs">
|
135 |
<div style="font-weight:bold">
|
136 |
+
<i class="fa fa-list-alt"></i> <a href='javascript:void(0)' style="color:#A62426" onclick='Duplicator.OpenLogWindow()'> <?php _e('Package Log', 'wpduplicator');?> </a>
|
137 |
</div>
|
138 |
<br/>
|
139 |
</div>
|
views/tools/cleanup.php
CHANGED
@@ -2,128 +2,160 @@
|
|
2 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
3 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
|
5 |
-
|
6 |
-
|
7 |
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
switch ($_GET['action']) {
|
22 |
-
case 'installer' :
|
23 |
-
|
24 |
-
$
|
|
|
|
|
|
|
|
|
|
|
25 |
break;
|
26 |
case 'legacy':
|
27 |
DUP_Settings::LegacyClean();
|
28 |
-
$action_response = __('Legacy data removed.'
|
29 |
break;
|
30 |
case 'tmp-cache':
|
31 |
DUP_Package::TmpCleanup(true);
|
32 |
-
$action_response = __('Build cache removed.'
|
33 |
break;
|
34 |
}
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
?>
|
37 |
|
38 |
<style type="text/css">
|
|
|
39 |
div.success {color:#4A8254}
|
40 |
div.failed {color:red}
|
41 |
table.dup-reset-opts td:first-child {font-weight: bold}
|
42 |
-
table.dup-reset-opts td {padding:
|
43 |
form#dup-settings-form {padding: 0px 10px 0px 10px}
|
|
|
|
|
44 |
</style>
|
45 |
|
46 |
-
|
47 |
<form id="dup-settings-form" action="?page=duplicator-tools&tab=cleanup" method="post">
|
48 |
|
49 |
<?php if ($_GET['action'] != 'display') : ?>
|
50 |
<div id="message" class="updated below-h2">
|
51 |
<p><?php echo $action_response; ?></p>
|
52 |
<?php if ( $_GET['action'] == 'installer') : ?>
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
$html .= (@unlink($installer_file)) ? "<div class='success'>Successfully removed {$installer_file}</div>" : "<div class='failed'>Does not exist or unable to remove file: {$installer_file}</div>";
|
63 |
-
$html .= (@unlink($installer_bak)) ? "<div class='success'>Successfully removed {$installer_bak}</div>" : "<div class='failed'>Does not exist or unable to remove file: {$installer_bak}</div>";
|
64 |
-
$html .= (@unlink($installer_sql)) ? "<div class='success'>Successfully removed {$installer_sql}</div>" : "<div class='failed'>Does not exist or unable to remove file: {$installer_sql}</div>";
|
65 |
-
$html .= (@unlink($installer_log)) ? "<div class='success'>Successfully removed {$installer_log}</div>" : "<div class='failed'>Does not exist or unable to remove file: {$installer_log}</div>";
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
77 |
} else {
|
78 |
-
$html .=
|
79 |
}
|
80 |
-
|
81 |
-
|
82 |
-
}
|
83 |
|
84 |
-
|
85 |
-
|
|
|
|
|
86 |
|
87 |
-
|
88 |
-
<?php _e('If the installer files did not successfully get removed, then you WILL need to remove them manually', 'wpduplicator')?>. <br/>
|
89 |
-
<?php _e('Please remove all installer files to avoid leaving open security issues on your server', 'wpduplicator')?>. <br/><br/>
|
90 |
-
</i>
|
91 |
-
|
92 |
-
<?php endif; ?>
|
93 |
</div>
|
94 |
<?php endif; ?>
|
95 |
|
96 |
|
97 |
-
<h3><?php _e('Data Cleanup'
|
98 |
<table class="dup-reset-opts">
|
99 |
-
<tr>
|
100 |
-
<td
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</tr>
|
103 |
<tr>
|
104 |
-
<td><a href="javascript:void(0)" onclick="Duplicator.Tools.DeleteLegacy()"><?php _e("Delete Legacy Data"
|
105 |
-
<td><?php _e("Removes all legacy data and settings prior to version"
|
106 |
</tr>
|
107 |
-
|
108 |
-
<td><a href="javascript:void(0)" onclick="Duplicator.Tools.ClearBuildCache()"><?php _e("Clear Build Cache"
|
109 |
-
<td><?php _e("Removes all build data from:"
|
110 |
</tr>
|
111 |
</table>
|
112 |
-
|
113 |
-
|
114 |
</form>
|
115 |
|
116 |
<script>
|
117 |
jQuery(document).ready(function($) {
|
118 |
-
|
119 |
-
|
120 |
Duplicator.Tools.DeleteLegacy = function () {
|
121 |
<?php
|
122 |
-
$msg = __('This action will remove all legacy settings prior to version %1$s. '
|
123 |
-
$msg .= __('Legacy settings are only needed if you plan to migrate back to an older version of this plugin.'
|
124 |
?>
|
125 |
var result = true;
|
126 |
-
var result = confirm('<?php printf(__($msg
|
127 |
if (! result)
|
128 |
return;
|
129 |
|
@@ -132,17 +164,15 @@ jQuery(document).ready(function($) {
|
|
132 |
|
133 |
Duplicator.Tools.ClearBuildCache = function () {
|
134 |
<?php
|
135 |
-
$msg = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.'
|
136 |
?>
|
137 |
var result = true;
|
138 |
var result = confirm('<?php echo $msg ?>');
|
139 |
if (! result)
|
140 |
return;
|
141 |
-
|
142 |
window.location = '?page=duplicator-tools&tab=cleanup&action=tmp-cache&_wpnonce=<?php echo $nonce; ?>';
|
143 |
-
}
|
144 |
-
|
145 |
-
|
146 |
});
|
147 |
</script>
|
148 |
|
2 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
|
3 |
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
|
5 |
+
$nonce = wp_create_nonce('duplicator_cleanup_page');
|
|
|
6 |
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
|
7 |
+
|
8 |
+
if(isset($_GET['action']))
|
9 |
+
{
|
10 |
+
if(($_GET['action'] == 'installer') || ($_GET['action'] == 'legacy') || ($_GET['action'] == 'tmp-cache'))
|
11 |
+
{
|
12 |
+
$verify_nonce = $_REQUEST['_wpnonce'];
|
13 |
+
if ( ! wp_verify_nonce( $verify_nonce, 'duplicator_cleanup_page' ) )
|
14 |
+
{
|
15 |
+
exit; // Get out of here bad nounce!
|
16 |
+
}
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
$found = DUP_Util::__("Found");
|
21 |
+
$not_found = DUP_Util::__("Not Found");
|
22 |
+
|
23 |
+
$installer_file = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_PHP;
|
24 |
+
$installer_bak = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_BAK;
|
25 |
+
$installer_sql1 = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_SQL;
|
26 |
+
$installer_sql2 = DUPLICATOR_WPROOTPATH . 'database.sql';
|
27 |
+
$installer_log = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_LOG;
|
28 |
|
29 |
switch ($_GET['action']) {
|
30 |
+
case 'installer' :
|
31 |
+
$action_response = __('Installer file cleanup ran!');
|
32 |
+
$css_hide_msg = 'div.dup-header div.error {display:none}';
|
33 |
+
@unlink($installer_file);
|
34 |
+
@unlink($installer_bak);
|
35 |
+
@unlink($installer_sql1);
|
36 |
+
@unlink($installer_sql2);
|
37 |
+
@unlink($installer_log);
|
38 |
break;
|
39 |
case 'legacy':
|
40 |
DUP_Settings::LegacyClean();
|
41 |
+
$action_response = __('Legacy data removed.');
|
42 |
break;
|
43 |
case 'tmp-cache':
|
44 |
DUP_Package::TmpCleanup(true);
|
45 |
+
$action_response = __('Build cache removed.');
|
46 |
break;
|
47 |
}
|
48 |
+
|
49 |
+
$installer_file_exists = file_exists($installer_file) ? true : false;
|
50 |
+
$installer_bak_exists = file_exists($installer_bak) ? true : false;
|
51 |
+
$installer_sql1_exists = file_exists($installer_sql1) ? true : false;
|
52 |
+
$installer_sql2_exists = file_exists($installer_sql2) ? true : false;
|
53 |
+
$installer_log_exists = file_exists($installer_log) ? true : false;
|
54 |
?>
|
55 |
|
56 |
<style type="text/css">
|
57 |
+
<?php echo isset($css_hide_msg) ? $css_hide_msg : ''; ?>
|
58 |
div.success {color:#4A8254}
|
59 |
div.failed {color:red}
|
60 |
table.dup-reset-opts td:first-child {font-weight: bold}
|
61 |
+
table.dup-reset-opts td {padding:10px}
|
62 |
form#dup-settings-form {padding: 0px 10px 0px 10px}
|
63 |
+
a.dup-fixed-btn {min-width: 150px; text-align: center}
|
64 |
+
div#dup-tools-delete-moreinfo {display: none; padding: 5px 0 0 20px; border:1px solid silver; background-color: #fff; border-radius: 5px; padding:10px; margin:5px; width:750px }
|
65 |
</style>
|
66 |
|
|
|
67 |
<form id="dup-settings-form" action="?page=duplicator-tools&tab=cleanup" method="post">
|
68 |
|
69 |
<?php if ($_GET['action'] != 'display') : ?>
|
70 |
<div id="message" class="updated below-h2">
|
71 |
<p><?php echo $action_response; ?></p>
|
72 |
<?php if ( $_GET['action'] == 'installer') : ?>
|
73 |
+
<?php
|
74 |
+
$html = "";
|
75 |
+
$package_name = (isset($_GET['package'])) ? DUPLICATOR_WPROOTPATH . esc_html($_GET['package']) : '';
|
76 |
+
|
77 |
+
echo $installer_file_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_file} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_file} </div>";
|
78 |
+
echo $installer_bak_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_bak} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_bak} </div>";
|
79 |
+
echo $installer_sql1_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_sql1} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_sql1} </div>";
|
80 |
+
echo $installer_sql2_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_sql2} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_sql2} </div>";
|
81 |
+
echo $installer_log_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_log} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_log} </div>";
|
|
|
|
|
|
|
|
|
82 |
|
83 |
+
//No way to know exact name of archive file except from installer.
|
84 |
+
//The only place where the package can be remove is from installer
|
85 |
+
//So just show a message if removing from plugin.
|
86 |
+
if (! empty($package_name) ){
|
87 |
+
$path_parts = pathinfo($package_name);
|
88 |
+
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
89 |
+
if ($path_parts == "zip" && ! is_dir($package_name)) {
|
90 |
+
$html .= (@unlink($package_name))
|
91 |
+
? "<div class='success'>Successfully removed {$package_name}</div>"
|
92 |
+
: "<div class='failed'>Does not exist or unable to remove archive file.</div>";
|
93 |
+
} else {
|
94 |
+
$html .= "<div class='failed'>Does not exist or unable to remove archive file. Please validate that an archive file exists.</div>";
|
95 |
+
}
|
96 |
} else {
|
97 |
+
$html .= '<br/><div>It is recommended to remove your archive file from the root of your WordPress install. This will need to be done manually.</div>';
|
98 |
}
|
99 |
+
echo $html;
|
100 |
+
?>
|
|
|
101 |
|
102 |
+
<i><br/>
|
103 |
+
<?php DUP_Util::_e('If the installer files did not successfully get removed, then you WILL need to remove them manually')?>. <br/>
|
104 |
+
<?php DUP_Util::_e('Please remove all installer files to avoid leaving open security issues on your server')?>. <br/><br/>
|
105 |
+
</i>
|
106 |
|
107 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
108 |
</div>
|
109 |
<?php endif; ?>
|
110 |
|
111 |
|
112 |
+
<h3><?php DUP_Util::_e('Data Cleanup')?><hr size="1"/></h3>
|
113 |
<table class="dup-reset-opts">
|
114 |
+
<tr style="vertical-align:text-top">
|
115 |
+
<td>
|
116 |
+
<a class="button button-small dup-fixed-btn" href="?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $nonce; ?>">
|
117 |
+
<?php DUP_Util::_e("Delete Reserved Files"); ?>
|
118 |
+
</a>
|
119 |
+
</td>
|
120 |
+
<td>
|
121 |
+
<?php DUP_Util::_e("Removes all reserved installer files."); ?>
|
122 |
+
<a href="javascript:void(0)" onclick="jQuery('#dup-tools-delete-moreinfo').toggle()">[<?php DUP_Util::_e("more info"); ?>]</a>
|
123 |
+
<br/>
|
124 |
+
<div id="dup-tools-delete-moreinfo">
|
125 |
+
<?php
|
126 |
+
DUP_Util::_e("Clicking on the 'Delete Reserved Files' button will remove the following reserved files. These files are typically from a previous Duplicator install. "
|
127 |
+
. "If you are unsure of the source, please validate the files. These files should never be left on production systems for security reasons. "
|
128 |
+
. "Below is a list of all the reserved files used by Duplicator. Please be sure these are removed from your server.");
|
129 |
+
echo "<br/><br/>";
|
130 |
+
echo $installer_file_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_file} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_file} </div>";
|
131 |
+
echo $installer_bak_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_bak} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_bak} </div>";
|
132 |
+
echo $installer_sql1_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_sql1} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_sql1} </div>";
|
133 |
+
echo $installer_sql2_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_sql2} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_sql2} </div>";
|
134 |
+
echo $installer_log_exists ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$found} - {$installer_log} </div>" : "<div class='success'> <i class='fa fa-check'></i> {$not_found} - {$installer_log} </div>";
|
135 |
+
?>
|
136 |
+
</div>
|
137 |
+
</td>
|
138 |
</tr>
|
139 |
<tr>
|
140 |
+
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.DeleteLegacy()"><?php DUP_Util::_e("Delete Legacy Data"); ?></a></td>
|
141 |
+
<td><?php DUP_Util::_e("Removes all legacy data and settings prior to version"); ?> [<?php echo DUPLICATOR_VERSION ?>].</td>
|
142 |
</tr>
|
143 |
+
<tr>
|
144 |
+
<td><a class="button button-small dup-fixed-btn" href="javascript:void(0)" onclick="Duplicator.Tools.ClearBuildCache()"><?php DUP_Util::_e("Clear Build Cache"); ?></a></td>
|
145 |
+
<td><?php DUP_Util::_e("Removes all build data from:"); ?> [<?php echo DUPLICATOR_SSDIR_PATH_TMP ?>].</td>
|
146 |
</tr>
|
147 |
</table>
|
|
|
|
|
148 |
</form>
|
149 |
|
150 |
<script>
|
151 |
jQuery(document).ready(function($) {
|
|
|
|
|
152 |
Duplicator.Tools.DeleteLegacy = function () {
|
153 |
<?php
|
154 |
+
$msg = __('This action will remove all legacy settings prior to version %1$s. ');
|
155 |
+
$msg .= __('Legacy settings are only needed if you plan to migrate back to an older version of this plugin.');
|
156 |
?>
|
157 |
var result = true;
|
158 |
+
var result = confirm('<?php printf(__($msg), DUPLICATOR_VERSION) ?>');
|
159 |
if (! result)
|
160 |
return;
|
161 |
|
164 |
|
165 |
Duplicator.Tools.ClearBuildCache = function () {
|
166 |
<?php
|
167 |
+
$msg = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.');
|
168 |
?>
|
169 |
var result = true;
|
170 |
var result = confirm('<?php echo $msg ?>');
|
171 |
if (! result)
|
172 |
return;
|
173 |
+
|
174 |
window.location = '?page=duplicator-tools&tab=cleanup&action=tmp-cache&_wpnonce=<?php echo $nonce; ?>';
|
175 |
+
}
|
|
|
|
|
176 |
});
|
177 |
</script>
|
178 |
|