Removed trailing whitespace

This commit is contained in:
Michael 2021-04-26 15:09:32 +00:00
parent c4705a33c0
commit 5527353d87
1 changed files with 9 additions and 9 deletions

View File

@ -2706,9 +2706,9 @@ class Item
/** /**
* Check if the body contains a link * Check if the body contains a link
* *
* @param string $body * @param string $body
* @param string $url * @param string $url
* @return bool * @return bool
*/ */
public static function containsLink(string $body, string $url) public static function containsLink(string $body, string $url)
{ {
@ -2716,7 +2716,7 @@ class Item
return true; return true;
} }
foreach ([0, 1, 2] as $size) { foreach ([0, 1, 2] as $size) {
if (preg_match('#/photo/.*-' . $size . '\.#ism', $url) && if (preg_match('#/photo/.*-' . $size . '\.#ism', $url) &&
strpos(preg_replace('#(/photo/.*)-[012]\.#ism', '$1-' . $size . '.', $body), $url)) { strpos(preg_replace('#(/photo/.*)-[012]\.#ism', '$1-' . $size . '.', $body), $url)) {
return true; return true;
} }
@ -2728,7 +2728,7 @@ class Item
* Add visual attachments to the content * Add visual attachments to the content
* *
* @param array $attachments * @param array $attachments
* @param array $item * @param array $item
* @param string $content * @param string $content
* @return string modified content * @return string modified content
*/ */
@ -2741,7 +2741,7 @@ class Item
if (self::containsLink($item['body'], $attachment['url'])) { if (self::containsLink($item['body'], $attachment['url'])) {
continue; continue;
} }
$author = ['uid' => 0, 'id' => $item['author-id'], $author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']]; 'network' => $item['author-network'], 'url' => $item['author-link']];
$the_url = Contact::magicLinkByContact($author, $attachment['url']); $the_url = Contact::magicLinkByContact($author, $attachment['url']);
@ -2791,7 +2791,7 @@ class Item
if ($leading != '') { if ($leading != '') {
$content = '<div class="body-attach">' . $leading . '<div class="clear"></div></div>' . $content; $content = '<div class="body-attach">' . $leading . '<div class="clear"></div></div>' . $content;
} }
if ($trailing != '') { if ($trailing != '') {
$content .= '<div class="body-attach">' . $trailing . '<div class="clear"></div></div>'; $content .= '<div class="body-attach">' . $trailing . '<div class="clear"></div></div>';
} }
@ -2804,7 +2804,7 @@ class Item
* Add link attachment to the content * Add link attachment to the content
* *
* @param array $attachments * @param array $attachments
* @param array $item * @param array $item
* @param string $content * @param string $content
* @param bool $shared * @param bool $shared
* @return string modified content * @return string modified content
@ -2861,7 +2861,7 @@ class Item
* Add non visual attachments to the content * Add non visual attachments to the content
* *
* @param array $attachments * @param array $attachments
* @param array $item * @param array $item
* @param string $content * @param string $content
* @return string modified content * @return string modified content
*/ */