Commit 4f159229 authored by Jonathan Swaelens's avatar Jonathan Swaelens
Browse files

:sparkles: feat(rest.php): Add visual difference for monovalued or multivalued attribute

Add visual difference for monovalued or multivalued attribute
Showing with 6 additions and 1 deletion
+6 -1
......@@ -579,7 +579,12 @@ class fdRestService extends fdRPCService
$attributes = [];
foreach ($section['attrs'] as $attr) {
if ($object->attrIsReadable($attr)) {
$attributes[] = $attr->getLdapName();
// Add "" for monovalued attribute or [] for multivalued (only if the class used is SetAttribute)
if (get_class($attr) == "SetAttribute") {
$attributes[$attr->getLdapName()] = [];
} else {
$attributes[$attr->getLdapName()] = "";
}
}
}
$section['attrs'] = $attributes;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment