aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-20 19:56:36 -0700
committerredmatrix <git@macgirvin.com>2016-03-20 19:56:36 -0700
commitd3e7ef70e841c819d8ecf5e4b0900cb3f5b19aa4 (patch)
tree1fae16c33c620e6bfbfd14108692d61c70c04885 /mod
parentfea532af4da522001c71eb79df5fc49c83833da9 (diff)
parentf5b22dfd5be2a8b1126a12fc389d359a46f8544b (diff)
downloadvolse-hubzilla-d3e7ef70e841c819d8ecf5e4b0900cb3f5b19aa4.tar.gz
volse-hubzilla-d3e7ef70e841c819d8ecf5e4b0900cb3f5b19aa4.tar.bz2
volse-hubzilla-d3e7ef70e841c819d8ecf5e4b0900cb3f5b19aa4.zip
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'mod')
-rw-r--r--mod/acl.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/mod/acl.php b/mod/acl.php
index f7984fa13..146cb74c8 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -2,6 +2,7 @@
/* ACL selector json backend */
require_once("include/acl_selectors.php");
+require_once("include/group.php");
function acl_init(&$a){
@@ -48,32 +49,28 @@ function acl_init(&$a){
if ($type=='' || $type=='g'){
- $r = q("SELECT `groups`.`id`, `groups`.`hash`, `groups`.`name`,
- %s as uids
+ $r = q("SELECT `groups`.`id`, `groups`.`hash`, `groups`.`name`
FROM `groups`,`group_member`
WHERE `groups`.`deleted` = 0 AND `groups`.`uid` = %d
- AND `group_member`.`gid`=`groups`.`id`
- $sql_extra
+ AND `group_member`.`gid`=`groups`.`id`
+ $sql_extra
GROUP BY `groups`.`id`
ORDER BY `groups`.`name`
LIMIT %d OFFSET %d",
- db_concat('group_member.xchan', ','),
intval(local_channel()),
intval($count),
intval($start)
);
foreach($r as $g){
-// logger('acl: group: ' . $g['name'] . ' members: ' . $g['uids']);
+// logger('acl: group: ' . $g['name'] . ' members: ' . group_get_members_xchan($g['id']));
$groups[] = array(
"type" => "g",
"photo" => "images/twopeople.png",
"name" => $g['name'],
"id" => $g['id'],
"xid" => $g['hash'],
- //FIXME: db_concat aka GROUP_CONCAT has a defoult setting of group_concat_max_len = 1024 in mysql.
- // This value is quickly exceeded here. As a result $g['uids'] only contains a part of the complete xchan set.
- "uids" => explode(",",$g['uids']),
+ "uids" => group_get_members_xchan($g['id']),
"link" => ''
);
}