Commit 3e298f39 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) openvpn dependencies and missing vars

parent f1b2a731
...@@ -111,7 +111,7 @@ function openvpn_vpnid_next() { ...@@ -111,7 +111,7 @@ function openvpn_vpnid_next() {
function openvpn_port_used($prot, $interface, $port, $curvpnid = 0) { function openvpn_port_used($prot, $interface, $port, $curvpnid = 0) {
global $config; global $config;
if (is_array($config['openvpn']['openvpn-server'])) { if (isset($config['openvpn']['openvpn-server'])) {
foreach ($config['openvpn']['openvpn-server'] as & $settings) { foreach ($config['openvpn']['openvpn-server'] as & $settings) {
if (isset($settings['disable'])) if (isset($settings['disable']))
continue; continue;
...@@ -125,7 +125,7 @@ function openvpn_port_used($prot, $interface, $port, $curvpnid = 0) { ...@@ -125,7 +125,7 @@ function openvpn_port_used($prot, $interface, $port, $curvpnid = 0) {
} }
} }
if (is_array($config['openvpn']['openvpn-client'])) { if (isset($config['openvpn']['openvpn-client'])) {
foreach ($config['openvpn']['openvpn-client'] as & $settings) { foreach ($config['openvpn']['openvpn-client'] as & $settings) {
if (isset($settings['disable'])) if (isset($settings['disable']))
continue; continue;
......
...@@ -30,6 +30,7 @@ require_once("guiconfig.inc"); ...@@ -30,6 +30,7 @@ require_once("guiconfig.inc");
require_once("captiveportal.inc"); require_once("captiveportal.inc");
require_once("services.inc"); require_once("services.inc");
require_once("pfsense-utils.inc"); require_once("pfsense-utils.inc");
require_once("interfaces.inc");
$cpzone = $_GET['zone']; $cpzone = $_GET['zone'];
if (isset($_POST['zone'])) if (isset($_POST['zone']))
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("services.inc"); require_once("services.inc");
require_once("interfaces.inc");
$a_gateways = return_gateways_array(); $a_gateways = return_gateways_array();
$gateways_status = array(); $gateways_status = array();
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("services.inc"); require_once("services.inc");
require_once("interfaces.inc");
if ($_POST) { if ($_POST) {
if ($_POST['clear'] == "Clear") { if ($_POST['clear'] == "Clear") {
......
...@@ -42,7 +42,7 @@ global $current_openvpn_version, $current_openvpn_version_rev; ...@@ -42,7 +42,7 @@ global $current_openvpn_version, $current_openvpn_version_rev;
$pgtitle = array("OpenVPN", "Client Export Utility"); $pgtitle = array("OpenVPN", "Client Export Utility");
if (!is_array($config['openvpn']['openvpn-server'])) { if (!isset($config['openvpn']['openvpn-server'])) {
$config['openvpn']['openvpn-server'] = array(); $config['openvpn']['openvpn-server'] = array();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment