File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/opnsense/mvc/app/library/OPNsense/Base Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,15 @@ public function fetch(
132
132
$ searchFound = false ;
133
133
foreach ($ fields as $ fieldname ) {
134
134
$ item = $ row ['% ' . $ fieldname ] ?? $ row [$ fieldname ] ?? '' ; /* prefer search by description */
135
+ if (!array_key_exists ($ fieldname , $ row ) && $ record ->$ fieldname != null ) {
136
+ /**
137
+ * Fallback, item is most likely virtual. Since the model has no knowledge
138
+ * of these types, but the controller explicitly asked for it, include it in the result.
139
+ * XXX this item should be a volatile field in the model.
140
+ */
141
+ $ item = $ record ->$ fieldname ->getDescription ();
142
+ $ row [$ fieldname ] = $ item ;
143
+ }
135
144
if (!empty ($ item ) && strpos (strtolower ($ item ), strtolower ($ clause )) !== false ) {
136
145
$ searchFound = true ;
137
146
}
You can’t perform that action at this time.
0 commit comments