Merge branch 'ilosada-BT9431' into 1.10.x

1.10.x
Yannick Warnier 11 years ago
commit 8fd2c2ad46
  1. 26
      main/admin/group_list.php
  2. 1374
      main/webservices/registration.soap.php

@ -102,9 +102,33 @@ function get_group_data($from, $number_of_items, $column, $direction) {
$status[GROUP_PERMISSION_OPEN] = get_lang('Open');
$status[GROUP_PERMISSION_CLOSED] = get_lang('Closed');
$result = Database::select(
'tGroupRelGroup.group_id, tGroup.id, tGroup.name',
Database::get_main_table(TABLE_MAIN_GROUP_REL_GROUP).
" AS tGroupRelGroup RIGHT JOIN ".Database::get_main_table(TABLE_MAIN_GROUP).
" AS tGroup ON tGroupRelGroup.subgroup_id = tGroup.id"
);
$groupRelations = array();
foreach ($result as $row) {
$groupRelations[$row['id']] = $row;
}
while ($group = Database::fetch_row($res)) {
$name = null;
$id = $group[0];
// Loops while the current group is a subgroup
while (isset($groupRelations[$id]['group_id'])) {
$name = $name ?
$groupRelations[$id]['name'] . " > " . $name :
$groupRelations[$id]['name'];
$id = $groupRelations[$id]['group_id'];
}
// The base group
$name = $name ?
$groupRelations[$id]['name'] . " > " . $name :
$groupRelations[$id]['name'];
$group[3] = $status[$group[3]];
$group['1'] = '<a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php?id='.$group['0'].'">'.$group['1'].'</a>';
$group['1'] = '<a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php?id='.$group['0'].'">'.$name.'</a>';
$groups[] = $group;
}
return $groups;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save