removed ticketsystem; lots of work on cron stuff

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 13:09:14 +01:00
parent 903b775f79
commit 3ff20e327f
86 changed files with 3823 additions and 7421 deletions

View File

@@ -16,55 +16,39 @@
* @package Install
*
*/
use Froxlor\FroxlorLogger;
if (!defined('_CRON_UPDATE')) {
if (!defined('AREA')
|| (defined('AREA') && AREA != 'admin')
|| !isset($userinfo['loginname'])
|| (isset($userinfo['loginname']) && $userinfo['loginname'] == '')
) {
if (! defined('_CRON_UPDATE')) {
if (! defined('AREA') || (defined('AREA') && AREA != 'admin') || ! isset($userinfo['loginname']) || (isset($userinfo['loginname']) && $userinfo['loginname'] == '')) {
header('Location: ../index.php');
exit;
exit();
}
}
$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'));
$updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log'));
$filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'));
$filelog->setLogFile($updatelogfile);
$filelog = FroxlorLogger::getInstanceOf(array(
'loginname' => 'updater'
));
// if first writing does not work we'll stop, tell the user to fix it
// and then let him try again.
try {
$filelog->logAction(ADM_ACTION, LOG_WARNING, '-------------- START LOG --------------');
} catch(Exception $e) {
} catch (Exception $e) {
standard_error('exception', $e->getMessage());
}
/*
* since froxlor, we have to check if there's still someone
* out there using syscp and needs to upgrade
*/
if(!isFroxlor()) {
/**
* Upgrading SysCP to Froxlor-0.9
*/
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/upgrade_syscp.inc.php'));
}
if (isFroxlor()) {
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php'));
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.10/update_0.10.inc.php'));
if (\Froxlor\Froxlor::isFroxlor()) {
include_once (\Froxlor\FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/0.9/update_0.9.inc.php'));
include_once (\Froxlor\FileDir::makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/0.10/update_0.10.inc.php'));
// Check Froxlor - database integrity (only happens after all updates are done, so we know the db-layout is okay)
showUpdateStep("Checking database integrity");
$integrity = new IntegrityCheck();
if (!$integrity->checkAll()) {
if (! $integrity->checkAll()) {
lastStepStatus(1, 'Monkeys ate the integrity');
showUpdateStep("Trying to remove monkeys, feeding bananas");
if(!$integrity->fixAll()) {
if (! $integrity->fixAll()) {
lastStepStatus(2, 'Some monkeys just would not move, you should contact team@froxlor.org');
} else {
lastStepStatus(0, 'Integrity restored');