Passed
Push — master ( d23e96...1bc100 )
by Roeland
11:25 queued 10s
created
lib/private/Archive/ZIP.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$this->path=$source;
48 48
 		$this->zip=new \ZipArchive();
49 49
 		if($this->zip->open($source, \ZipArchive::CREATE)) {
50
-		}else{
50
+		} else{
51 51
 			\OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, ILogger::WARN);
52 52
 		}
53 53
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	public function addFile($path, $source='') {
69 69
 		if($source and $source[0]=='/' and file_exists($source)) {
70 70
 			$result=$this->zip->addFile($source, $path);
71
-		}else{
71
+		} else{
72 72
 			$result=$this->zip->addFromString($path, $source);
73 73
 		}
74 74
 		if($result) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	public function remove($path) {
178 178
 		if($this->fileExists($path.'/')) {
179 179
 			return $this->zip->deleteName($path.'/');
180
-		}else{
180
+		} else{
181 181
 			return $this->zip->deleteName($path);
182 182
 		}
183 183
 	}
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			//in the archive when the stream is closed
197 197
 			if(strrpos($path, '.')!==false) {
198 198
 				$ext=substr($path, strrpos($path, '.'));
199
-			}else{
199
+			} else{
200 200
 				$ext='';
201 201
 			}
202 202
 			$tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	private function stripPath($path) {
226 226
 		if(!$path || $path[0]=='/') {
227 227
 			return substr($path, 1);
228
-		}else{
228
+		} else{
229 229
 			return $path;
230 230
 		}
231 231
 	}
Please login to merge, or discard this patch.
lib/private/Installer.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -459,7 +459,7 @@
 block discarded – undo
459 459
 			$appDir = OC_App::getInstallPath() . '/' . $appId;
460 460
 			OC_Helper::rmdirr($appDir);
461 461
 			return true;
462
-		}else{
462
+		} else{
463 463
 			\OCP\Util::writeLog('core', 'can\'t remove app '.$appId.'. It is not installed.', ILogger::ERROR);
464 464
 
465 465
 			return false;
Please login to merge, or discard this patch.
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,8 +247,7 @@
 block discarded – undo
247 247
 			return new JSONResponse($e->getReturnMessage(), Http::STATUS_BAD_REQUEST);
248 248
 		} catch (AuthenticationFailedException $e) {
249 249
 			return new JSONResponse(["message" => "RESOURCE_NOT_FOUND"], Http::STATUS_FORBIDDEN);
250
-		}
251
-		catch (\Exception $e) {
250
+		} catch (\Exception $e) {
252 251
 			return new JSONResponse(
253 252
 				['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()],
254 253
 				Http::STATUS_BAD_REQUEST
Please login to merge, or discard this patch.
apps/federatedfilesharing/templates/settings-admin.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,14 +18,20 @@  discard block
 block discarded – undo
18 18
 
19 19
 	<p>
20 20
 		<input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox"
21
-			   value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
21
+			   value="1" <?php if ($_['outgoingServer2serverShareEnabled']) {
22
+    print_unescaped('checked="checked"');
23
+}
24
+?> />
22 25
 		<label for="outgoingServer2serverShareEnabled">
23 26
 			<?php p($l->t('Allow users on this server to send shares to other servers'));?>
24 27
 		</label>
25 28
 	</p>
26 29
 	<p>
27 30
 		<input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox"
28
-			   value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
31
+			   value="1" <?php if ($_['incomingServer2serverShareEnabled']) {
32
+    print_unescaped('checked="checked"');
33
+}
34
+?> />
29 35
 		<label for="incomingServer2serverShareEnabled">
30 36
 			<?php p($l->t('Allow users on this server to receive shares from other servers'));?>
31 37
 		</label><br/>
@@ -33,14 +39,20 @@  discard block
 block discarded – undo
33 39
 	<?php if($_['federatedGroupSharingSupported']): ?>
34 40
 	<p>
35 41
 		<input type="checkbox" name="outgoing_server2server_group_share_enabled" id="outgoingServer2serverGroupShareEnabled" class="checkbox"
36
-			   value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> />
42
+			   value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) {
43
+    print_unescaped('checked="checked"');
44
+}
45
+?> />
37 46
 		<label for="outgoingServer2serverGroupShareEnabled">
38 47
 			<?php p($l->t('Allow users on this server to send shares to groups on other servers'));?>
39 48
 		</label>
40 49
 	</p>
41 50
 	<p>
42 51
 		<input type="checkbox" name="incoming_server2server_group_share_enabled" id="incomingServer2serverGroupShareEnabled" class="checkbox"
43
-			   value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> />
52
+			   value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) {
53
+    print_unescaped('checked="checked"');
54
+}
55
+?> />
44 56
 		<label for="incomingServer2serverGroupShareEnabled">
45 57
 			<?php p($l->t('Allow users on this server to receive group shares from other servers'));?>
46 58
 		</label><br/>
@@ -48,14 +60,20 @@  discard block
 block discarded – undo
48 60
 	<?php endif; ?>
49 61
 	<p>
50 62
 		<input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox"
51
-			   value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> />
63
+			   value="1" <?php if ($_['lookupServerEnabled']) {
64
+    print_unescaped('checked="checked"');
65
+}
66
+?> />
52 67
 		<label for="lookupServerEnabled">
53 68
 			<?php p($l->t('Search global and public address book for users'));?>
54 69
 		</label><br/>
55 70
 	</p>
56 71
 	<p>
57 72
 		<input type="checkbox" name="lookupServerUploadEnabled" id="lookupServerUploadEnabled" class="checkbox"
58
-			   value="1" <?php if ($_['lookupServerUploadEnabled']) print_unescaped('checked="checked"'); ?> />
73
+			   value="1" <?php if ($_['lookupServerUploadEnabled']) {
74
+    print_unescaped('checked="checked"');
75
+}
76
+?> />
59 77
 		<label for="lookupServerUploadEnabled">
60 78
 			<?php p($l->t('Allow users to publish their data to a global and public address book'));?>
61 79
 		</label><br/>
Please login to merge, or discard this patch.
lib/private/Share20/Manager.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
 			if ($share->getSharedWith() === null) {
227 227
 				throw new \InvalidArgumentException('SharedWith should not be empty');
228 228
 			}
229
-		}  else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE_GROUP) {
229
+		} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE_GROUP) {
230 230
 			if ($share->getSharedWith() === null) {
231 231
 				throw new \InvalidArgumentException('SharedWith should not be empty');
232 232
 			}
Please login to merge, or discard this patch.
apps/files_external/templates/settings.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,10 @@  discard block
 block discarded – undo
96 96
 <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
97 97
 	<h2 data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2>
98 98
 	<p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p>
99
-	<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?>
99
+	<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) {
100
+    print_unescaped(''.$_['dependencies'].'');
101
+}
102
+?>
100 103
 	<table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
