ask implementsAction instead of checking method_exists for easier testing

This commit is contained in:
Arthur Schiwon 2014-04-08 12:31:11 +02:00
parent 96cb75f5cf
commit 5f8d9b3a4e
1 changed files with 1 additions and 1 deletions

View File

@ -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