dblayout enhancements for backup-feature; added preconfig and updates for 2.1.x
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -223,6 +223,8 @@ CREATE TABLE `panel_customers` (
|
|||||||
`api_allowed` tinyint(1) NOT NULL default '1',
|
`api_allowed` tinyint(1) NOT NULL default '1',
|
||||||
`logviewenabled` tinyint(1) NOT NULL default '0',
|
`logviewenabled` tinyint(1) NOT NULL default '0',
|
||||||
`allowed_mysqlserver` text NOT NULL,
|
`allowed_mysqlserver` text NOT NULL,
|
||||||
|
`backup` int(11) NOT NULL default '1',
|
||||||
|
`access_backups` tinyint(1) NOT NULL default '1',
|
||||||
PRIMARY KEY (`customerid`),
|
PRIMARY KEY (`customerid`),
|
||||||
UNIQUE KEY `loginname` (`loginname`)
|
UNIQUE KEY `loginname` (`loginname`)
|
||||||
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;
|
||||||
@@ -1063,6 +1065,7 @@ CREATE TABLE `panel_usercolumns` (
|
|||||||
KEY customerid (customerid)
|
KEY customerid (customerid)
|
||||||
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_loginlinks`;
|
DROP TABLE IF EXISTS `panel_loginlinks`;
|
||||||
CREATE TABLE `panel_loginlinks` (
|
CREATE TABLE `panel_loginlinks` (
|
||||||
`hash` varchar(500) NOT NULL,
|
`hash` varchar(500) NOT NULL,
|
||||||
@@ -1072,6 +1075,27 @@ CREATE TABLE `panel_loginlinks` (
|
|||||||
UNIQUE KEY `loginname` (`loginname`)
|
UNIQUE KEY `loginname` (`loginname`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `panel_backup_storages`;
|
||||||
|
CREATE TABLE `panel_backup_storages` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`description` varchar(255) NOT NULL,
|
||||||
|
`type` varchar(255) NOT NULL DEFAULT 'local',
|
||||||
|
`region` varchar(255) NULL,
|
||||||
|
`bucket` varchar(255) NULL,
|
||||||
|
`destination_path` varchar(255) NOT NULL,
|
||||||
|
`hostname` varchar(255) NULL,
|
||||||
|
`username` varchar(255) NULL,
|
||||||
|
`password` varchar(255) NULL,
|
||||||
|
`pgp_public_key` varchar(255) NULL,
|
||||||
|
`retention` int(3) NOT NULL DEFAULT 3,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|
||||||
|
INSERT INTO `panel_backup_storages` (`id`, `description`, `destination_path`) VALUES
|
||||||
|
(1, 'Local backup storage', '/var/customers/backups');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_backups`;
|
DROP TABLE IF EXISTS `panel_backups`;
|
||||||
CREATE TABLE `panel_backups` (
|
CREATE TABLE `panel_backups` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
@@ -1079,6 +1103,8 @@ CREATE TABLE `panel_backups` (
|
|||||||
`customerid` int(11) NOT NULL,
|
`customerid` int(11) NOT NULL,
|
||||||
`loginname` varchar(255) NOT NULL,
|
`loginname` varchar(255) NOT NULL,
|
||||||
`size` bigint(20) NOT NULL,
|
`size` bigint(20) NOT NULL,
|
||||||
|
`storage_id` int(11) NOT NULL,
|
||||||
|
`filename` varchar(255) NOT NULL,
|
||||||
`created_at` int(15) NOT NULL,
|
`created_at` int(15) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|||||||
@@ -497,86 +497,3 @@ if (Froxlor::isFroxlorVersion('2.0.19')) {
|
|||||||
Update::showUpdateStep("Updating from 2.0.19 to 2.0.20", false);
|
Update::showUpdateStep("Updating from 2.0.19 to 2.0.20", false);
|
||||||
Froxlor::updateToVersion('2.0.20');
|
Froxlor::updateToVersion('2.0.20');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Froxlor::isDatabaseVersion('202304260')) {
|
|
||||||
Update::showUpdateStep("Cleaning domains table");
|
|
||||||
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` DROP COLUMN `ismainbutsubto`;");
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Update::showUpdateStep("Creating new tables and fields");
|
|
||||||
Database::query("DROP TABLE IF EXISTS `panel_loginlinks`;");
|
|
||||||
$sql = "CREATE TABLE `panel_loginlinks` (
|
|
||||||
`hash` varchar(500) NOT NULL,
|
|
||||||
`loginname` varchar(50) NOT NULL,
|
|
||||||
`valid_until` int(15) NOT NULL,
|
|
||||||
`allowed_from` text NOT NULL,
|
|
||||||
UNIQUE KEY `loginname` (`loginname`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
|
|
||||||
Database::query($sql);
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Update::showUpdateStep("Adjusting setting for deactivated webroot");
|
|
||||||
$current_deactivated_webroot = Settings::Get('system.deactivateddocroot');
|
|
||||||
if (empty($current_deactivated_webroot)) {
|
|
||||||
Settings::Set('system.deactivateddocroot', FileDir::makeCorrectDir(Froxlor::getInstallDir() . '/templates/misc/deactivated/'));
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
} else {
|
|
||||||
Update::lastStepStatus(1, 'Customized setting, not changing');
|
|
||||||
}
|
|
||||||
|
|
||||||
Update::showUpdateStep("Creating new tables and fields for backups");
|
|
||||||
Database::query("DROP TABLE IF EXISTS `panel_backups`;");
|
|
||||||
$sql = "CREATE TABLE `panel_backups` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`adminid` int(11) NOT NULL,
|
|
||||||
`customerid` int(11) NOT NULL,
|
|
||||||
`loginname` varchar(255) NOT NULL,
|
|
||||||
`size` bigint(20) NOT NULL,
|
|
||||||
`created_at` int(15) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
|
|
||||||
Database::query($sql);
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Update::showUpdateStep("Adding new backup settings");
|
|
||||||
Settings::AddNew('backup.enabled', 0);
|
|
||||||
Settings::AddNew('backup.type', 'Local');
|
|
||||||
Settings::AddNew('backup.region', '');
|
|
||||||
Settings::AddNew('backup.bucket', '');
|
|
||||||
Settings::AddNew('backup.destination_path', '/srv/backups/');
|
|
||||||
Settings::AddNew('backup.hostname', '');
|
|
||||||
Settings::AddNew('backup.username', '');
|
|
||||||
Settings::AddNew('backup.password', '');
|
|
||||||
Settings::AddNew('backup.pgp_public_key', '');
|
|
||||||
Settings::AddNew('backup.retention', 3);
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Update::showUpdateStep("Adjusting cronjobs");
|
|
||||||
Database::query("
|
|
||||||
UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET
|
|
||||||
`module`= 'froxlor/export',
|
|
||||||
`cronfile` = 'export',
|
|
||||||
`cronclass` = '\\Froxlor\\Cron\\System\\ExportCron',
|
|
||||||
`desc_lng_key` = 'cron_export'
|
|
||||||
WHERE `module` = 'froxlor/backup'
|
|
||||||
");
|
|
||||||
Database::query("
|
|
||||||
INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET
|
|
||||||
`module`= 'froxlor/backup',
|
|
||||||
`cronfile` = 'backup',
|
|
||||||
`cronclass` = '\\Froxlor\\Cron\\Backup\\BackupCron',
|
|
||||||
`interval` = '1 DAY',
|
|
||||||
`isactive` = '0',
|
|
||||||
`desc_lng_key` = 'cron_backup'
|
|
||||||
");
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Update::showUpdateStep("Adjusting system for data-export function");
|
|
||||||
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `varname` = 'exportenabled' WHERE `settinggroup`= 'system' AND `varname`= 'backupenabled");
|
|
||||||
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `value` = REPLACE(`value`, 'extras.backup', 'extras.export') WHERE `settinggroup` = 'panel' AND `varname` = 'customer_hide_options'");
|
|
||||||
Database::query("DELETE FROM `" . TABLE_PANEL_USERCOLUMNS . "` WHERE `section` = 'backup_list'");
|
|
||||||
Database::query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '20'");
|
|
||||||
Update::lastStepStatus(0);
|
|
||||||
|
|
||||||
Froxlor::updateToDbVersion('202305240');
|
|
||||||
}
|
|
||||||
138
install/updates/froxlor/update_2.1.inc.php
Normal file
138
install/updates/froxlor/update_2.1.inc.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you can also view it online at
|
||||||
|
* https://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org>
|
||||||
|
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Froxlor\Database\Database;
|
||||||
|
use Froxlor\FileDir;
|
||||||
|
use Froxlor\Froxlor;
|
||||||
|
use Froxlor\Install\Update;
|
||||||
|
use Froxlor\Settings;
|
||||||
|
|
||||||
|
if (!defined('_CRON_UPDATE')) {
|
||||||
|
if (!defined('AREA') || (defined('AREA') && AREA != 'admin') || !isset($userinfo['loginname']) || (isset($userinfo['loginname']) && $userinfo['loginname'] == '')) {
|
||||||
|
header('Location: ../../../../index.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Froxlor::isDatabaseVersion('202304260')) {
|
||||||
|
Update::showUpdateStep("Cleaning domains table");
|
||||||
|
Database::query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` DROP COLUMN `ismainbutsubto`;");
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Update::showUpdateStep("Creating new tables and fields");
|
||||||
|
Database::query("DROP TABLE IF EXISTS `panel_loginlinks`;");
|
||||||
|
$sql = "CREATE TABLE `panel_loginlinks` (
|
||||||
|
`hash` varchar(500) NOT NULL,
|
||||||
|
`loginname` varchar(50) NOT NULL,
|
||||||
|
`valid_until` int(15) NOT NULL,
|
||||||
|
`allowed_from` text NOT NULL,
|
||||||
|
UNIQUE KEY `loginname` (`loginname`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
|
||||||
|
Database::query($sql);
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Update::showUpdateStep("Adjusting setting for deactivated webroot");
|
||||||
|
$current_deactivated_webroot = Settings::Get('system.deactivateddocroot');
|
||||||
|
if (empty($current_deactivated_webroot)) {
|
||||||
|
Settings::Set('system.deactivateddocroot', FileDir::makeCorrectDir(Froxlor::getInstallDir() . '/templates/misc/deactivated/'));
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
} else {
|
||||||
|
Update::lastStepStatus(1, 'Customized setting, not changing');
|
||||||
|
}
|
||||||
|
|
||||||
|
Update::showUpdateStep("Creating new tables and fields for backups");
|
||||||
|
Database::query("DROP TABLE IF EXISTS `panel_backup_storages`;");
|
||||||
|
$sql = "CREATE TABLE `panel_backup_storages` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`description` varchar(255) NOT NULL,
|
||||||
|
`type` varchar(255) NOT NULL DEFAULT 'local',
|
||||||
|
`region` varchar(255) NULL,
|
||||||
|
`bucket` varchar(255) NULL,
|
||||||
|
`destination_path` varchar(255) NOT NULL,
|
||||||
|
`hostname` varchar(255) NULL,
|
||||||
|
`username` varchar(255) NULL,
|
||||||
|
`password` varchar(255) NULL,
|
||||||
|
`pgp_public_key` varchar(255) NULL,
|
||||||
|
`retention` int(3) NOT NULL DEFAULT 3,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
|
||||||
|
Database::query($sql);
|
||||||
|
Database::query("
|
||||||
|
INSERT INTO `panel_backup_storages` (`id`, `description`, `destination_path`) VALUES
|
||||||
|
(1, 'Local backup storage', '/var/customers/backups');
|
||||||
|
");
|
||||||
|
Database::query("DROP TABLE IF EXISTS `panel_backups`;");
|
||||||
|
$sql = "CREATE TABLE `panel_backups` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`adminid` int(11) NOT NULL,
|
||||||
|
`customerid` int(11) NOT NULL,
|
||||||
|
`loginname` varchar(255) NOT NULL,
|
||||||
|
`size` bigint(20) NOT NULL,
|
||||||
|
`storage_id` int(11) NOT NULL,
|
||||||
|
`filename` varchar(255) NOT NULL,
|
||||||
|
`created_at` int(15) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
|
||||||
|
Database::query($sql);
|
||||||
|
// add customer backup-target-storage
|
||||||
|
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `backup` int(11) NOT NULL default '1' AFTER `allowed_mysqlserver`;");
|
||||||
|
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `access_backups` tinyint(1) NOT NULL default '1' AFTER `backup`;");
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Update::showUpdateStep("Adding new backup settings");
|
||||||
|
Settings::AddNew('backup.enabled', 0);
|
||||||
|
Settings::AddNew('backup.default_storage', 1);
|
||||||
|
Settings::AddNew('backup.default_customer_access', 1);
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Update::showUpdateStep("Adjusting cronjobs");
|
||||||
|
Database::query("
|
||||||
|
UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET
|
||||||
|
`module`= 'froxlor/export',
|
||||||
|
`cronfile` = 'export',
|
||||||
|
`cronclass` = '\\Froxlor\\Cron\\System\\ExportCron',
|
||||||
|
`desc_lng_key` = 'cron_export'
|
||||||
|
WHERE `module` = 'froxlor/backup'
|
||||||
|
");
|
||||||
|
Database::query("
|
||||||
|
INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET
|
||||||
|
`module`= 'froxlor/backup',
|
||||||
|
`cronfile` = 'backup',
|
||||||
|
`cronclass` = '\\Froxlor\\Cron\\Backup\\BackupCron',
|
||||||
|
`interval` = '1 DAY',
|
||||||
|
`isactive` = '0',
|
||||||
|
`desc_lng_key` = 'cron_backup'
|
||||||
|
");
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Update::showUpdateStep("Adjusting system for data-export function");
|
||||||
|
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `varname` = 'exportenabled' WHERE `settinggroup`= 'system' AND `varname`= 'backupenabled");
|
||||||
|
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `value` = REPLACE(`value`, 'extras.backup', 'extras.export') WHERE `settinggroup` = 'panel' AND `varname` = 'customer_hide_options'");
|
||||||
|
Database::query("DELETE FROM `" . TABLE_PANEL_USERCOLUMNS . "` WHERE `section` = 'backup_list'");
|
||||||
|
Database::query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '20'");
|
||||||
|
Update::lastStepStatus(0);
|
||||||
|
|
||||||
|
Froxlor::updateToDbVersion('202305240');
|
||||||
|
}
|
||||||
@@ -30,7 +30,7 @@ use Froxlor\Install\Update;
|
|||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
|
|
||||||
$preconfig = [
|
$preconfig = [
|
||||||
'title' => '2.x updates',
|
'title' => '2.0.x updates',
|
||||||
'fields' => []
|
'fields' => []
|
||||||
];
|
];
|
||||||
$return = [];
|
$return = [];
|
||||||
43
install/updates/preconfig/preconfig_2.1.inc.php
Normal file
43
install/updates/preconfig/preconfig_2.1.inc.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you can also view it online at
|
||||||
|
* https://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org>
|
||||||
|
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Froxlor\Froxlor;
|
||||||
|
use Froxlor\FileDir;
|
||||||
|
use Froxlor\Config\ConfigParser;
|
||||||
|
use Froxlor\Install\Update;
|
||||||
|
use Froxlor\Settings;
|
||||||
|
|
||||||
|
$preconfig = [
|
||||||
|
'title' => '2.1.x updates',
|
||||||
|
'fields' => []
|
||||||
|
];
|
||||||
|
$return = [];
|
||||||
|
|
||||||
|
if (Update::versionInUpdate($current_version, '2.1.0-dev1')) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$preconfig['fields'] = $return;
|
||||||
|
return $preconfig;
|
||||||
@@ -53,7 +53,8 @@ try {
|
|||||||
if (Froxlor::isFroxlor()) {
|
if (Froxlor::isFroxlor()) {
|
||||||
|
|
||||||
include_once(FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/update_0.10.inc.php'));
|
include_once(FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/update_0.10.inc.php'));
|
||||||
include_once(FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/update_2.x.inc.php'));
|
include_once(FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/update_2.0.inc.php'));
|
||||||
|
include_once(FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/update_2.1.inc.php'));
|
||||||
|
|
||||||
// Check Froxlor - database integrity (only happens after all updates are done, so we know the db-layout is okay)
|
// Check Froxlor - database integrity (only happens after all updates are done, so we know the db-layout is okay)
|
||||||
Update::showUpdateStep("Checking database integrity");
|
Update::showUpdateStep("Checking database integrity");
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ class BackupCron extends FroxlorCron
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function handle($user, $data)
|
private static function handle(array $userdata)
|
||||||
{
|
{
|
||||||
echo "BackupCron: started - creating customer backup for user $user\n";
|
echo "BackupCron: started - creating customer backup for user " . $userdata['user'] . "\n";
|
||||||
|
|
||||||
echo $data . "\n";
|
echo $userdata['data'] . "\n";
|
||||||
|
|
||||||
sleep(rand(1, 3));
|
sleep(rand(1, 3));
|
||||||
|
|
||||||
echo "BackupCron: finished - creating customer backup for user $user\n";
|
echo "BackupCron: finished - creating customer backup for user " . $userdata['user'] . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user