- q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d",
- intval($forum), intval($forum),
- intval($importer["id"])
- );
+ $condition = array('`forum` != ? AND `id` = ?', $forum, $importer["id"]);
+ dba::update('contact', array('forum' => $forum), $condition);
+ }
+
+ // We are processing relocations even if we are ignoring a contact
+ $relocations = $xpath->query("/atom:feed/dfrn:relocate");
+ foreach ($relocations AS $relocation) {
+ self::process_relocation($xpath, $relocation, $importer);
+ }
+
+ if ($importer["readonly"]) {
+ // We aren't receiving stuff from this person. But we will quietly ignore them
+ // rather than a blatant "go away" message.
+ logger('ignoring contact '.$importer["id"]);
+ return 403;