From ed277f82f4def28fdedd5d6f8e763d8e1c0714ce Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Feb 2013 03:11:23 -0800 Subject: searchable flag logic reversed --- include/zot.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index a1169ea3b..5afa9d496 100644 --- a/include/zot.php +++ b/include/zot.php @@ -229,8 +229,10 @@ function zot_refresh($them,$channel = null) { $j = json_decode($result['body'],true); - if(! (($j) && ($j['success']))) + if(! (($j) && ($j['success']))) { + logger('zot_refresh: result not decodable'); return false; + } $x = import_xchan($j); @@ -548,10 +550,10 @@ function import_xchan($arr) { && ($arr['site']['url'] != z_root())) $arr['searchable'] = false; - + $hidden = (1 - intval($arr['searchable'])); // Be careful - XCHAN_FLAGS_HIDDEN should evaluate to 1 - if(($r[0]['xchan_flags'] & XCHAN_FLAGS_HIDDEN) != $arr['searchable']) + if(($r[0]['xchan_flags'] & XCHAN_FLAGS_HIDDEN) != $hidden) $new_flags = $r[0]['xchan_flags'] ^ XCHAN_FLAGS_HIDDEN; else $new_flags = $r[0]['xchan_flags']; -- cgit v1.2.3