Introducing Profiler

This commit is contained in:
Philipp Holzer 2019-02-16 23:11:30 +01:00
parent 12ff467a9b
commit 5e6e1a8025
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
24 changed files with 370 additions and 262 deletions

View file

@ -1027,7 +1027,7 @@ class BBCode extends BaseObject
@curl_exec($ch);
$curl_info = @curl_getinfo($ch);
$a->saveTimestamp($stamp1, "network");
$a->getProfiler()->saveTimestamp($stamp1, "network");
if (substr($curl_info["content_type"], 0, 6) == "image/") {
$text = "[url=" . $match[1] . "]" . $match[1] . "[/url]";
@ -1086,7 +1086,7 @@ class BBCode extends BaseObject
@curl_exec($ch);
$curl_info = @curl_getinfo($ch);
$a->saveTimestamp($stamp1, "network");
$a->getProfiler()->saveTimestamp($stamp1, "network");
// if its a link to a picture then embed this picture
if (substr($curl_info["content_type"], 0, 6) == "image/") {
@ -1915,7 +1915,7 @@ class BBCode extends BaseObject
// unmask the special chars back to HTML
$text = str_replace(['&\_lt\_;', '&\_gt\_;', '&\_amp\_;'], ['<', '>', '&'], $text);
$a->saveTimestamp($stamp1, "parser");
$a->getProfiler()->saveTimestamp($stamp1, "parser");
// Libertree has a problem with escaped hashtags.
$text = str_replace(['\#'], ['#'], $text);