]> git.mxchange.org Git - friendica.git/commitdiff
Replace Addon class with AddonHelper in mod photos.php
authorArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 06:54:53 +0000 (06:54 +0000)
committerArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 06:54:53 +0000 (06:54 +0000)
mod/photos.php

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