Commit 3cafc99e authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6083-improve-objectsattribute' into '1.4-dev'

Resolve "Improve ObjectsAttribute"

See merge request fusiondirectory/fd!762
parents 1ad2dccc a7ff72c6
......@@ -88,6 +88,21 @@ class ObjectsAttribute extends GenericDialogAttribute
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)
{
if ($attrs) {
......
Markdown is supported
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