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')) {