From b68a6064ba3a564076800a24571e7aeaaebaae1e Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 13 Aug 2005 09:49:28 +0000 Subject: [PATCH] make sure that RDN attributes have correct order --- lam/lib/modules.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 54268691..ba84de0f 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -145,10 +145,13 @@ function getRDNAttributes($scope) { } } // merge arrays - $return = $attrs_high; - for ($i = 0; $i < sizeof($attrs_normal); $i++) $return[] = $attrs_normal[$i]; - for ($i = 0; $i < sizeof($attrs_low); $i++) $return[] = $attrs_low[$i]; - $return = array_values(array_unique($return)); + $return = array_values(array_unique($attrs_high)); + for ($i = 0; $i < sizeof($attrs_normal); $i++) { + if (!in_array($attrs_normal[$i], $return)) $return[] = $attrs_normal[$i]; + } + for ($i = 0; $i < sizeof($attrs_low); $i++) { + if (!in_array($attrs_low[$i], $return)) $return[] = $attrs_low[$i]; + } return $return; }