EVOLUTION-MANAGER
Edit File: class.constants.php
<?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; /** * @copyright 2016 Snap Creek LLC */ class DUP_PRO_Constants { const PLUGIN_SLUG = 'duplicator-pro'; const DAYS_TO_RETAIN_DUMP_FILES = 1; const ZIPPED_LOG_FILENAME = 'duplicator_pro_log.zip'; const ZIP_MAX_FILE_DESCRIPTORS = 50; // How many file descriptors are allowed to be outstanding (addfile has issues) const ZIP_STRING_LIMIT = 500000; // Cutoff for using ZipArchive addtostring vs addfile const TEMP_CLEANUP_SECONDS = 900; // 15 min = How many seconds to keep temp files around when delete is requested const IMPORTS_CLEANUP_SECS = 86400; // 24 hours - how old files in import directory can be before getting cleane up const MAX_LOG_SIZE = 400000; // The higher this is the more overhead const LICENSE_KEY_OPTION_NAME = 'duplicator_pro_license_key'; const MAX_BUILD_RETRIES = 15; // Max number of tries doing the same part of the package before auto cancelling const EDD_API_CACHE_TIME = 86400; // 24 hours const UNLICENSED_SUPER_NAG_DELAY_IN_DAYS = 30; const PACKAGE_CHECK_TIME_IN_SEC = 10; const DEFAULT_MAX_PACKAGE_RUNTIME_IN_MIN = 90; const ORPAHN_CLEANUP_DELAY_MAX_PACKAGE_RUNTIME = 60; //SVG Icon: See https://websemantics.uk/tools/image-to-data-uri-converter/ //older version //const ICON_SVG = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIw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DEwLjM3NCwwLjUyMw0KCQkJYzMuMzA0LDAsNi42MDctMC4xNjIsOS45LTAuNDc5bDEzLjM2NSwyMC4zMzVsMTcuMzQ3LTQuNjQ2bDEuMzk5LTI0LjIwMmM2LjA3My0yLjcyNSwxMS45MzEtNi4wNzcsMTcuNDg2LTEwLjAzOGwyMS44MzEsMTAuOTc0DQoJCQlsMTIuNjk5LTEyLjY5OGwtMTAuOTEtMjEuNzAxYzQuMDEyLTUuNTIxLDcuMzk2LTExLjM1MiwxMC4xNjktMTcuMzk4bDI0LjM2OS0xLjQwOGw0LjY0OS0xNy4zNDhsLTIwLjI0Mi0xMy4zDQoJCQljMC43MDgtNi43MzYsMC43ODQtMTMuNTIzLDAuMTY0LTIwLjI2NmwyMC4yODUtMTMuMzI4bC00LjY0OC0xNy4zNDhsLTIzLjMyNC0xLjM0OWwtMC4yMjcsMC44MjVsLTkuMTA3LDMzLjE3NQ0KCQkJYzIuMTI3LDI0LjMzMi02LjEwNCw0OS40MDEtMjQuNzI5LDY4LjAyNGMtMTYuNzA5LDE2LjcxLTM4LjYwNCwyNS4wNjEtNjAuNTAxLDI1LjA2MWMtMTMuOTk4LDAtMjcuOTk1LTMuNDEtNDAuNjQzLTEwLjIyOQ0KCQkJTDIwNS40OCw4Ny45ODRsMi41ODYsMzIuMzU2TDIyOS4wMTUsNDQuMDM2TDIyOS4wMTUsNDQuMDM2eiIvPg0KCTwvZz4NCjwvZz4NCjwvc3ZnPg0K'; /* Pseudo constants */ public static $PACKAGES_SUBMENU_SLUG; public static $IMPORT_SUBMENU_SLUG; public static $SCHEDULES_SUBMENU_SLUG; public static $STORAGE_SUBMENU_SLUG; public static $TEMPLATES_SUBMENU_SLUG; public static $TOOLS_SUBMENU_SLUG; public static $SETTINGS_SUBMENU_SLUG; public static $DEBUG_SUBMENU_SLUG; public static $LOCKING_FILE_FILENAME; public static $IMPORT_INSTALLER_PAGE; // SQL CONSTANTS const DEFAULT_PHP_DUMP_CHUNK_SIZE = 500; const DEFAULT_MYSQL_DUMP_CHUNK_SIZE = 131072; // 128K const MYSQL_DUMP_CHUNK_SIZE_MIN_LIMIT = 1024; const MYSQL_DUMP_CHUNK_SIZE_MAX_LIMIT = 1046528; public static function init() { self::$PACKAGES_SUBMENU_SLUG = self::PLUGIN_SLUG; self::$IMPORT_SUBMENU_SLUG = self::PLUGIN_SLUG.'-import'; self::$SCHEDULES_SUBMENU_SLUG = self::PLUGIN_SLUG.'-schedules'; self::$STORAGE_SUBMENU_SLUG = self::PLUGIN_SLUG.'-storage'; self::$TEMPLATES_SUBMENU_SLUG = self::PLUGIN_SLUG.'-templates'; self::$TOOLS_SUBMENU_SLUG = self::PLUGIN_SLUG.'-tools'; self::$SETTINGS_SUBMENU_SLUG = self::PLUGIN_SLUG.'-settings'; self::$DEBUG_SUBMENU_SLUG = self::PLUGIN_SLUG.'-debug'; self::$IMPORT_INSTALLER_PAGE = self::PLUGIN_SLUG.'-import-installer'; self::$LOCKING_FILE_FILENAME = DUPLICATOR_PRO_PLUGIN_PATH.'/dup_pro_lock.bin'; } public static function getPhpDumpChunkSizes() { return array("20", "100", "500", "1000", "2000"); } public static function getMysqlDumpChunkSizes() { return array( "8192" => '8k', "32768" => '32K', "131072" => '128K', "524288" => '512K', "1046528" => '1M'); } }