• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/duplicator/installer/dup-installer/ctrls/classes/class.ctrl.extraction.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
                    if ((file_exists($wpconfig_ark_path) || (@file_exists("{$outer_root_path}/wp-config.php") && !@file_exists("{$outer_root_path}/wp-settings.php"))) && @file_exists("{$root_path}/wp-admin") && @file_exists("{$root_path}/wp-includes")) {
     
    1
    <?php
    2
    defined("DUPXABSPATH") or die("");
    3
    ​
    4
    class DUP_LITE_Extraction
    5
    {
    6
    ​
    7
        const ACTION_DO_NOTHING         = 'donothing';
    8
        const ACTION_REMOVE_ALL_FILES   = 'removeall';
    9
        const ACTION_REMOVE_WP_FILES    = 'removewpfiles';
    10
        const INPUT_NAME_ARCHIVE_ACTION = 'archive_action';
    11
    ​
    12
        public $archive_action                        = self::ACTION_DO_NOTHING;
    13
    ​
    14
        /**
    15
         *
    16
         * @var self
    17
         */
    18
        protected static $instance = null;
    19
    ​
    20
        /**
    21
         *
    22
         * @return self
    23
         */
    24
        public static function getInstance()
    25
        {
    26
            if (is_null(self::$instance)) {
    27
                self::$instance = new self;
    28
            }
    29
            return self::$instance;
    30
        }
    31
    ​
    32
        private function __construct()
    33
        {
    34
            $this->initData();
    35
        }
    36
    ​
    37
        /**
    38
         * inizialize extraction data
    39
         */
    40
        public function initData()
    41
        {
    42
            if ($_POST['archive_engine'] == 'manual') {
    43
                $GLOBALS['DUPX_STATE']->isManualExtraction = true;
    44
                $GLOBALS['DUPX_STATE']->save();
    45
            }
    46
        }
    47
    ​
    48
        /**
    49
         * 
    50
         * @param string[] $folders
    51
         */
    52
        protected function removeFiles($folders = array())
    53
        {
    54
            $archive_path = $GLOBALS['FW_PACKAGE_PATH'];
    55
    ​
    56
            $excludeFiles = array(
    57
                '/^'.preg_quote($archive_path, '/').'$/',
    58
                '/^'.preg_quote(DUPX_CSRF::getVal('bootLogFile'), '/').'$/',
    59
                '/^'.preg_quote(DUPX_CSRF::getVal('installerOrigPath'), '/').'$/',
    60
                '/^'.preg_quote($GLOBALS['DUPX_ROOT'].'/wp-config.php', '/').'$/'
    61
            );
    62
     
    63
            $excludeFolders = array(
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.