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
9d39f174
Commit
9d39f174
authored
Dec 19, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Jan 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(UIModelGrid) return all selected items for list types
(cherry picked from commit
74b0ed00
)
parent
6ea5f75e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
UIModelGrid.php
src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
+8
-3
No files found.
src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php
View file @
9d39f174
...
...
@@ -105,12 +105,17 @@ class UIModelGrid
if
(
$record
->
$fieldname
!=
null
)
{
$row
[
$fieldname
]
=
$record
->
$fieldname
->
getNodeData
();
if
(
is_array
(
$row
[
$fieldname
]))
{
foreach
(
$row
[
$fieldname
]
as
$fieldKey
=>
$fieldValue
)
{
$listItems
=
$row
[
$fieldname
];
$row
[
$fieldname
]
=
''
;
foreach
(
$listItems
as
$fieldValue
)
{
if
(
$fieldValue
[
'selected'
]
==
1
)
{
$row
[
$fieldname
]
=
$fieldValue
[
'value'
];
if
(
!
empty
(
$row
[
$fieldname
]))
{
$row
[
$fieldname
]
.=
','
;
}
$row
[
$fieldname
]
.=
$fieldValue
[
'value'
];
}
}
if
(
is_arra
y
(
$row
[
$fieldname
]))
{
if
(
empt
y
(
$row
[
$fieldname
]))
{
$row
[
$fieldname
]
=
"##Unlinked"
;
}
}
...
...
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