diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-22 17:21:57 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-22 19:05:36 +0100 |
commit | bb75dfc021a68bcd9526ef40f78bca4910798345 (patch) | |
tree | 30185c8198f4da87f180214bf1f2076ec48f3777 /lib/group | |
parent | 78fce834058a38a7dbcc5310e16095c743434bc6 (diff) | |
download | nextcloud-server-bb75dfc021a68bcd9526ef40f78bca4910798345.tar.gz nextcloud-server-bb75dfc021a68bcd9526ef40f78bca4910798345.zip |
Whitespace fixes
Diffstat (limited to 'lib/group')
-rw-r--r-- | lib/group/backend.php | 34 | ||||
-rw-r--r-- | lib/group/database.php | 32 |
2 files changed, 33 insertions, 33 deletions
diff --git a/lib/group/backend.php b/lib/group/backend.php index 4f6570c3be3..e7b7b21d957 100644 --- a/lib/group/backend.php +++ b/lib/group/backend.php @@ -133,23 +133,23 @@ 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 = '';
- $users = $this->usersInGroup($gid, $search, $limit, $offset);
- foreach ( $users as $user ) {
- $DisplayNames[$user] = $user;
- }
-
- return $DisplayNames;
+ + /** + * @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 = ''; + $users = $this->usersInGroup($gid, $search, $limit, $offset); + foreach ( $users as $user ) { + $DisplayNames[$user] = $user; + } + + return $DisplayNames; } } diff --git a/lib/group/database.php b/lib/group/database.php index 93dc05c53a1..40e9b0d4147 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -210,16 +210,16 @@ 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) {
+ + /** + * @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 = ''; $stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`' @@ -228,12 +228,12 @@ class OC_Group_Database extends OC_Group_Backend { .' WHERE `gid` = ? AND `*PREFIX*group_user`.`uid` LIKE ?', $limit, $offset); - $result = $stmt->execute(array($gid, $search.'%'));
- $users = array();
+ $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;
+ $displayName = trim($row['displayname'], ' '); + $displayNames[$row['uid']] = empty($displayName) ? $row['uid'] : $displayName; + } + return $displayNames; } } |