diff --git a/include/class_objects.inc b/include/class_objects.inc index fe2483c73f920572e128d098cc99d5e35b334cb0..69fd929cc27cf3bebe889fff9c3e46985f5c962c 100644 --- a/include/class_objects.inc +++ b/include/class_objects.inc @@ -57,12 +57,17 @@ class objects $attrs = array(); foreach ($types as $type) { $infos = static::infos($type); - $attrs[] = $infos['mainAttr']; + if ($infos['mainAttr']) { + $attrs[] = $infos['mainAttr']; + } } $attrs = array_unique($attrs); if (count($attrs) == 1) { $attrs = $attrs[0]; } + if (count($attrs) == 0) { + $attrs = array('dn' => 'raw'); + } } if (is_array($attrs)) { diff --git a/include/simpleplugin/class_simpleManagement.inc b/include/simpleplugin/class_simpleManagement.inc index f81c6d5196140ce34d7cd8e651915d3425f99321..17aae65f248aa99c2f8fcaa4a290fe0ec6daef0e 100644 --- a/include/simpleplugin/class_simpleManagement.inc +++ b/include/simpleplugin/class_simpleManagement.inc @@ -422,8 +422,12 @@ class simpleManagement ); $this->filter->elementValues[$tag] = TRUE; - $attributes[] = $i['mainAttr']; - $attributes[] = $i['nameAttr']; + if ($i['mainAttr']) { + $attributes[] = $i['mainAttr']; + } + if ($i['nameAttr']) { + $attributes[] = $i['nameAttr']; + } } if (!static::$skipTemplates) { $tag = 'FILTERTEMPLATE';