]> git.mxchange.org Git - friendica.git/commitdiff
Normalize Contact::magicLinkByContact method name
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 22 Feb 2019 02:29:22 +0000 (21:29 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 23 Feb 2019 22:32:10 +0000 (17:32 -0500)
include/conversation.php
src/Model/Contact.php
src/Object/Post.php

index 23a0dcbf29215318fc776b1cb7821cbf99bfd03c..3c52e62fc478ca40389b6917d695eab618834d62 100644 (file)
@@ -365,7 +365,7 @@ function localize_item(&$item)
 
        // Only create a redirection to a magic link when logged in
        if (!empty($item['plink']) && (local_user() || remote_user())) {
-               $item['plink'] = Contact::magicLinkbyContact($author, $item['plink']);
+               $item['plink'] = Contact::magicLinkByContact($author, $item['plink']);
        }
 }
 
@@ -625,7 +625,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
 
                                $author = ['uid' => 0, 'id' => $item['author-id'],
                                        'network' => $item['author-network'], 'url' => $item['author-link']];
-                               $profile_link = Contact::magicLinkbyContact($author);
+                               $profile_link = Contact::magicLinkByContact($author);
 
                                if (strpos($profile_link, 'redir/') === 0) {
                                        $sparkle = ' sparkle';
@@ -858,7 +858,7 @@ function item_photo_menu($item) {
 
        $author = ['uid' => 0, 'id' => $item['author-id'],
                'network' => $item['author-network'], 'url' => $item['author-link']];
-       $profile_link = Contact::magicLinkbyContact($author);
+       $profile_link = Contact::magicLinkByContact($author);
        $sparkle = (strpos($profile_link, 'redir/') === 0);
 
        $cid = 0;
@@ -966,7 +966,7 @@ function builtin_activity_puller($item, &$conv_responses) {
                if (activity_match($item['verb'], $verb) && ($item['id'] != $item['parent'])) {
                        $author = ['uid' => 0, 'id' => $item['author-id'],
                                'network' => $item['author-network'], 'url' => $item['author-link']];
-                       $url = Contact::magicLinkbyContact($author);
+                       $url = Contact::magicLinkByContact($author);
                        if (strpos($url, 'redir/') === 0) {
                                $sparkle = ' class="sparkle" ';
                        }
index d38d1cc1016442a9c1eeb97926a31d830304b38a..5f63d89d0f974243d6f2ea7de78212c8ce14e54e 100644 (file)
@@ -2184,7 +2184,7 @@ class Contact extends BaseObject
        {
                $contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], ['id' => $cid]);
 
-               return self::magicLinkbyContact($contact, $url);
+               return self::magicLinkByContact($contact, $url);
        }
 
        /**
@@ -2197,7 +2197,7 @@ class Contact extends BaseObject
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function magicLinkbyContact($contact, $url = '')
+       public static function magicLinkByContact($contact, $url = '')
        {
                if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) {
                        return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
index e24607a7878c96d21ea0c24be1654f3837e7eb4f..bd48dbb3d32753bd6a6ccf185edeba67c307c94f 100644 (file)
@@ -83,7 +83,7 @@ class Post extends BaseObject
                $author = ['uid' => 0, 'id' => $this->getDataValue('author-id'),
                        'network' => $this->getDataValue('author-network'),
                        'url' => $this->getDataValue('author-link')];
-               $this->redirect_url = Contact::magicLinkbyContact($author);
+               $this->redirect_url = Contact::magicLinkByContact($author);
                if (!$this->isToplevel()) {
                        $this->threaded = true;
                }
@@ -224,7 +224,7 @@ class Post extends BaseObject
                        'network' => $item['author-network'], 'url' => $item['author-link']];
 
                if (local_user() || remote_user()) {
-                       $profile_link = Contact::magicLinkbyContact($author);
+                       $profile_link = Contact::magicLinkByContact($author);
                } else {
                        $profile_link = $item['author-link'];
                }
@@ -948,7 +948,7 @@ class Post extends BaseObject
                                                $owner = ['uid' => 0, 'id' => $this->getDataValue('owner-id'),
                                                        'network' => $this->getDataValue('owner-network'),
                                                        'url' => $this->getDataValue('owner-link')];
-                                               $this->owner_url = Contact::magicLinkbyContact($owner);
+                                               $this->owner_url = Contact::magicLinkByContact($owner);
                                        }
                                }
                        }