Duplicator – WordPress Migration Plugin - Version 0.5.32

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 0.5.32
Comparing to
See all releases

Code changes from version 0.5.30 to 0.5.32

assets/img/dropbox-64.png ADDED
Binary file
assets/img/ftp-64.png ADDED
Binary file
assets/img/google_drive_64px.png ADDED
Binary file
classes/server.php CHANGED
@@ -113,13 +113,34 @@ class DUP_Server
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
  /**
124
  * Get the IP of a client machine
125
  * @return string IP of the client machine
113
  */
114
  public static function InstallerFilesFound()
115
  {
116
+ $files = self::GetInstallerFiles();
117
+ foreach($files as $file => $path)
118
+ {
119
+ if (file_exists($path))
120
+ return true;
121
+ }
122
+ return false;
123
+ }
124
+
125
+
126
+ /**
127
+ * Gets a list of all the installer files by name and full path
128
+ * @return array [file_name, file_path]
129
+ */
130
+ public static function GetInstallerFiles()
131
+ {
132
+ /* Files:
133
+ * installer.php, installer-backup.php, installer-data.sql, installer-log.txt, database.sql */
134
+ return array(
135
+ DUPLICATOR_INSTALL_PHP => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_PHP,
136
+ DUPLICATOR_INSTALL_BAK => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_BAK,
137
+ DUPLICATOR_INSTALL_SQL => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_SQL,
138
+ DUPLICATOR_INSTALL_LOG => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_LOG,
139
+ DUPLICATOR_INSTALL_DB => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_DB
140
+ );
141
  }
142
 
