]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact.php
Merge pull request #8135 from annando/brief
[friendica.git] / src / Module / Contact.php
index c45a27c88aa606680fb6adc3c4e96316f5219640..d618e2486a5c96235dd6cf86b2ba69a4930af8ae 100644 (file)
@@ -14,7 +14,6 @@ use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
-use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -28,8 +27,6 @@ use Friendica\Util\Strings;
 
 /**
  *  Manages and show Contacts and their content
- *
- *  @brief manages contacts
  */
 class Contact extends BaseModule
 {
@@ -252,8 +249,8 @@ class Contact extends BaseModule
                $nets = $_GET['nets'] ?? '';
                $rel  = $_GET['rel']  ?? '';
 
-               if (empty($a->page['aside'])) {
-                       $a->page['aside'] = '';
+               if (empty(DI::page()['aside'])) {
+                       DI::page()['aside'] = '';
                }
 
                $contact_id = null;
@@ -347,10 +344,10 @@ class Contact extends BaseModule
                        $groups_widget = null;
                }
 
-               $a->page['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $groups_widget . $networks_widget . $rel_widget;
+               DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $groups_widget . $networks_widget . $rel_widget;
 
                $tpl = Renderer::getMarkupTemplate('contacts-head.tpl');
-               $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
+               DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
                        '$baseurl' => DI::baseUrl()->get(true),
                ]);
 
@@ -434,7 +431,7 @@ class Contact extends BaseModule
                                                }
                                        }
 
-                                       $a->page['aside'] = '';
+                                       DI::page()['aside'] = '';
 
                                        return Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_drop_confirm.tpl'), [
                                                '$header' => L10n::t('Drop contact'),
@@ -472,7 +469,7 @@ class Contact extends BaseModule
                if (!empty($a->data['contact']) && is_array($a->data['contact'])) {
                        $contact = $a->data['contact'];
 
-                       $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_head.tpl'), [
+                       DI::page()['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_head.tpl'), [
                                '$baseurl' => DI::baseUrl()->get(true),
                        ]);
 
@@ -819,7 +816,7 @@ class Contact extends BaseModule
                        '$desc'       => L10n::t('Search your contacts'),
                        '$finding'    => $searching ? L10n::t('Results for: %s', $search) : '',
                        '$submit'     => L10n::t('Find'),
-                       '$cmd'        => $a->cmd,
+                       '$cmd'        => DI::args()->getCommand(),
                        '$contacts'   => $contacts,
                        '$contact_drop_confirm' => L10n::t('Do you really want to delete this contact?'),
                        'multiselect' => 1,
@@ -838,7 +835,7 @@ class Contact extends BaseModule
        }
 
        /**
-        * @brief List of pages for the Contact TabBar
+        * List of pages for the Contact TabBar
         *
         * Available Pages are 'Status', 'Profile', 'Contacts' and 'Common Friends'
         *
@@ -931,7 +928,7 @@ class Contact extends BaseModule
                                        'default_location' => $a->user['default-location'],
                                        'nickname' => $a->user['nickname'],
                                        'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
-                                       'acl' => ACL::getFullSelectorHTML($a->page, $a->user, true),
+                                       'acl' => ACL::getFullSelectorHTML(DI::page(), $a->user, true),
                                        'bang' => '',
                                        'visitor' => 'block',
                                        'profile_uid' => local_user(),
@@ -947,7 +944,7 @@ class Contact extends BaseModule
                }
 
                if (DBA::isResult($contact)) {
-                       $a->page['aside'] = '';
+                       DI::page()['aside'] = '';
 
                        $profiledata = Model\Contact::getDetailsByURL($contact['url']);
 
@@ -965,12 +962,12 @@ class Contact extends BaseModule
                $o = self::getTabsHTML($a, $contact, 2);
 
                if (DBA::isResult($contact)) {
-                       $a->page['aside'] = '';
+                       DI::page()['aside'] = '';
 
                        $profiledata = Model\Contact::getDetailsByURL($contact['url']);
 
                        if (local_user() && in_array($profiledata['network'], Protocol::FEDERATED)) {
-                               $profiledata['remoteconnect'] = System::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
+                               $profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
                        }
 
                        Model\Profile::load($a, '', 0, $profiledata, true);
@@ -1050,7 +1047,7 @@ class Contact extends BaseModule
        }
 
        /**
-        * @brief Gives a array with actions which can performed to a given contact
+        * Gives a array with actions which can performed to a given contact
         *
         * This includes actions like e.g. 'block', 'hide', 'archive', 'delete' and others
         *