diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-06 14:32:31 +0400 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-06 14:32:31 +0400 |
commit | d9a0d1d23b568a8ea520a00936850b69c2330a52 (patch) | |
tree | ba3d3c18ce5860e166e7fd75905d7b7e49cb954c /apps | |
parent | 82990b82a6f4d90730e6af4eddead6e4103dd0e8 (diff) | |
parent | bce0c3c372c2916e53c1991a11d9f541cb8f96fb (diff) |
Merge pull request #2119 from owncloud/fix_ldap_settings
LDAP: fix settings output thus make settings work again
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/settings.php | 12 | ||||
-rw-r--r-- | apps/user_ldap/templates/settings.php | 15 |
2 files changed, 15 insertions, 12 deletions
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index c55a718a82a..05497ae8a33 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -42,17 +42,7 @@ OCP\Util::addstyle('user_ldap', 'settings'); $tmpl = new OCP\Template('user_ldap', 'settings'); $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 = ''; -} -if(count($prefixes) == 0) { - $scoHtml .= '<option value="" selected>1. Server</option>'; -} -$tmpl->assign('serverConfigurationOptions', $scoHtml); +$tmpl->assign('serverConfigurationPrefixes', $prefixes); // assign default values if(!isset($ldap)) { diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index cd004cec4b3..d3c2c298904 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -14,7 +14,20 @@ <fieldset id="ldapSettings-1"> <p><label for="ldap_serverconfig_chooser"><?php p($l->t('Server configuration'));?></label> <select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser"> - <?php p($_['serverConfigurationOptions']); ?> + <?php if(count($_['serverConfigurationPrefixes']) == 0 ) { + ?> + <option value="" selected>1. Server</option>'); + <?php + } else { + $i = 1; + $sel = ' selected'; + foreach($_['serverConfigurationPrefixes'] as $prefix) { + ?> + <option value="<?php p($prefix); ?>"<?php p($sel); ?>><?php p($i++); ?>. Server</option> + <?php + } + } + ?> <option value="NEW"><?php p($l->t('Add Server Configuration'));?></option> </select> <button id="ldap_action_delete_configuration" |