aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-04-12 09:29:51 +0200
committerMario Vavti <mario@mariovavti.com>2023-04-12 09:29:51 +0200
commit7ce4175876ce13727432dc839938bb8e486ef406 (patch)
tree5128e5c5d13629628c0e50b4a91935cfeda44a20 /Zotlabs/Lib/Libzot.php
parent03bdbfa705ba490b0450f063753100557f5d8bae (diff)
downloadvolse-hubzilla-7ce4175876ce13727432dc839938bb8e486ef406.tar.gz
volse-hubzilla-7ce4175876ce13727432dc839938bb8e486ef406.tar.bz2
volse-hubzilla-7ce4175876ce13727432dc839938bb8e486ef406.zip
initial commit directory sync rewrite - should work but still requires lots of cleanup
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index a8334595f..b41ba043a 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -920,11 +920,11 @@ class Libzot {
$s = Libsync::sync_locations($arr, $arr);
if ($s) {
- if (isset($s['change_message']))
+ if (!empty($s['change_message']))
$what .= $s['change_message'];
- if (isset($s['changed']))
+ if (!empty($s['changed']))
$changed = $s['changed'];
- if (isset($s['message']))
+ if (!empty($s['message']))
$ret['message'] .= $s['message'];
}
@@ -977,17 +977,15 @@ class Libzot {
}
}
- if (($changed) || ($ud_flags == UPDATE_FLAGS_FORCED)) {
+ if ($changed/* || ($ud_flags == UPDATE_FLAGS_FORCED)*/) {
$guid = random_string() . '@' . \App::get_hostname();
Libzotdir::update_modtime($xchan_hash, $guid, $address, $ud_flags);
- logger('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 (ud_flags & %d) = 0 ",
- intval(UPDATE_FLAGS_UPDATED),
- dbesc($address),
- intval(UPDATE_FLAGS_UPDATED)
+ q("update updates set ud_flags = 0, ud_date = '%s' where ud_hash = '%s'",
+ dbesc(datetime_convert()),
+ dbesc($xchan_hash)
);
}