Commit aa3d9042 authored by Piers Harding's avatar Piers Harding Committed by Richard Mansfield
Browse files

Include grouptype class when changing group roles (bug #827762)

Changes to the group_update function in commit 57a9d96e

 added a
call to the grouptype's get_roles method, without first including
the grouptype class.  The grouptype class is not available when
this function is called from the webservice api, so group_update
will call a method that doesn't exist.

Change-Id: I10c861f7e692192621ec8372e7a7f5f25cbd8f6f
Signed-off-by: default avatarRichard Mansfield <>
parent 7289bb19
......@@ -533,7 +533,8 @@ function group_update($new, $create=false) {
// When the group type changes, make sure everyone has a valid role.
$allowedroles = call_static_method('GroupType' . $new->grouptype, 'get_roles');
safe_require('grouptype', $new->grouptype);
$allowedroles = call_static_method('GroupType' . ucfirst($new->grouptype), 'get_roles');
'group_member', 'role', 'member',
'"group" = ? AND NOT role IN (' . join(',', array_fill(0, count($allowedroles), '?')) . ')',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment