@@ -78,6 +78,7 @@ public function indexAction()
7878 } else {
7979 $ this ->addControl ($ searchBar );
8080 $ this ->sendMultipartUpdate ();
81+
8182 return ;
8283 }
8384 } else {
@@ -93,13 +94,7 @@ public function indexAction()
9394 $ this ->addControl ($ limitControl );
9495 $ this ->addControl ($ searchBar );
9596
96- $ exportable = array_flip ([
97- 'valid ' , 'hostname ' , 'ip ' , 'port ' , 'subject ' , 'issuer ' , 'version ' ,
98- 'self_signed ' , 'ca ' , 'trusted ' , 'pubkey_algo ' , 'pubkey_bits ' ,
99- 'signature_algo ' , 'signature_hash_algo ' , 'valid_from ' , 'valid_to '
100- ]);
101-
102- $ this ->handleFormatRequest ($ targets , function (Query $ targets ) use ($ conn , $ exportable ) {
97+ $ this ->handleFormatRequest ($ targets , function (Query $ targets ) {
10398 foreach ($ targets as $ usage ) {
10499 $ usage ['valid_from ' ] = (new \DateTime ())
105100 ->setTimestamp ($ usage ['valid_from ' ])
@@ -113,7 +108,10 @@ public function indexAction()
113108 $ usage ->port = $ usage ->chain ->target ->port ;
114109 $ usage ->valid = $ usage ->chain ->valid ;
115110
116- yield array_intersect_key (iterator_to_array ($ usage ), $ exportable );
111+ yield array_intersect_key (
112+ iterator_to_array ($ usage ),
113+ array_flip (array_merge (['valid ' , 'hostname ' , 'ip ' , 'port ' ], $ usage ->getExportableColumns ()))
114+ );
117115 }
118116 });
119117
@@ -126,10 +124,11 @@ public function indexAction()
126124
127125 public function completeAction ()
128126 {
129- $ suggestions = new ObjectSuggestions ();
130- $ suggestions ->setModel (X509Certificate::class);
131- $ suggestions ->forRequest ($ this ->getServerRequest ());
132- $ this ->getDocument ()->add ($ suggestions );
127+ $ this ->getDocument ()->add (
128+ (new ObjectSuggestions ())
129+ ->setModel (X509Certificate::class)
130+ ->forRequest ($ this ->getServerRequest ())
131+ );
133132 }
134133
135134 public function searchEditorAction ()
0 commit comments