summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-12 17:30:29 +0200
committerSimon Rettberg2022-05-12 17:30:29 +0200
commit4845167135bd6184646281dd0eb39d1d065e7b79 (patch)
tree56264071e5cabcbfa0836e1ab162c2824db4a8cf
parent[dnbd3] Types (diff)
downloadslx-admin-4845167135bd6184646281dd0eb39d1d065e7b79.tar.gz
slx-admin-4845167135bd6184646281dd0eb39d1d065e7b79.tar.xz
slx-admin-4845167135bd6184646281dd0eb39d1d065e7b79.zip
[statistics] install: Remove bogus SCREEN entries on update
-rw-r--r--modules-available/statistics/install.inc.php1
1 files changed, 1 insertions, 0 deletions
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) {