Skip to content
Snippets Groups Projects
Commit 7b7893b5 authored by hahn's avatar hahn
Browse files

Bugfix: logfilter

parent 33960db0
No related branches found
No related tags found
1 merge request!195534 add docker
......@@ -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\,\ ]');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment