From 40e2900326a25ba0e2feedb802d38b7052b194cc Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 11 Dec 2013 14:54:36 -0800 Subject: comanchify all the simple cases - those that only load a profile. Rework permission checks for the profile sidebar so that it is all done internally. Remove crepair which we aren't using. --- mod/viewconnections.php | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'mod/viewconnections.php') diff --git a/mod/viewconnections.php b/mod/viewconnections.php index 9c85d63b6..e0b1af346 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -11,17 +11,6 @@ function viewconnections_init(&$a) { profile_load($a,argv(1)); } - -function viewconnections_aside(&$a) { - - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { - return; - } - - profile_create_sidebar($a); -} - - function viewconnections_content(&$a) { if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { -- cgit v1.2.3 From 2c02f57f276658269a6cc2031fb0fc9ac0a9077c Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 11 Dec 2013 15:04:09 -0800 Subject: remove hidden and deleted channels from viewconnections --- mod/viewconnections.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'mod/viewconnections.php') diff --git a/mod/viewconnections.php b/mod/viewconnections.php index e0b1af346..4f6f81d82 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -30,14 +30,11 @@ function viewconnections_content(&$a) { - $r = q("SELECT COUNT(abook_id) as total FROM abook WHERE abook_channel = %d AND abook_flags = 0 ", - intval($a->profile['uid']) - ); - 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 abook_flags = 0 order by xchan_name LIMIT %d , %d ", + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_flags = 0 and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) order by xchan_name LIMIT %d , %d ", intval($a->profile['uid']), + intval(XCHAN_FLAGS_HIDDEN), + intval(XCHAN_FLAGS_ORPHAN), + intval(XCHAN_FLAGS_DELETED), intval($a->pager['start']), intval($a->pager['itemspage']) ); -- cgit v1.2.3