mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/l2tp: PHP 7.1 compat
This commit is contained in:
parent
1e779975d8
commit
f048bee85d
4 changed files with 5 additions and 12 deletions
|
|
@ -1,5 +1,6 @@
|
|||
PLUGIN_NAME= l2tp
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_DEPENDS= clog mpd5
|
||||
PLUGIN_COMMENT= L2TP server based on MPD5
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@ require_once("services.inc");
|
|||
require_once("system.inc");
|
||||
require_once("plugins.inc.d/if_l2tp.inc");
|
||||
|
||||
if (!isset($config['l2tp']['radius']) || !is_array($config['l2tp']['radius'])) {
|
||||
$config['l2tp']['radius'] = array();
|
||||
}
|
||||
$l2tpcfg = &$config['l2tp'];
|
||||
$l2tpcfg = &config_read_array('l2tp');
|
||||
config_read_array('l2tp', 'radius');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig['remoteip'] = $l2tpcfg['remoteip'];
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@ require_once("services.inc");
|
|||
require_once("system.inc");
|
||||
require_once("plugins.inc.d/if_l2tp.inc");
|
||||
|
||||
if (!isset($config['l2tp']['user'])) {
|
||||
$config['l2tp']['user'] = array();
|
||||
}
|
||||
$a_secret = &$config['l2tp']['user'];
|
||||
$a_secret = &config_read_array('l2tp', 'user');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
// delete entry
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ require_once("services.inc");
|
|||
require_once("system.inc");
|
||||
require_once("plugins.inc.d/if_l2tp.inc");
|
||||
|
||||
if (empty($config['l2tp']['user']) || !is_array($config['l2tp']['user'])) {
|
||||
$config['l2tp']['user'] = array();
|
||||
}
|
||||
$a_secret = &$config['l2tp']['user'];
|
||||
$a_secret = &config_read_array('l2tp', 'user');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
if (isset($_GET['id']) && !empty($a_secret[$_GET['id']])) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue