Skip to content

Commit 8957961

Browse files
committed
Fixed issue cosmocode#437, filtering DateTime
Applying a filter on a DateTime column in an aggregation was causing an uncaught error to occur and prevent the page being rendered at all. Fortunately, this turned out to be a very simple issue to resolve.
1 parent 8a07aec commit 8957961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ public function select(QueryBuilder $QB, $tablealias, $colname, $alias)
127127
public function filter(QueryBuilderWhere $add, $tablealias, $colname, $comp, $value, $op)
128128
{
129129
$col = "$tablealias.$colname";
130+
$QB = $add->getQB();
130131

131132
// when accessing the revision column we need to convert from Unix timestamp
132133
if (is_a($this->context, 'dokuwiki\plugin\struct\meta\RevisionColumn')) {
133-
$QB = $add->getQB();
134134
$rightalias = $QB->generateTableAlias();
135135
$col = "DATETIME($rightalias.lastrev, 'unixepoch', 'localtime')";
136136
$QB->addLeftJoin($tablealias, 'titles', $rightalias, "$tablealias.pid = $rightalias.pid");

0 commit comments

Comments
 (0)