Download all files FTP
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Controllers\SettingsPageController;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
$dbbuild_mode = DUP_PRO_DB::getBuildMode();
|
||||
$settingsPackageUrl = SettingsPageController::getInstance()->getMenuLink(SettingsPageController::L2_SLUG_PACKAGE);
|
||||
?>
|
||||
<div class="filter-db-tab-content">
|
||||
<?php $tplMng->render('parts/filters/tables_list_filter'); ?>
|
||||
<br/><br/>
|
||||
|
||||
<div class="dup-package-hdr-1">
|
||||
<?php esc_html_e("Configuration", 'duplicator-pro') ?>
|
||||
</div>
|
||||
|
||||
<div class="dup-form-item">
|
||||
<span class="title"><?php esc_html_e("SQL Mode", 'duplicator-pro') ?>:</span>
|
||||
<span class="input">
|
||||
<a href="<?php echo esc_url($settingsPackageUrl); ?>" target="settings">
|
||||
<?php echo esc_html($dbbuild_mode); ?>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="dup-form-item">
|
||||
<span class="title">
|
||||
<?php esc_html_e("Compatibility Mode", 'duplicator-pro') ?>:
|
||||
<?php
|
||||
$tipCont = __(
|
||||
'This is an advanced database backwards compatibility feature that should ONLY be used if having problems installing packages.
|
||||
If the database server version is lower than the version where the package was built then these options may help generate
|
||||
a script that is more compliant with the older database server. It is recommended to try each option separately starting with mysql40.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("Compatibility Mode", 'duplicator-pro'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($tipCont); ?>">
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($dbbuild_mode == 'MYSQLDUMP') :?>
|
||||
<?php
|
||||
$modes = isset($Package) ? explode(',', $Package->Database->Compatible) : array();
|
||||
$is_mysql40 = in_array('mysql40', $modes);
|
||||
$is_no_table = in_array('no_table_options', $modes);
|
||||
$is_no_key = in_array('no_key_options', $modes);
|
||||
$is_no_field = in_array('no_field_options', $modes);
|
||||
?>
|
||||
<div class="dup-form-horiz-opts">
|
||||
<span>
|
||||
<input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' : ''; ?> >
|
||||
<label for="dbcompat-mysql40"><?php esc_html_e("mysql40", 'duplicator-pro') ?></label>
|
||||
</span>
|
||||
<span>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="dbcompat[]"
|
||||
id="dbcompat-no_table_options"
|
||||
value="no_table_options"
|
||||
<?php echo $is_no_table ? 'checked="true"' : ''; ?>
|
||||
>
|
||||
<label for="dbcompat-no_table_options"><?php esc_html_e("no_table_options", 'duplicator-pro') ?></label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' : ''; ?>>
|
||||
<label for="dbcompat-no_key_options"><?php esc_html_e("no_key_options", 'duplicator-pro') ?></label>
|
||||
</span>
|
||||
<span>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="dbcompat[]"
|
||||
id="dbcompat-no_field_options"
|
||||
value="no_field_options"
|
||||
<?php echo $is_no_field ? 'checked="true"' : ''; ?>
|
||||
>
|
||||
<label for="dbcompat-no_field_options"><?php esc_html_e("no_field_options", 'duplicator-pro') ?></label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="dup-tabs-opts-help">
|
||||
<?php esc_html_e("Compatibility mode settings are not persistent. They must be enabled with every new build.", 'duplicator-pro'); ?>
|
||||
<a href="<?php echo esc_url(DUPLICATOR_PRO_DUPLICATOR_DOCS_URL . 'how-to-fix-database-write-issues');?>" target="_blank">
|
||||
[<?php esc_html_e('full overview', 'duplicator-pro'); ?>]
|
||||
</a>
|
||||
</div>
|
||||
<?php else :?>
|
||||
<i><?php esc_html_e("This option is only available with mysqldump mode.", 'duplicator-pro'); ?></i>
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Libs\Snap\SnapIO;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
?>
|
||||
<div class="filter-files-tab-content">
|
||||
<?php
|
||||
$uploads = wp_upload_dir();
|
||||
$upload_dir = SnapIO::safePath($uploads['basedir']);
|
||||
$content_path = defined('WP_CONTENT_DIR') ? SnapIO::safePath(WP_CONTENT_DIR) : '';
|
||||
?>
|
||||
|
||||
<?php $tplMng->render('parts/filters/package_components'); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Addons\ProBase\License\License;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
if (!is_multisite()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="filter-mu-tab-content <?php echo (License::can(License::CAPABILITY_MULTISITE_PLUS) ? '' : 'disabled');?>" >
|
||||
<div style="max-width:900px">
|
||||
<?php if (!License::can(License::CAPABILITY_MULTISITE_PLUS)) { ?>
|
||||
<div class="dpro-panel-optional-txt alert-disabled" style="text-align: center">
|
||||
<b><?php esc_html_e("Notice:", 'duplicator-pro'); ?></b>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__(
|
||||
'This option isn\'t available at the %1$s license level.',
|
||||
'duplicator-pro'
|
||||
),
|
||||
esc_html(License::getLicenseToString())
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html_x(
|
||||
'To enable this option %1$supgrade%2$s the License.',
|
||||
'%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator-pro'
|
||||
),
|
||||
'<a href="' . esc_url(License::getUpsellURL()) . '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
echo '<b>' . esc_html__("Overview:", 'duplicator-pro') . '</b><br/>';
|
||||
esc_html_e(
|
||||
"When you want to move a full multisite network or convert a subsite to a standalone site just
|
||||
create a standard package like you would with a single site.
|
||||
Then browse to the installer and choose either 'Restore entire multisite network' or 'Convert subsite into a standalone site'.
|
||||
These options will be present on Step 1 of the installer when restoring a Multisite package.",
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<table class="mu-opts">
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php esc_html_e("Included Sub-Sites", 'duplicator-pro'); ?>:</b><br/>
|
||||
<select name="mu-include[]" id="mu-include" multiple="true" class="mu-selector">
|
||||
<?php
|
||||
$subsites = License::can(License::CAPABILITY_MULTISITE_PLUS) ? DUP_PRO_MU::getSubsites() : array();
|
||||
foreach ($subsites as $site) {
|
||||
echo "<option value='" . (int) $site->id . "'>" . esc_html($site->domain . $site->path) . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" id="mu-exclude-btn" class="mu-push-btn"><i class="fa fa-chevron-right"></i></button>
|
||||
<br/>
|
||||
<button type="button" id="mu-include-btn" class="mu-push-btn"><i class="fa fa-chevron-left"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<b><?php esc_html_e("Excluded Sub-Sites", 'duplicator-pro'); ?>:</b><br/>
|
||||
<select name="mu-exclude[]" id="mu-exclude" multiple="true" class="mu-selector"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="dpro-panel-optional-txt" style="text-align: left">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__(
|
||||
"<u><b>Important:</b></u> Full network restoration is an installer option only if you include <b>all</b> subsites.
|
||||
If any subsites are filtered then you may only restore individual subsites as standalones sites at install-time.",
|
||||
'duplicator-pro'
|
||||
),
|
||||
array(
|
||||
'b' => array(),
|
||||
'u' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<br/>
|
||||
<br/>
|
||||
<?php
|
||||
esc_html_e(
|
||||
"This section allows you to control which sub-sites of a multisite network you want to include within your package.
|
||||
The 'Included Sub-Sites' will also be available to choose from at install time.",
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
esc_html_e(
|
||||
"By default all packages are included. The ability to exclude sub-sites are intended to help shrink your package if needed.",
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Installer\Package\ArchiveDescriptor;
|
||||
use Duplicator\Package\SettingsUtils;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
$secureOn = (isset($tplData['secureOn']) ? $tplData['secureOn'] : ArchiveDescriptor::SECURE_MODE_NONE);
|
||||
$securePass = (isset($tplData['securePass']) ? $tplData['securePass'] : '');
|
||||
|
||||
$unavaliableMessage = '';
|
||||
$encryptAvaliable = SettingsUtils::isArchiveEncryptionAvailable($unavaliableMessage);
|
||||
|
||||
?>
|
||||
<div class="archive-setup-tab" >
|
||||
<div class="dup-package-hdr-1">
|
||||
<?php esc_html_e('Security', 'duplicator-pro'); ?>
|
||||
</div>
|
||||
|
||||
<div class="dup-form-item">
|
||||
<span class="title">
|
||||
<?php esc_html_e('Mode', 'duplicator-pro') ?>:
|
||||
</span>
|
||||
<div class="input">
|
||||
<span class="secure-on-input-wrapper">
|
||||
<label class="margin-right-1" >
|
||||
<input
|
||||
type="radio"
|
||||
name="secure-on"
|
||||
id="secure-on-none"
|
||||
onclick="DupPro.EnableInstallerPassword()"
|
||||
required
|
||||
value="<?php echo (int) ArchiveDescriptor::SECURE_MODE_NONE; ?>"
|
||||
<?php checked($secureOn, ArchiveDescriptor::SECURE_MODE_NONE); ?>
|
||||
data-parsley-multiple="secure-on-mltiple-error"
|
||||
data-parsley-errors-container="#secure-on-parsely-error"
|
||||
>
|
||||
<?php esc_html_e('None', 'duplicator-pro') ?>
|
||||
</label>
|
||||
<label class="margin-right-1" >
|
||||
<input
|
||||
type="radio"
|
||||
name="secure-on"
|
||||
id="secure-on-inst-pwd"
|
||||
value="<?php echo (int) ArchiveDescriptor::SECURE_MODE_INST_PWD; ?>"
|
||||
<?php checked($secureOn, ArchiveDescriptor::SECURE_MODE_INST_PWD); ?>
|
||||
onclick="DupPro.EnableInstallerPassword()"
|
||||
data-parsley-multiple="secure-on-mltiple-error"
|
||||
>
|
||||
<?php esc_html_e('Installer password', 'duplicator-pro') ?>
|
||||
</label>
|
||||
<label <?php echo ($encryptAvaliable ? '' : 'class="silver"'); ?>>
|
||||
<input
|
||||
type="radio"
|
||||
name="secure-on"
|
||||
id="secure-on-arc-encrypt"
|
||||
value="<?php echo (int) ArchiveDescriptor::SECURE_MODE_ARC_ENCRYPT; ?>"
|
||||
<?php echo ($encryptAvaliable ? checked($secureOn, ArchiveDescriptor::SECURE_MODE_ARC_ENCRYPT, false) : ''); ?>
|
||||
onclick="DupPro.EnableInstallerPassword()"
|
||||
<?php disabled(!$encryptAvaliable); ?>
|
||||
data-parsley-multiple="secure-on-mltiple-error"
|
||||
>
|
||||
<?php esc_html_e('Archive encryption', 'duplicator-pro') ?>
|
||||
</label>
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e('Security', 'duplicator-pro'); ?>"
|
||||
data-tooltip="<?php $tplMng->renderEscAttr('admin_pages/packages/setup/security-tooltip-content'); ?>">
|
||||
</i>
|
||||
</span>
|
||||
<div id="secure-on-parsely-error"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dup-form-item">
|
||||
<span class="title">
|
||||
<?php esc_html_e('Password', 'duplicator-pro') ?>:
|
||||
</span>
|
||||
<div class="input">
|
||||
<span class="dup-password-toggle">
|
||||
<input
|
||||
id="secure-pass"
|
||||
type="password"
|
||||
name="secure-pass"
|
||||
required="required"
|
||||
size="50"
|
||||
maxlength="150"
|
||||
value="<?php echo esc_attr($securePass); ?>"
|
||||
>
|
||||
<button type="button" >
|
||||
<i class="fas fa-eye fa-sm"></i>
|
||||
</button>
|
||||
</span>
|
||||
<div class="input dup-tabs-opts-help-secure-pass">
|
||||
<?php
|
||||
esc_html_e(
|
||||
'Caution: Passwords are case-sensitive and if lost cannot be recovered. Please keep passwords in a safe place!',
|
||||
'duplicator-pro'
|
||||
);
|
||||
echo '<br/>';
|
||||
esc_html_e(
|
||||
'If this password is lost then a new archive file will need to be created.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!$encryptAvaliable) { ?>
|
||||
<div class="dup-form-item">
|
||||
<span class="title">
|
||||
|
||||
</span>
|
||||
<span class="input dup-tabs-opts-notice">
|
||||
<i>
|
||||
<i class="fas fa-exclamation-triangle fa-xs"></i>
|
||||
<?php
|
||||
echo esc_html__("The security mode 'Archive encryption' option above is currently disabled on this server.", 'duplicator-pro') . '<br>'
|
||||
. esc_html($unavaliableMessage);
|
||||
?>
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
DupPro.EnableInstallerPassword = function () {
|
||||
let $button = $('#secure-btn');
|
||||
let secureOnVal = $('.secure-on-input-wrapper input:checked').val();
|
||||
|
||||
if (secureOnVal == <?php echo json_encode(ArchiveDescriptor::SECURE_MODE_NONE); ?>) {
|
||||
$('#secure-pass').removeAttr('required');
|
||||
$('#secure-pass').attr('readonly', true);
|
||||
$('#dpro-install-secure-lock').hide();
|
||||
$button.prop('disabled', true);
|
||||
} else {
|
||||
$('#secure-pass').attr('readonly', false);
|
||||
$('#secure-pass').attr('required', 'true').focus();
|
||||
$('#dpro-install-secure-lock').show();
|
||||
$button.prop('disabled', false);
|
||||
}
|
||||
};
|
||||
|
||||
$('#secure-on-none').parsley().on('field:error', function() {
|
||||
$('.archive-setup-tab button').trigger('click');
|
||||
$('html,body').animate({scrollTop: $(".archive-setup-tab").offset().top - 30},'slow');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Installer\Core\Descriptors\ArchiveConfig;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
echo esc_html(
|
||||
__('When enabled the archive file will be encrypted with a password that is required to open.', 'duplicator-pro') . ' ' .
|
||||
__('The installer will also prompt for the password at install time.', 'duplicator-pro') . ' ' .
|
||||
__('Encryption is a general deterrent and should not be substituted for properly keeping your files secure.', 'duplicator-pro') . ' ' .
|
||||
__('Be sure to remove all installer files when the install process is completed.', 'duplicator-pro')
|
||||
);
|
||||
?>
|
||||
<ul>
|
||||
<li>
|
||||
<b>
|
||||
<?php esc_html_e('None:', 'duplicator-pro'); ?>
|
||||
</b>
|
||||
<?php esc_html_e(
|
||||
"No protection system activated! The installer or archive files can be accessed by any resource that knows the full URL to either file.",
|
||||
'duplicator-pro'
|
||||
); ?>
|
||||
</li>
|
||||
<li>
|
||||
<b>
|
||||
<?php esc_html_e('Installer password:', 'duplicator-pro'); ?>
|
||||
</b>
|
||||
<?php esc_html_e(
|
||||
'The archive is NOT encrypted. When the installer starts, it will prompt for a password to prevent anyone from running the installer.',
|
||||
'duplicator-pro'
|
||||
); ?>
|
||||
</li>
|
||||
<li>
|
||||
<b>
|
||||
<?php esc_html_e('Archive encryption:', 'duplicator-pro'); ?>
|
||||
</b>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'The archive IS encrypted with a password, and the installer will ask for a password when started.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
esc_html_e(
|
||||
'This option is the recommended maximum level of security.',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user