Commit d80be7bf authored by Franco Fichtner's avatar Franco Fichtner

ipsec: more config amending; fixes #112

parent 2d86dbfb
<?php
/* $Id$ */
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
......@@ -57,8 +57,13 @@ if ($_GET['act'] == 'connect') {
}
}
if (!is_array($config['ipsec']['phase1']))
if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
$a_phase1 = &$config['ipsec']['phase1'];
......
......@@ -33,8 +33,13 @@ global $g;
require_once("guiconfig.inc");
require_once("ipsec.inc");
if (!is_array($config['ipsec']['phase2']))
if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase2'])) {
$config['ipsec']['phase2'] = array();
}
$ipsec_status = array();
......
......@@ -38,11 +38,13 @@ if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1']))
if (!is_array($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
if (!is_array($config['ipsec']['phase2']))
if (!is_array($config['ipsec']['phase2'])) {
$config['ipsec']['phase2'] = array();
}
$a_phase1 = &$config['ipsec']['phase1'];
$a_phase2 = &$config['ipsec']['phase2'];
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Shrew Soft Inc
......@@ -35,14 +36,15 @@ if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1']))
if (!is_array($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
$a_phase1 = &$config['ipsec']['phase1'];
if (!is_array($config['ipsec']['client']))
if (!is_array($config['ipsec']['client'])) {
$config['ipsec']['client'] = array();
}
$a_phase1 = &$config['ipsec']['phase1'];
$a_client = &$config['ipsec']['client'];
if (count($a_client)) {
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Shrew Soft Inc
Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2014 Ermal LUÇI
Copyright (C) 2014 Ermal Luçi
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -37,11 +38,13 @@ if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1']))
if (!is_array($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
if (!is_array($config['ipsec']['phase2']))
if (!is_array($config['ipsec']['phase2'])) {
$config['ipsec']['phase2'] = array();
}
$a_phase1 = &$config['ipsec']['phase1'];
$a_phase2 = &$config['ipsec']['phase2'];
......
......@@ -36,14 +36,15 @@ if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['client']))
if (!is_array($config['ipsec']['client'])) {
$config['ipsec']['client'] = array();
}
$a_client = &$config['ipsec']['client'];
if (!is_array($config['ipsec']['phase2']))
if (!is_array($config['ipsec']['phase2'])) {
$config['ipsec']['phase2'] = array();
}
$a_client = &$config['ipsec']['client'];
$a_phase2 = &$config['ipsec']['phase2'];
if (!empty($_GET['p2index']))
......
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