diff options
author | Mario <mario@mariovavti.com> | 2021-06-05 18:40:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-05 18:40:23 +0000 |
commit | 67322c12643ced03bec0be70667f8b1c45de752f (patch) | |
tree | 39cf50841599a80038f73c0285e2a49f9ff3304b | |
parent | 607f0346f42708b25f79881e845482441020ffb7 (diff) | |
download | volse-hubzilla-67322c12643ced03bec0be70667f8b1c45de752f.tar.gz volse-hubzilla-67322c12643ced03bec0be70667f8b1c45de752f.tar.bz2 volse-hubzilla-67322c12643ced03bec0be70667f8b1c45de752f.zip |
more work on directory sync
-rw-r--r-- | Zotlabs/Daemon/Onedirsync.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/Libzotdir.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Dirsearch.php | 20 |
3 files changed, 3 insertions, 21 deletions
diff --git a/Zotlabs/Daemon/Onedirsync.php b/Zotlabs/Daemon/Onedirsync.php index 35d0ae604..ea995be9e 100644 --- a/Zotlabs/Daemon/Onedirsync.php +++ b/Zotlabs/Daemon/Onedirsync.php @@ -58,7 +58,7 @@ class Onedirsync { if (($h) && (($h['hubloc_status'] & HUBLOC_OFFLINE) || $h['hubloc_deleted'] || $h['hubloc_error'])) { q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ", - intval(UPDATE_FLAGS_UPDATED), + intval(UPDATE_FLAGS_DELETED), dbesc($r[0]['ud_addr']), intval(UPDATE_FLAGS_UPDATED) ); diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php index 9042bcd16..507ddb674 100644 --- a/Zotlabs/Lib/Libzotdir.php +++ b/Zotlabs/Lib/Libzotdir.php @@ -252,7 +252,7 @@ class Libzotdir { continue; $j = json_decode($x['body'],true); - if (!($j['transactions']) || ($j['ratings'])) + if (!$j['transactions']) continue; q("update site set site_sync = '%s' where site_url = '%s'", diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php index 5d748fb80..78205a9fc 100644 --- a/Zotlabs/Module/Dirsearch.php +++ b/Zotlabs/Module/Dirsearch.php @@ -214,7 +214,7 @@ class Dirsearch extends Controller { if($sync) { $spkt = array('transactions' => array()); - $r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc", + $r = q("select * from updates where ud_date >= '%s' and ud_guid != '' and ud_addr != '' order by ud_date desc", dbesc($sync) ); if($r) { @@ -234,24 +234,6 @@ class Dirsearch extends Controller { ); } } - $r = q("select * from xlink where xlink_static = 1 and xlink_updated >= '%s' ", - dbesc($sync) - ); - if($r) { - $spkt['ratings'] = array(); - foreach($r as $rr) { - $spkt['ratings'][] = array( - 'type' => 'rating', - 'encoding' => 'zot', - 'channel' => $rr['xlink_xchan'], - 'target' => $rr['xlink_link'], - 'rating' => intval($rr['xlink_rating']), - 'rating_text' => $rr['xlink_rating_text'], - 'signature' => $rr['xlink_sig'], - 'edited' => $rr['xlink_updated'] - ); - } - } json_return_and_die($spkt); } else { |