File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,12 +82,15 @@ function search($service, $dirty_query
8282
8383 // todo: move back into own function once error handling is refactored
8484 if ($ service == "openaire " ) {
85- $ payload = json_encode (array ("params " => $ post_params ));
86- $ res = $ apiclient ->call_api ($ service . "/projectdata " , $ payload );
87- $ result = json_decode ($ res ["result " ], true );
88- if (isset ($ result ["status " ]) && $ result ["status " ] === "error " ) {
89- return json_encode ($ result );
90- }
85+ $ payload = json_encode (array ("params " => $ post_params ));
86+ $ res = $ apiclient ->call_api ($ service . "/projectdata " , $ payload );
87+ $ result = json_decode ($ res ["result " ], true );
88+ if (isset ($ result ["status " ]) && $ result ["status " ] === "error " ) {
89+ return json_encode ($ result );
90+ } else {
91+ $ projectdata = $ result ["projectdata " ];
92+ $ post_params = array_merge ($ post_params , $ projectdata );
93+ }
9194 }
9295
9396 $ params_json = packParamsJSON ($ param_types , $ post_params );
You can’t perform that action at this time.
0 commit comments