From 7b7893b51cb72e38aa49f2a0eb89508d1e222692 Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Wed, 20 Jul 2022 16:49:19 +0200 Subject: [PATCH] Bugfix: logfilter --- public_html/deployment/classes/actionlog.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php index e2cdfa6e..0f07dffe 100644 --- a/public_html/deployment/classes/actionlog.class.php +++ b/public_html/deployment/classes/actionlog.class.php @@ -167,21 +167,21 @@ class Actionlog { if (isset($aFilter["project"]) && $aFilter["project"]) { $aWhere[]='`project`="' . $this->_filterAllowedChars($aFilter["project"], '[a-z0-9\-\_]') . '"'; } - if (isset($aFilter["from"])) { + if (isset($aFilter["from"]) && $aFilter["from"]) { $aWhere[]='`time`>="' . $this->_filterAllowedChars($aFilter["from"], '[0-9\-\ \:]') . '"'; } - if (isset($aFilter["to"])) { + if (isset($aFilter["to"]) && $aFilter["to"]) { $aWhere[]='`time`<="' . $this->_filterAllowedChars($aFilter["to"], '[0-9\-\ \:]') . '"'; } $sSql.=(count($aWhere) ? 'WHERE '. implode(' AND ', $aWhere) : ''); - if (isset($aFilter["order"])) { + if (isset($aFilter["order"]) && $aFilter["order"]) { $sSql.=' ORDER BY ' . $this->_filterAllowedChars($aFilter["order"], '[a-z\`0-9\,\ ]'); } else { $sSql.=' ORDER BY id DESC '; } - if (isset($aFilter["limit"])) { + if (isset($aFilter["limit"]) && $aFilter["limit"]) { $sSql.=' LIMIT ' . $this->_filterAllowedChars($aFilter["limit"], '[0-9\,\ ]'); } -- GitLab