143
+
144
  /**
145
  * Get the IP of a client machine
146
  * @return string IP of the client machine
classes/ui.php CHANGED
@@ -101,7 +101,7 @@ class DUP_UI {
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.');
101
  $screen = get_current_screen();
102
  $on_active_tab = isset($_GET['tab']) && $_GET['tab'] == 'cleanup' ? true : false;
103
 
104
+ echo '<div class="error" id="dup-global-error-reserved-files"><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.');
classes/utility.php CHANGED
@@ -216,17 +216,26 @@ class DUP_Util {
216
  return $size;
217
  }
218
 
219
-
220
- public static function IsShellExecAvailable() {
 
 
 
 
221
 
222
- if (array_intersect(array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded'), array_map('trim', explode(',', @ini_get('disable_functions')))))
 
223
  return false;
224
 
225
  //Suhosin: http://www.hardened-php.net/suhosin/
226
- //Will cause PHP to silently fail.
227
- if (extension_loaded('suhosin'))
228
- return false;
229
-
 
 
 
 
230
  // Can we issue a simple echo command?
231
  if (!@shell_exec('echo duplicator'))
232
  return false;
216
  return $size;
217
  }
218
 
219
+ /**
220
+ * Can shell_exec be called on this server
221
+ */
222
+ public static function IsShellExecAvailable()
223
+ {
224
+ $cmds = array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded');
225
 
226
+ //Function disabled at server level
227
+ if (array_intersect($cmds, array_map('trim', explode(',', @ini_get('disable_functions')))))
228
  return false;
229
 
230
  //Suhosin: http://www.hardened-php.net/suhosin/
231
+ //Will cause PHP to silently fail
232
+ if (extension_loaded('suhosin'))
233
+ {
234
+ $suhosin_ini = @ini_get("suhosin.executor.func.blacklist");
235
+ if (array_intersect($cmds, array_map('trim', explode(',', $suhosin_ini))))
236
+ return false;
237
+ }
238
+
239
  // Can we issue a simple echo command?
240
  if (!@shell_exec('echo duplicator'))
241
  return false;
define.php CHANGED
@@ -3,7 +3,7 @@
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");
@@ -31,17 +31,18 @@ if (function_exists('plugin_dir_url')) {
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');
3
  if (function_exists('plugin_dir_url')) {
4
 
5
 
6
+ define('DUPLICATOR_VERSION', '0.5.32');
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");
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
+ define("DUPLICATOR_INSTALL_DB", 'database.sql');
35
 
36
  //RESTRAINT CONSTANTS
37
  define("DUPLICATOR_PHP_MAX_MEMORY", '5000M');
38
  define("DUPLICATOR_DB_MAX_TIME", 5000);
39
  define("DUPLICATOR_DB_EOF_MARKER", 'DUPLICATOR_MYSQLDUMP_EOF');
40
+ define("DUPLICATOR_SCAN_SITE", 157286400); //150MB
41
+ define("DUPLICATOR_SCAN_WARNFILESIZE", 3145728); //3MB
42
+ define("DUPLICATOR_SCAN_CACHESIZE", 524288); //512K
43
+ define("DUPLICATOR_SCAN_DBSIZE", 52428800); //50MB
44
+ define("DUPLICATOR_SCAN_DBROWS", 250000);
45
+ define("DUPLICATOR_SCAN_TIMEOUT", 150); //Seconds
46
  define("DUPLICATOR_SCAN_MIN_WP", "3.7.0");
47
  $GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
48
  $GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
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.30
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.32
7
  Author: LifeInTheGrid
8
  Author URI: http://www.lifeinthegrid.com
9
  Text Domain: wpduplicator
installer/build/ajax.step1.php CHANGED
@@ -5,7 +5,7 @@ if (! defined('DUPLICATOR_INIT')) {
5
  $_baseURL = "http://" . $_baseURL;
6
  header("HTTP/1.1 301 Moved Permanently");
7
  header("Location: $_baseURL");
8
- exit;
9
  }
10
 
11
  //POST PARAMS
@@ -41,7 +41,7 @@ error_reporting(E_ERROR);
41
  //DATABASE TEST CONNECTION
42
  //===============================
43
  if (isset($_GET['dbtest'])) {
44
-
45
  $html = "";
46
  $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
47
  $dbConn = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
@@ -55,11 +55,11 @@ if (isset($_GET['dbtest'])) {
55
  $html .= "<small style='display:block; padding:5px'>Using Connection String:<br/>Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}</small>";
56
  $html .= "<label>Server Connected:</label> {$tstSrv} <br/>";
57
  $html .= "<label>Database Found:</label> {$tstDB} <br/>";
58
-
59
 
60
  if ($_POST['dbaction'] == 'create'){
61
  $tblcount = DupUtil::dbtable_count($dbConn, $_POST['dbname']);
62
- $html .= ($tblcount > 0)
63
  ? "<div class='dup-fail'><b>WARNING</b></div><br/>" . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount)
64
  : "";
65
  }
@@ -78,6 +78,7 @@ function_exists('mysqli_connect') or DUPX_Log::Error(ERR_MYSQLI_SUPPORT);
78
 
79
  //ERR_DBCONNECT
80
  $dbh = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
 
81
  ($dbh) or DUPX_Log::Error(ERR_DBCONNECT . mysqli_connect_error());
82
  if ($_POST['dbaction'] == 'empty') {
83
  mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::Error(sprintf(ERR_DBCREATE, $_POST['dbname']));
@@ -97,10 +98,10 @@ if ($_POST['zip_manual']) {
97
  }
98
  } else {
99
  //ERR_CONFIG_FOUND
100
- (!file_exists('wp-config.php'))
101
  or DUPX_Log::Error(ERR_CONFIG_FOUND);
102
  //ERR_ZIPNOTFOUND
103
- (is_readable("{$package_path}"))
104
  or DUPX_Log::Error(ERR_ZIPNOTFOUND);
105
  }
106
 
@@ -149,7 +150,7 @@ if ($_POST['zip_manual']) {
149
  $log .= "--------------------------------------\n";
150
  DUPX_Log::Info($log);
151
  }
152
-
153
  if (! class_exists('ZipArchive')) {
154
  DUPX_Log::Info("ERROR: Stopping install process. Trying to extract without ZipArchive module installed. Please use the 'Manual Package extraction' mode to extract zip file.");
155
  DUPX_Log::Error(ERR_ZIPARCHIVE);
@@ -300,12 +301,12 @@ DUPX_Log::Info("MAXPACK:\t{$dbvar_maxpacks}");
300
 
301
  //CREATE DB
302
  switch ($_POST['dbaction']) {
303
- case "create":
304
  mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `{$_POST['dbname']}`");
305
  mysqli_select_db($dbh, $_POST['dbname'])
306
  or DUPX_Log::Error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
307
  break;
308
- case "empty":
309
  //DROP DB TABLES
310
  $drop_log = "Database already empty. Ready for install.";
311
  $sql = "SHOW TABLES FROM `{$_POST['dbname']}`";
@@ -355,11 +356,14 @@ while ($counter < $sql_result_file_length) {
355
  if (!mysqli_ping($dbh)) {
356
  mysqli_close($dbh);
357
  $dbh = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
 
 
 
358
  }
359
  DUPX_Log::Info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
360
  $dbquery_errs++;
361
 
362
- //Buffer data to browser to keep connection open
363
  } else {
364
  if ($fcgi_buffer_count++ > $fcgi_buffer_pool) {
365
  $fcgi_buffer_count = 0;
@@ -405,7 +409,7 @@ $dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
405
  DUPX_Log::Info("Removed '{$dbdelete_count}' cache/transient rows");
406
  //Reset Duplicator Options
407
  foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
408
- mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
409
  }
410
 
411
  @mysqli_close($dbh);
5
  $_baseURL = "http://" . $_baseURL;
6
  header("HTTP/1.1 301 Moved Permanently");
7
  header("Location: $_baseURL");
8
+ exit;
9
  }
10
 
11
  //POST PARAMS
41
  //DATABASE TEST CONNECTION
42
  //===============================
43
  if (isset($_GET['dbtest'])) {
44
+
45
  $html = "";
46
  $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
47
  $dbConn = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
55
  $html .= "<small style='display:block; padding:5px'>Using Connection String:<br/>Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}</small>";
56
  $html .= "<label>Server Connected:</label> {$tstSrv} <br/>";
57
  $html .= "<label>Database Found:</label> {$tstDB} <br/>";
58
+
59
 
60
  if ($_POST['dbaction'] == 'create'){
61
  $tblcount = DupUtil::dbtable_count($dbConn, $_POST['dbname']);
62
+ $html .= ($tblcount > 0)
63
  ? "<div class='dup-fail'><b>WARNING</b></div><br/>" . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount)
64
  : "";
65
  }
78
 
79
  //ERR_DBCONNECT
80
  $dbh = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
81
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
82
  ($dbh) or DUPX_Log::Error(ERR_DBCONNECT . mysqli_connect_error());
83
  if ($_POST['dbaction'] == 'empty') {
84
  mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::Error(sprintf(ERR_DBCREATE, $_POST['dbname']));
98
  }
99
  } else {
100
  //ERR_CONFIG_FOUND
101
+ (!file_exists('wp-config.php'))
102
  or DUPX_Log::Error(ERR_CONFIG_FOUND);
103
  //ERR_ZIPNOTFOUND
104
+ (is_readable("{$package_path}"))
105
  or DUPX_Log::Error(ERR_ZIPNOTFOUND);
106
  }
107
 
150
  $log .= "--------------------------------------\n";
151
  DUPX_Log::Info($log);
152
  }
153
+
154
  if (! class_exists('ZipArchive')) {
155
  DUPX_Log::Info("ERROR: Stopping install process. Trying to extract without ZipArchive module installed. Please use the 'Manual Package extraction' mode to extract zip file.");
156
  DUPX_Log::Error(ERR_ZIPARCHIVE);
301
 
302
  //CREATE DB
303
  switch ($_POST['dbaction']) {
304
+ case "create":
305
  mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `{$_POST['dbname']}`");
306
  mysqli_select_db($dbh, $_POST['dbname'])
307
  or DUPX_Log::Error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
308
  break;
309
+ case "empty":
310
  //DROP DB TABLES
311
  $drop_log = "Database already empty. Ready for install.";
312
  $sql = "SHOW TABLES FROM `{$_POST['dbname']}`";
356
  if (!mysqli_ping($dbh)) {
357
  mysqli_close($dbh);
358
  $dbh = DupUtil::db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
359
+ // Reset session setup
360
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
361
+ DupUtil::mysql_set_charset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
362
  }
363
  DUPX_Log::Info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
364
  $dbquery_errs++;
365
 
366
+ //Buffer data to browser to keep connection open
367
  } else {
368
  if ($fcgi_buffer_count++ > $fcgi_buffer_pool) {
369
  $fcgi_buffer_count = 0;
409
  DUPX_Log::Info("Removed '{$dbdelete_count}' cache/transient rows");
410
  //Reset Duplicator Options
411
  foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
412
+ mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
413
  }
414
 
415
  @mysqli_close($dbh);
installer/build/view.step3.php CHANGED
@@ -188,7 +188,7 @@ VIEW: STEP 3- INPUT -->
188
  <a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
189
  <a href='http://support.lifeinthegrid.com/knowledgebase.php' target='_blank'>FAQs</a> |
190
  <a href='http://lifeinthegrid.com/duplicator' target='_blank'>Support</a> |
191
- <a href='http://lifeinthegrid.com/partner/' target='_blank'>Donate</a>
192
  </div><br/>
193
  </form>
194
 
188
  <a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
189
  <a href='http://support.lifeinthegrid.com/knowledgebase.php' target='_blank'>FAQs</a> |
190
  <a href='http://lifeinthegrid.com/duplicator' target='_blank'>Support</a> |
191
+ <a href='http://snapcreek.com/duplicator/' target='_blank'>Go Pro!</a>
192
  </div><br/>
193
  </form>
194
 
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.30
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.32
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
views/help/gopro.php CHANGED
@@ -1,146 +1,141 @@
1
- <?php
2
- DUP_Util::CheckPermissions('read');
3
-
4
- require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
5
- require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
6
- ?>
7
- <style>
8
- /*================================================
9
- PAGE-SUPPORT:*/
10
- div.dup-support-hlp-hdrs{
11
- text-align: center;
12
- padding:15px;
13
- font-weight:bold; font-size:25px;
14
- background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
15
- background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
16
- background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
17
- background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
18
- background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
19
- background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
20
- }
21
- div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
22
- div.feature {background: #fff; padding:15px; margin: 2px; text-align: center; min-height: 20px}
23
- div.feature a {font-size:18px; font-weight: bold;}
24
- div.dup-compare-area div.feature div.info {display:none; padding:7px 7px 5px 7px; font-style: italic; color: #555; font-size: 14px}
25
- div.dup-gopro-header {text-align: center; margin: 5px 0 15px 0; font-size:18px; line-height: 30px}
26
- div.dup-gopro-header b {font-size: 35px}
27
- a.dup-check-it-btn {box-shadow: 5px 5px 5px 0px #999 !important; font-size: 20px !important; height:50px !important; padding:10px 40px 0 40px !important;}
28
-
29
- </style>
30
-
31
- <script type="text/javascript">var switchTo5x = true;</script>
32
- <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
33
- <script type="text/javascript">stLight.options({publisher: "1a44d92e-2a78-42c3-a32e-414f78f9f484"});</script>
34
-
35
- <div class="wrap dup-wrap">
36
-
37
- <?php duplicator_header(__("Go Pro!", 'wpduplicator')) ?>
38
- <hr size="1" />
39
-
40
- <div style="width:850px; margin:auto; text-align: center;">
41
-
42
- <div style="line-height:28px">
43
-
44
- <h1 style="font-size:38px">
45
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo.png" style='text-align:top; margin:-8px 0' />
46
- <?php DUP_Util::_e('Duplicator Pro Has Arrived!') ?>
47
- </h1>
48
- <h3 style="font-size:20px">
49
- <?php DUP_Util::_e('The simplicity of Duplicator') ?>
50
- <?php DUP_Util::_e('with the power the professional requires.') ?>
51
- </h3>
52
- </div>
53
-
54
- <!-- FREE-->
55
- <div class="dup-compare-area">
56
- <div class="dup-support-hlp-hdrs">
57
- <?php DUP_Util::_e('Duplicator Free') ?>
58
- </div>
59
- <div class="feature">
60
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Backup Files &amp; Database') ?></a>
61
- <div class="info"><?php DUP_Util::_e('Compresses all your WordPress files and database into a compressed snapshot archive file.') ?></div>
62
- </div>
63
- <div class="feature">
64
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Directory Filters') ?></a>
65
- <div class="info"><?php DUP_Util::_e('Filter out the directories and file extensions you want to include/exclude in your in your archive file.') ?></div>
66
- </div>
67
- <div class="feature">
68
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Database Table Filters') ?></a>
69
- <div class="info"><?php DUP_Util::_e('Filter out only the database tables you want to include/exclude in your database creation script.') ?></div>
70
- </div>
71
- <div class="feature">
72
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Migration Wizard') ?></a>
73
- <div class="info"><?php DUP_Util::_e('With just two files (archive &amp; installer.php) move your site to a new location.') ?></div>
74
- </div>
75
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
76
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
77
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
78
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
79
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
80
- <div class="feature"><i class="fa fa-times fa-lg"></i></div>
81
-
82
- </div>
83
-
84
- <!-- PRO -->
85
- <div class="dup-compare-area">
86
- <div class="dup-support-hlp-hdrs">
87
- <?php DUP_Util::_e('Duplicator Pro') ?>
88
- </div>
89
- <div class="feature">
90
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Backup Files &amp; Database') ?></a>
91
- <div class="info"><?php DUP_Util::_e('Compresses all your WordPress files and database into a compressed snapshot archive file.') ?></div>
92
- </div>
93
- <div class="feature">
94
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Directory Filters') ?></a>
95
- <div class="info"><?php DUP_Util::_e('Filter out the directories and file extensions you want to include/exclude in your in your archive file.') ?></div>
96
- </div>
97
- <div class="feature">
98
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Database Table Filters') ?></a>
99
- <div class="info"><?php DUP_Util::_e('Filter out only the database tables you want to include/exclude in your database creation script.') ?></div>
100
- </div>
101
- <div class="feature">
102
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Migration Wizard') ?></a>
103
- <div class="info"><?php DUP_Util::_e('With just two files (archive &amp; installer.php) move your site to a new location.') ?></div>
104
- </div>
105
- <div class="feature">
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>
117
- <div class="feature">
118
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Customer Support') ?></a>
119
- <div class="info"><?php DUP_Util::_e('Server setups can be quite complex, with pro you get prompt help to get your site backed up and moved.') ?></div>
120
- </div>
121
- <div class="feature">
122
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Enhanced Package Engine') ?></a>
123
- <div class="info"><?php DUP_Util::_e('Overhauled package engine is faster and processes larger sites without timing-out.') ?></div>
124
- </div>
125
- <div class="feature">
126
- <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Package Templates') ?></a>
127
- <div class="info"><?php DUP_Util::_e('Reusable package configurations for flexible backups and custom site generation.') ?></div>
128
- </div>
129
-
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>
137
- </div>
138
- </div><br/><br/><br/><br/>
139
-
140
- <script type="text/javascript">
141
- jQuery(document).ready(function($) {
142
- $( "a.dup-info-click" ).click(function() {
143
- $(this).parent().find('.info').toggle();
144
- });
145
- });
146
  </script>
1
+ <?php
2
+ DUP_Util::CheckPermissions('read');
3
+
4
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
5
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
6
+ ?>
7
+ <style>
8
+ /*================================================
9
+ PAGE-SUPPORT:*/
10
+ div.dup-pro-area {
11
+ padding:10px 70px; max-width:750px; width:90%; margin:auto; text-align: center;
12
+ background: #fff; border-radius:20px;
13
+ box-shadow: inset 0px 0px 67px 20px rgba(241,241,241,1);
14
+ }
15
+ div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
16
+ div.feature {background: #fff; padding:15px; margin: 2px; text-align: center; min-height: 20px}
17
+ div.feature a {font-size:18px; font-weight: bold;}
18
+ div.dup-compare-area div.feature div.info {display:none; padding:7px 7px 5px 7px; font-style: italic; color: #555; font-size: 14px}
19
+ div.dup-gopro-header {text-align: center; margin: 5px 0 15px 0; font-size:18px; line-height: 30px}
20
+ div.dup-gopro-header b {font-size: 35px}
21
+ a.dup-check-it-btn {box-shadow: 5px 5px 5px 0px #999 !important; font-size: 20px !important; height:50px !important; padding:10px 40px 0 40px !important;}
22
+
23
+ #comparison-table { margin-top:25px; border-spacing: 0px; width: 100%}
24
+ #comparison-table th { color: #E21906;}
25
+ #comparison-table td, #comparison-table th { font-size: 1.2rem; padding: 15px; }
26
+ #comparison-table .feature-column { text-align: left; width: 46%}
27
+ #comparison-table .check-column { text-align: center; width: 27% }
28
+ #comparison-table tr:nth-child(2n+2) {background-color: #f6f6f6; }
29
+ </style>
30
+
31
+ <script type="text/javascript">var switchTo5x = true;</script>
32
+ <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
33
+ <script type="text/javascript">stLight.options({publisher: "1a44d92e-2a78-42c3-a32e-414f78f9f484"});</script>
34
+
35
+ <div class="dup-pro-area">
36
+
37
+ <div>
38
+ <h1 style="font-size:34px; margin-top:50px">
39
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo.png" style='text-align:top; margin:-8px 0; height:40px;' />
40
+ <?php DUP_Util::_e('Duplicator Professional') ?>
41
+ </h1>
42
+ <h3 style="margin-top:10px; font-size:18px; font-style: italic; color:gray">
43
+ <?php DUP_Util::_e('The simplicity of Duplicator') ?>
44
+ <?php DUP_Util::_e('with power for the professional.') ?>
45
+ </h3>
46
+ </div>
47
+
48
+ <table id="comparison-table">
49
+ <tr>
50
+ <th class="feature-column">
51
+ Feature
52
+ </th>
53
+ <th class="check-column">
54
+ Free
55
+ </th>
56
+ <th class="check-column">
57
+ Professional
58
+ </th>
59
+ </tr>
60
+ <tr>
61
+ <td class="feature-column">Backup Files & Database</td>
62
+ <td class="check-column"><i class="fa fa-check"></i></td>
63
+ <td class="check-column"><i class="fa fa-check"></i></td>
64
+ </tr>
65
+ <tr>
66
+ <td class="feature-column">Directory Filters</td>
67
+ <td class="check-column"><i class="fa fa-check"></i></td>
68
+ <td class="check-column"><i class="fa fa-check"></i></td>
69
+ </tr>
70
+ <tr>
71
+ <td class="feature-column">Database Table Filters</td>
72
+ <td class="check-column"><i class="fa fa-check"></i></td>
73
+ <td class="check-column"><i class="fa fa-check"></i></td>
74
+ </tr>
75
+ <tr>
76
+ <td class="feature-column">Migration Wizard</td>
77
+ <td class="check-column"><i class="fa fa-check"></i></td>
78
+ <td class="check-column"><i class="fa fa-check"></i></td>
79
+ </tr>
80
+ <tr>
81
+ <td class="feature-column"><img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" style='height:16px; width:16px' /> Dropbox Storage </td>
82
+ <td class="check-column"></td>
83
+ <td class="check-column"><i class="fa fa-check"></i></td>
84
+ </tr>
85
+ <tr>
86
+ <td class="feature-column"><img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px' /> Google Drive Storage</td>
87
+ <td class="check-column"></td>
88
+ <td class="check-column"><i class="fa fa-check"></i></td>
89
+ </tr>
90
+ <tr>
91
+ <td class="feature-column"><img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px' /> Remote FTP Storage</td>
92
+ <td class="check-column"></td>
93
+ <td class="check-column"><i class="fa fa-check"></i></td>
94
+ </tr>
95
+ <tr>
96
+ <td class="feature-column">Scheduled Backups</td>
97
+ <td class="check-column"></td>
98
+ <td class="check-column"><i class="fa fa-check"></i></td>
99
+ </tr>
100
+ <tr>
101
+ <td class="feature-column">Enhanced Package Engine</td>
102
+ <td class="check-column"></td>
103
+ <td class="check-column"><i class="fa fa-check"></i></td>
104
+ </tr>
105
+ <tr>
106
+ <td class="feature-column">Email Alerts</td>
107
+ <td class="check-column"></td>
108
+ <td class="check-column"><i class="fa fa-check"></i></td>
109
+ </tr>
110
+ <tr>
111
+ <td class="feature-column">Custom Templates</td>
112
+ <td class="check-column"></td>
113
+ <td class="check-column"><i class="fa fa-check"></i></td>
114
+ </tr>
115
+ <tr>
116
+ <td class="feature-column">File Filters</td>
117
+ <td class="check-column"></td>
118
+ <td class="check-column"><i class="fa fa-check"></i></td>
119
+ </tr>
120
+ <tr>
121
+ <td class="feature-column">Customer Support</td>
122
+ <td class="check-column"></td>
123
+ <td class="check-column"><i class="fa fa-check"></i></td>
124
+ </tr>
125
+ </table>
126
+
127
+ <br style="clear:both" />
128
+ <p style="text-align:center">
129
+ <a href="http://snapcreek.com/duplicator?free-go-pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
130
+ <?php DUP_Util::_e('Check It Out!') ?>
131
+ </a>
132
+ </p>
133
+ <br/><br/>
134
+ </div>
135
+ <br/><br/>
136
+
137
+ <script type="text/javascript">
138
+ jQuery(document).ready(function ($) {
139
+
140
+ });
 
 
 
 
 
141
  </script>
views/packages/new1.base.php CHANGED
@@ -28,6 +28,8 @@ $view_state = DUP_UI::GetViewStateArray();
28
  $ui_css_storage = (isset($view_state['dup-pack-storage-panel']) && $view_state['dup-pack-storage-panel']) ? 'display:block' : 'display:none';
29
  $ui_css_archive = (isset($view_state['dup-pack-archive-panel']) && $view_state['dup-pack-archive-panel']) ? 'display:block' : 'display:none';
30
  $ui_css_installer = (isset($view_state['dup-pack-installer-panel']) && $view_state['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
 
 
31
  ?>
32
 
33
  <style>
@@ -218,12 +220,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, 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; ?>
28
  $ui_css_storage = (isset($view_state['dup-pack-storage-panel']) && $view_state['dup-pack-storage-panel']) ? 'display:block' : 'display:none';
29
  $ui_css_archive = (isset($view_state['dup-pack-archive-panel']) && $view_state['dup-pack-archive-panel']) ? 'display:block' : 'display:none';
30
  $ui_css_installer = (isset($view_state['dup-pack-installer-panel']) && $view_state['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
31
+ $dup_intaller_files = implode(", ", array_keys(DUP_Server::GetInstallerFiles()));
32
+
33
  ?>
34
 
35
  <style>
220
  </div>
221
  <div class="dup-sys-info dup-info-box">
222
  <?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
223
+ <?php _e("None of the reserved files [{$dup_intaller_files}] where found from a previous install. This means you are clear to create a new package.", 'wpduplicator'); ?>
224
  <?php else:
225
  $duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
226
  ?>
227
  <form method="post" action="admin.php?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
228
+ <?php _e("A reserved file(s) was found in the WordPress root directory. Reserved file names are [{$dup_intaller_files}]. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.", 'wpduplicator'); ?>
229
  <br/><input type='submit' class='button action' value='<?php _e('Remove Files Now', 'wpduplicator') ?>' style='font-size:10px; margin-top:5px;' />
230
  </form>
231
  <?php endif; ?>
views/packages/new1.inc.form.php CHANGED
@@ -41,17 +41,14 @@ META-BOX: STORAGE -->
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>
@@ -114,7 +111,7 @@ META-BOX: STORAGE -->
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>
41
  </tr>
42
  <tr>
43
  <td colspan="4">
44
+ <div style="font-size:12px; font-style:italic;">
45
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" style='height:16px; width:16px; vertical-align: text-top' />
46
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px; vertical-align: text-top' />
47
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px; vertical-align: text-top' />
48
+
49
+ <?php echo sprintf(__('%1$s, %2$s, %3$s and other storage options available in', 'wpduplicator'), 'Dropbox', 'Google Drive', 'FTP'); ?>
50
+ <a href="http://snapcreek.com/duplicator/?free-storage" target="_blank">Duplicator Pro</a>
51
+ </div>
 
 
 
52
  </td>
53
  </tr>
54
  </tbody>
111
  </div>
112
  <br/>
113
  <span style="font-style:italic; font-size:12px ">
114
+ <?php echo sprintf(DUP_Util::__('%1$s are available in'), 'Individual file filters'); ?>
115
  <a href="http://snapcreek.com/duplicator/?free-file-filters" target="_blank">Duplicator Pro</a>
116
  </span>
117
  </div>
views/tools/cleanup.php CHANGED
@@ -17,24 +17,14 @@
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();
@@ -46,11 +36,6 @@
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">
@@ -72,13 +57,15 @@
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
@@ -127,11 +114,13 @@
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>
17
  }
18
  }
19
 
20
+ $txt_found = DUP_Util::__("Found");
21
+ $txt_not_found = DUP_Util::__("Not Found");
22
+ $installer_files = DUP_Server::GetInstallerFiles();
 
 
 
 
 
23
 
24
  switch ($_GET['action']) {
25
  case 'installer' :
26
  $action_response = __('Installer file cleanup ran!');
27
+ $css_hide_msg = 'div.dup-header div.error {display:none}';
 
 
 
 
 
28
  break;
29
  case 'legacy':
30
  DUP_Settings::LegacyClean();
36
  break;
37
  }
38
 
 
 
 
 
 
39
  ?>
40
 
41
  <style type="text/css">
57
  <?php if ( $_GET['action'] == 'installer') : ?>
58
  <?php
59
  $html = "";
60
+
61
+ $package_name = (isset($_GET['package'])) ? DUPLICATOR_WPROOTPATH . esc_html($_GET['package']) : '';
62
+ foreach($installer_files as $file => $path)
63
+ {
64
+ @unlink($path);
65
+ echo (file_exists($path))
66
+ ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$txt_found} - {$path} </div>"
67
+ : "<div class='success'> <i class='fa fa-check'></i> {$txt_not_found} - {$path} </div>";
68
+ }
69
 
70
  //No way to know exact name of archive file except from installer.
71
  //The only place where the package can be remove is from installer
114
  . "If you are unsure of the source, please validate the files. These files should never be left on production systems for security reasons. "
115
  . "Below is a list of all the reserved files used by Duplicator. Please be sure these are removed from your server.");
116
  echo "<br/><br/>";
117
+
118
+ foreach($installer_files as $file => $path)
119
+ {
120
+ echo (file_exists($path))
121
+ ? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$txt_found} - {$file} </div>"
122
+ : "<div class='success'> <i class='fa fa-check'></i> {$txt_not_found} - {$file} </div>";
123
+ }
124
  ?>
125
  </div>
126
  </td>