mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 19:54:46 +01:00
generate_lang_file.php : improve to handle new config parameters
This commit is contained in:
parent
68d6d2b6e1
commit
741f0d826e
1 changed files with 27 additions and 2 deletions
|
@ -185,10 +185,22 @@ if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
|
|||
if (is_array($pname['possible_values'])) {
|
||||
foreach($pname['possible_values'] as $pk => $pn) {
|
||||
if ($pk == 'OTHER_OBJECT') continue;
|
||||
add($pn);
|
||||
elseif ($pk == 'OTHER_ATTRIBUTE') {
|
||||
if (is_array($pn) && ! isset($pn['attr'])) {
|
||||
foreach($pn as $pattr => $plabel)
|
||||
add($plabel);
|
||||
}
|
||||
}
|
||||
else add($pn);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($pkey == 'OTHER_ATTRIBUTE') {
|
||||
if (is_array($pname) && ! isset($pname['attr'])) {
|
||||
foreach($pname as $pattr => $plabel)
|
||||
add($plabel);
|
||||
}
|
||||
}
|
||||
elseif ($pkey != 'OTHER_OBJECT') {
|
||||
add($pname);
|
||||
}
|
||||
|
@ -206,6 +218,7 @@ if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
|
|||
if (is_array($attr['html_options']['components'])) {
|
||||
foreach($attr['html_options']['components'] as $c => $cconfig) {
|
||||
add($cconfig['label']);
|
||||
add($cconfig['help_info']);
|
||||
|
||||
// Component type select_list
|
||||
if (is_array($cconfig['options']['possible_values'])) {
|
||||
|
@ -215,10 +228,22 @@ if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
|
|||
if (is_array($pname['possible_values'])) {
|
||||
foreach($pname['possible_values'] as $pk => $pn) {
|
||||
if ($pk == 'OTHER_OBJECT') continue;
|
||||
add($pn);
|
||||
elseif ($pk == 'OTHER_ATTRIBUTE') {
|
||||
if (is_array($pn) && ! isset($pn['attr'])) {
|
||||
foreach($pn as $pattr => $plabel)
|
||||
add($plabel);
|
||||
}
|
||||
}
|
||||
else add($pn);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($pkey == 'OTHER_ATTRIBUTE') {
|
||||
if (is_array($pname) && ! isset($pname['attr'])) {
|
||||
foreach($pname as $pattr => $plabel)
|
||||
add($plabel);
|
||||
}
|
||||
}
|
||||
elseif ($pkey != 'OTHER_OBJECT') {
|
||||
add($pname);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue