X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FAPContact.php;h=baa364e940636a4e1d39ea7e40cadd5fed0e7bdb;hb=a2a7d04fa1f3073e1bf79703e9516b20e502c225;hp=9269ee7903875f386e07a26645aebfe14441cf72;hpb=d2ca812647c0c06665e008354aa692d492f8857a;p=friendica.git diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 9269ee7903..baa364e940 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -165,6 +165,8 @@ class APContact return $fetched_contact; } $url = $apcontact['url']; + } elseif (empty(parse_url($url, PHP_URL_PATH))) { + $apcontact['baseurl'] = $url; } // Detect multiple fast repeating request to the same address @@ -466,7 +468,7 @@ class APContact } // Limit the length on incoming fields - $apcontact = DBStructure::getFieldsForTable('apcontact', $apcontact); + $apcontact = DI::dbaDefinition()->truncateFieldsForTable('apcontact', $apcontact); if (DBA::exists('apcontact', ['url' => $apcontact['url']])) { DBA::update('apcontact', $apcontact, ['url' => $apcontact['url']]);