[Pkg-owncloud-commits] [owncloud] 18/32: clean up group backends

David Prévot taffit at moszumanska.debian.org
Wed Apr 23 18:59:01 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 649233e54cd1db432d78c4a56352fe5af97be869
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Fri Mar 14 13:54:22 2014 +0100

    clean up group backends
---
 lib/private/group/backend.php  | 19 -------------------
 lib/private/group/database.php | 26 --------------------------
 2 files changed, 45 deletions(-)

diff --git a/lib/private/group/backend.php b/lib/private/group/backend.php
index 4604e1c..7a41aff 100644
--- a/lib/private/group/backend.php
+++ b/lib/private/group/backend.php
@@ -135,23 +135,4 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
 	public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
 		return array();
 	}
-
-	/**
-	 * @brief get a list of all display names in a group
-	 * @param string $gid
-	 * @param string $search
-	 * @param int $limit
-	 * @param int $offset
-	 * @return array with display names (value) and user ids (key)
-	 */
-	public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
-		$displayNames = array();
-		$users = $this->usersInGroup($gid, $search, $limit, $offset);
-		foreach ($users as $user) {
-			$displayNames[$user] = $user;
-		}
-
-		return $displayNames;
-	}
-
 }
diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index d097468..fa43d4e 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -210,30 +210,4 @@ class OC_Group_Database extends OC_Group_Backend {
 		}
 		return $users;
 	}
-
-	/**
-	 * @brief get a list of all display names in a group
-	 * @param string $gid
-	 * @param string $search
-	 * @param int $limit
-	 * @param int $offset
-	 * @return array with display names (value) and user ids (key)
-	 */
-	public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
-		$displayNames = array();
-
-		$stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`'
-			.' FROM `*PREFIX*users`'
-			.' INNER JOIN `*PREFIX*group_user` ON `*PREFIX*group_user`.`uid` = `*PREFIX*users`.`uid`'
-			.' WHERE `gid` = ? AND `*PREFIX*group_user`.`uid` LIKE ?',
-			$limit,
-			$offset);
-		$result = $stmt->execute(array($gid, $search.'%'));
-		$users = array();
-		while ($row = $result->fetchRow()) {
-			$displayName = trim($row['displayname'], ' ');
-			$displayNames[$row['uid']] = empty($displayName) ? $row['uid'] : $displayName;
-		}
-		return $displayNames;
-	}
 }

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