mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
src: fix more auth server foo for translations; refs #467
This commit is contained in:
parent
8e3a78bc1d
commit
d89465456b
@ -61,13 +61,14 @@ function step2_stepbeforeformdisplay() {
|
||||
$found = false;
|
||||
$authlist = auth_get_authserver_list();
|
||||
$fields[1]['options']['option'] = array();
|
||||
foreach ($authlist as $i => $auth) {
|
||||
if ($auth['type'] != "ldap")
|
||||
foreach ($authlist as $key => $auth) {
|
||||
if ($auth['type'] != 'ldap') {
|
||||
continue;
|
||||
}
|
||||
$found = true;
|
||||
$opts = array();
|
||||
$opts['name'] = $auth['name'];
|
||||
$opts['value'] = $auth['name'];
|
||||
$opts['value'] = $key;
|
||||
$fields[1]['options']['option'][] = $opts;
|
||||
}
|
||||
if ($found == false) {
|
||||
@ -123,13 +124,14 @@ function step4_stepbeforeformdisplay() {
|
||||
$found = false;
|
||||
$authlist = auth_get_authserver_list();
|
||||
$fields[1]['options']['option'] = array();
|
||||
foreach ($authlist as $i => $auth) {
|
||||
if ($auth['type'] != "radius")
|
||||
foreach ($authlist as $key => $auth) {
|
||||
if ($auth['type'] != 'radius') {
|
||||
continue;
|
||||
}
|
||||
$found = true;
|
||||
$opts = array();
|
||||
$opts['name'] = $auth['name'];
|
||||
$opts['value'] = $auth['name'];
|
||||
$opts['value'] = $key;
|
||||
$fields[1]['options']['option'][] = $opts;
|
||||
}
|
||||
if ($found == false)
|
||||
|
||||
@ -136,21 +136,17 @@ if ($save_and_test) {
|
||||
<select name='authmode' id='authmode' class="selectpicker" data-style="btn-default" >
|
||||
<?php
|
||||
$auth_servers = auth_get_authserver_list();
|
||||
foreach ($auth_servers as $auth_server) :
|
||||
$selected = "";
|
||||
if ($auth_server['name'] == $pconfig['authmode']) {
|
||||
$selected = "selected=\"selected\"";
|
||||
foreach ($auth_servers as $auth_key => $auth_server) :
|
||||
$selected = '';
|
||||
if ($auth_key == $pconfig['authmode']) {
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
if (!isset($pconfig['authmode']) && $auth_server['name'] == "Local Database") {
|
||||
$selected = "selected=\"selected\"";
|
||||
if (!isset($pconfig['authmode']) && $auth_key == 'Local Database') {
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$auth_server['name'];
|
||||
?>" <?=$selected;
|
||||
?>><?=$auth_server['name'];?></option>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<option value="<?=$auth_key; ?>" <?=$selected; ?>><?=$auth_server['name'];?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -393,11 +393,9 @@ if (isset($input_errors) && count($input_errors) > 0) {
|
||||
<?php
|
||||
$authmodes = explode(",", $pconfig['user_source']);
|
||||
$auth_servers = auth_get_authserver_list();
|
||||
foreach ($auth_servers as $auth_server) :
|
||||
?>
|
||||
<option value="<?=htmlspecialchars($auth_server['name'])?>" <?=in_array($auth_server['name'], $authmodes) ? "selected=\"selected\"" : ""?> ><?=$auth_server['name']?></option>
|
||||
<?php endforeach;
|
||||
?>
|
||||
foreach ($auth_servers as $auth_key => $auth_server) : ?>
|
||||
<option value="<?=htmlspecialchars($auth_key)?>" <?=in_array($auth_key, $authmodes) ? 'selected="selected"' : ''?>><?=$auth_server['name']?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user