show group affiliations in contact editor
This commit is contained in:
parent
e25ded6d96
commit
b8c4d73377
3 changed files with 24 additions and 0 deletions
|
@ -185,3 +185,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;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue