Unverified Commit a7ff72c6 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(ObjectsAttribute) Use objects::ls in fillDisplayValue

This is consistent with ObjectAttribute and the use of management
 classes for the dialog.

issue #6083
Showing with 15 additions and 0 deletions
+15 -0
...@@ -88,6 +88,21 @@ class ObjectsAttribute extends GenericDialogAttribute ...@@ -88,6 +88,21 @@ class ObjectsAttribute extends GenericDialogAttribute
return $parameters; return $parameters;
} }
protected function fillDisplayValue ($i)
{
$value = $this->value[$i];
if ($this->store_attr == 'dn') {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], $value, '', FALSE, 'base');
} else {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], NULL, '('.$this->store_attr.'='.ldap_escape_f($value).')');
}
if (empty($objects) && $this->isTemplate()) {
$this->fillDisplayValueFrom($i, NULL);
} else {
$this->fillDisplayValueFrom($i, reset($objects));
}
}
protected function fillDisplayValueFrom ($i, $attrs) protected function fillDisplayValueFrom ($i, $attrs)
{ {
if ($attrs) { if ($attrs) {
......
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