\Duplicator\Addons\ProBase\License\License::isFreelancer(), 'display_brand' => false, 'pending_cancelled_package_ids' => DUP_PRO_Package::get_pending_cancellations(), 'rowCount' => 0, 'package_ui_created' => null ); if (isset($_REQUEST['create_from_temp'])) { //Takes temporary package and inserts it into the package table $package = DUP_PRO_Package::get_temporary_package(false); if ($package != null) { $package->save(); } unset($_REQUEST['create_from_temp']); unset($package); } $system_global = DUP_PRO_System_Global_Entity::get_instance(); if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'stop-build') { $package_id = (int) $_REQUEST['action-parameter']; DUP_PRO_LOG::trace("stop build of $package_id"); $action_package = DUP_PRO_Package::get_by_id($package_id); if ($action_package != null) { DUP_PRO_LOG::trace("set $action_package->ID for cancel"); $action_package->set_for_cancel(); } else { DUP_PRO_LOG::trace("could not find package so attempting hard delete. Old files may end up sticking around although chances are there isnt much if we couldnt nicely cancel it."); $result = DUP_PRO_Package::force_delete($package_id); ($result) ? DUP_PRO_LOG::trace("Hard delete success") : DUP_PRO_LOG::trace("Hard delete failure"); } unset($action_package); } else if ($_REQUEST['action'] == 'clear-messages') { $system_global->clear_recommended_fixes(); $system_global->save(); } } $totalElements = $wpdb->get_var("SELECT count(id) as totalElements FROM `{$wpdb->base_prefix}duplicator_pro_packages`"); $statusActive = $wpdb->get_var("SELECT count(id) as totalElements FROM `{$wpdb->base_prefix}duplicator_pro_packages` WHERE status < 100 and status > 0"); $pager = new DUP_PRO_Package_Pagination(); $per_page = $pager->get_per_page(); $current_page = ($statusActive >= 1) ? 1 : $pager->get_pagenum(); $offset = ( $current_page - 1 ) * $per_page; $global = DUP_PRO_Global_Entity::get_instance(); $active_package_present = DUP_PRO_Package::is_active_package_present(); $orphan_info = DUP_PRO_Server::getOrphanedPackageInfo(); $orphan_display_msg = ($orphan_info['count'] ? 'display: block' : 'display: none'); $recommended_text_fix_present = false; $user_id = get_current_user_id(); $packagesViewData['package_ui_created'] = is_numeric(get_user_meta($user_id, 'duplicator_pro_created_format', true)) ? get_user_meta($user_id, 'duplicator_pro_created_format', true) : 1; //Old option was $global->package_ui_created if (count($system_global->recommended_fixes) > 0) { foreach ($system_global->recommended_fixes as $fix) { /* @var $fix DUP_PRO_Recommended_Fix */ if (in_array($fix->recommended_fix_type, array( DUP_PRO_Recommended_Fix_Type::Text, DUP_PRO_Recommended_Fix_Type::QuickFix ), true) !== false) { $recommended_text_fix_present = true; } } } if (isset($_SERVER['AUTH_TYPE']) && $_SERVER['AUTH_TYPE'] == 'Basic' && !$global->basic_auth_enabled) { $recommended_text_fix_present = true; $system_global->add_recommended_quick_fix('Set authentication username and password', 'Automatically set basic auth username and password', array( 'special' => array( 'set_basic_auth' => 1 ) ) ); } if (isset($_GET['dpro_show_error'])) { $recommended_text_fix_present = true; // $system_global->add_recommended_text_fix('Test Error', 'Test fix recommendation'); $system_global->add_recommended_quick_fix('Activate DUP Archive', 'TEST: Switch to DUP archive. Click on button to fix this!', array( 'global' => array( 'archive_build_mode' => 3 ) ) ); $system_global->add_recommended_quick_fix('Activate ZIP Archive', 'TEST: Switch to ZIP archive. Click on button to fix this!', array( 'global' => array( 'archive_build_mode' => 2 ) ) ); $system_global->add_recommended_quick_fix('Activate SHELL Archive', 'TEST: Switch to Shell ZIP archive. Click on button to fix this!', array( 'global' => array( 'archive_build_mode' => 1 ) ) ); //special:{stuck_5percent_pending_fix:1} $system_global->add_recommended_quick_fix('Test Fix', 'Let\'s fix something special', array( 'special' => array( 'stuck_5percent_pending_fix' => 1 ) ) ); } if ($global->installer_name_mode == DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_SIMPLE) { $packageExeNameModeMsg = DUP_PRO_U::__("When clicking the Installer download button, the 'Save as' dialog is currently defaulting the name to 'installer.php'. " ."To improve the security and get more information, go to: Settings > Packages Tab > Installer > Name option or click on the gear icon at the top of this page."); } else { $packageExeNameModeMsg = DUP_PRO_U::__("When clicking the Installer download button, the 'Save as' dialog is defaulting the name to '[name]_[hash]_[date]_installer.php'. " ."This is the secure and recommended option. For more information, go to: Settings > Packages Tab > Installer > Name or click on the gear icon at the top of this page.

" ."To quickly copy the hashed installer name, to your clipboard use the copy icon link or click the installer name and manually copy the selected text."); } $max_pack_store = isset($global->max_default_store_files) ? intval($global->max_default_store_files) : 0; $delete_nonce = wp_create_nonce('duplicator_pro_package_delete'); $gift_nonce = wp_create_nonce('DUP_PRO_CTRL_Package_toggleGiftFeatureButton'); ?>

'; $orphan_msg .= DUP_PRO_U::__('Go to: Tools > Diagnostics > Stored Data > look for the [Delete Package Orphans] button for more details.').'
'; $orphan_msg .= ''.DUP_PRO_U::__('Take me there now!').''; printf($orphan_msg, $orphan_info['count'], DUP_PRO_U::byteSize($orphan_info['size'])); ?>

" onclick="DupPro.Pack.ConfirmDelete()"> " onclick="jQuery('#contextual-help-link').trigger('click')"> "> "> "> dupHidePackagesGiftFeatures) ? true : (!DUPLICATOR_PRO_GIFT_THIS_RELEASE === $global->dupHidePackagesGiftFeatures)) : ?> ">
ID); $isRecoverPoint = !DUP_PRO_CTRL_recovery::isDisallow() && DUP_PRO_Package_Recover::getRecoverPackageId() === $Package->ID; if (is_object($Package)) { $pack_name = $Package->Name; $pack_archive_size = $Package->Archive->Size; $pack_namehash = $Package->NameHash; $pack_dbonly = $Package->Archive->ExportOnlyDB; $pack_format = strtolower($Package->Archive->Format); $brand = (isset($Package->Brand) && !empty($Package->Brand) && is_string($Package->Brand) ? $Package->Brand : 'unknown'); } else { $pack_archive_size = 0; $pack_name = 'unknown'; $pack_namehash = 'unknown'; $brand = 'unknown'; } //Links $uniqueid = $Package->NameHash; $remote_display = $Package->contains_non_default_storage(); $storage_problem = $Package->transferWasInterrupted(); $archive_exists = ($Package->get_local_package_file(DUP_PRO_Package_File_Type::Archive, true) != null); $installer_exists = ($Package->get_local_package_file(DUP_PRO_Package_File_Type::Installer, true) != null); $archive_exists_txt = ($archive_exists) ? '' : DUP_PRO_U::__("No local files, click for more info..."); $package_type_style = ''; $progress_error = ''; $remote_style = ''; if ($remote_display) { $remote_style = ($storage_problem) ? 'remote-data-fail' : 'remote-data-pass'; } if ($isRecoverPoint) { $rowClasses[] = 'dpro-recovery-package'; } $archive_name = $Package->Archive->File; $archiveDownloadInfoJson = DupProSnapJsonU::json_encode_esc_attr($Package->getPackageFileDownloadInfo(DUP_PRO_Package_File_Type::Archive)); $installerDownloadInfoJson = DupProSnapJsonU::json_encode_esc_attr($Package->getInstallerDownloadInfo()); $installer_name = $Package->get_installer_filename(); switch ($Package->Type) { case DUP_PRO_PackageType::MANUAL: $package_type_string = DUP_PRO_U::__('Manual'); break; case DUP_PRO_PackageType::SCHEDULED: $package_type_string = DUP_PRO_U::__('Schedule'); break; case DUP_PRO_PackageType::RUN_NOW: $package_type_style = 'style="padding-top:8px"'; $package_type_string = ''.DUP_PRO_U::__('Schedule').' R'; break; default: $package_type_string = DUP_PRO_U::__('Unknown'); break; } if ($Package->Status >= DUP_PRO_PackageStatus::COMPLETE) : ?> Status < DUP_PRO_PackageStatus::COPIEDPACKAGE) { // In the process of building $size = 0; $tmpSearch = glob(DUPLICATOR_PRO_SSDIR_PATH_TMP."/{$pack_namehash}_*"); if (is_array($tmpSearch)) { $result = @array_map('filesize', $tmpSearch); $size = array_sum($result); } $pack_archive_size = $size; } // If its in the pending cancels consider it stopped if (in_array($Package->ID, $packagesViewData['pending_cancelled_package_ids'])) { $status = DUP_PRO_PackageStatus::PENDING_CANCEL; } else { $status = $Package->Status; } if ($status >= 0) { $progress_css = 'run'; if ($status >= 75) { $stop_button_text = DUP_PRO_U::__('Stop Transfer'); $progress_html = "0%" .""; } else if ($status > 0) { $stop_button_text = DUP_PRO_U::__('Stop Build'); $progress_html = "{$status}%"; } else { // In a pending state $stop_button_text = DUP_PRO_U::__('Cancel Pending'); $progress_html = " "; } } else { /** FAILURES AND CANCELLATIONS * */ $progress_css = 'fail'; if ($status == DUP_PRO_PackageStatus::ERROR) { $progress_error = '
'.DUP_PRO_U::__('Error Processing')."
"; } else if ($status == DUP_PRO_PackageStatus::BUILD_CANCELLED) { $progress_error = '
'.DUP_PRO_U::__('Build Cancelled')."
"; } else if ($status == DUP_PRO_PackageStatus::PENDING_CANCEL) { $progress_error = '
'.DUP_PRO_U::__('Cancelling Build')."
"; } else if ($status == DUP_PRO_PackageStatus::REQUIREMENTS_FAILED) { $package_id = $Package->ID; $package = DUP_PRO_Package::get_by_id($package_id); $package_log_store_dir = trailingslashit(dirname($package->StorePath)); $is_txt_log_file_exist = file_exists("{$package_log_store_dir}{$package->NameHash}_log.txt"); if ($is_txt_log_file_exist) { $link_log = "{$package->StoreURL}{$package->NameHash}_log.txt"; } else { // .log is for backward compatibility $link_log = "{$package->StoreURL}{$package->NameHash}.log"; } $progress_error = '
'.DUP_PRO_U::__('Requirements Failed')."
"; } } ?> = DUP_PRO_PackageStatus::PRE_PROCESS) : ?> DUP_PRO_PackageStatus::PRE_PROCESS) : ?>
" style="margin-left:15px" onClick="DupPro.Pack.SetDeleteAll()" /> " data-tooltip="" >


 
>   DB    Created, $packagesViewData['package_ui_created']); ?> installer_name_mode) { case DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_SIMPLE: $lockIcon = 'fa-lock-open'; $installerToolTipTitle = sprintf(DUP_PRO_U::__('Using standard installer name. To improve security, switch to hashed change in %2$s'), get_admin_url(null, 'admin.php?page=duplicator-pro-settings&tab=package'), DUP_PRO_U::__('Settings')); break; case DUP_PRO_Global_Entity::INSTALLER_NAME_MODE_WITH_HASH: default: $lockIcon = 'fa-lock'; $installerToolTipTitle = DUP_PRO_U::__('Using more secure, hashed installer name.'); break; } $installerName = $Package->get_inst_download_name(); ?>
Type == DUP_PRO_PackageType::MANUAL) ? DUP_PRO_U::__('Manual') : DUP_PRO_U::__('Schedule')); ?> Created, $packagesViewData['package_ui_created']); ?> get_display_size(); ?> DB" : $pack_name; ?> = DUP_PRO_PackageStatus::STORAGE_PROCESSING) : ?>
".DUP_PRO_U::__("Building Package")." {$progress_html}
"; echo ''.DUP_PRO_U::__("Please allow it to finish before creating another one.").'' ?>
".DUP_PRO_U::__("Transferring Package")." {$progress_html}
"; echo ''.DUP_PRO_U::__("Getting Transfer State...").'' ?>
" data-tooltip=' Storage > Default > Max Packages and change the value, otherwise this note can be ignored.'), absint($max_pack_store)); ?>'>
'.DUP_PRO_U::__("Time").': '; ?>
$per_page) : ?>
0) : ?>
display_pagination($totalElements, $per_page); ?>
width = 750; $remoteDlg->height = 450; $remoteDlg->title = DUP_PRO_U::__('Remote Storage Locations'); $remoteDlg->message = DUP_PRO_U::__('Loading Please Wait...'); $remoteDlg->initAlert(); $alert1 = new DUP_PRO_UI_Dialog(); $alert1->title = DUP_PRO_U::__('Bulk Action Required'); $alert1->message = ' '; $alert1->message .= DUP_PRO_U::__('No selections made! Please select an action from the "Bulk Actions" drop down menu!'); $alert1->initAlert(); $alert2 = new DUP_PRO_UI_Dialog(); $alert2->title = DUP_PRO_U::__('Selection Required'); $alert2->wrapperClassButtons = 'dpro-dlg-nopackage-sel-bulk-action-btns'; $alert2->message = ' '; $alert2->message .= DUP_PRO_U::__('No selections made! Please select at least one package to delete!'); $alert2->initAlert(); $alert3 = new DUP_PRO_UI_Dialog(); $alert3->title = DUP_PRO_U::__('Alert!'); $alert3->message = DUP_PRO_U::__('A package is being processed. Retry later.'); $alert3->initAlert(); $alert4 = new DUP_PRO_UI_Dialog(); $alert4->title = DUP_PRO_U::__('ERROR!'); $alert4->message = DUP_PRO_U::__('Got an error or a warning: undefined'); $alert4->initAlert(); $alert5 = new DUP_PRO_UI_Dialog(); $alert5->title = $alert4->title; $alert5->message = DUP_PRO_U::__('Failed to get details.'); $alert5->initAlert(); $alert6 = new DUP_PRO_UI_Dialog(); $alert6->height = 300; $alert6->title = DUP_PRO_U::__('Download Status'); $alert6->message = DUP_PRO_U::__("No package files are available for direct download from this server using the 'Download' button. Please use the " ." More Items ❯ Storage option to get the package from its non-default stored location.

" ."- To enable the direct download button be sure the local default storage type is enabled when creating a package.

" ."- If the Storage ❯ Default ❯ 'Max Packages' is set then packages will be removed but the entry will still be visible.
"); $alert6->initAlert(); $confirm1 = new DUP_PRO_UI_Dialog(); $confirm1->title = DUP_PRO_U::__('Delete Packages?'); $confirm1->wrapperClassButtons = 'dpro-dlg-detete-packages-btns'; $confirm1->message = DUP_PRO_U::__('Are you sure you want to delete the selected package(s)?'); $confirm1->message .= '
'; $confirm1->message .= DUP_PRO_U::__('Note: This action removes only packages located on this server. If a remote package was created then it will not be removed or affected.'); $confirm1->progressText = DUP_PRO_U::__('Removing Packages, Please Wait...'); $confirm1->jsCallback = 'DupPro.Pack.Delete()'; $confirm1->initConfirm(); $confirmRestoreBk = new DUP_PRO_UI_Dialog(); $confirmRestoreBk->title = DUP_PRO_U::__('Restore selected backup?'); $confirmRestoreBk->wrapperClassButtons = 'dpro-dlg-restore-bk-btns'; $confirmRestoreBk->message = DUP_PRO_U::__('Are you sure you want restore the selected package backup ?'); $confirmRestoreBk->message .= '
'; $confirmRestoreBk->message .= DUP_PRO_U::__('This function runs the installer of the selected package by deleting all the current data of the site.

' .'Once the operation has started there is no possibility to go back and the restore of the backup must be terminated otherwise the site will not be reachable.'); $confirmRestoreBk->jsCallback = 'DupPro.Pack.BackupRestore();'; $confirmRestoreBk->initConfirm(); $storageTabURL = DupProSnapLibURLU::appendQueryValue(DUP_PRO_U::getMenuPageURL(DUP_PRO_Constants::$STORAGE_SUBMENU_SLUG, false), 'tab', 'storage'); $tempStorageEditURLWithOutStorageId = DupProSnapLibURLU::appendQueryValue($storageTabURL, 'inner_page', 'edit'); ?>