From 57d3f5e8f773eac1e76297bf694b0c12674c5692 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 20 Sep 2007 07:23:15 +0000 Subject: [PATCH] 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 --- html/password.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); -- 2.30.2