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

Merge branch '6015-add-support-for-supann-cms-carte-multi-service' into '1.4-dev'

Resolve "Add support for SupAnn CMS (Carte Multi Service)"

See merge request fusiondirectory/fd-plugins!695
parents 907e1508 67c6ae28
......@@ -30,16 +30,14 @@ class TaggedAttribute extends SetAttribute
{
$this->value = [];
$pattern = '/^'.preg_quote($this->getLdapName(), '/').';(.+)$/';
if (!empty($attrs)) {
for ($i = 0; $i < $attrs['count']; $i++) {
if ($attrs[$i] == $this->getLdapName()) {
for ($j = 0; $j < $attrs[$attrs[$i]]['count']; $j++) {
$this->value[] = ';'.$attrs[$attrs[$i]][$j];
}
} elseif (preg_match($pattern, $attrs[$i], $m)) {
for ($j = 0; $j < $attrs[$attrs[$i]]['count']; $j++) {
$this->value[] = $m[1].';'.$attrs[$attrs[$i]][$j];
foreach ($attrs as $key => $attr) {
if ($key == $this->getLdapName()) {
for ($j = 0; $j < $attr['count']; $j++) {
$this->value[] = ';'.$attr[$j];
}
} elseif (preg_match($pattern, $key, $m)) {
for ($j = 0; $j < $attr['count']; $j++) {
$this->value[] = $m[1].';'.$attr[$j];
}
}
}
......
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