X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FItem.php;h=c0b1d3b49a37d3baf1aaffd69245aec129965836;hb=76ae210527487bea129411e8ed02ac4997d0d89b;hp=f39a8fa19db367f5b65aed09a6b89203dc6ddee7;hpb=66da9976dc70d4a6c63e73ff9545684db881c07d;p=friendica.git diff --git a/src/Content/Item.php b/src/Content/Item.php index f39a8fa19d..c0b1d3b49a 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -130,7 +130,7 @@ class Item // Checking for the alias that is used for OStatus $pattern = '/[@!]\[url\=(.*?)\](.*?)\[\/url\]/ism'; if (preg_match($pattern, $tag, $matches)) { - $data = Contact::getDetailsByURL($matches[1]); + $data = Contact::getByURL($matches[1], false, ['alias', 'nick']); if ($data['alias'] != '') { $newtag = '@[url=' . $data['alias'] . ']' . $data['nick'] . '[/url]'; @@ -149,15 +149,8 @@ class Item $name = $nameparts[0]; // Try to detect the contact in various ways - if (strpos($name, 'http://')) { - // At first we have to ensure that the contact exists - Contact::getIdForURL($name); - - // Now we should have something - $contact = Contact::getDetailsByURL($name, $profile_uid); - } elseif (strpos($name, '@')) { - // This function automatically probes when no entry was found - $contact = Contact::getDetailsByAddr($name, $profile_uid); + if (strpos($name, 'http://') || strpos($name, '@')) { + $contact = Contact::getByURLForUser($name, $profile_uid); } else { $contact = false; $fields = ['id', 'url', 'nick', 'name', 'alias', 'network', 'forum', 'prv'];