2010-01-27 08:54:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file is part of the Froxlor project.
|
|
|
|
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
|
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the COPYING
|
|
|
|
* file that was distributed with this source code. You can also view the
|
|
|
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
|
|
*
|
|
|
|
* @copyright (c) the authors
|
|
|
|
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
|
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
|
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
|
|
* @package Install
|
2011-05-04 09:59:20 +00:00
|
|
|
*
|
2010-01-27 08:54:31 +00:00
|
|
|
*/
|
|
|
|
|
2013-11-04 12:28:23 +00:00
|
|
|
$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $settings);
|
2010-01-27 08:54:31 +00:00
|
|
|
|
2010-05-17 09:10:02 +00:00
|
|
|
$updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log'));
|
2010-05-17 08:26:55 +00:00
|
|
|
$filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'), $settings);
|
2010-05-17 09:10:02 +00:00
|
|
|
$filelog->setLogFile($updatelogfile);
|
2010-05-31 06:04:51 +00:00
|
|
|
|
|
|
|
// 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) {
|
|
|
|
standard_error('exception', $e->getMessage());
|
|
|
|
}
|
2010-05-17 08:26:55 +00:00
|
|
|
|
2010-01-27 08:54:31 +00:00
|
|
|
/*
|
|
|
|
* since froxlor, we have to check if there's still someone
|
|
|
|
* out there using syscp and needs to upgrade
|
|
|
|
*/
|
2013-11-04 08:03:29 +00:00
|
|
|
if(!isFroxlor()) {
|
2010-01-27 08:54:31 +00:00
|
|
|
/**
|
|
|
|
* Upgrading SysCP to Froxlor-0.9
|
|
|
|
*/
|
|
|
|
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/upgrade_syscp.inc.php'));
|
|
|
|
}
|
|
|
|
|
2013-11-04 08:03:29 +00:00
|
|
|
if (isFroxlor()) {
|
2010-01-27 08:54:31 +00:00
|
|
|
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php'));
|
2010-05-17 08:42:32 +00:00
|
|
|
$filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------');
|
2010-05-17 06:09:30 +00:00
|
|
|
unset($filelog);
|
2010-01-27 08:54:31 +00:00
|
|
|
}
|