mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:50:11 +00:00
Introducing Profiler
This commit is contained in:
parent
12ff467a9b
commit
5e6e1a8025
24 changed files with 370 additions and 262 deletions
|
@ -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);
|
||||
|
|
|
@ -36,7 +36,7 @@ class Markdown extends BaseObject
|
|||
$html = $MarkdownParser->transform($text);
|
||||
$html = preg_replace('/<a(.*?)href="#/is', '<a$1href="' . ltrim($_SERVER['REQUEST_URI'], '/') . '#', $html);
|
||||
|
||||
self::getApp()->saveTimestamp($stamp1, "parser");
|
||||
self::getApp()->getProfiler()->saveTimestamp($stamp1, "parser");
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue