From 9b50b0e16f2046b91cb4c734c56024524d8b178b Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 3 Apr 2011 20:41:40 -0700 Subject: Public exposure warning on affected network group pages. config-able so a plugin can shut it up. --- include/group.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 793e854be..07cd45f19 100644 --- a/include/group.php +++ b/include/group.php @@ -110,7 +110,7 @@ function group_get_members($gid) { LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` WHERE `gid` = %d AND `group_member`.`uid` = %d", intval($gid), - intval($_SESSION['uid']) + intval(local_user()) ); if(count($r)) $ret = $r; @@ -118,6 +118,21 @@ function group_get_members($gid) { return $ret; } +function group_public_members($gid) { + $ret = 0; + if(intval($gid)) { + $r = q("SELECT `contact`.`id` AS `contact-id` FROM `group_member` + LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` + WHERE `gid` = %d AND `group_member`.`uid` = %d AND `contact`.`network` != 'dfrn' ", + intval($gid), + intval(local_user()) + ); + if(count($r)) + $ret = count($r); + } + return $ret; +} + function group_side($every="contacts",$each="group") { -- cgit v1.2.3 From 61915a524debe3db08a07f0adb86033ee894be28 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 12 Apr 2011 01:31:55 -0700 Subject: first cut at group chooser UI --- include/group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 07cd45f19..5001cf53e 100644 --- a/include/group.php +++ b/include/group.php @@ -108,7 +108,7 @@ function group_get_members($gid) { if(intval($gid)) { $r = q("SELECT `group_member`.`contact-id`, `contact`.* FROM `group_member` LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` - WHERE `gid` = %d AND `group_member`.`uid` = %d", + WHERE `gid` = %d AND `group_member`.`uid` = %d ORDER BY `contact`.`name` ASC ", intval($gid), intval(local_user()) ); -- cgit v1.2.3 From f04e2e70447e433bdc6acb2094fd988a995d1c08 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 12 Apr 2011 18:22:58 -0700 Subject: edit group links on network page --- include/group.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 5001cf53e..065c2241f 100644 --- a/include/group.php +++ b/include/group.php @@ -135,7 +135,7 @@ function group_public_members($gid) { -function group_side($every="contacts",$each="group") { +function group_side($every="contacts",$each="group",$edit = false) { $o = ''; @@ -165,7 +165,7 @@ EOT; ); if(count($r)) { foreach($r as $rr) - $o .= "
  • {$rr['name']}
  • \r\n"; + $o .= ' \r\n"; } $o .= " \r\n \r\n"; -- cgit v1.2.3 From ab099e91028122dfb6b10cf9510b1b061f6f547f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 17 Apr 2011 23:27:11 -0700 Subject: email integration, cont. --- include/group.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 065c2241f..5dca08c76 100644 --- a/include/group.php +++ b/include/group.php @@ -123,7 +123,8 @@ function group_public_members($gid) { if(intval($gid)) { $r = q("SELECT `contact`.`id` AS `contact-id` FROM `group_member` LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` - WHERE `gid` = %d AND `group_member`.`uid` = %d AND `contact`.`network` != 'dfrn' ", + WHERE `gid` = %d AND `group_member`.`uid` = %d + AND `contact`.`network` != 'dfrn' AND `contact`.`network` != 'mail' ", intval($gid), intval(local_user()) ); -- cgit v1.2.3 From a01c40a845ae96d44ca58859cb2bc54ad6cd0b3d Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 26 Apr 2011 05:45:53 -0700 Subject: no insecure warning on FB connections --- include/group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/group.php') diff --git a/include/group.php b/include/group.php index 5dca08c76..8866104fc 100644 --- a/include/group.php +++ b/include/group.php @@ -124,7 +124,7 @@ function group_public_members($gid) { $r = q("SELECT `contact`.`id` AS `contact-id` FROM `group_member` LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` WHERE `gid` = %d AND `group_member`.`uid` = %d - AND `contact`.`network` != 'dfrn' AND `contact`.`network` != 'mail' ", + AND `contact`.`network` != 'dfrn' AND `contact`.`network` != 'mail' AND `contact`.`network` != 'face' ", intval($gid), intval(local_user()) ); -- cgit v1.2.3