mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
inc: fix usage due to PHP's is_array() warning level raise
This commit is contained in:
parent
21abc3627e
commit
1ff9cef76d
@ -1,15 +1,9 @@
|
||||
<?php
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com>.
|
||||
All rights reserved.
|
||||
|
||||
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
@ -33,9 +27,8 @@
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
pfSense_MODULE: authgui
|
||||
*/
|
||||
|
||||
include_once("auth.inc");
|
||||
include_once("priv.inc");
|
||||
|
||||
@ -199,7 +192,7 @@ function display_login_form() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($config['openvpn']['openvpn-server'])) {
|
||||
if (isset($config['openvpn']['openvpn-server'])) {
|
||||
foreach ($config['openvpn']['openvpn-server'] as $ovpns) {
|
||||
if (is_ipaddrv4($http_host) && !empty($ovpns['tunnel_network']) && ip_in_subnet($http_host, $ovpns['tunnel_network'])) {
|
||||
$local_ip = true;
|
||||
|
||||
@ -960,7 +960,7 @@ function filter_generate_optcfg_array()
|
||||
$FilterIflist['enc0'] = $oic;
|
||||
}
|
||||
/* add openvpn interfaces */
|
||||
if($config['openvpn']['openvpn-server'] || $config['openvpn']['openvpn-client']) {
|
||||
if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
|
||||
$oic = array();
|
||||
$oic['if'] = "openvpn";
|
||||
$oic['descr'] = 'OpenVPN';
|
||||
|
||||
@ -5270,7 +5270,7 @@ function interfaces_staticarp_configure($if)
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " -staticarp " );
|
||||
mwexec("/usr/sbin/arp -d -i " . escapeshellarg($ifcfg['if']) . " -a > /dev/null 2>&1 ");
|
||||
if (is_array($config['dhcpd'][$if]) && is_array($config['dhcpd'][$if]['staticmap'])) {
|
||||
if (isset($config['dhcpd'][$if]['staticmap'])) {
|
||||
foreach ($config['dhcpd'][$if]['staticmap'] as $arpent) {
|
||||
if (isset($arpent['arp_table_static_entry'])) {
|
||||
mwexec("/usr/sbin/arp -s " . escapeshellarg($arpent['ipaddr']) . " " . escapeshellarg($arpent['mac']));
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
vpn.inc
|
||||
Copyright (C) 2004 Scott Ullrich
|
||||
Copyright (C) 2008 Shrew Soft Inc
|
||||
Copyright (C) 2008 Ermal Lu<EFBFBD>i
|
||||
All rights reserved.
|
||||
|
||||
originally part of m0n0wall (http://m0n0.ch/wall)
|
||||
Copyright (C) 2008 Ermal Luçi
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
@ -33,13 +29,6 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
pfSense_BUILDER_BINARIES: /sbin/ifconfig
|
||||
pfSense_BUILDER_BINARIES: /usr/local/sbin/ipsec /usr/local/libexec/ipsec/charon /usr/local/libexec/ipsec/starter
|
||||
pfSense_BUILDER_BINARIES: /usr/local/sbin/filterdns /usr/local/sbin/mpd4
|
||||
pfSense_MODULE: vpn
|
||||
*/
|
||||
|
||||
require_once("ipsec.inc");
|
||||
|
||||
function vpn_ipsec_configure_loglevels($forconfig = false)
|
||||
@ -106,9 +95,9 @@ function vpn_ipsec_configure($ipchg = false)
|
||||
|
||||
$syscfg = $config['system'];
|
||||
$ipseccfg = $config['ipsec'];
|
||||
$a_phase1 = $config['ipsec']['phase1'];
|
||||
$a_phase2 = $config['ipsec']['phase2'];
|
||||
$a_client = $config['ipsec']['client'];
|
||||
$a_phase1 = isset($config['ipsec']['phase1']) ? $config['ipsec']['phase1'] : array();
|
||||
$a_phase2 = isset($config['ipsec']['phase2']) ? $config['ipsec']['phase2'] : array();
|
||||
$a_client = isset($config['ipsec']['client']) ? $config['ipsec']['client'] : array();
|
||||
|
||||
if (!isset($ipseccfg['enable'])) {
|
||||
/* try to stop charon */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user