From 51848c619080e19cace647966a17eb9a1b42ca25 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Jan 2015 19:33:19 -0800 Subject: working through the xchan table to remove bitfields, mostly complete except for updating the updater --- include/dir_fns.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'include/dir_fns.php') diff --git a/include/dir_fns.php b/include/dir_fns.php index 6d06fddd1..86be8662c 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -295,23 +295,15 @@ function local_dir_update($uid,$force) { logger('hidden: ' . $hidden); - $r = q("select xchan_flags from xchan where xchan_hash = '%s' limit 1", + $r = q("select xchan_hidden from xchan where xchan_hash = '%s' limit 1", dbesc($p[0]['channel_hash']) ); - // Be careful - XCHAN_FLAGS_HIDDEN should evaluate to 1 - 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']; - - if($new_flags != $r[0]['xchan_flags']) { - - $r = q("update xchan set xchan_flags = %d where xchan_hash = '%s'", - intval($new_flags), + if(intval($r[0]['xchan_hidden']) != $hidden) { + $r = q("update xchan set xchan_hidden = %d where xchan_hash = '%s'", + intval($hidden), dbesc($p[0]['channel_hash']) ); - } $address = $p[0]['channel_address'] . '@' . get_app()->get_hostname(); -- cgit v1.2.3