mirror of
https://github.com/friendica/friendica
synced 2025-04-25 03:50:12 +00:00
Refactor dynamic App::getProfiler() to static DI::profiler()
This commit is contained in:
parent
e2b2778e0a
commit
181529f3df
12 changed files with 22 additions and 30 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue