fixing upgrade process and re-reading of panel.version
This commit is contained in:
@@ -19,12 +19,18 @@ return array(
|
|||||||
'groups' => array(
|
'groups' => array(
|
||||||
'version' => array(
|
'version' => array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'system_dbversion' => array(
|
'panel_version' => array(
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'panel',
|
||||||
'varname' => 'dbversion',
|
'varname' => 'version',
|
||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
),
|
),
|
||||||
|
'panel_frontend' => array(
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'frontend',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'default' => 'syscp',
|
||||||
|
),
|
||||||
'system_last_tasks_run' => array(
|
'system_last_tasks_run' => array(
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'last_tasks_run',
|
'varname' => 'last_tasks_run',
|
||||||
@@ -61,4 +67,4 @@ return array(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$updateto = '1.0';
|
$updateto = '0.9';
|
||||||
$frontend = 'froxlor';
|
$frontend = 'froxlor';
|
||||||
|
|
||||||
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Upgrading SysCP ".$settings['panel']['version']." to Froxlor ". $updateto);
|
$updatelog->logAction(ADM_ACTION, LOG_WARNING, "Upgrading SysCP ".$settings['panel']['version']." to Froxlor ". $updateto);
|
||||||
@@ -33,7 +33,7 @@ $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname
|
|||||||
* this is the main upgrade
|
* this is the main upgrade
|
||||||
*/
|
*/
|
||||||
if($settings['panel']['frontend'] == 'froxlor'
|
if($settings['panel']['frontend'] == 'froxlor'
|
||||||
&& $settings['panel']['version'] == '1.0')
|
&& $settings['panel']['version'] == '0.9')
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ require ('../lib/tables.inc.php');
|
|||||||
* Inlcudes the MySQL-Connection-Class
|
* Inlcudes the MySQL-Connection-Class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require ('../lib/class_mysqldb.php');
|
require ('../lib/classes/database/class.db.php');
|
||||||
$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']);
|
$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']);
|
||||||
unset($sql['password']);
|
unset($sql['password']);
|
||||||
unset($db->password);
|
unset($db->password);
|
||||||
@@ -112,7 +112,7 @@ if(!isset($settings['panel']['frontend'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrading SysCP to Froxlor-1.0
|
* Upgrading SysCP to Froxlor-0.9
|
||||||
*
|
*
|
||||||
* when we reach this part, all necessary updates
|
* when we reach this part, all necessary updates
|
||||||
* should have been installes automatically by the
|
* should have been installes automatically by the
|
||||||
@@ -127,4 +127,4 @@ inserttask('1');
|
|||||||
@chmod('../lib/userdata.inc.php', 0440);
|
@chmod('../lib/userdata.inc.php', 0440);
|
||||||
header('Location: ../index.php');
|
header('Location: ../index.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user