Changed parameter order for getByURL

This commit is contained in:
Michael
2020-07-15 17:06:48 +00:00
parent d9c6a46ffe
commit fc0312451d
22 changed files with 32 additions and 32 deletions

View File

@@ -987,7 +987,7 @@ class Processor
{
$parent_terms = Tag::getByURIId($parent['uri-id'], [Tag::MENTION, Tag::IMPLICIT_MENTION, Tag::EXCLUSIVE_MENTION]);
$parent_author = Contact::getByURL($parent['author-link'], 0, ['url', 'nurl', 'alias'], false);
$parent_author = Contact::getByURL($parent['author-link'], false, ['url', 'nurl', 'alias']);
$implicit_mentions = [];
if (empty($parent_author['url'])) {
@@ -1003,7 +1003,7 @@ class Processor
}
foreach ($parent_terms as $term) {
$contact = Contact::getByURL($term['url'], 0, ['url', 'nurl', 'alias'], false);
$contact = Contact::getByURL($term['url'], false, ['url', 'nurl', 'alias']);
if (!empty($contact['url'])) {
$implicit_mentions[] = $contact['url'];
$implicit_mentions[] = $contact['nurl'];

View File

@@ -1008,7 +1008,7 @@ class Transmitter
$url = DI::baseUrl() . '/search?tag=' . urlencode($term['name']);
$tags[] = ['type' => 'Hashtag', 'href' => $url, 'name' => '#' . $term['name']];
} else {
$contact = Contact::getByURL($term['url'], 0, ['addr'], false);
$contact = Contact::getByURL($term['url'], false, ['addr']);
if (!empty($contact['addr'])) {
$mention = '@' . $contact['addr'];
} else {
@@ -1141,7 +1141,7 @@ class Transmitter
return '';
}
$data = Contact::getByURL($match[1], 0, ['url', 'nick'], false);
$data = Contact::getByURL($match[1], false, ['url', 'nick']);
if (empty($data['nick'])) {
return $match[0];
}
@@ -1861,7 +1861,7 @@ class Transmitter
$mentions = [];
foreach (Tag::getByURIId($uriid, [Tag::IMPLICIT_MENTION]) as $tag) {
$profile = Contact::getByURL($tag['url'], 0, ['addr', 'contact-type', 'nick'], false);
$profile = Contact::getByURL($tag['url'], false, ['addr', 'contact-type', 'nick']);
if (!empty($profile['addr'])
&& $profile['contact-type'] != Contact::TYPE_COMMUNITY
&& !strstr($body, $profile['addr'])

View File

@@ -3729,7 +3729,7 @@ class Diaspora
private static function prependParentAuthorMention($body, $profile_url)
{
$profile = Contact::getByURL($profile_url, 0, ['addr', 'name', 'contact-type'], false);
$profile = Contact::getByURL($profile_url, false, ['addr', 'name', 'contact-type']);
if (!empty($profile['addr'])
&& $profile['contact-type'] != Contact::TYPE_COMMUNITY
&& !strstr($body, $profile['addr'])

View File

@@ -2105,7 +2105,7 @@ class OStatus
$mentioned = $newmentions;
foreach ($mentioned as $mention) {
$contact = Contact::getByURL($mention, 0, ['contact-type']);
$contact = Contact::getByURL($mention, ['contact-type']);
if (!empty($contact) && ($contact['contact-type'] == Contact::TYPE_COMMUNITY)) {
XML::addElement($doc, $entry, "link", "",
[