remove unused upgrade procedures, migrated a few minor functions and files to PDO database, fixed FROXLOR_INSTALL_DIR define for master-cronjob, fixes #1294

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-11-04 09:03:29 +01:00
parent e549ab2cbb
commit e3750a2988
7 changed files with 56 additions and 154 deletions

View File

@@ -22,7 +22,9 @@ showUpdateStep("Upgrading SysCP ".$settings['panel']['version']." to Froxlor ".
updateToVersion($updateto);
// add field frontend
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','frontend','".$frontend."')");
Database::query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` SET
`settinggroup` = 'panel',
`varname` = 'frontend',
`value` = 'froxlor'"
);
$settings['panel']['frontend'] = $frontend;
?>

View File

@@ -35,72 +35,14 @@ try {
* since froxlor, we have to check if there's still someone
* out there using syscp and needs to upgrade
*/
if(!isFroxlor())
{
/**
* First case: We are updating from a version < 1.0.10
*/
if(!isset($settings['panel']['version'])
|| (substr($settings['panel']['version'], 0, 3) == '1.0' && $settings['panel']['version'] != '1.0.10'))
{
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0 to 1.0.10");
include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0_1.0.10.inc.php'));
}
/**
* Second case: We are updating from version = 1.0.10
*/
if($settings['panel']['version'] == '1.0.10')
{
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0.10 to 1.2-beta1");
include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php'));
}
/**
* Third case: We are updating from a version > 1.2-beta1
*/
if(substr($settings['panel']['version'], 0, 3) == '1.2')
{
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2-beta1 to 1.2.19");
include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php'));
}
/**
* 4th case: We are updating from 1.2.19 to 1.2.20 (prolly the last from the 1.2.x series)
*/
if(substr($settings['panel']['version'], 0, 6) == '1.2.19')
{
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19 to 1.4");
include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2.19_1.4.inc.php'));
}
/**
* 5th case: We are updating from a version >= 1.4
*/
if(substr($settings['panel']['version'], 0, 3) == '1.4')
{
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4");
include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.4/update_1.4.inc.php'));
}
if(!isFroxlor()) {
/**
* Upgrading SysCP to Froxlor-0.9
*
* when we reach this part, all necessary updates
* should have been installes automatically by the
* update scripts.
*/
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/upgrade_syscp.inc.php'));
}
if(isFroxlor())
{
if (isFroxlor()) {
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php'));
$filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------');
unset($filelog);