]> git.mxchange.org Git - friendica.git/commitdiff
Replace calls for App::getProfileOwner() with AppHelper
authorArt4 <art4@wlabs.de>
Fri, 8 Nov 2024 22:45:14 +0000 (22:45 +0000)
committerArt4 <art4@wlabs.de>
Fri, 8 Nov 2024 22:45:14 +0000 (22:45 +0000)
src/Model/Profile.php
src/Object/Thread.php

index 5ace7ed2c568775fd2867a25cf337de32bd54588..6275fcd994334e83f2da90007fc18fe5bfa72b04 100644 (file)
@@ -7,7 +7,6 @@
 
 namespace Friendica\Model;
 
-use Friendica\App;
 use Friendica\App\Mode;
 use Friendica\AppHelper;
 use Friendica\Content\Text\BBCode;
@@ -191,7 +190,6 @@ class Profile
         *      the theme is chosen before the _init() function of a theme is run, which will usually
         *      load a lot of theme-specific content
         *
-        * @param App    $a
         * @param string $nickname string
         * @param bool   $show_contacts
         *
@@ -688,15 +686,13 @@ class Profile
         * settings take precedence; unless a local user is logged in which means they don't
         * want to see anybody else's theme settings except their own while on this site.
         *
-        * @param App $a
-        *
         * @return int user ID
         *
         * @note Returns local_user instead of user ID if "always_my_theme" is set to true
         */
-       public static function getThemeUid(App $a): int
+       public static function getThemeUid(AppHelper $appHelper): int
        {
-               return DI::userSession()->getLocalUserId() ?: $a->getProfileOwner();
+               return DI::userSession()->getLocalUserId() ?: $appHelper->getProfileOwner();
        }
 
        /**
index a39ea10e0233ab8a6b8238cfef33b7a1912e6d22..e0585e322255a2a6272c3e8d09b9d1fa750d375a 100644 (file)
@@ -57,7 +57,7 @@ class Thread
                        return;
                }
 
-               $a = DI::app();
+               $appHelper = DI::apphelper();
 
                switch ($mode) {
                        case Conversation::MODE_NETWORK:
@@ -67,7 +67,7 @@ class Thread
                                break;
                        case Conversation::MODE_PROFILE:
                        case Conversation::MODE_DISPLAY:
-                               $this->profile_owner = $a->getProfileOwner();
+                               $this->profile_owner = $appHelper->getProfileOwner();
                                $this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable;
                                break;
                        case Conversation::MODE_CHANNEL: