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
1caf2081
Commit
1caf2081
authored
Aug 18, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) fix some warnings/notices in guiconfig.inc
parent
36a069a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
guiconfig.inc
src/www/guiconfig.inc
+10
-4
No files found.
src/www/guiconfig.inc
View file @
1caf2081
...
@@ -161,7 +161,10 @@ function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_error
...
@@ -161,7 +161,10 @@ function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_error
}
}
for
(
$i
=
0
;
$i
<
count
(
$reqdfields
);
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$reqdfields
);
$i
++
)
{
if
(
$_POST
[
$reqdfields
[
$i
]]
==
""
&&
$_REQUEST
[
$reqdfields
[
$i
]]
==
""
)
{
// why.. do you want to do this? we send data to validate and then validate something else....
// can't now for sure if any page uses this wrong behaviour, but it should die eventually.
// TODO: kill
if
(
empty
(
$_POST
[
$reqdfields
[
$i
]])
&&
empty
(
$_REQUEST
[
$reqdfields
[
$i
]]))
{
$input_errors
[]
=
sprintf
(
gettext
(
"The field %s is required."
),
$reqdfieldsn
[
$i
]);
$input_errors
[]
=
sprintf
(
gettext
(
"The field %s is required."
),
$reqdfieldsn
[
$i
]);
}
}
}
}
...
@@ -477,10 +480,13 @@ function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendp
...
@@ -477,10 +480,13 @@ function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendp
else
else
$pnot
=
0
;
$pnot
=
0
;
if
(
$adr
[
'port'
])
{
if
(
isset
(
$adr
[
'port'
]))
{
list
(
$pbeginport
,
$pendport
)
=
explode
(
"-"
,
$adr
[
'port'
]);
if
(
strpos
(
'-'
,
$adr
[
'port'
])
!==
false
)
{
if
(
!
$pendport
)
list
(
$pbeginport
,
$pendport
)
=
explode
(
"-"
,
$adr
[
'port'
]);
}
else
{
$pbeginport
=
$adr
[
'port'
];
$pendport
=
$pbeginport
;
$pendport
=
$pbeginport
;
}
}
else
if
(
!
is_alias
(
$pbeginport
)
&&
!
is_alias
(
$pendport
))
{
}
else
if
(
!
is_alias
(
$pbeginport
)
&&
!
is_alias
(
$pendport
))
{
$pbeginport
=
"any"
;
$pbeginport
=
"any"
;
$pendport
=
"any"
;
$pendport
=
"any"
;
...
...
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