X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FContact.php;h=0aeabc9725cc226074e37a37864cd56c936cf811;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=5787439c1ff57d6be9e6e7bf346c007ad368ba07;hpb=82b423c5ac3269d39e6384fa3c43d1d9e5285ad4;p=friendica.git diff --git a/include/Contact.php b/include/Contact.php index 5787439c1f..0aeabc9725 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,6 +1,7 @@ 1 AND $uid == 0 AND $contact_id != 0 AND $url != "") { + if (count($contacts) > 1 && $uid == 0 && $contact_id != 0 && $url != "") { q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d AND NOT `self`", dbesc(normalise_link($url)), intval($contact_id)); @@ -677,9 +654,9 @@ function get_contact($url, $uid = 0, $no_update = false) { } // Only update if there had something been changed - if ($data["addr"] != $contacts[0]["addr"] OR - $data["alias"] != $contacts[0]["alias"] OR - $data["name"] != $contacts[0]["name"] OR + if ($data["addr"] != $contacts[0]["addr"] || + $data["alias"] != $contacts[0]["alias"] || + $data["name"] != $contacts[0]["name"] || $data["nick"] != $contacts[0]["nick"]) { q("UPDATE `contact` SET `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s', `name-date` = '%s', `uri-date` = '%s' WHERE `id` = %d", @@ -792,7 +769,7 @@ function formatted_location($profile) { if($profile['locality']) $location .= $profile['locality']; - if($profile['region'] AND ($profile['locality'] != $profile['region'])) { + if($profile['region'] && ($profile['locality'] != $profile['region'])) { if($location) $location .= ', ';