[Pkg-owncloud-commits] [owncloud] 10/34: ask implementsAction instead of checking method_exists for easier testing

David Prévot taffit at moszumanska.debian.org
Thu Nov 13 19:37:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v6.0.6
in repository owncloud.

commit a84250c6d1a9ef9ce0257acdc56dbc3b60ebcb53
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Tue Apr 8 12:31:11 2014 +0200

    ask implementsAction instead of checking method_exists for easier testing
---
 lib/private/group/group.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/group/group.php b/lib/private/group/group.php
index 9689ecb..7593bb6 100644
--- a/lib/private/group/group.php
+++ b/lib/private/group/group.php
@@ -189,7 +189,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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list