1
0
Fork 0

Make "HTTPRequest::curl" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:15:46 +01:00 committed by Hypolite Petovan
commit 2973ed6448
20 changed files with 72 additions and 84 deletions

View file

@ -285,7 +285,7 @@ class Search
$return = GContact::searchByName($search, $mode);
} else {
$p = $page > 1 ? 'p=' . $page : '';
$curlResult = HTTPRequest::curl(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), false, ['accept_content' => 'application/json']);
$curlResult = DI::httpRequest()->curl(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), false, ['accept_content' => 'application/json']);
if ($curlResult->isSuccess()) {
$searchResult = json_decode($curlResult->getBody(), true);
if (!empty($searchResult['profiles'])) {