From 85eb80e2548ad1ca2e198e70feec687d13722fb9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 3 Feb 2009 19:54:57 +0000 Subject: [PATCH] display subgroups --- lam/lib/modules/nisnetgroup.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/nisnetgroup.inc b/lam/lib/modules/nisnetgroup.inc index 45853308..f2c11fa2 100644 --- a/lam/lib/modules/nisnetgroup.inc +++ b/lam/lib/modules/nisnetgroup.inc @@ -176,9 +176,18 @@ class nisnetgroup extends baseModule { array('kind' => 'text', 'text' => _('Description')), array('kind' => 'input', 'name' => 'description', 'type' => 'text', 'size' => '30', 'maxlength' => '255', 'value' => $this->attributes['description'][0]), array ('kind' => 'help', 'value' => 'description')); + $subgroups = array(); + if (isset($this->attributes['memberNisNetgroup']) && is_array($this->attributes['memberNisNetgroup'])) { + $membergroups = $this->attributes['memberNisNetgroup']; + while (sizeof($membergroups) > 0) { + $parts = array_splice($membergroups, 0, 8); + $subgroups[] = array(array('kind' => 'text', 'text' => implode(', ', $parts))); + } + } + $subgroups[] = array(array('kind' => 'input', 'name' => 'form_subpage_nisnetgroup_group_open', 'type' => 'submit', 'value' => _('Edit subgroups'))); $return[] = array( - array('kind' => 'text', 'text' => _('Subgroups')), - array('kind' => 'input', 'name' => 'form_subpage_nisnetgroup_group_open', 'type' => 'submit', 'value' => _('Edit subgroups')), + array('kind' => 'text', 'text' => _('Subgroups'), 'td' => array('valign' => 'top')), + array('kind' => 'table', 'value' => $subgroups), array('kind' => 'help', 'value' => 'memberNisNetgroup')); $return[] = array( array('kind' => 'text', 'text' => ' '),