Add table_exists condition to prevent an error on new installs

This commit is contained in:
markjcrane
2025-12-08 12:34:15 -07:00
parent f56c51f6d2
commit df90513f86

View File

@@ -113,6 +113,8 @@ if ($domains_processed == 1) {
$database->execute("delete from v_dashboard;");
}
//migrate data from the dashboard_groups old table to the new dashboard_widget_groups table
if ($database->table_exists('v_dashboard_groups')) {
//get the dashboard widget groups
$sql = "select * from v_dashboard_widget_groups ";
$new_groups = $database->select($sql, null, 'all');
@@ -148,6 +150,7 @@ if ($domains_processed == 1) {
$database->execute($sql);
unset($sql, $parameters);
}
}
//make the default groups exist
$group = new groups;