Remove blanks
This commit is contained in:
parent
cc5d4db6a3
commit
f5c7f9670f
|
@ -41,7 +41,7 @@ use Friendica\Protocol\Activity;
|
||||||
* type, event, otype, activity, verb, uid, cid, origin_cid, item, link,
|
* type, event, otype, activity, verb, uid, cid, origin_cid, item, link,
|
||||||
* source_name, source_mail, source_nick, source_link, source_photo,
|
* source_name, source_mail, source_nick, source_link, source_photo,
|
||||||
* show_in_notification_page
|
* show_in_notification_page
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
|
@ -273,7 +273,7 @@ function notification($params)
|
||||||
$epreamble = $l10n->t('%1$s [url=%2$s]shared a post[/url] from %3$s.',
|
$epreamble = $l10n->t('%1$s [url=%2$s]shared a post[/url] from %3$s.',
|
||||||
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
||||||
$params['link'], '[url='.$params['origin_link'].']'.$params['origin_name'].'[/url]'
|
$params['link'], '[url='.$params['origin_link'].']'.$params['origin_name'].'[/url]'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sitelink = $l10n->t('Please visit %s to view and/or reply to the conversation.');
|
$sitelink = $l10n->t('Please visit %s to view and/or reply to the conversation.');
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Notification extends BaseFactory
|
||||||
case ModelNotification\Type::SHARE:
|
case ModelNotification\Type::SHARE:
|
||||||
$type = 'status';
|
$type = 'status';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ class Contact
|
||||||
$condition = ['`alias` IN (?, ?, ?) AND `uid` = ? AND NOT `deleted`', $url, Strings::normaliseLink($url), $ssl_url, $uid];
|
$condition = ['`alias` IN (?, ?, ?) AND `uid` = ? AND NOT `deleted`', $url, Strings::normaliseLink($url), $ssl_url, $uid];
|
||||||
$contact = DBA::selectFirst('contact', $fields, $condition, $options);
|
$contact = DBA::selectFirst('contact', $fields, $condition, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DBA::isResult($contact)) {
|
if (!DBA::isResult($contact)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = self::getByURL($url, $update, $fields);
|
$contact = self::getByURL($url, $update, $fields);
|
||||||
if (!empty($contact['id'])) {
|
if (!empty($contact['id'])) {
|
||||||
$contact['cid'] = 0;
|
$contact['cid'] = 0;
|
||||||
$contact['zid'] = $contact['id'];
|
$contact['zid'] = $contact['id'];
|
||||||
}
|
}
|
||||||
|
@ -1274,7 +1274,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @param string $contact_url Contact URL
|
* @param string $contact_url Contact URL
|
||||||
* @param bool $thread_mode
|
* @param bool $thread_mode
|
||||||
* @param int $update Update mode
|
* @param int $update Update mode
|
||||||
* @param int $parent Item parent ID for the update mode
|
* @param int $parent Item parent ID for the update mode
|
||||||
* @return string posts in HTML
|
* @return string posts in HTML
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
@ -1289,7 +1289,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @param int $cid Contact ID
|
* @param int $cid Contact ID
|
||||||
* @param bool $thread_mode
|
* @param bool $thread_mode
|
||||||
* @param int $update Update mode
|
* @param int $update Update mode
|
||||||
* @param int $parent Item parent ID for the update mode
|
* @param int $parent Item parent ID for the update mode
|
||||||
* @return string posts in HTML
|
* @return string posts in HTML
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
@ -1347,7 +1347,7 @@ class Contact
|
||||||
$o = '';
|
$o = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($thread_mode) {
|
if ($thread_mode) {
|
||||||
$items = Post::toArray(Post::selectForUser(local_user(), ['uri-id', 'gravity', 'parent-uri-id', 'thr-parent-id', 'author-id'], $condition, $params));
|
$items = Post::toArray(Post::selectForUser(local_user(), ['uri-id', 'gravity', 'parent-uri-id', 'thr-parent-id', 'author-id'], $condition, $params));
|
||||||
|
|
||||||
$o .= conversation($a, $items, 'contacts', $update, false, 'commented', local_user());
|
$o .= conversation($a, $items, 'contacts', $update, false, 'commented', local_user());
|
||||||
|
@ -1607,12 +1607,12 @@ class Contact
|
||||||
$avatar['size'] = 48;
|
$avatar['size'] = 48;
|
||||||
$default = self::DEFAULT_AVATAR_MICRO;
|
$default = self::DEFAULT_AVATAR_MICRO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Proxy::SIZE_THUMB:
|
case Proxy::SIZE_THUMB:
|
||||||
$avatar['size'] = 80;
|
$avatar['size'] = 80;
|
||||||
$default = self::DEFAULT_AVATAR_THUMB;
|
$default = self::DEFAULT_AVATAR_THUMB;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Proxy::SIZE_SMALL:
|
case Proxy::SIZE_SMALL:
|
||||||
default:
|
default:
|
||||||
$avatar['size'] = 300;
|
$avatar['size'] = 300;
|
||||||
|
@ -1720,7 +1720,7 @@ class Contact
|
||||||
$contact['thumb'] ?? '',
|
$contact['thumb'] ?? '',
|
||||||
$contact['micro'] ?? '',
|
$contact['micro'] ?? '',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($data as $image_uri) {
|
foreach ($data as $image_uri) {
|
||||||
$image_rid = Photo::ridFromURI($image_uri);
|
$image_rid = Photo::ridFromURI($image_uri);
|
||||||
if ($image_rid && !Photo::exists(['resource-id' => $image_rid, 'uid' => $uid])) {
|
if ($image_rid && !Photo::exists(['resource-id' => $image_rid, 'uid' => $uid])) {
|
||||||
|
@ -2027,7 +2027,7 @@ class Contact
|
||||||
if (Contact\Relation::isDiscoverable($ret['url'])) {
|
if (Contact\Relation::isDiscoverable($ret['url'])) {
|
||||||
Worker::add(PRIORITY_LOW, 'ContactDiscovery', $ret['url']);
|
Worker::add(PRIORITY_LOW, 'ContactDiscovery', $ret['url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the public contact
|
// Update the public contact
|
||||||
if ($uid != 0) {
|
if ($uid != 0) {
|
||||||
$contact = self::getByURL($ret['url'], false, ['id']);
|
$contact = self::getByURL($ret['url'], false, ['id']);
|
||||||
|
|
|
@ -74,7 +74,7 @@ class Search extends BaseApi
|
||||||
}
|
}
|
||||||
if ($result instanceof ContactResult) {
|
if ($result instanceof ContactResult) {
|
||||||
$id = Contact::getIdForURL($result->getUrl(), 0, false);
|
$id = Contact::getIdForURL($result->getUrl(), 0, false);
|
||||||
$accounts[] = DI::mstdnAccount()->createFromContactId($id, $uid);
|
$accounts[] = DI::mstdnAccount()->createFromContactId($id, $uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue