- corrected dbversion-setting when upgrading from syscp-stable (1.4.2.1), fixes #54

This commit is contained in:
Michael Kaufmann (d00p)
2010-03-10 07:30:53 +00:00
parent 1d03f04e1e
commit 6f37aa2209

View File

@@ -37,7 +37,21 @@ if($page == 'overview')
if (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == ''
) {
$settings['system']['dbversion'] = 2;
/**
* for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly
* and the svn-version has its value in the database
* -> bug #54
*/
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
if(isset($result['value']))
{
$settings['system']['dbversion'] = (int)$result['value'];
} else {
$settings['system']['dbversion'] = 0;
}
}
}