From bf190be5b42378e3a9c122a5ff2311691b4814fe Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 23 Aug 2015 13:27:34 -0700 Subject: issues encountered with hubzilla DB changes, zot_refresh and item_drop and hub sync --- include/zot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 17330838b..178b8fe57 100644 --- a/include/zot.php +++ b/include/zot.php @@ -294,12 +294,12 @@ function zot_refresh($them, $channel = null, $force = false) { if ($them['hubloc_url']) { $url = $them['hubloc_url']; } else { - $r = q("select hubloc_url, hubloc_flags from hubloc where hubloc_hash = '%s'", + $r = q("select hubloc_url, hubloc_primary from hubloc where hubloc_hash = '%s'", dbesc($them['xchan_hash']) ); if ($r) { foreach ($r as $rr) { - if ($rr['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) { + if (intval($rr['hubloc_primary'])) { $url = $rr['hubloc_url']; break; } @@ -2207,7 +2207,7 @@ function sync_locations($sender, $arr, $absolute = false) { dbesc(datetime_convert()), intval($r[0]['hubloc_id']) ); - $r[0]['hubloc_flags'] = $r[0]['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY; + $r[0]['hubloc_primary'] = intval($location['primary']); hubloc_change_primary($r[0]); $what .= 'primary_hub '; $changed = true; -- cgit v1.2.3 From b1f091e4d7de4467495bb1bde0b0054f5f10403d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 23 Aug 2015 17:40:47 -0700 Subject: issues with abook sync between hubzilla and red --- include/zot.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 19bacfa4f..76f73934d 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2930,7 +2930,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { $total_feeds ++; } - $disallowed = array('abook_id','abook_account','abook_channel'); + $disallowed = array('abook_id','abook_account','abook_channel','abook_blocked','abook_ignored','abook_hidden','abook_archived','abook_pending','abook_unconnected','abook_self','abook_feed'); foreach($arr['abook'] as $abook) { @@ -3029,7 +3029,6 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { foreach($clean as $k => $v) { if($k == 'abook_dob') $v = dbescdate($v); - $r = dbq("UPDATE abook set " . dbesc($k) . " = '" . dbesc($v) . "' where abook_xchan = '" . dbesc($clean['abook_xchan']) . "' and abook_channel = " . intval($channel['channel_id'])); } -- cgit v1.2.3