fix update procedure for users who upgraded from syscp (the database field which is to be dropped does not exist for them, just in fresh installs), fixes #1278
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -2238,9 +2238,15 @@ if (isFroxlorVersion('0.9.29.1-dev3')) {
|
|||||||
showUpdateStep("Updating from 0.9.29.1-dev3 to 0.9.29.1-dev4", true);
|
showUpdateStep("Updating from 0.9.29.1-dev3 to 0.9.29.1-dev4", true);
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
showUpdateStep("Removing old billing-field from admin-users");
|
// If you upgraded from SysCP the edit_billingdata field has been
|
||||||
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `edit_billingdata`");
|
// removed in one of the first upgrades to froxlor. Sadly, one field
|
||||||
lastStepStatus(0);
|
// remained in the install.sql so we remove it now if it exists
|
||||||
|
$bd_exists = $db->query("SHOW COLUMNS FROM `".TABLE_PANEL_ADMINS."` LIKE 'edit_billingdata';");
|
||||||
|
if ($db->num_rows() > 0) {
|
||||||
|
showUpdateStep("Removing old billing-field from admin-users");
|
||||||
|
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `edit_billingdata`");
|
||||||
|
lastStepStatus(0);
|
||||||
|
}
|
||||||
|
|
||||||
updateToVersion('0.9.29.1-dev4');
|
updateToVersion('0.9.29.1-dev4');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user