mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Public exposure warning on affected network group pages. config-able so a plugin can shut it up.
This commit is contained in:
parent
b500da74b6
commit
9b50b0e16f
4 changed files with 26 additions and 7 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue