diff options
author | Mario Vavti <mario@mariovavti.com> | 2023-04-12 17:50:39 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2023-04-12 17:50:39 +0200 |
commit | aa06400a50122dc7a8472e4c6144ac8ba6cbcc51 (patch) | |
tree | 4df0c31b54a1b54594764dce1b5fce5a675e21ea /Zotlabs/Module/Dirsearch.php | |
parent | 0d3b389538fe25a2cb6cc15fe5a44dd244ee6428 (diff) | |
download | volse-hubzilla-aa06400a50122dc7a8472e4c6144ac8ba6cbcc51.tar.gz volse-hubzilla-aa06400a50122dc7a8472e4c6144ac8ba6cbcc51.tar.bz2 volse-hubzilla-aa06400a50122dc7a8472e4c6144ac8ba6cbcc51.zip |
deprecate flags and transaction_id and only return results which are currently updated
Diffstat (limited to 'Zotlabs/Module/Dirsearch.php')
-rw-r--r-- | Zotlabs/Module/Dirsearch.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php index 001bd87a7..837783e8b 100644 --- a/Zotlabs/Module/Dirsearch.php +++ b/Zotlabs/Module/Dirsearch.php @@ -216,24 +216,18 @@ class Dirsearch extends Controller { if($sync) { $spkt = array('transactions' => array()); - $r = q("select * from updates where ud_date >= '%s' order by ud_date desc", + $r = q("SELECT * FROM updates WHERE ud_flags = 0 AND ud_date >= '%s' ORDER BY ud_date DESC", dbesc($sync) ); if($r) { foreach($r as $rr) { - $flags = []; - if($rr['ud_flags'] & UPDATE_FLAGS_DELETED) - $flags[] = 'deleted'; - if($rr['ud_flags'] & UPDATE_FLAGS_FORCED) - $flags[] = 'forced'; - $spkt['transactions'][] = [ 'hash' => $rr['ud_hash'], 'address' => $rr['ud_addr'], - 'transaction_id' => $rr['ud_guid'], - 'timestamp' => $rr['ud_date'], - 'flags' => $flags + 'host' => $rr['ud_guid'], + 'transaction_id' => $rr['ud_guid'], // deprecated 2023-04-12 + 'timestamp' => $rr['ud_date'] ]; } } |