summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {