more tracing
This commit is contained in:
@@ -298,6 +298,8 @@ class Article extends Handler_Protected {
|
||||
* @return array{'formatted': string, 'entries': array<int, array<string, mixed>>}
|
||||
*/
|
||||
static function _format_enclosures(int $id, bool $always_display_enclosures, string $article_content, bool $hide_images = false): array {
|
||||
$scope = Tracer::start(__METHOD__);
|
||||
|
||||
$enclosures = self::_get_enclosures($id);
|
||||
$enclosures_formatted = "";
|
||||
|
||||
@@ -324,6 +326,7 @@ class Article extends Handler_Protected {
|
||||
$enclosures_formatted, $enclosures, $id, $always_display_enclosures, $article_content, $hide_images);
|
||||
|
||||
if (!empty($enclosures_formatted)) {
|
||||
$scope->close();
|
||||
return [
|
||||
'formatted' => $enclosures_formatted,
|
||||
'entries' => []
|
||||
@@ -367,6 +370,7 @@ class Article extends Handler_Protected {
|
||||
}
|
||||
}
|
||||
|
||||
$scope->close();
|
||||
return $rv;
|
||||
}
|
||||
|
||||
@@ -374,6 +378,7 @@ class Article extends Handler_Protected {
|
||||
* @return array<int, string>
|
||||
*/
|
||||
static function _get_tags(int $id, int $owner_uid = 0, ?string $tag_cache = null): array {
|
||||
$scope = Tracer::start(__METHOD__);
|
||||
|
||||
$a_id = $id;
|
||||
|
||||
@@ -422,6 +427,7 @@ class Article extends Handler_Protected {
|
||||
$sth->execute([$tags_str, $id, $owner_uid]);
|
||||
}
|
||||
|
||||
$scope->close();
|
||||
return $tags;
|
||||
}
|
||||
|
||||
@@ -516,6 +522,8 @@ class Article extends Handler_Protected {
|
||||
* @return array<int, array<int, int|string>>
|
||||
*/
|
||||
static function _get_labels(int $id, ?int $owner_uid = null): array {
|
||||
$scope = Tracer::start(__METHOD__, []);
|
||||
|
||||
$rv = array();
|
||||
|
||||
if (!$owner_uid) $owner_uid = $_SESSION["uid"];
|
||||
@@ -561,6 +569,8 @@ class Article extends Handler_Protected {
|
||||
else
|
||||
Labels::update_cache($owner_uid, $id, array("no-labels" => 1));
|
||||
|
||||
$scope->close();
|
||||
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user