Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
b0156ef3
Commit
b0156ef3
authored
Apr 03, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppps: avoid more potential config issues
parent
41e5e457
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
interfaces_ppps.php
src/www/interfaces_ppps.php
+7
-1
interfaces_ppps_edit.php
src/www/interfaces_ppps_edit.php
+7
-1
setup_wizard.xml
src/www/wizards/setup_wizard.xml
+13
-10
No files found.
src/www/interfaces_ppps.php
View file @
b0156ef3
...
...
@@ -57,8 +57,14 @@ if ($_GET['act'] == "del") {
}
}
if
(
!
is_array
(
$config
[
'ppps'
][
'ppp'
]))
if
(
!
is_array
(
$config
[
'ppps'
]))
{
$config
[
'ppps'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ppps'
][
'ppp'
]))
{
$config
[
'ppps'
][
'ppp'
]
=
array
();
}
$a_ppps
=
$config
[
'ppps'
][
'ppp'
];
$pgtitle
=
gettext
(
"Interfaces: PPPs"
);
...
...
src/www/interfaces_ppps_edit.php
View file @
b0156ef3
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
...
...
@@ -37,8 +38,13 @@ define("CRON_WEEKLY_PATTERN", "0 0 * * 0");
define
(
"CRON_DAILY_PATTERN"
,
"0 0 * * *"
);
define
(
"CRON_HOURLY_PATTERN"
,
"0 * * * *"
);
if
(
!
is_array
(
$config
[
'ppps'
][
'ppp'
]))
if
(
!
is_array
(
$config
[
'ppps'
]))
{
$config
[
'ppps'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ppps'
][
'ppp'
]))
{
$config
[
'ppps'
][
'ppp'
]
=
array
();
}
$a_ppps
=
&
$config
[
'ppps'
][
'ppp'
];
...
...
src/www/wizards/setup_wizard.xml
View file @
b0156ef3
...
...
@@ -433,16 +433,19 @@
}
$type = $_POST['selectedtype'];
if (!is_array($config['ppps']['ppp']))
if (!is_array($config['ppps'])) {
$config['ppps'] = array();
}
if (!is_array($config['ppps']['ppp'])) {
$config['ppps']['ppp'] = array();
if (count($config['ppps']['ppp'])) {
}
foreach ($config['ppps']['ppp'] as $pppid =>
$ppp) {
if ($ppp['ptpid'] == "0") {
if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) {
$oldif = explode(",", $ppp['ports']);
$config['interfaces']['wan']['if'] = $oldif[0];
}
if ($type == "pppoe" || $type == "pptp")
if ($type == "pppoe" || $type == "pptp") {
unset($config['ppps']['ppp'][$pppid]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment