- fix update from syscp-trunk (current rev 2739), fixes #27
This commit is contained in:
@@ -22,6 +22,22 @@ if($page == 'overview')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
|
||||
|
||||
/**
|
||||
* this is a dirty hack but syscp 1.4.2.1 does not
|
||||
* has any version/dbversion in the database (don't know why)
|
||||
* so we have to set them both to run a correct upgrade
|
||||
*/
|
||||
if (!isset($settings['panel']['version'])
|
||||
|| $settings['panel']['version'] == ''
|
||||
) {
|
||||
$settings['panel']['version'] = '1.4.2.1';
|
||||
}
|
||||
if (!isset($settings['system']['dbversion'])
|
||||
|| $settings['system']['dbversion'] == ''
|
||||
) {
|
||||
$settings['system']['dbversion'] = 2;
|
||||
}
|
||||
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
|
||||
@@ -20,13 +20,13 @@ if(isFroxlorVersion('0.9-r0'))
|
||||
showUpdateStep("Updating from 0.9-r0 to 0.9-r1", false);
|
||||
showUpdateStep("Performing database updates");
|
||||
/*
|
||||
* add missing database-updates if necessary (old: update/update_database.php
|
||||
* add missing database-updates if necessary (old: update/update_database.php)
|
||||
*/
|
||||
if(!isset($settings['system']['dbversion']) || $settings['system']['dbversion'] < '1')
|
||||
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 1)
|
||||
{
|
||||
$db->query("ALTER TABLE `panel_databases` ADD `dbserver` INT( 11 ) UNSIGNED NOT NULL default '0';");
|
||||
}
|
||||
if(!isset($settings['system']['dbversion']) || $settings['system']['dbversion'] < '2')
|
||||
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 2)
|
||||
{
|
||||
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user