From 4845167135bd6184646281dd0eb39d1d065e7b79 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 12 May 2022 17:30:29 +0200 Subject: [statistics] install: Remove bogus SCREEN entries on update --- modules-available/statistics/install.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules-available/statistics/install.inc.php b/modules-available/statistics/install.inc.php index 67c00d8f..cb36c47f 100644 --- a/modules-available/statistics/install.inc.php +++ b/modules-available/statistics/install.inc.php @@ -322,6 +322,7 @@ if (stripos(tableColumnType('machine_x_hw_prop', 'prop'), 'varchar(64)') === fal $res[] = UPDATE_DONE; } if (stripos(tableColumnType('statistic_hw', 'hwname'), 'char(32)') === false) { + Database::exec("DELETE FROM statistic_hw WHERE hwname NOT REGEXP '^[a-zA-Z0-9_ \\=@\\*\\-]+$'"); $ret = Database::exec("ALTER TABLE statistic_hw MODIFY `hwname` char(32) CHARACTER SET ascii NOT NULL, MODIFY `hwtype` char(16) CHARACTER SET ascii NOT NULL"); if ($ret === false) { -- cgit v1.2.3-55-g7522