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
6847e4f2
Commit
6847e4f2
authored
May 28, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mvc) add __empty__ item to OptionField as placeholder for an empty string
parent
4934ce12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
OptionField.php
...e/mvc/app/models/OPNsense/Base/FieldTypes/OptionField.php
+5
-1
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/OptionField.php
View file @
6847e4f2
...
@@ -59,11 +59,15 @@ class OptionField extends BaseField
...
@@ -59,11 +59,15 @@ class OptionField extends BaseField
// copy options to internal structure, make sure we don't copy in array structures
// copy options to internal structure, make sure we don't copy in array structures
foreach
(
$data
as
$key
=>
$value
)
{
foreach
(
$data
as
$key
=>
$value
)
{
if
(
!
is_array
(
$value
))
{
if
(
!
is_array
(
$value
))
{
if
(
$key
==
"__empty__"
)
{
$this
->
internalOptionList
[
""
]
=
$value
;
}
else
{
$this
->
internalOptionList
[
$key
]
=
$value
;
$this
->
internalOptionList
[
$key
]
=
$value
;
}
}
}
}
}
}
}
}
}
/**
/**
* get valid options, descriptions and selected value
* get valid options, descriptions and selected value
...
...
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