Merge remote-tracking branch 'origin/1.8.x' into feat-expose-sequence

This commit is contained in:
Jake Barnby 2025-05-27 13:58:04 +12:00
commit 59c1f55183
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -77,12 +77,21 @@ Database::addFilter(
]);
foreach ($attributes as $attribute) {
if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) {
$options = $attribute->getAttribute('options');
foreach ($options as $key => $value) {
$attribute->setAttribute($key, $value);
}
$attribute->removeAttribute('options');
$attributeType = $attribute->getAttribute('type');
switch ($attributeType) {
case Database::VAR_RELATIONSHIP:
$options = $attribute->getAttribute('options');
foreach ($options as $key => $value) {
$attribute->setAttribute($key, $value);
}
$attribute->removeAttribute('options');
break;
case Database::VAR_STRING:
$filters = $attribute->getAttribute('filters', []);
$attribute->setAttribute('encrypt', in_array('encrypt', $filters));
break;
}
}