Changed source root directory

This commit is contained in:
2026-03-05 16:30:11 +01:00
parent dc85447ee1
commit 538f85d7a2
5868 changed files with 749734 additions and 99 deletions

View File

@@ -0,0 +1,53 @@
<?php
use Duplicator\Core\MigrationMng;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
$safeMsg = MigrationMng::getSaveModeWarning();
$nonce = wp_create_nonce('duplicator_cleanup_page');
$url = DUP_CTRL_Tools::getDiagnosticURL();
?>
<div class="dup-notice-success notice notice-success duplicator-pro-admin-notice dup-migration-pass-wrapper" >
<p>
<b><?php
if (MigrationMng::getMigrationData('restoreBackupMode')) {
_e('Restore Backup Almost Complete!', 'duplicator');
} else {
_e('Migration Almost Complete!', 'duplicator');
}
?></b>
</p>
<p>
<?php
esc_html_e(
'Reserved Duplicator installation files have been detected in the root directory. '
. 'Please delete these installation files to avoid security issues.',
'duplicator'
);
?>
<br/>
<?php
esc_html_e('Go to: Duplicator > Tools > General > Information > Utils and click the "Remove Installation Files" button', 'duplicator'); ?><br>
<a id="dpro-notice-action-general-site-page" href="<?php echo $url; ?>">
<?php esc_html_e('Take me there now!', 'duplicator'); ?>
</a>
</p>
<?php if (strlen($safeMsg) > 0) { ?>
<div class="notice-safemode">
<?php echo esc_html($safeMsg); ?>
</div>
<?php } ?>
<p class="sub-note">
<i><?php
_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'
);
?>
</i>
</p>
<?php echo apply_filters(MigrationMng::HOOK_BOTTOM_MIGRATION_MESSAGE, ''); ?>
</div>

View File

@@ -0,0 +1,98 @@
<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
use Duplicator\Core\MigrationMng;
use Duplicator\Utils\LinkManager;
use Duplicator\Views\AdminNotices;
?>
<div class="dpro-diagnostic-action-installer">
<p>
<b><?php echo __('Installation cleanup ran!', 'duplicator'); ?></b>
</p>
<?php
$fileRemoved = MigrationMng::cleanMigrationFiles();
$removeError = false;
if (count($fileRemoved) === 0) {
?>
<p>
<b><?php _e('No Duplicator files were found on this WordPress Site.', 'duplicator'); ?></b>
</p> <?php
} else {
foreach ($fileRemoved as $path => $success) {
if ($success) {
?><div class="success">
<i class="fa fa-check"></i> <?php _e("Removed", 'duplicator'); ?> - <?php echo esc_html($path); ?>
</div><?php
} else {
?><div class="failed">
<i class='fa fa-exclamation-triangle'></i> <?php _e("Found", 'duplicator'); ?> - <?php echo esc_html($path); ?>
</div><?php
$removeError = true;
}
}
}
foreach (MigrationMng::purgeCaches() as $message) {
?><div class="success">
<i class="fa fa-check"></i> <?php echo $message; ?>
</div>
<?php
}
if ($removeError) {
?>
<p>
<?php _e('Some of the installer files did not get removed, ', 'duplicator'); ?>
<span class="link-style" onclick="Duplicator.Tools.deleteInstallerFiles();">
<?php _e('please retry the installer cleanup process', 'duplicator'); ?>
</span><br>
<?php _e(' If this process continues please see the previous FAQ link.', 'duplicator'); ?>
</p>
<?php
} else {
delete_option(AdminNotices::OPTION_KEY_MIGRATION_SUCCESS_NOTICE);
}
?>
<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'); ?>:</b>
<?php
_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'
);
?><br>
<?php
printf(
_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 are <a> tags',
'duplicator'
),
'<a href="' . esc_url(LinkManager::getDocUrl('which-files-need-to-be-removed-after-an-install', 'migration-notice')) . '" target="_blank">',
'</a>'
);
?>
</p>
<p>
<b><i class="fa fa-thumbs-up"></i> <?php esc_html_e('Help Support Duplicator', 'duplicator'); ?>:</b>
<?php
_e('The Duplicator team has worked many years to make moving a WordPress site a much easier process. ', 'duplicator');
echo '<br/>';
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 are <a> tags',
'duplicator'
),
'<a href="' . esc_url(\Duplicator\Core\Notifications\Review::getReviewUrl()) . '" target="_blank">',
'</a>'
);
?>
</p>
</div>
</div>

View File

@@ -0,0 +1,85 @@
<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
use Duplicator\Core\MigrationMng;
use Duplicator\Libs\Snap\SnapUtil;
$safeMsg = MigrationMng::getSaveModeWarning();
$cleanupReport = MigrationMng::getCleanupReport();
$cleanFileAction = (sanitize_text_field(SnapUtil::filterInputRequest('action')) === 'installer');
?>
<div class="dup-notice-success notice notice-success duplicator-pro-admin-notice dup-migration-pass-wrapper">
<div class="dup-migration-pass-title">
<i class="fa fa-check-circle"></i> <?php
if (MigrationMng::getMigrationData('restoreBackupMode')) {
_e('This site has been successfully restored!', 'duplicator');
} else {
_e('This site has been successfully migrated!', 'duplicator');
}
?>
</div>
<p>
<?php printf(__('The following installation files are stored in the folder <b>%s</b>', 'duplicator'), DUP_Settings::getSsdirPath()); ?>
</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 ($cleanFileAction) {
require DUPLICATOR_LITE_PATH . '/views/parts/migration-clean-installation-files.php';
} else {
if (count($cleanupReport['instFile']) > 0) { ?>
<p>
<?php _e('Security actions:', 'duplicator'); ?>
</p>
<ul class="dup-stored-minstallation-files">
<?php
foreach ($cleanupReport['instFile'] as $html) { ?>
<li>
<?php echo $html; ?>
</li>
<?php } ?>
</ul>
<?php } ?>
<p>
<b><?php _e('Final step:', 'duplicator'); ?></b><br>
<span id="dpro-notice-action-remove-installer-files" class="link-style" onclick="Duplicator.Tools.deleteInstallerFiles();" >
<?php esc_html_e('Remove Installation Files Now!', 'duplicator'); ?>
</span>
</p>
<?php if (strlen($safeMsg) > 0) { ?>
<div class="notice-safemode">
<?php echo esc_html($safeMsg); ?>
</div>
<?php } ?>
<p class="sub-note">
<i><?php
_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'
);
?><br>
<i class="fas fa-info-circle"></i>
<?php
_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'
)
?>
</i>
</p>
<?php
}
echo apply_filters(MigrationMng::HOOK_BOTTOM_MIGRATION_MESSAGE, '');
?>
</div>