From 1203088c3eadb26b2105c99f3421d2f6852b6d52 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 26 Nov 2015 08:26:29 +0100 Subject: [PATCH] Only update contact data for OStatus contacts --- include/ostatus.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ostatus.php b/include/ostatus.php index 0dd462d3e..523ccfe51 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -137,9 +137,9 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) if ($value != "") $contact["location"] = $value; - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d", + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'", dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), - dbesc(datetime_convert()), intval($contact["id"])); + dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); poco_check($contact["url"], $contact["name"], $contact["network"], $author["author-avatar"], $contact["about"], $contact["location"], "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]); @@ -152,9 +152,9 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); - q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d", + q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), - dbesc(datetime_convert()), intval($contact["id"])); + dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); } }