diff options
author | Bryan Haase <bryan.haase@gmail.com> | 2011-07-27 14:41:55 -0500 |
---|---|---|
committer | Bryan Haase <bryan.haase@gmail.com> | 2011-07-27 14:41:55 -0500 |
commit | f9199cd3ac0b38770e672f5fbda64d7eead036e8 (patch) | |
tree | a60d41163e9622369d1a332eb6c4fac60683e95c /usr/local | |
parent | 2c189c8cb110bc293acbb88c6930e636e19db5d4 (diff) | |
download | pfsense-f9199cd3ac0b38770e672f5fbda64d7eead036e8.zip pfsense-f9199cd3ac0b38770e672f5fbda64d7eead036e8.tar.gz |
Check for null Array and move option system to top
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/vpn_ipsec_mobile.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php index 9d81c53..f0df0b7 100755 --- a/usr/local/www/vpn_ipsec_mobile.php +++ b/usr/local/www/vpn_ipsec_mobile.php @@ -355,16 +355,19 @@ function login_banner_change() { <td width="78%" class="vtable"> <?=gettext("Source"); ?>: <select name="user_source" class="formselect" id="user_source"> - <? - foreach ($config['system']['authserver'] as $authcfg) { - if ($authcfg['type'] == 'ldap') { - $selected = ""; - if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected"; - print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>'; - } - } - ?> <option value="system" <?php if ($pconfig['user_source'] == 'system') echo "selected"; ?>><?=gettext("system"); ?></option> + <? + if (isset($config['system']['authserver'])) + { + foreach ($config['system']['authserver'] as $authcfg) { + if ($authcfg['type'] == 'ldap') { + $selected = ""; + if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected"; + print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>'; + } + } + } + ?> </select> </td> </tr> |