defined("DUPXABSPATH") or die("");
class DUP_LITE_Extraction
const ACTION_DO_NOTHING = 'donothing';
const ACTION_REMOVE_ALL_FILES = 'removeall';
const ACTION_REMOVE_WP_FILES = 'removewpfiles';
const INPUT_NAME_ARCHIVE_ACTION = 'archive_action';
public $archive_action = self::ACTION_DO_NOTHING;
protected static $instance = null;
public static function getInstance()
if (is_null(self::$instance)) {
self::$instance = new self;
private function __construct()
public function initData()
if ($_POST['archive_engine'] == 'manual') {
$GLOBALS['DUPX_STATE']->isManualExtraction = true;
$GLOBALS['DUPX_STATE']->save();
protected function removeFiles($folders = array())
$archive_path = $GLOBALS['FW_PACKAGE_PATH'];
'/^'.preg_quote($archive_path, '/').'$/',
'/^'.preg_quote(DUPX_CSRF::getVal('bootLogFile'), '/').'$/',
'/^'.preg_quote(DUPX_CSRF::getVal('installerOrigPath'), '/').'$/',
'/^'.preg_quote($GLOBALS['DUPX_ROOT'].'/wp-config.php', '/').'$/'