mirror of
https://github.com/friendica/friendica
synced 2025-05-24 14:24:14 +02:00
New function to convert BBCode for a given ID
This commit is contained in:
parent
f3452d86c4
commit
f29bd23ea8
15 changed files with 145 additions and 38 deletions
|
@ -1886,7 +1886,7 @@ class Contact
|
|||
{
|
||||
if (Strings::normaliseLink($new_url) != Strings::normaliseLink($old_url)) {
|
||||
Logger::notice('New URL differs from old URL', ['old' => $old_url, 'new' => $new_url]);
|
||||
// @todo It is to decide what to do when the URL is changed
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DBA::update('contact', $fields, ['id' => $id])) {
|
||||
|
@ -2073,6 +2073,14 @@ class Contact
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Strings::normaliseLink($ret['url']) != Strings::normaliseLink($contact['url'])) {
|
||||
$cid = self::getIdForURL($ret['url']);
|
||||
if (!empty($cid) && ($cid != $id)) {
|
||||
Logger::notice('URL of contact changed.', ['id' => $id, 'new_id' => $cid, 'old' => $contact['url'], 'new' => $ret['url']]);
|
||||
return self::updateFromProbeArray($cid, $ret);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($ret['hide']) && is_bool($ret['hide'])) {
|
||||
$ret['unsearchable'] = $ret['hide'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue