@@ -101,16 +101,16 @@ discard block |
||
| 101 | 101 | * @return DataResponse |
| 102 | 102 | */ |
| 103 | 103 | public function create($id) { |
| 104 | - if($this->groupManager->groupExists($id)) { |
|
| 104 | + if ($this->groupManager->groupExists($id)) { |
|
| 105 | 105 | return new DataResponse( |
| 106 | 106 | array( |
| 107 | - 'message' => (string)$this->l10n->t('Group already exists.') |
|
| 107 | + 'message' => (string) $this->l10n->t('Group already exists.') |
|
| 108 | 108 | ), |
| 109 | 109 | Http::STATUS_CONFLICT |
| 110 | 110 | ); |
| 111 | 111 | } |
| 112 | 112 | $group = $this->groupManager->createGroup($id); |
| 113 | - if($group instanceof IGroup) { |
|
| 113 | + if ($group instanceof IGroup) { |
|
| 114 | 114 | return new DataResponse(['groupname' => $group->getDisplayName()], Http::STATUS_CREATED); |
| 115 | 115 | } |
| 116 | 116 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | array( |
| 119 | 119 | 'status' => 'error', |
| 120 | 120 | 'data' => array( |
| 121 | - 'message' => (string)$this->l10n->t('Unable to add group.') |
|
| 121 | + 'message' => (string) $this->l10n->t('Unable to add group.') |
|
| 122 | 122 | ) |
| 123 | 123 | ), |
| 124 | 124 | Http::STATUS_FORBIDDEN |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | array( |
| 148 | 148 | 'status' => 'error', |
| 149 | 149 | 'data' => array( |
| 150 | - 'message' => (string)$this->l10n->t('Unable to delete group.') |
|
| 150 | + 'message' => (string) $this->l10n->t('Unable to delete group.') |
|
| 151 | 151 | ), |
| 152 | 152 | ), |
| 153 | 153 | Http::STATUS_FORBIDDEN |
@@ -26,12 +26,12 @@ discard block |
||
| 26 | 26 | </li> |
| 27 | 27 | |
| 28 | 28 | <!-- The Admin Group --> |
| 29 | - <?php foreach($_["adminGroup"] as $adminGroup): ?> |
|
| 30 | - <li data-gid="admin" data-usercount="<?php if($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?>" class="isgroup"> |
|
| 29 | + <?php foreach ($_["adminGroup"] as $adminGroup): ?> |
|
| 30 | + <li data-gid="admin" data-usercount="<?php if ($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?>" class="isgroup"> |
|
| 31 | 31 | <a href="#"><span class="groupname"><?php p($l->t('Admins')); ?></span></a> |
| 32 | 32 | <div class="app-navigation-entry-utils"> |
| 33 | 33 | <ul> |
| 34 | - <li class="app-navigation-entry-utils-counter"><?php if($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?></li> |
|
| 34 | + <li class="app-navigation-entry-utils-counter"><?php if ($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?></li> |
|
| 35 | 35 | </ul> |
| 36 | 36 | </div> |
| 37 | 37 | </li> |
@@ -39,25 +39,25 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <!-- Disabled Users --> |
| 41 | 41 | <?php $disabledUsersGroup = $_["disabledUsersGroup"] ?> |
| 42 | - <li data-gid="_disabledUsers" data-usercount="<?php if($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?>" class="isgroup"> |
|
| 42 | + <li data-gid="_disabledUsers" data-usercount="<?php if ($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?>" class="isgroup"> |
|
| 43 | 43 | <a href="#"><span class="groupname"><?php p($l->t('Disabled')); ?></span></a> |
| 44 | 44 | <div class="app-navigation-entry-utils"> |
| 45 | 45 | <ul> |
| 46 | - <li class="app-navigation-entry-utils-counter"><?php if($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?></li> |
|
| 46 | + <li class="app-navigation-entry-utils-counter"><?php if ($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?></li> |
|
| 47 | 47 | </ul> |
| 48 | 48 | </div> |
| 49 | 49 | </li> |
| 50 | 50 | |
| 51 | 51 | <!--List of Groups--> |
| 52 | - <?php foreach($_["groups"] as $group): ?> |
|
| 52 | + <?php foreach ($_["groups"] as $group): ?> |
|
| 53 | 53 | <li data-gid="<?php p($group['id']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup"> |
| 54 | 54 | <a href="#" class="dorename"> |
| 55 | 55 | <span class="groupname"><?php p($group['name']); ?></span> |
| 56 | 56 | </a> |
| 57 | 57 | <div class="app-navigation-entry-utils"> |
| 58 | 58 | <ul> |
| 59 | - <li class="app-navigation-entry-utils-counter"><?php if($group['usercount'] > 0) { p($group['usercount']); } ?></li> |
|
| 60 | - <?php if($_['isAdmin']): ?> |
|
| 59 | + <li class="app-navigation-entry-utils-counter"><?php if ($group['usercount'] > 0) { p($group['usercount']); } ?></li> |
|
| 60 | + <?php if ($_['isAdmin']): ?> |
|
| 61 | 61 | <li class="app-navigation-entry-utils-menu-button delete"> |
| 62 | 62 | <button class="icon-delete"></button> |
| 63 | 63 | </li> |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | style('settings', 'settings'); |
| 20 | 20 | |
| 21 | 21 | $userlistParams = array(); |
| 22 | -$allGroups=array(); |
|
| 23 | -foreach($_["adminGroup"] as $group) { |
|
| 22 | +$allGroups = array(); |
|
| 23 | +foreach ($_["adminGroup"] as $group) { |
|
| 24 | 24 | $allGroups[$group['id']] = array('displayName' => $group['name']); |
| 25 | 25 | } |
| 26 | -foreach($_["groups"] as $group) { |
|
| 26 | +foreach ($_["groups"] as $group) { |
|
| 27 | 27 | $allGroups[$group['id']] = array('displayName' => $group['name']); |
| 28 | 28 | } |
| 29 | 29 | $userlistParams['subadmingroups'] = $allGroups; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | <?php print_unescaped($this->inc('users/part.grouplist')); ?> |
| 41 | 41 | <div id="app-settings"> |
| 42 | 42 | <div id="app-settings-header"> |
| 43 | - <button class="settings-button" tabindex="0" data-apps-slide-toggle="#app-settings-content"><?php p($l->t('Settings'));?></button> |
|
| 43 | + <button class="settings-button" tabindex="0" data-apps-slide-toggle="#app-settings-content"><?php p($l->t('Settings')); ?></button> |
|
| 44 | 44 | </div> |
| 45 | 45 | <div id="app-settings-content"> |
| 46 | 46 | <?php print_unescaped($this->inc('users/part.setquota')); ?> |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | ->execute(); |
| 121 | 121 | |
| 122 | 122 | $groups = []; |
| 123 | - while($row = $result->fetch()) { |
|
| 123 | + while ($row = $result->fetch()) { |
|
| 124 | 124 | $group = $this->groupManager->get($row['gid']); |
| 125 | - if(!is_null($group)) { |
|
| 125 | + if (!is_null($group)) { |
|
| 126 | 126 | $groups[$group->getGID()] = $group; |
| 127 | 127 | } |
| 128 | 128 | } |
@@ -156,9 +156,9 @@ discard block |
||
| 156 | 156 | ->execute(); |
| 157 | 157 | |
| 158 | 158 | $users = []; |
| 159 | - while($row = $result->fetch()) { |
|
| 159 | + while ($row = $result->fetch()) { |
|
| 160 | 160 | $user = $this->userManager->get($row['uid']); |
| 161 | - if(!is_null($user)) { |
|
| 161 | + if (!is_null($user)) { |
|
| 162 | 162 | $users[] = $user; |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -179,10 +179,10 @@ discard block |
||
| 179 | 179 | ->execute(); |
| 180 | 180 | |
| 181 | 181 | $subadmins = []; |
| 182 | - while($row = $result->fetch()) { |
|
| 182 | + while ($row = $result->fetch()) { |
|
| 183 | 183 | $user = $this->userManager->get($row['uid']); |
| 184 | 184 | $group = $this->groupManager->get($row['gid']); |
| 185 | - if(!is_null($user) && !is_null($group)) { |
|
| 185 | + if (!is_null($user) && !is_null($group)) { |
|
| 186 | 186 | $subadmins[] = [ |
| 187 | 187 | 'user' => $user, |
| 188 | 188 | 'group' => $group |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | ->andWhere($qb->expr()->eq('uid', $qb->createNamedParameter($user->getUID()))) |
| 213 | 213 | ->execute(); |
| 214 | 214 | |
| 215 | - $fetch = $result->fetch(); |
|
| 215 | + $fetch = $result->fetch(); |
|
| 216 | 216 | $result->closeCursor(); |
| 217 | 217 | $result = !empty($fetch) ? true : false; |
| 218 | 218 | |
@@ -251,15 +251,15 @@ discard block |
||
| 251 | 251 | * @return bool |
| 252 | 252 | */ |
| 253 | 253 | public function isUserAccessible($subadmin, $user) { |
| 254 | - if(!$this->isSubAdmin($subadmin)) { |
|
| 254 | + if (!$this->isSubAdmin($subadmin)) { |
|
| 255 | 255 | return false; |
| 256 | 256 | } |
| 257 | - if($this->groupManager->isAdmin($user->getUID())) { |
|
| 257 | + if ($this->groupManager->isAdmin($user->getUID())) { |
|
| 258 | 258 | return false; |
| 259 | 259 | } |
| 260 | 260 | $accessibleGroups = $this->getSubAdminsGroups($subadmin); |
| 261 | - foreach($accessibleGroups as $accessibleGroup) { |
|
| 262 | - if($accessibleGroup->inGroup($user)) { |
|
| 261 | + foreach ($accessibleGroups as $accessibleGroup) { |
|
| 262 | + if ($accessibleGroup->inGroup($user)) { |
|
| 263 | 263 | return true; |
| 264 | 264 | } |
| 265 | 265 | } |