mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 05:04:25 +02:00
Make "HTTPRequest::fetchUrl" dynamic
This commit is contained in:
parent
3b4cf87c95
commit
1aa07f87a4
20 changed files with 26 additions and 46 deletions
|
@ -21,8 +21,6 @@
|
|||
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Network\HTTPRequest;
|
||||
|
||||
/**
|
||||
* Manage compatibility with federated networks
|
||||
*/
|
||||
|
@ -123,7 +121,7 @@ class Protocol
|
|||
if (preg_match('=https?://(.*)/user/(.*)=ism', $profile_url, $matches)) {
|
||||
$statusnet_host = $matches[1];
|
||||
$statusnet_user = $matches[2];
|
||||
$UserData = HTTPRequest::fetchUrl('http://' . $statusnet_host . '/api/users/show.json?user_id=' . $statusnet_user);
|
||||
$UserData = DI::httpRequest()->fetchUrl('http://' . $statusnet_host . '/api/users/show.json?user_id=' . $statusnet_user);
|
||||
$user = json_decode($UserData);
|
||||
if ($user) {
|
||||
$matches[2] = $user->screen_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue