package_ui_created
if (isset($_REQUEST['_package_mysqldump_path'])) {
$mysqldump_exe_file = DupProSnapLibUtil::sanitize_non_stamp_chars_newline_and_trim($_REQUEST['_package_mysqldump_path']);
$mysqldump_exe_file = preg_match('/^([A-Za-z]\:)?[\/\\\\]/', $mysqldump_exe_file) ? $mysqldump_exe_file : '';
$mysqldump_exe_file = preg_replace('/[\'";]/m', '', $mysqldump_exe_file);
$_REQUEST['_package_mysqldump_path'] = DupProSnapLibIOU::safePathUntrailingslashit($mysqldump_exe_file);
}
//SAVE RESULTS
if (isset($_POST['action']) && $_POST['action'] == 'save') {
DUP_PRO_U::verifyNonce($_POST['_wpnonce'], Duplicator\Controllers\SettingsPageController::NONCE_ACTION);
//DATABASE
$global->setDbMode();
//ARCHIVE SETTINGS
DUP_PRO_U::initStorageDirectory();
$global->setArchiveMode();
//PROCESSING
$global->max_package_runtime_in_min = (int) $_POST['max_package_runtime_in_min'];
$global->server_load_reduction = (int) $_POST['server_load_reduction'];
switch (filter_input(INPUT_POST, 'installer_name_mode', FILTER_SANITIZE_STRING)) {
case DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_WITH_HASH:
$global->installer_name_mode = DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_WITH_HASH;
break;
case DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_SIMPLE:
default:
$global->installer_name_mode = DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_SIMPLE;
break;
}
$action_updated = $global->save();
$sglobal->save();
$global->adjust_settings_for_system();
}
$mysqlDumpPath = DUP_PRO_DB::getMySqlDumpPath();
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
$installerNameMode = $global->installer_name_mode;
class DUP_PRO_UI_Settings_General_Basic
{
public static function getShellZipMessage($hasShellZip = false)
{
if ($hasShellZip) {
DUP_PRO_U::esc_html_e('The "Shell Zip" mode allows Duplicator to use the server\'s internal zip command.');
echo '
';
DUP_PRO_U::esc_html_e('When available this mode is recommended over the PHP "ZipArchive" mode.');
} else {
$scanPath = DUP_PRO_Archive::getScanPaths();
if (count($scanPath) > 1) {
echo '';
echo " ";
echo DUP_PRO_U::__("This server is not configured for the Shell Zip engine - please use a different engine mode.");
echo '';
} else {
echo " ";
echo DUP_PRO_U::__("This server is not configured for the Shell Zip engine - please use a different engine mode.");
printf(DUP_PRO_U::__("Shell Zip is %s recommended %s when available. "), "", ' ');
printf(DUP_PRO_U::__("For a list of supported hosting providers %s click here %s."), "", ' ');
echo '';
//Show possible solutions for some linux setups
$problem_fixes = DUP_PRO_Zip_U::getShellExecZipProblems();
if (count($problem_fixes) > 0 && ((strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN'))) {
$shell_tooltip = ' ';
$shell_tooltip .= DUP_PRO_U::__("To make 'Shell Zip' available, ask your host to:");
echo '
';
$i = 1;
foreach ($problem_fixes as $problem_fix) {
$shell_tooltip .= "{$i}. {$problem_fix->fix}
";
$i++;
}
$shell_tooltip .= '
';
echo "{$shell_tooltip}";
}
}
}
}
public static function getMySQLDumpMessage($mysqlDumpFound = false, $mysqlDumpPath = '')
{
?>