101 104
 		<thead>
102 105
 			<tr>
@@ -105,7 +108,10 @@  discard block
 block discarded – undo
105 108
 				<th><?php p($l->t('External storage')); ?></th>
106 109
 				<th><?php p($l->t('Authentication')); ?></th>
107 110
 				<th><?php p($l->t('Configuration')); ?></th>
108
-				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?>
111
+				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) {
112
+    print_unescaped('<th>'.$l->t('Available for').'</th>');
113
+}
114
+?>
109 115
 				<th>&nbsp;</th>
110 116
 				<th>&nbsp;</th>
111 117
 				<th>&nbsp;</th>
@@ -138,7 +144,10 @@  discard block
 block discarded – undo
138 144
 							});
139 145
 						?>
140 146
 						<?php foreach ($sortedBackends as $backend): ?>
141
-							<?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?>
147
+							<?php if ($backend->getDeprecateTo()) {
148
+    continue;
149
+}
150
+// ignore deprecated backends ?>
142 151
 							<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
143 152
 						<?php endforeach; ?>
144 153
 					</select>
@@ -163,7 +172,10 @@  discard block
 block discarded – undo
163 172
 
164 173
 	<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?>
165 174
 		<input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox"
166
-			value="1" <?php if ($_['allowUserMounting']) print_unescaped(' checked="checked"'); ?> />
175
+			value="1" <?php if ($_['allowUserMounting']) {
176
+    print_unescaped(' checked="checked"');
177
+}
178
+?> />
167 179
 		<label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
168 180
 
169 181
 		<p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>>
@@ -175,8 +187,14 @@  discard block
 block discarded – undo
175 187
 			<?php $i = 0; foreach ($userBackends as $backend): ?>
176 188
 				<?php if ($deprecateTo = $backend->getDeprecateTo()): ?>
