diff --git a/classes/article.php b/classes/article.php index f4c271118..63469ccd2 100755 --- a/classes/article.php +++ b/classes/article.php @@ -581,6 +581,7 @@ class Article extends Handler_Protected { * @return array */ static function _get_image(array $enclosures, string $content, string $site_url, array $headline) { + $scope = Tracer::start(__METHOD__); $article_image = ""; $article_stream = ""; @@ -659,6 +660,8 @@ class Article extends Handler_Protected { if ($article_stream && $cache->exists(sha1($article_stream))) $article_stream = $cache->get_url(sha1($article_stream)); + $scope->close(); + return [$article_image, $article_stream, $article_kind]; } @@ -672,6 +675,8 @@ class Article extends Handler_Protected { if (count($article_ids) == 0) return []; + $scope = Tracer::start(__METHOD__); + $entries = ORM::for_table('ttrss_entries') ->table_alias('e') ->join('ttrss_user_entries', ['ref_id', '=', 'id'], 'ue') @@ -691,6 +696,8 @@ class Article extends Handler_Protected { } } + $scope->close(); + return array_unique($rv); } @@ -702,6 +709,8 @@ class Article extends Handler_Protected { if (count($article_ids) == 0) return []; + $scope = Tracer::start(__METHOD__); + $entries = ORM::for_table('ttrss_entries') ->table_alias('e') ->join('ttrss_user_entries', ['ref_id', '=', 'id'], 'ue') @@ -714,6 +723,8 @@ class Article extends Handler_Protected { array_push($rv, $entry->feed_id); } + $scope->close(); + return array_unique($rv); } } diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 09c8b1671..bdbecca13 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -659,6 +659,7 @@ class PluginHost { private function save_data(string $plugin): void { if ($this->owner_uid) { + $scope = Tracer::start(__METHOD__); if (!$this->pdo_data) $this->pdo_data = Db::instance()->pdo_connect(); @@ -686,6 +687,7 @@ class PluginHost { } $this->pdo_data->commit(); + $scope->close(); } }