diff options
author | Simon Rettberg | 2023-05-10 16:44:40 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-05-10 16:44:40 +0200 |
commit | 5b24b5c7c8a5717b66df26447f50d0f4d5d853df (patch) | |
tree | 70a89795f8def93c74dc27e245da8360c86502b0 /modules-available/statistics/inc/hardwarequerycolumn.inc.php | |
parent | [statistics] Fix typo (diff) | |
download | slx-admin-5b24b5c7c8a5717b66df26447f50d0f4d5d853df.tar.gz slx-admin-5b24b5c7c8a5717b66df26447f50d0f4d5d853df.tar.xz slx-admin-5b24b5c7c8a5717b66df26447f50d0f4d5d853df.zip |
[statistics] Fix system model filter
Diffstat (limited to 'modules-available/statistics/inc/hardwarequerycolumn.inc.php')
-rw-r--r-- | modules-available/statistics/inc/hardwarequerycolumn.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/statistics/inc/hardwarequerycolumn.inc.php b/modules-available/statistics/inc/hardwarequerycolumn.inc.php index 8aab6a54..01e32978 100644 --- a/modules-available/statistics/inc/hardwarequerycolumn.inc.php +++ b/modules-available/statistics/inc/hardwarequerycolumn.inc.php @@ -78,6 +78,12 @@ class HardwareQueryColumn } else { $other->conditions[] = $cond; } + } elseif ($op === '~' || $op === '!~') { + $op = $op === '~' ? 'LIKE' : 'NOT LIKE'; + $other = str_replace(array('=', '_', '%', '*', '?'), array('==', '=_', '=%', '%', '_'), $other); + $pid = self::getId(); + $this->conditions[] = "{$this->tableAlias}.`$valueCol` $op (:$pid) ESCAPE '='"; + $this->params[$pid] = $other; } else { $pid = self::getId(); $this->conditions[] = "{$this->tableAlias}.`$valueCol` $op (:$pid)"; |