403Webshell
Server IP : 192.64.118.117  /  Your IP : 3.148.113.167
Web Server : LiteSpeed
System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : thecgapy ( 1160)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/thecgapy/www/wp-content/plugins/duplicator/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/thecgapy/www/wp-content/plugins/duplicator/classes/class.plugin.upgrade.php
<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;

/**

 * Upgrade logic of plugin resides here

 */
class DUP_LITE_Plugin_Upgrade
{

    const DUP_VERSION_OPT_KEY = 'duplicator_version_plugin';

    public static function onActivationAction()
    {
        if (($oldDupVersion = get_option(self::DUP_VERSION_OPT_KEY, false)) === false) {
            self::newInstallation();
        } else {
            self::updateInstallation($oldDupVersion);
        }

        //Setup All Directories
        DUP_Util::initSnapshotDirectory();
    }

    protected static function newInstallation()
    {
        self::updateDatabase();

        update_option(DUP_UI_Notice::OPTION_KEY_INSTALLER_HASH_NOTICE, true);

        //WordPress Options Hooks
        update_option(self::DUP_VERSION_OPT_KEY, DUPLICATOR_VERSION);
    }

    protected static function updateInstallation($oldVersion)
    {
        self::updateDatabase();

        if (version_compare($oldVersion, '1.3.30', '<=')) {
            update_option(DUP_UI_Notice::OPTION_KEY_INSTALLER_HASH_NOTICE, true);
        }

        if (version_compare($oldVersion, '1.3.35', '<')) {
            update_option(DUP_UI_Notice::OPTION_KEY_NEW_STORAGE_POSITION, true);
            DUP_Settings::Set('storage_position', DUP_Settings::STORAGE_POSITION_LECAGY);
            DUP_Settings::Save();
        }

        //WordPress Options Hooks
        update_option(self::DUP_VERSION_OPT_KEY, DUPLICATOR_VERSION);
    }

    protected static function updateDatabase()
    {
        global $wpdb;

        $table_name = $wpdb->prefix."duplicator_packages";

        //PRIMARY KEY must have 2 spaces before for dbDelta to work
        //see: https://codex.wordpress.org/Creating_Tables_with_Plugins
        $sql = "CREATE TABLE `{$table_name}` (
			   id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
			   name VARCHAR(250) NOT NULL,
			   hash VARCHAR(50) NOT NULL,
			   status INT(11) NOT NULL,
			   created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
			   owner VARCHAR(60) NOT NULL,
			   package LONGTEXT NOT NULL,
			   PRIMARY KEY  (id),
			   KEY hash (hash))";

        $abs_path = duplicator_get_abs_path();
        require_once($abs_path.'/wp-admin/includes/upgrade.php');
        @dbDelta($sql);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit