From 4e8d10e269caf8efe46e1e6167e71fc6f0cabb81 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Jun 2014 03:34:37 -0700 Subject: update the update records for all addresses attached to this channel, not just the primary. --- include/zot.php | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/include/zot.php b/include/zot.php index 4f42ea2b4..13c4b7237 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1,4 +1,4 @@ -get_hostname(); - update_modtime($xchan_hash,$guid,$arr['address'],$ud_flags); + if($addresses) { + foreach($addresses as $address) { + update_modtime($xchan_hash,$guid,$address,$ud_flags); + } + } logger('import_xchan: changed: ' . $what,LOGGER_DEBUG); } elseif(! $ud_flags) { // nothing changed but we still need to update the updates record - q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and not (ud_flags & %d) ", - intval(UPDATE_FLAGS_UPDATED), - dbesc($arr['address']), - intval(UPDATE_FLAGS_UPDATED) - ); + if($addresses) { + foreach($addresses as $address) { + + q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and not (ud_flags & %d) ", + intval(UPDATE_FLAGS_UPDATED), + dbesc($address), + intval(UPDATE_FLAGS_UPDATED) + ); + } + } } if(! x($ret,'message')) { -- cgit v1.2.3