summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards/openvpn_wizard.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-11 16:51:34 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-11 16:53:03 +0000
commit30e86d57151a916ea09b5a1f17d30a7c1b2008bc (patch)
treebf36c4fe6399acc44796228b61518912077683a6 /usr/local/www/wizards/openvpn_wizard.inc
parentfff3d2b942b9487a48d14c3882065bd553ebab63 (diff)
downloadpfsense-30e86d57151a916ea09b5a1f17d30a7c1b2008bc.zip
pfsense-30e86d57151a916ea09b5a1f17d30a7c1b2008bc.tar.gz
Correct logic.
Diffstat (limited to 'usr/local/www/wizards/openvpn_wizard.inc')
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc19
1 files changed, 9 insertions, 10 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc
index 02d2fa7..680e3ce 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -20,21 +20,21 @@ function step2_stepbeforeformdisplay() {
$fields =& $pkg['step'][1]['fields']['field'];
- $count = 0;
+ $found = false;
$authlist = auth_get_authserver_list();
$fields[1]['options']['option'] = array();
foreach ($authlist as $i => $auth) {
- if ($auth['type'] != "ldap") {
- $count++;
+ if ($auth['type'] != "ldap")
continue;
- }
+ $found = true;
$opts = array();
$opts['name'] = $auth['name'];
$opts['value'] = $auth['name'];
$fields[1]['options']['option'][] = $opts;
}
- if ($count < 1)
+ if ($found == true) {
$stepid = 2;
+ }
}
function step2_submitphpaction() {
@@ -68,20 +68,19 @@ function step4_stepbeforeformdisplay() {
$fields =& $pkg['step'][3]['fields']['field'];
- $count = 0;
+ $found = false;
$authlist = auth_get_authserver_list();
$fields[1]['options']['option'] = array();
foreach ($authlist as $i => $auth) {
- if ($auth['type'] != "radius") {
- $count++;
+ if ($auth['type'] != "radius")
continue;
- }
+ $found = true;
$opts = array();
$opts['name'] = $auth['name'];
$opts['value'] = $auth['name'];
$fields[1]['options']['option'][] = $opts;
}
- if ($count < 1)
+ if ($found == true)
$stepid = 4;
}
OpenPOWER on IntegriCloud