first commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Controllers\ToolsPageController;
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Core\MigrationMng;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
$safeMsg = MigrationMng::getSaveModeWarning();
|
||||
$url = $ctrlMng->getMenuLink(ControllersManager::TOOLS_SUBMENU_SLUG, ToolsPageController::L2_SLUG_DISAGNOSTIC);
|
||||
;
|
||||
|
||||
?>
|
||||
<div class="notice notice-success dpro-admin-notice dup-migration-pass-wrapper" >
|
||||
<p>
|
||||
<b><?php
|
||||
if (MigrationMng::getMigrationData()->restoreBackupMode) {
|
||||
esc_html_e('Restore Backup Almost Complete!', 'duplicator-pro');
|
||||
} else {
|
||||
esc_html_e('Migration Almost Complete!', 'duplicator-pro');
|
||||
}
|
||||
?></b>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'Reserved Duplicator Pro installation files have been detected in the root directory.
|
||||
Please delete these installation files to avoid security issues.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
<br/>
|
||||
<?php esc_html_e('Go to: Tools > General > Information > Stored Data > and click the "Remove Installation Files" button', 'duplicator-pro'); ?><br>
|
||||
<a id="dpro-notice-action-general-site-page" href="<?php echo esc_url($url); ?>">
|
||||
<?php esc_html_e('Take me there now!', 'duplicator-pro'); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php if (strlen($safeMsg) > 0) { ?>
|
||||
<div class="notice-safemode">
|
||||
<?php echo esc_html($safeMsg); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<p class="sub-note">
|
||||
<i><?php
|
||||
esc_html_e(
|
||||
'If an archive.zip/daf file was intentially added to the root directory
|
||||
to perform an overwrite install of this site then you can ignore this message.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</i>
|
||||
</p>
|
||||
|
||||
<?php echo apply_filters(MigrationMng::HOOK_BOTTOM_MIGRATION_MESSAGE, ''); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Views\ViewHelper;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
$fileRemoved = $tplData['installerCleanupFiles'];
|
||||
$removeError = $tplData['installerCleanupError'];
|
||||
$purgeCaches = $tplData['installerCleanupPurge'];
|
||||
?>
|
||||
<div class="dpro-diagnostic-action-installer">
|
||||
<p>
|
||||
<b><?php esc_html_e('Installation cleanup ran!', 'duplicator-pro'); ?></b>
|
||||
</p>
|
||||
<?php
|
||||
if (count($fileRemoved) === 0) {
|
||||
?>
|
||||
<p>
|
||||
<b><?php esc_html_e('No Duplicator files were found on this WordPress Site.', 'duplicator-pro'); ?></b>
|
||||
</p> <?php
|
||||
} else {
|
||||
foreach ($fileRemoved as $path => $success) {
|
||||
if ($success) {
|
||||
?><div class="success">
|
||||
<i class="fa fa-check"></i> <?php esc_html_e("Removed", 'duplicator-pro'); ?> - <?php echo esc_html($path); ?>
|
||||
</div><?php
|
||||
} else {
|
||||
?><div class="failed">
|
||||
<i class='fa fa-exclamation-triangle'></i> <?php esc_html_e("Found", 'duplicator-pro'); ?> - <?php echo esc_html($path); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($purgeCaches as $message) {
|
||||
?><div class="success">
|
||||
<i class="fa fa-check"></i> <?php echo wp_kses($message, ViewHelper::GEN_KSES_TAGS); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($removeError) {
|
||||
?>
|
||||
<p>
|
||||
<?php esc_html_e('Some of the installer files did not get removed, ', 'duplicator-pro'); ?>
|
||||
<span class="link-style" onclick="DupPro.Tools.removeInstallerFiles();">
|
||||
<?php esc_html_e('please retry the installer cleanup process', 'duplicator-pro'); ?>
|
||||
</span><br>
|
||||
<?php esc_html_e(' If this process continues please see the previous FAQ link.', 'duplicator-pro'); ?>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div style="font-style: italic; max-width:900px; padding:10px 0 25px 0;">
|
||||
<p>
|
||||
<b><i class="fa fa-shield-alt"></i> <?php esc_html_e('Security Notes', 'duplicator-pro'); ?>:</b>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'If the installer files do not successfully get removed with this action,
|
||||
then they WILL need to be removed manually through your hosts control panel or FTP.
|
||||
Please remove all installer files to avoid any security issues on this site.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?><br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html_x(
|
||||
'For more details please visit the FAQ link %1$sWhich files need to be removed after an install?%2$s',
|
||||
'%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator-pro'
|
||||
),
|
||||
'<a href="' . esc_url(DUPLICATOR_PRO_DUPLICATOR_DOCS_URL . 'which-files-need-to-be-removed-after-an-install') . '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<b><i class="fa fa-thumbs-up"></i> <?php esc_html_e('Help Support Duplicator', 'duplicator-pro'); ?>:</b>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'The Duplicator team has worked many years to make moving a WordPress site a much easier process. ',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html_x(
|
||||
'Show your support with a %1$s5 star review%2$s! We would be thrilled if you could!',
|
||||
'%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator-pro'
|
||||
),
|
||||
'<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Core\MigrationMng;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
if (!isset($tplData['isMigrationSuccessNotice']) || !$tplData['isMigrationSuccessNotice']) {
|
||||
$tplMng->render('parts/migration/tool-cleanup-installer-files');
|
||||
return;
|
||||
}
|
||||
|
||||
$safeMsg = MigrationMng::getSaveModeWarning();
|
||||
$cleanupReport = MigrationMng::getCleanupReport();
|
||||
|
||||
?>
|
||||
<div class="notice notice-success dpro-admin-notice dup-migration-pass-wrapper">
|
||||
<div class="dup-migration-pass-title">
|
||||
<i class="fa fa-check-circle"></i> <?php
|
||||
if (MigrationMng::getMigrationData()->restoreBackupMode) {
|
||||
esc_html_e('This site has been successfully restored!', 'duplicator-pro');
|
||||
} else {
|
||||
esc_html_e('This site has been successfully migrated!', 'duplicator-pro');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__(
|
||||
'The following installation files are stored in the folder %s',
|
||||
'duplicator-pro'
|
||||
),
|
||||
'<b>' . esc_html(DUPLICATOR_PRO_SSDIR_PATH_INSTALLER) . '</b>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<ul class="dup-stored-minstallation-files">
|
||||
<?php foreach (MigrationMng::getStoredMigrationLists() as $path => $label) { ?>
|
||||
<li>
|
||||
- <?php echo esc_html($label); ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
if (isset($tplData['isInstallerCleanup']) && $tplData['isInstallerCleanup']) {
|
||||
$tplMng->render('parts/migration/clean-installation-files');
|
||||
} else {
|
||||
if (count($cleanupReport['instFile']) > 0) { ?>
|
||||
<p>
|
||||
<?php esc_html_e('Security actions:', 'duplicator-pro'); ?>
|
||||
</p>
|
||||
<ul class="dup-stored-minstallation-files">
|
||||
<?php
|
||||
foreach ($cleanupReport['instFile'] as $html) { ?>
|
||||
<li>
|
||||
<?php echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<b><?php esc_html_e('Final step:', 'duplicator-pro'); ?></b><br>
|
||||
<span id="dpro-notice-action-remove-installer-files" class="link-style" onclick="DupPro.Tools.removeInstallerFiles();">
|
||||
<?php esc_html_e('Remove Installation Files Now!', 'duplicator-pro'); ?>
|
||||
</span>
|
||||
</p>
|
||||
<?php if (strlen($safeMsg) > 0) { ?>
|
||||
<div class="notice-safemode">
|
||||
<?php echo esc_html($safeMsg); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<p class="sub-note">
|
||||
<i><?php
|
||||
esc_html_e(
|
||||
'Note: This message will be removed after all installer files are removed.
|
||||
Installer files must be removed to maintain a secure site.
|
||||
Click the link above to remove all installer files and complete the migration.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?><br>
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'If an archive.zip/daf file was intentially added to the root directory to perform an overwrite install
|
||||
of this site then you can ignore this message.',
|
||||
'duplicator-pro'
|
||||
)
|
||||
?>
|
||||
</i>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo apply_filters(MigrationMng::HOOK_BOTTOM_MIGRATION_MESSAGE, ''); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
*/
|
||||
|
||||
if (!isset($tplData['isInstallerCleanup']) || !$tplData['isInstallerCleanup']) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="message" class="notice notice-success">
|
||||
<?php $tplMng->render('parts/migration/clean-installation-files'); ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user