From f5eee2c3343abc65619cf2903d48b9b539f10bc2 Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 28 Apr 2025 14:07:20 +0000 Subject: [PATCH] Replace Addon class with AddonHelper in Post Object --- src/Object/Post.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index d4b381a115..afc3d04fa7 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -9,7 +9,6 @@ namespace Friendica\Object; use Friendica\Content\ContactSelector; use Friendica\Content\Feature; -use Friendica\Core\Addon; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\DI; @@ -1118,12 +1117,14 @@ class Post $conv = $this->getThread(); if ($conv->isWritable() && $this->isWritable()) { + $addonHelper = DI::addonHelper(); + /* * Hmmm, code depending on the presence of a particular addon? * 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) : []; }