177 189
 					<input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" />
178
-				<?php else: ?>
179
-					<input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> />
190
+				<?php else {
191
+    : ?>
192
+					<input type="checkbox" id="allowUserMountingBackends<?php p($i);
193
+}
194
+?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) {
195
+    print_unescaped(' checked="checked"');
196
+}
197
+?> />
180 198
 					<label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br />
181 199
 				<?php endif; ?>
182 200
 				<?php $i++; ?>
Please login to merge, or discard this patch.
core/templates/404.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,13 @@
 block discarded – undo
14 14
 ?>
15 15
 <?php if (isset($_['content'])): ?>
16 16
 	<?php print_unescaped($_['content']) ?>
17
-<?php else: ?>
17
+<?php else {
18
+    : ?>
18 19
 	<div class="body-login-container update">
19 20
 		<div class="icon-big icon-search icon-white"></div>
20
-		<h2><?php p($l->t('File not found')); ?></h2>
21
+		<h2><?php p($l->t('File not found'));
22
+}
23
+?></h2>
21 24
 		<p class="infogroup"><?php p($l->t('The document could not be found on the server. Maybe the share was deleted or has expired?')); ?></p>
22 25
 		<p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>">
23 26
 			<?php p($l->t('Back to %s', array($theme->getName()))); ?>
Please login to merge, or discard this patch.
apps/files_sharing/templates/public.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,17 +50,23 @@
 block discarded – undo
50 50
 		<div id="preview">
51 51
 			<?php if (isset($_['folder'])): ?>
52 52
 				<?php print_unescaped($_['folder']); ?>
53
-			<?php else: ?>
53
+			<?php else {
54
+    : ?>
54 55
 				<?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?>
55 56
 					<div id="imgframe">
56
-						<audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px">
57
+						<audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']);
58
+}
59
+?>px; max-height: <?php p($_['previewMaxY']); ?>px">
57 60
 							<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
58 61
 						</audio>
59 62
 					</div>
60
-				<?php else: ?>
63
+				<?php else {
64
+    : ?>
61 65
 					<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
62 66
 					<div id="imgframe"></div>
63
-				<?php endif; ?>
67
+				<?php endif;
68
+}
69
+?>
64 70
 				<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
65 71
 					<div class="directDownload">
66 72
 						<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
Please login to merge, or discard this patch.
core/templates/twofactorselectchallenge.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,11 +27,15 @@  discard block
 block discarded – undo
27 27
 					<?php p($l->t('Set up two-factor authentication')) ?>
28 28
 				</a>
29 29
 			<?php } ?>
30
-		<?php else: ?>
30
+		<?php else {
31
+    : ?>
31 32
 			<strong><?php p($l->t('Two-factor authentication is enforced but has not been configured on your account. Use one of your backup codes to log in or contact your admin for assistance.')) ?></strong>
32
-		<?php endif; ?>
33
+		<?php endif;
34
+}
35
+?>
33 36
 	</p>
34
-	<?php else: ?>
37
+	<?php else {
38
+    : ?>
35 39
 	<ul>
36 40
 	<?php foreach ($_['providers'] as $provider): ?>
37 41
 		<li>
@@ -45,6 +49,7 @@  discard block
 block discarded – undo
45 49
 				<?php
46 50
 				if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
47 51
 					$icon = $provider->getLightIcon();
52
+}
48 53
 				} else {
49 54
 					$icon = image_path('core', 'actions/password-white.svg');
50 55
 				}
@@ -61,7 +66,8 @@  discard block
 block discarded – undo
61 66
 	<?php endif ?>
62 67
 	<?php if (!is_null($_['backupProvider'])): ?>
63 68
 	<p>
64
-		<a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
69
+		<a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else {
70
+    : ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
65 71
 			[
66 72
 				'challengeProviderId' => $_['backupProvider']->getId(),
67 73
 				'redirect_url' => $_['redirect_url'],
@@ -70,7 +76,9 @@  discard block
 block discarded – undo
70 76
 			<?php p($l->t('Use backup code')) ?>
71 77
 		</a>
72 78
 	</p>
73
-	<?php endif; ?>
79
+	<?php endif;
80
+}
81
+?>
74 82
 	<p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>">
75 83
 		<?php p($l->t('Cancel log in')) ?>
76 84
 	</a></p>
Please login to merge, or discard this patch.