]> git.mxchange.org Git - friendica.git/commitdiff
Replace Addon class with AddonHelper in Post Object
authorArt4 <art4@wlabs.de>
Mon, 28 Apr 2025 14:07:20 +0000 (14:07 +0000)
committerArt4 <art4@wlabs.de>
Mon, 28 Apr 2025 14:07:20 +0000 (14:07 +0000)
src/Object/Post.php

index d4b381a115d9990db4141e36cb950bd1e9994920..afc3d04fa75eef1dad746ea08ab0b84d49602d2b 100644 (file)
@@ -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) : [];
                        }