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 /mod/viewconnections.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 'mod/viewconnections.php')
-rw-r--r-- | mod/viewconnections.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mod/viewconnections.php b/mod/viewconnections.php index 40d26c823..d4731d8c4 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -31,25 +31,24 @@ function viewconnections_content(&$a) { $is_owner = ((local_user() && local_user() == $a->profile['uid']) ? true : false); $abook_flags = ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF; - $xchan_flags = XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED; + $sql_extra = ''; + if(! $is_owner) { $abook_flags = $abook_flags | ABOOK_FLAG_HIDDEN; - $xchan_flags = $xchan_flags | XCHAN_FLAGS_HIDDEN; + $sql_extra = " and xchan_hidden = 0 "; } - $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d )>0 and not ( xchan_flags & %d )>0 ", + $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d )>0 and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra ", intval($a->profile['uid']), - intval($abook_flags), - intval($xchan_flags) + intval($abook_flags) ); if($r) { $a->set_pager_total($r[0]['total']); } - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not ( abook_flags & %d )>0 and not ( xchan_flags & %d )>0 order by xchan_name LIMIT %d OFFSET %d ", + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not ( abook_flags & %d )>0 and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra order by xchan_name LIMIT %d OFFSET %d ", intval($a->profile['uid']), intval($abook_flags), - intval($xchan_flags), intval($a->pager['itemspage']), intval($a->pager['start']) ); |