Passed
Push — master ( 581704...2efa00 )
by Roeland
11:12 queued 11s
created
lib/private/Collaboration/Collaborators/UserPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 							'label' => $user->getDisplayName(),
107 107
 							'value' => [
108 108
 								'shareType' => IShare::TYPE_USER,
109
-								'shareWith' => (string)$user->getUID(),
109
+								'shareWith' => (string) $user->getUID(),
110 110
 							],
111 111
 						];
112 112
 					}
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	public function takeOutCurrentUser(array &$users) {
186 186
 		$currentUser = $this->userSession->getUser();
187
-		if(!is_null($currentUser)) {
187
+		if (!is_null($currentUser)) {
188 188
 			if (isset($users[$currentUser->getUID()])) {
189 189
 				unset($users[$currentUser->getUID()]);
190 190
 			}
Please login to merge, or discard this patch.
lib/private/Collaboration/Collaborators/GroupPlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,17 +60,17 @@
 block discarded – undo
60 60
 		$result = ['wide' => [], 'exact' => []];
61 61
 
62 62
 		$groups = $this->groupManager->search($search, $limit, $offset);
63
-		$groupIds = array_map(function (IGroup $group) { return $group->getGID(); }, $groups);
63
+		$groupIds = array_map(function(IGroup $group) { return $group->getGID(); }, $groups);
64 64
 
65 65
 		if (!$this->shareeEnumeration || count($groups) < $limit) {
66 66
 			$hasMoreResults = true;
67 67
 		}
68 68
 
69
-		$userGroups =  [];
69
+		$userGroups = [];
70 70
 		if (!empty($groups) && ($this->shareWithGroupOnly || $this->shareeEnumerationInGroupOnly)) {
71 71
 			// Intersect all the groups that match with the groups this user is a member of
72 72
 			$userGroups = $this->groupManager->getUserGroups($this->userSession->getUser());
73
-			$userGroups = array_map(function (IGroup $group) { return $group->getGID(); }, $userGroups);
73
+			$userGroups = array_map(function(IGroup $group) { return $group->getGID(); }, $userGroups);
74 74
 			$groupIds = array_intersect($groupIds, $userGroups);
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Principal.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		$principals = [];
134 134
 
135 135
 		if ($prefixPath === $this->principalPrefix) {
136
-			foreach($this->userManager->search('') as $user) {
136
+			foreach ($this->userManager->search('') as $user) {
137 137
 				$principals[] = $this->userToPrincipal($user);
138 138
 			}
139 139
 		}
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 				if ($user !== null) {
162 162
 					return [
163
-						'uri' => 'principals/users/' . $user->getUID() . '/' . $name,
163
+						'uri' => 'principals/users/'.$user->getUID().'/'.$name,
164 164
 					];
165 165
 				}
166 166
 				return null;
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 		if ($this->hasGroups || $needGroups) {
209 209
 			$userGroups = $this->groupManager->getUserGroups($user);
210
-			foreach($userGroups as $userGroup) {
211
-				$groups[] = 'principals/groups/' . urlencode($userGroup->getGID());
210
+			foreach ($userGroups as $userGroup) {
211
+				$groups[] = 'principals/groups/'.urlencode($userGroup->getGID());
212 212
 			}
213 213
 		}
214 214
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 					}
281 281
 
282 282
 					if ($limitEnumeration) {
283
-						$users = \array_filter($users, function (IUser $user) use ($currentUserGroups, $value) {
283
+						$users = \array_filter($users, function(IUser $user) use ($currentUserGroups, $value) {
284 284
 							return !empty(array_intersect(
285 285
 									$this->groupManager->getUserGroupIds($user),
286 286
 									$currentUserGroups
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 							}
298 298
 						}
299 299
 
300
-						$carry[] = $this->principalPrefix . '/' . $user->getUID();
300
+						$carry[] = $this->principalPrefix.'/'.$user->getUID();
301 301
 						return $carry;
302 302
 					}, []);
303 303
 					break;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 					}
313 313
 
314 314
 					if ($limitEnumeration) {
315
-						$users = \array_filter($users, function (IUser $user) use ($currentUserGroups, $value) {
315
+						$users = \array_filter($users, function(IUser $user) use ($currentUserGroups, $value) {
316 316
 							return !empty(array_intersect(
317 317
 									$this->groupManager->getUserGroupIds($user),
318 318
 									$currentUserGroups
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 							}
330 330
 						}
331 331
 
332
-						$carry[] = $this->principalPrefix . '/' . $user->getUID();
332
+						$carry[] = $this->principalPrefix.'/'.$user->getUID();
333 333
 						return $carry;
334 334
 					}, []);
335 335
 					break;
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 					}
426 426
 				}
427 427
 
428
-				return $this->principalPrefix . '/' . $user->getUID();
428
+				return $this->principalPrefix.'/'.$user->getUID();
429 429
 			}
430 430
 		}
431 431
 		if (substr($uri, 0, 10) === 'principal:') {
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		$userId = $user->getUID();
448 448
 		$displayName = $user->getDisplayName();
449 449
 		$principal = [
450
-				'uri' => $this->principalPrefix . '/' . $userId,
450
+				'uri' => $this->principalPrefix.'/'.$userId,
451 451
 				'{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
452 452
 				'{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL',
453 453
 		];
@@ -478,9 +478,9 @@  discard block
 block discarded – undo
478 478
 
479 479
 		try {
480 480
 			$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($circleUniqueId, true);
481
-		} catch(QueryException $ex) {
481
+		} catch (QueryException $ex) {
482 482
 			return null;
483
-		} catch(CircleDoesNotExistException $ex) {
483
+		} catch (CircleDoesNotExistException $ex) {
484 484
 			return null;
485 485
 		}
486 486
 
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 		}
490 490
 
491 491
 		$principal = [
492
-			'uri' => 'principals/circles/' . $circleUniqueId,
492
+			'uri' => 'principals/circles/'.$circleUniqueId,
493 493
 			'{DAV:}displayname' => $circle->getName(),
494 494
 		];
495 495
 
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 
522 522
 			$circles = array_map(function($circle) {
523 523
 				/** @var \OCA\Circles\Model\Circle $circle */
524
-				return 'principals/circles/' . urlencode($circle->getUniqueId());
524
+				return 'principals/circles/'.urlencode($circle->getUniqueId());
525 525
 			}, $circles);
526 526
 
527 527
 			return $circles;
Please login to merge, or discard this patch.
apps/settings/templates/settings/admin/sharing.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -27,82 +27,82 @@  discard block
 block discarded – undo
27 27
 ?>
28 28
 
29 29
 <div class="section" id="shareAPI">
30
-	<h2><?php p($l->t('Sharing'));?></h2>
30
+	<h2><?php p($l->t('Sharing')); ?></h2>
31 31
 	<a target="_blank" rel="noreferrer noopener" class="icon-info"
32
-	   title="<?php p($l->t('Open documentation'));?>"
32
+	   title="<?php p($l->t('Open documentation')); ?>"
33 33
 	   href="<?php p(link_to_docs('admin-sharing')); ?>"></a>
34
-        <p class="settings-hint"><?php p($l->t('As admin you can fine-tune the sharing behavior. Please see the documentation for more information.'));?></p>
34
+        <p class="settings-hint"><?php p($l->t('As admin you can fine-tune the sharing behavior. Please see the documentation for more information.')); ?></p>
35 35
 	<p id="enable">
36 36
 		<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox"
37 37
 			   value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
38
-		<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
38
+		<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API')); ?></label><br/>
39 39
 	</p>
40 40
 
41 41
 	<p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
42 42
 		<input type="checkbox" name="shareapi_default_internal_expire_date" id="shareapiDefaultInternalExpireDate" class="checkbox"
43 43
 			   value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
44
-		<label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/>
44
+		<label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares')); ?></label><br/>
45 45
 	</p>
46
-	<p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
47
-		<?php p($l->t( 'Expire after ' )); ?>
46
+	<p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
47
+		<?php p($l->t('Expire after ')); ?>
48 48
 		<input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>"
49 49
 			   value='<?php p($_['shareInternalExpireAfterNDays']) ?>' />
50
-		<?php p($l->t( 'days' )); ?>
50
+		<?php p($l->t('days')); ?>
51 51
 		<input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox"
52 52
 			   value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
53
-		<label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
53
+		<label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date')); ?></label><br/>
54 54
 	</p>
55 55
 
56
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
56
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
57 57
 		<input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox"
58 58
 			   value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
59
-		<label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
59
+		<label for="allowLinks"><?php p($l->t('Allow users to share via link')); ?></label><br/>
60 60
 	</p>
61 61
 
62 62
 	<p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
63 63
 		<input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox"
64 64
 			   value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
65
-		<label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
65
+		<label for="allowPublicUpload"><?php p($l->t('Allow public uploads')); ?></label><br/>
66 66
 		<input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox"
67 67
 			   value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') print_unescaped('checked="checked"'); ?> />
68
-		<label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password'));?></label><br/>
68
+		<label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password')); ?></label><br/>
69 69
 		<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox"
70 70
 			   value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
71
-		<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
71
+		<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection')); ?></label><br/>
72 72
 
73 73
 		<input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox"
74 74
 			   value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
75
-		<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date for link shares'));?></label><br/>
75
+		<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date for link shares')); ?></label><br/>
76 76
 
77 77
 	</p>
78
-	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
79
-		<?php p($l->t( 'Expire after ' )); ?>
78
+	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
79
+		<?php p($l->t('Expire after ')); ?>
80 80
 		<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
81 81
 			   value='<?php p($_['shareExpireAfterNDays']) ?>' />
82
-		<?php p($l->t( 'days' )); ?>
82
+		<?php p($l->t('days')); ?>
83 83
 		<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
84 84
 			   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
85
-		<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
85
+		<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date')); ?></label><br/>
86 86
 	</p>
87
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
87
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
88 88
 		<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox"
89 89
 			   value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
90
-		<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
90
+		<label for="allowResharing"><?php p($l->t('Allow resharing')); ?></label><br/>
91 91
 	</p>
92
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
92
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
93 93
 		<input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
94 94
 			   value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
95
-		<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
95
+		<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups')); ?></label><br />
96 96
 	</p>
97
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
97
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
98 98
 		<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
99 99
 			   value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
100
-		<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
100
+		<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups')); ?></label><br/>
101 101
 	</p>
102
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
102
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
103 103
 		<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox"
104 104
 			   value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
105
-		<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
105
+		<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing')); ?></label><br/>
106 106
 	</p>
107 107
 	<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
108 108
 		<input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/>
@@ -110,35 +110,35 @@  discard block
 block discarded – undo
110 110
 		<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
111 111
 	</p>
112 112
 
113
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
113
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
114 114
 		<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox"
115 115
 			<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> />
116
-		<label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered.'));?></label><br />
116
+		<label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered.')); ?></label><br />
117 117
 	</p>
118 118
 
119
-	<p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') p('hidden');?>">
119
+	<p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') p('hidden'); ?>">
120 120
 		<input type="checkbox" name="shareapi_restrict_user_enumeration_to_group" value="1" id="shareapi_restrict_user_enumeration_to_group" class="checkbox"
121 121
 			<?php if ($_['restrictUserEnumerationToGroup'] === 'yes') print_unescaped('checked="checked"'); ?> />
122
-		<label for="shareapi_restrict_user_enumeration_to_group"><?php p($l->t('Restrict username autocompletion to users within the same groups'));?></label><br />
122
+		<label for="shareapi_restrict_user_enumeration_to_group"><?php p($l->t('Restrict username autocompletion to users within the same groups')); ?></label><br />
123 123
 	</p>
124 124
 
125 125
 	<p>
126 126
 		<input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate"
127 127
 			<?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> />
128
-		<label for="publicShareDisclaimer"><?php p($l->t('Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)'));?></label>
128
+		<label for="publicShareDisclaimer"><?php p($l->t('Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)')); ?></label>
129 129
 		<span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span>
130 130
 		<br/>
131 131
 		<textarea placeholder="<?php p($l->t('This text will be shown on the public link upload page when the file list is hidden.')) ?>" id="publicShareDisclaimerText" <?php if ($_['publicShareDisclaimerText'] === null) { print_unescaped('class="hidden"'); } ?>><?php p($_['publicShareDisclaimerText']) ?></textarea>
132 132
 	</p>
133 133
 
134
-	<h3><?php p($l->t('Default share permissions'));?></h3>
134
+	<h3><?php p($l->t('Default share permissions')); ?></h3>
135 135
 	<input type="hidden" name="shareapi_default_permissions" id="shareApiDefaultPermissions" class="checkbox"
136 136
 		   value="<?php p($_['shareApiDefaultPermissions']) ?>" />
137 137
 	<p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
138 138
 		<?php foreach ($_['shareApiDefaultPermissionsCheckboxes'] as $perm): ?>
139 139
 			<input type="checkbox" name="shareapi_default_permission_<?php p($perm['id']) ?>" id="shareapi_default_permission_<?php p($perm['id']) ?>"
140 140
 				   class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) print_unescaped('checked="checked"'); ?> />
141
-			<label for="shareapi_default_permission_<?php p($perm['id']) ?>"><?php p($perm['label']);?></label>
141
+			<label for="shareapi_default_permission_<?php p($perm['id']) ?>"><?php p($perm['label']); ?></label>
142 142
 		<?php endforeach ?>
143 143
 	</p>
144 144
 </div>
Please login to merge, or discard this patch.