Refactor dynamic App::getProfiler() to static DI::profiler()
This commit is contained in:
@@ -10,6 +10,7 @@ use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\CurlResult;
|
||||
|
||||
class Network
|
||||
@@ -233,7 +234,7 @@ class Network
|
||||
|
||||
@curl_close($ch);
|
||||
|
||||
$a->getProfiler()->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
DI::profiler()->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
|
||||
return $curlResponse;
|
||||
}
|
||||
@@ -325,7 +326,7 @@ class Network
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
$a->getProfiler()->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
DI::profiler()->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
|
||||
// Very old versions of Lighttpd don't like the "Expect" header, so we remove it when needed
|
||||
if ($curlResponse->getReturnCode() == 417) {
|
||||
@@ -654,7 +655,7 @@ class Network
|
||||
$http_code = $curl_info['http_code'];
|
||||
curl_close($ch);
|
||||
|
||||
$a->getProfiler()->saveTimestamp($stamp1, "network", System::callstack());
|
||||
DI::profiler()->saveTimestamp($stamp1, "network", System::callstack());
|
||||
|
||||
if ($http_code == 0) {
|
||||
return $url;
|
||||
@@ -696,7 +697,7 @@ class Network
|
||||
$body = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
$a->getProfiler()->saveTimestamp($stamp1, "network", System::callstack());
|
||||
DI::profiler()->saveTimestamp($stamp1, "network", System::callstack());
|
||||
|
||||
if (trim($body) == "") {
|
||||
return $url;
|
||||
|
||||
Reference in New Issue
Block a user