X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fgroup.php;h=e16c900d90cc27257c67acf22b1b85bc52bb619b;hb=24836f2966842b413ae29f325fbb61b30186a5f7;hp=5dca08c76bd7357d97a823c72edcc8c83156ec27;hpb=ab099e91028122dfb6b10cf9510b1b061f6f547f;p=friendica.git diff --git a/include/group.php b/include/group.php index 5dca08c76b..e16c900d90 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()) ); @@ -136,7 +136,7 @@ function group_public_members($gid) { -function group_side($every="contacts",$each="group",$edit = false) { +function group_side($every="contacts",$each="group",$edit = false, $group_id = 0) { $o = ''; @@ -145,30 +145,37 @@ function group_side($every="contacts",$each="group",$edit = false) { $createtext = t('Create a new group'); $linktext= t('Everybody'); - + $selected = (($group_id == 0) ? ' class="group-selected" ' : ''); $o .= <<< EOT
"; + $o .= " \r\n "; + + $o .= <<< EOT + + + + +EOT; return $o; } @@ -185,3 +192,15 @@ function expand_groups($a) { $ret[] = $rr['contact-id']; return $ret; } + + +function member_of($c) { + + $r = q("SELECT `group`.`name`, `group`.`id` FROM `group` LEFT JOIN `group_member` ON `group_member`.`gid` = `group`.`id` WHERE `group_member`.`contact-id` = %d AND `group`.`deleted` = 0 ORDER BY `group`.`name` ASC ", + intval($c) + ); + + return $r; + +} +