diff options
author | Phil Davis <phil.davis@inf.org> | 2015-01-06 07:27:36 +0545 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-06 12:22:45 -0200 |
commit | 0bd024d0b13a0456111eb408a8edc099b577cc32 (patch) | |
tree | d0293fcb5d09d1b180bf8a6ed4755410b2889e16 | |
parent | d8540659972c0ddd66a9064a53eb357f2fd2c67f (diff) | |
download | pfsense-0bd024d0b13a0456111eb408a8edc099b577cc32.zip pfsense-0bd024d0b13a0456111eb408a8edc099b577cc32.tar.gz |
OpenVPN backend authentication fix key and translation
The array returned by auth_get_authserver_list() has key as the fixed name of each available authentication mode - e.g. "Local Database".
The array value ["name"] has the name string translated into the selected GUI language.
Use the key do determine which items are selected, and as the value that ends up being stored in the config.
Use ["name"] for display.
Forum report: https://forum.pfsense.org/index.php?topic=86326.0
Redmine Bug #4180
-rw-r--r-- | usr/local/www/vpn_openvpn_server.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php index 3c6e228..71686d2 100644 --- a/usr/local/www/vpn_openvpn_server.php +++ b/usr/local/www/vpn_openvpn_server.php @@ -801,12 +801,12 @@ if ($savemsg) <?php $authmodes = explode(",", $pconfig['authmode']); ?> <?php $auth_servers = auth_get_authserver_list(); - foreach ($auth_servers as $auth_server): + foreach ($auth_servers as $auth_server_key => $auth_server): $selected = ""; - if (in_array($auth_server['name'], $authmodes)) + if (in_array($auth_server_key, $authmodes)) $selected = "selected=\"selected\""; ?> - <option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option> + <option value="<?=$auth_server_key;?>" <?=$selected;?>><?=$auth_server['name'];?></option> <?php endforeach; ?> </select> </td> |