[Pkg-owncloud-commits] [owncloud] 65/104: if backends have the same class name, sum their users up instead of overwriting

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 13:33:40 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit cf8fc2294ea8e35aafd55b160489018a2d2f2270
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Wed Jan 8 13:24:28 2014 +0100

    if backends have the same class name, sum their users up instead of overwriting
---
 lib/private/user/manager.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php
index a13f4aa..9fc5935 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/user/manager.php
@@ -273,7 +273,11 @@ class Manager extends PublicEmitter {
 			if ($backend->implementsActions(\OC_USER_BACKEND_COUNT_USERS)) {
 				$backendusers = $backend->countUsers();
 				if($backendusers !== false) {
-					$userCountStatistics[get_class($backend)] = $backendusers;
+					if(isset($userCountStatistics[get_class($backend)])) {
+						$userCountStatistics[get_class($backend)] += $backendusers;
+					} else {
+						$userCountStatistics[get_class($backend)] = $backendusers;
+					}
 				}
 			}
 		}

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