]> git.mxchange.org Git - friendica.git/commitdiff
Renamed functions
authorMichael <heluecht@pirati.ca>
Wed, 3 Oct 2018 15:41:51 +0000 (15:41 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 3 Oct 2018 15:41:51 +0000 (15:41 +0000)
mod/dfrn_confirm.php
src/Model/Contact.php
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php
src/Protocol/ActivityPub/Transmitter.php
src/Worker/APDelivery.php

index 9bd9339ed7f8e615734ace6eaa7da8da527073b6..d3fa45d361219a1ce9632e209ca18cd8ca06ec2b 100644 (file)
@@ -337,7 +337,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
                        );
                } else {
                        if ($network == Protocol::ACTIVITYPUB) {
-                               ActivityPub\Transmitter::transmitContactAccept($contact['url'], $contact['hub-verify'], $uid);
+                               ActivityPub\Transmitter::sendContactAccept($contact['url'], $contact['hub-verify'], $uid);
                                $pending = true;
                        } else {
                                $pending = false;
@@ -394,7 +394,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
                Group::addMember(User::getDefaultGroup($uid, $contact["network"]), $contact['id']);
 
                if ($network == Protocol::ACTIVITYPUB && $duplex) {
-                       ActivityPub\Transmitter::transmitActivity('Follow', $contact['url'], $uid);
+                       ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid);
                }
 
                // Let's send our user to the contact editor in case they want to
index c7513567ac24bfb4855d6b5ad5583f0d61823eca..3ffd5b2af5e2f45208287ffbf3a7129c1afa7377 100644 (file)
@@ -557,10 +557,10 @@ class Contact extends BaseObject
                } elseif ($contact['network'] == Protocol::DIASPORA) {
                        Diaspora::sendUnshare($user, $contact);
                } elseif ($contact['network'] == Protocol::ACTIVITYPUB) {
-                       ActivityPub\Transmitter::transmitContactUndo($contact['url'], $user['uid']);
+                       ActivityPub\Transmitter::sendContactUndo($contact['url'], $user['uid']);
 
                        if ($dissolve) {
-                               ActivityPub\Transmitter::transmitContactReject($contact['url'], $contact['hub-verify'], $user['uid']);
+                               ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $user['uid']);
                        }
                }
        }
@@ -1769,7 +1769,7 @@ class Contact extends BaseObject
                                $ret = Diaspora::sendShare($a->user, $contact);
                                logger('share returns: ' . $ret);
                        } elseif ($contact['network'] == Protocol::ACTIVITYPUB) {
-                               $ret = ActivityPub\Transmitter::transmitActivity('Follow', $contact['url'], $uid);
+                               $ret = ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid);
                                logger('Follow returns: ' . $ret);
                        }
                }
@@ -1846,7 +1846,7 @@ class Contact extends BaseObject
                        }
 
                        if ($contact['network'] == Protocol::ACTIVITYPUB) {
-                               ActivityPub\Transmitter::transmitContactAccept($contact['url'], $contact['hub-verify'], $importer['uid']);
+                               ActivityPub\Transmitter::sendContactAccept($contact['url'], $contact['hub-verify'], $importer['uid']);
                        }
 
                        // send email notification to owner?
index 69343d66610d0f0564ab61f5c1d4ac3c589546b3..8162605613dbf74d7246a35dfe63ee845f38c874 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @file src/Protocol/ActivityPub.php
+ * @file src/Protocol/ActivityPub/Processor.php
  */
 namespace Friendica\Protocol\ActivityPub;
 
@@ -93,7 +93,7 @@ class Processor
                foreach ($attachments as $attach) {
                        $filetype = strtolower(substr($attach['mediaType'], 0, strpos($attach['mediaType'], '/')));
                        if ($filetype == 'image') {
-                               $item['body'] .= "\n[img]".$attach['url'].'[/img]';
+                               $item['body'] .= "\n[img]" . $attach['url'] . '[/img]';
                        } else {
                                if (!empty($item["attach"])) {
                                        $item["attach"] .= ',';
index 6b2e02a2c061a18798bed131bd6509511cf62af8..b84dc6cee9048b87919b554a33f03d7e2fc7e2a9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @file src/Protocol/ActivityPub.php
+ * @file src/Protocol/ActivityPub/Receiver.php
  */
 namespace Friendica\Protocol\ActivityPub;
 
index ee4fe20b9adc94588a6461ffd4053af641589e7c..c3bc2eeb74ba466316010f82e4da772697852226 100644 (file)
@@ -687,7 +687,7 @@ class Transmitter
         * @param integer $uid User ID
         * @param string $inbox Target inbox
         */
-       public static function transmitProfileDeletion($uid, $inbox)
+       public static function sendProfileDeletion($uid, $inbox)
        {
                $owner = User::getOwnerDataById($uid);
                $profile = APContact::getByURL($owner['url']);
@@ -713,7 +713,7 @@ class Transmitter
         * @param integer $uid User ID
         * @param string $inbox Target inbox
         */
-       public static function transmitProfileUpdate($uid, $inbox)
+       public static function sendProfileUpdate($uid, $inbox)
        {
                $owner = User::getOwnerDataById($uid);
                $profile = APContact::getByURL($owner['url']);
@@ -740,7 +740,7 @@ class Transmitter
         * @param string $target Target profile
         * @param integer $uid User ID
         */
-       public static function transmitActivity($activity, $target, $uid)
+       public static function sendActivity($activity, $target, $uid)
        {
                $profile = APContact::getByURL($target);
 
@@ -766,7 +766,7 @@ class Transmitter
         * @param $id
         * @param integer $uid User ID
         */
-       public static function transmitContactAccept($target, $id, $uid)
+       public static function sendContactAccept($target, $id, $uid)
        {
                $profile = APContact::getByURL($target);
 
@@ -793,7 +793,7 @@ class Transmitter
         * @param $id
         * @param integer $uid User ID
         */
-       public static function transmitContactReject($target, $id, $uid)
+       public static function sendContactReject($target, $id, $uid)
        {
                $profile = APContact::getByURL($target);
 
@@ -819,7 +819,7 @@ class Transmitter
         * @param string $target Target profile
         * @param integer $uid User ID
         */
-       public static function transmitContactUndo($target, $uid)
+       public static function sendContactUndo($target, $uid)
        {
                $profile = APContact::getByURL($target);
 
index 21d4c785899cd26c561b82b7b7525130292977eb..3c2eba8d8f6bd8cf2072ceccbf29f26c51254cf0 100644 (file)
@@ -19,9 +19,9 @@ class APDelivery extends BaseObject
                } elseif ($cmd == Delivery::SUGGESTION) {
                } elseif ($cmd == Delivery::RELOCATION) {
                } elseif ($cmd == Delivery::REMOVAL) {
-                       ActivityPub\Transmitter::transmitProfileDeletion($uid, $inbox);
+                       ActivityPub\Transmitter::sendProfileDeletion($uid, $inbox);
                } elseif ($cmd == Delivery::PROFILEUPDATE) {
-                       ActivityPub\Transmitter::transmitProfileUpdate($uid, $inbox);
+                       ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox);
                } else {
                        $data = ActivityPub\Transmitter::createActivityFromItem($item_id);
                        if (!empty($data)) {