From: hickert Date: Thu, 20 Sep 2007 07:23:15 +0000 (+0000) Subject: Updated password.php. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57d3f5e8f773eac1e76297bf694b0c12674c5692;p=gosa.git Updated password.php. Use first ldap->server (location), if default is not valid. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7343 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/password.php b/html/password.php index d04b92aa0..c93410bd4 100644 --- a/html/password.php +++ b/html/password.php @@ -101,13 +101,17 @@ textdomain($domain); /* Generate server list */ $servers= array(); +foreach ($config->data['LOCATIONS'] as $key => $ignored){ + $servers[$key]= $key; +} if (isset($_POST['server'])){ $directory= validate($_POST['server']); } else { $directory= $config->data['MAIN']['DEFAULT']; -} -foreach ($config->data['LOCATIONS'] as $key => $ignored){ - $servers[$key]= $key; + + if(!isset($servers[$directory])){ + $directory = key($servers); + } } if (isset($_GET['directory']) && isset($servers[$_GET['directory']])){ $smarty->assign ("show_directory_chooser", false);