fixed PHP notice

This commit is contained in:
Roland Gruber 2007-10-10 16:45:30 +00:00
parent 6eaeb3a28e
commit 3ac346d4e3
1 changed files with 4 additions and 2 deletions

View File

@ -798,6 +798,7 @@ class accountContainer {
* Returns the account module with the given class name * Returns the account module with the given class name
* *
* @param string $name class name (e.g. posixAccount) * @param string $name class name (e.g. posixAccount)
* @return baseModule account module
*/ */
function getAccountModule($name) { function getAccountModule($name) {
if (isset($this->module[$name])) { if (isset($this->module[$name])) {
@ -1054,15 +1055,16 @@ class accountContainer {
))); )));
} }
else { else {
$options_selected = array();
// loop through all suffixes // loop through all suffixes
$rootsuffix = $_SESSION['config']->get_Suffix($this->type); $rootsuffix = $_SESSION['config']->get_Suffix($this->type);
foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) { foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) {
if ($this->dn == $suffix) $options_selected = $suffix; if ($this->dn == $suffix) $options_selected = array($suffix);
$suffixes[] = $suffix; $suffixes[] = $suffix;
} }
$return[] = array( $return[] = array(
0 => array('kind' => 'text', 'text' => _('Suffix')), 0 => array('kind' => 'text', 'text' => _('Suffix')),
1 => array('kind' => 'select', 'name' => 'suffix', 'options' => $suffixes, 'options_selected' => array($options_selected), 'noSorting' => true), 1 => array('kind' => 'select', 'name' => 'suffix', 'options' => $suffixes, 'options_selected' => $options_selected, 'noSorting' => true),
2 => array ('kind' => 'help', 'value' => '361')); 2 => array ('kind' => 'help', 'value' => '361'));
// RDN selection // RDN selection
$rdnlist = getRDNAttributes($this->type); $rdnlist = getRDNAttributes($this->type);