1
0
Fork 0
mirror of synced 2024-06-01 10:29:48 +12:00

Update init.php

This commit is contained in:
Bradley Schofield 2022-08-09 13:32:33 +01:00
parent bf3c15708d
commit 603cb1db34

View file

@ -383,18 +383,10 @@ Database::addFilter(
return null;
},
function (mixed $value, Document $document, Database $database) {
$variables = $database
return $database
->find('variables', [
new Query('functionInternalId', Query::TYPE_EQUAL, [$document->getInternalId()]),
], $database->getAttributeLimit(), 0, []);
$object = [];
foreach ($variables as $variable) {
$object[$variable['key']] = $variable['value'];
}
return $object;
], APP_LIMIT_SUBQUERY);
}
);