]> git.mxchange.org Git - friendica.git/commitdiff
Fixes standards
authorMichael <heluecht@pirati.ca>
Sun, 28 Nov 2021 13:46:30 +0000 (13:46 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 28 Nov 2021 13:46:30 +0000 (13:46 +0000)
src/Module/Api/Twitter/Statuses/Retweet.php
src/Module/Api/Twitter/Statuses/Update.php

index 71ce6ed4ba2b3c3a109b455772252f4e9fec4179..0df60d2c97f00ffaed775c3fd53e328c9050846e 100644 (file)
@@ -51,26 +51,26 @@ class Retweet extends BaseApi
                }
 
                $fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
-               $item = Post::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
-       
+               $item   = Post::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
+
                if (DBA::isResult($item) && !empty($item['body'])) {
                        if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
                                if (!Item::performActivity($id, 'announce', $uid)) {
                                        throw new InternalServerErrorException();
                                }
-       
+
                                $item_id = $id;
                        } else {
                                if (strpos($item['body'], "[/share]") !== false) {
-                                       $pos = strpos($item['body'], "[share");
+                                       $pos  = strpos($item['body'], "[share");
                                        $post = substr($item['body'], $pos);
                                } else {
                                        $post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid']);
-       
+
                                        if (!empty($item['title'])) {
                                                $post .= '[h3]' . $item['title'] . "[/h3]\n";
                                        }
-       
+
                                        $post .= $item['body'];
                                        $post .= "[/share]";
                                }
@@ -83,13 +83,13 @@ class Retweet extends BaseApi
                                if (empty($item['app']) && !empty(self::getCurrentApplication()['name'])) {
                                        $item['app'] = self::getCurrentApplication()['name'];
                                }
-       
+
                                $item_id = Item::insert($item, true);
                        }
                } else {
                        throw new ForbiddenException();
                }
-       
+
                $status_info = DI::twitterStatus()->createFromItemId($item_id, $uid)->toArray();
 
                DI::apiResponse()->exit('status', ['status' => $status_info], $this->parameters['extension'] ?? null);
index 3618d9233c14697efaffa4ae2980af01b05ae229..bc6a4ff188697b3b76c44a8bae2ec747bce627b6 100644 (file)
@@ -101,7 +101,7 @@ class Update extends BaseApi
                if (!empty($request['lat']) && !empty($request['long'])) {
                        $item['coord'] = sprintf("%s %s", $request['lat'], $request['long']);
                }
-       
+
                $item['allow_cid'] = $owner['allow_cid'];
                $item['allow_gid'] = $owner['allow_gid'];
                $item['deny_cid']  = $owner['deny_cid'];