Fixes standards
This commit is contained in:
parent
61f1a4d14d
commit
19019381e6
@ -51,7 +51,7 @@ class Retweet extends BaseApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
|
$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 (DBA::isResult($item) && !empty($item['body'])) {
|
||||||
if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
|
if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
|
||||||
@ -62,7 +62,7 @@ class Retweet extends BaseApi
|
|||||||
$item_id = $id;
|
$item_id = $id;
|
||||||
} else {
|
} else {
|
||||||
if (strpos($item['body'], "[/share]") !== false) {
|
if (strpos($item['body'], "[/share]") !== false) {
|
||||||
$pos = strpos($item['body'], "[share");
|
$pos = strpos($item['body'], "[share");
|
||||||
$post = substr($item['body'], $pos);
|
$post = substr($item['body'], $pos);
|
||||||
} else {
|
} else {
|
||||||
$post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid']);
|
$post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user