summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorBryan Haase <bryan.haase@gmail.com>2011-07-27 14:41:55 -0500
committerBryan Haase <bryan.haase@gmail.com>2011-07-27 14:41:55 -0500
commitf9199cd3ac0b38770e672f5fbda64d7eead036e8 (patch)
treea60d41163e9622369d1a332eb6c4fac60683e95c /usr
parent2c189c8cb110bc293acbb88c6930e636e19db5d4 (diff)
downloadpfsense-f9199cd3ac0b38770e672f5fbda64d7eead036e8.zip
pfsense-f9199cd3ac0b38770e672f5fbda64d7eead036e8.tar.gz
Check for null Array and move option system to top
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php21
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"); ?>:&nbsp;&nbsp;
<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>
OpenPOWER on IntegriCloud