]> git.mxchange.org Git - friendica.git/commitdiff
Remove unused App parameter from Module\Contact::getTabsHTML
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 6 Aug 2020 14:31:40 +0000 (10:31 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 7 Aug 2020 02:59:09 +0000 (22:59 -0400)
mod/common.php
src/Module/AllFriends.php
src/Module/Contact.php
src/Module/Contact/Advanced.php

index d4ee97c4ff7a1b37998ed2ddacd3f6e91c624b8a..fe63a653bea646bf88d037985a3f243d654fbb6c 100644 (file)
@@ -120,7 +120,7 @@ function common_content(App $a)
        $title = '';
        $tab_str = '';
        if ($cmd === 'loc' && $cid && local_user() == $uid) {
-               $tab_str = Module\Contact::getTabsHTML($a, $contact, 5);
+               $tab_str = Module\Contact::getTabsHTML($contact, 5);
        } else {
                $title = DI::l10n()->t('Common Friends');
        }
index f41b8b0d71a9a7db0bfdddfc390b4b2733e2c7a8..9f1152f26ec1da81c2e0b26aa05ad07a959ca871 100644 (file)
@@ -72,7 +72,7 @@ class AllFriends extends BaseModule
                        return DI::l10n()->t('No friends to display.');
                }
 
-               $tab_str = Contact::getTabsHTML($app, $contact, 4);
+               $tab_str = Contact::getTabsHTML($contact, 4);
 
                $entries = [];
                foreach ($friends as $friend) {
index 750a927e882aa5a3050f2d2ffab6825c95c03015..3085bbd0b86fbaabc52e3d1b151929b6ecd9aa73 100644 (file)
@@ -531,7 +531,7 @@ class Contact extends BaseModule
                        $nettype = DI::l10n()->t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact['url'], $contact['protocol']));
 
                        // tabs
-                       $tab_str = self::getTabsHTML($a, $contact, 3);
+                       $tab_str = self::getTabsHTML($contact, 3);
 
                        $lost_contact = (($contact['archive'] && $contact['term-date'] > DBA::NULL_DATETIME && $contact['term-date'] < DateTimeFormat::utcNow()) ? DI::l10n()->t('Communications lost with this contact!') : '');
 
@@ -855,14 +855,14 @@ class Contact extends BaseModule
         *
         * Available Pages are 'Status', 'Profile', 'Contacts' and 'Common Friends'
         *
-        * @param App   $a
         * @param array $contact    The contact array
         * @param int   $active_tab 1 if tab should be marked as active
         *
         * @return string HTML string of the contact page tabs buttons.
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+        * @throws \ImagickException
         */
-       public static function getTabsHTML($a, $contact, $active_tab)
+       public static function getTabsHTML(array $contact, int $active_tab)
        {
                $cid = $pcid = $contact['id'];
                $data = Model\Contact::getPublicAndUserContacID($contact['id'], local_user());
@@ -964,7 +964,7 @@ class Contact extends BaseModule
                $contact = DBA::selectFirst('contact', ['uid', 'url', 'id'], ['id' => $contact_id, 'deleted' => false]);
 
                if (!$update) {
-                       $o .= self::getTabsHTML($a, $contact, 1);
+                       $o .= self::getTabsHTML($contact, 1);
                }
 
                if (DBA::isResult($contact)) {
@@ -988,7 +988,7 @@ class Contact extends BaseModule
        {
                $contact = DBA::selectFirst('contact', ['uid', 'url', 'id'], ['id' => $contact_id, 'deleted' => false]);
 
-               $o = self::getTabsHTML($a, $contact, 2);
+               $o = self::getTabsHTML($contact, 2);
 
                if (DBA::isResult($contact)) {
                        DI::page()['aside'] = '';
index be1e874a57939c98af964e20e703970a01914017..2ba7fb185a7b128fca4120d7bb2dda114e194893 100644 (file)
@@ -125,7 +125,7 @@ class Advanced extends BaseModule
                        $remote_self_options = ['0' => DI::l10n()->t('No mirroring'), '2' => DI::l10n()->t('Mirror as my own posting')];
                }
 
-               $tab_str = Contact::getTabsHTML(DI::app(), $contact, 6);
+               $tab_str = Contact::getTabsHTML($contact, 6);
 
                $tpl = Renderer::getMarkupTemplate('contact/advanced.tpl');
                return Renderer::replaceMacros($tpl, [