diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-24 12:42:28 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-24 12:42:28 +0100 |
commit | 96949fc9dd5c50818a8f8bda75a9beb731ac91ae (patch) | |
tree | 3817b6eed781cf33e1f865377a3de6a44c2b5bf4 /apps/user_ldap/settings.php | |
parent | b979bf6f1cc2c3b9cf6d7a004edb5cbf9299e08b (diff) | |
download | nextcloud-server-96949fc9dd5c50818a8f8bda75a9beb731ac91ae.tar.gz nextcloud-server-96949fc9dd5c50818a8f8bda75a9beb731ac91ae.zip |
LDAP: consolidate config prefix determination, autofill combo box in settings
Diffstat (limited to 'apps/user_ldap/settings.php')
-rw-r--r-- | apps/user_ldap/settings.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index f3f0826739f..57d370601cf 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -86,7 +86,16 @@ $tmpl->assign('ldap_cache_ttl', OCP\Config::getAppValue('user_ldap', 'ldap_cache $hfnr = OCP\Config::getAppValue('user_ldap', 'home_folder_naming_rule', 'opt:username'); $hfnr = ($hfnr == 'opt:username') ? '' : substr($hfnr, strlen('attr:')); $tmpl->assign('home_folder_naming_rule', $hfnr, ''); -$tmpl->assign('serverConfigurationOptions', '', false); + +$prefixes = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(); +$scoHtml = ''; +$i = 1; +$sel = ' selected'; +foreach($prefixes as $prefix) { + $scoHtml .= '<option value="'.$prefix.'"'.$sel.'>'.$i++.'. Server</option>'; + $sel = ''; +} +$tmpl->assign('serverConfigurationOptions', $scoHtml, false); // assign default values if(!isset($ldap)) { |