From c50827a80399f8173ee14adc3650a9e62ea4d49f Mon Sep 17 00:00:00 2001 From: Art4 Date: Tue, 4 Feb 2025 06:54:53 +0000 Subject: [PATCH] Replace Addon class with AddonHelper in mod photos.php --- mod/photos.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index c2831270ab..1294406761 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -11,7 +11,6 @@ use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Content\Text\BBCode; use Friendica\Core\ACL; -use Friendica\Core\Addon; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\Core\System; @@ -1067,6 +1066,7 @@ function photos_content() $cmnt_tpl = Renderer::getMarkupTemplate('comment_item.tpl'); $tpl = Renderer::getMarkupTemplate('photo_item.tpl'); $return_path = DI::args()->getCommand(); + $addonHelper = DI::addonHelper(); if (!DBA::isResult($items)) { if (($can_post || Security::canWriteToUserWall($owner_uid))) { @@ -1075,7 +1075,7 @@ function photos_content() * This should be better if done by a hook */ $qcomment = null; - if (Addon::isEnabled('qcomment')) { + if ($addonHelper->isAddonEnabled('qcomment')) { $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words'); $qcomment = $words ? explode("\n", $words) : []; } @@ -1131,7 +1131,7 @@ function photos_content() * This should be better if done by a hook */ $qcomment = null; - if (Addon::isEnabled('qcomment')) { + if ($addonHelper->isAddonEnabled('qcomment')) { $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words'); $qcomment = $words ? explode("\n", $words) : []; } @@ -1211,7 +1211,7 @@ function photos_content() * This should be better if done by a hook */ $qcomment = null; - if (Addon::isEnabled('qcomment')) { + if ($addonHelper->isAddonEnabled('qcomment')) { $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words'); $qcomment = $words ? explode("\n", $words) : []; }