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) {
|
public function count($search) {
|
||||||
$users = false;
|
$users = false;
|
||||||
foreach ($this->backends as $backend) {
|
foreach ($this->backends as $backend) {
|
||||||
if(method_exists($backend, 'countUsersInGroup')) {
|
if($backend->implementsActions(OC_GROUP_BACKEND_COUNT_USERS)) {
|
||||||
if($users === false) {
|
if($users === false) {
|
||||||
//we could directly add to a bool variable, but this would
|
//we could directly add to a bool variable, but this would
|
||||||
//be ugly
|
//be ugly
|
||||||
|
|
Loading…
Reference in New Issue