diff options
author | friendica <info@friendica.com> | 2015-01-20 19:33:19 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-20 19:33:19 -0800 |
commit | 51848c619080e19cace647966a17eb9a1b42ca25 (patch) | |
tree | 6aee6c9487813051801cabbd2a4914528232d5b5 /include/dir_fns.php | |
parent | ee3eee425c92b37fba5a7035d8e9ec0b0b563d0b (diff) | |
download | volse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.tar.gz volse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.tar.bz2 volse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.zip |
working through the xchan table to remove bitfields, mostly complete except for updating the updater
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r-- | include/dir_fns.php | 16 |
1 files changed, 4 insertions, 12 deletions
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(); |