ask implementsAction instead of checking method_exists for easier testing
This commit is contained in:
parent
96cb75f5cf
commit
5f8d9b3a4e
|
@ -195,7 +195,7 @@ class Group {
|
|||
public function count($search) {
|
||||
$users = false;
|
||||
foreach ($this->backends as $backend) {
|
||||
if(method_exists($backend, 'countUsersInGroup')) {
|
||||
if($backend->implementsActions(OC_GROUP_BACKEND_COUNT_USERS)) {
|
||||
if($users === false) {
|
||||
//we could directly add to a bool variable, but this would
|
||||
//be ugly
|
||||
|
|
Loading…
Reference in New Issue