Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
apps/files_external/templates/settings.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,10 @@  discard block
 block discarded – undo
87 87
 </form>
88 88
 
89 89
 <form id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
90
-	<?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?>
90
+	<?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) {
91
+    print_unescaped(''.$_['dependencies'].'');
92
+}
93
+?>
91 94
 	<table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
92 95
 		<thead>
93 96
 			<tr>
@@ -96,7 +99,10 @@  discard block
 block discarded – undo
96 99
 				<th><?php p($l->t('External storage')); ?></th>
97 100
 				<th><?php p($l->t('Authentication')); ?></th>
98 101
 				<th><?php p($l->t('Configuration')); ?></th>
99
-				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?>
102
+				<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) {
103
+    print_unescaped('<th>'.$l->t('Available for').'</th>');
104
+}
105
+?>
100 106
 				<th>&nbsp;</th>
101 107
 				<th>&nbsp;</th>
102 108
 			</tr>
@@ -128,7 +134,10 @@  discard block
 block discarded – undo
128 134
 							});
129 135
 						?>
130 136
 						<?php foreach ($sortedBackends as $backend): ?>
131
-							<?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?>
137
+							<?php if ($backend->getDeprecateTo()) {
138
+    continue;
139
+}
140
+// ignore deprecated backends ?>
132 141
 							<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
133 142
 						<?php endforeach; ?>
134 143
 					</select>
@@ -163,7 +172,10 @@  discard block
 block discarded – undo
163 172
 	<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?>
164 173
 		<br />
165 174
 		<input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox"
166
-			value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> />
175
+			value="1" <?php if ($_['allowUserMounting'] == 'yes') {
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'] != 'yes'): ?> class="hidden"<?php endif; ?>>
@@ -176,8 +188,14 @@  discard block
 block discarded – undo
176 188
 			<?php $i = 0; foreach ($userBackends as $backend): ?>
177 189
 				<?php if ($deprecateTo = $backend->getDeprecateTo()): ?>
178 190
 					<input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" />
179
-				<?php else: ?>
180
-					<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"'); ?> />
191
+				<?php else {
192
+    : ?>
193
+					<input type="checkbox" id="allowUserMountingBackends<?php p($i);
194
+}
195
+?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) {
196
+    print_unescaped(' checked="checked"');
197
+}
198
+?> />
181 199
 					<label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br />
182 200
 				<?php endif; ?>
183 201
 				<?php $i++; ?>
Please login to merge, or discard this patch.
apps/dav/lib/connector/sabre/filesplugin.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,9 @@
 block discarded – undo
202 202
 	function httpGet(RequestInterface $request, ResponseInterface $response) {
203 203
 		// Only handle valid files
204 204
 		$node = $this->tree->getNodeForPath($request->getPath());
205
-		if (!($node instanceof IFile)) return;
205
+		if (!($node instanceof IFile)) {
206
+		    return;
207
+		}
206 208
 
207 209
 		// adds a 'Content-Disposition: attachment' header
208 210
 		$filename = $node->getName();
Please login to merge, or discard this patch.
apps/dav/lib/connector/legacydavacl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
 	function getCurrentUserPrincipals() {
54 54
 		$principalV2 = $this->getCurrentUserPrincipal();
55 55
 
56
-		if (is_null($principalV2)) return [];
56
+		if (is_null($principalV2)) {
57
+		    return [];
58
+		}
57 59
 
58 60
 		$principalV1 = $this->convertPrincipal($principalV2, false);
59 61
 		return array_merge(
Please login to merge, or discard this patch.
apps/dav/lib/dav/sharing/plugin.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
 
120 120
 		// Only handling xml
121 121
 		$contentType = $request->getHeader('Content-Type');
122
-		if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false)
123
-			return;
122
+		if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false) {
123
+					return;
124
+		}
124 125
 
125 126
 		// Making sure the node exists
126 127
 		try {
Please login to merge, or discard this patch.
apps/dav/lib/caldav/caldavbackend.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -808,7 +808,9 @@
 block discarded – undo
808 808
 		$stmt = $query->execute();
809 809
 		$row = $stmt->fetch(\PDO::FETCH_ASSOC);
810 810
 
811
-		if(!$row) return null;
811
+		if(!$row) {
812
+		    return null;
813
+		}
812 814
 
813 815
 		return [
814 816
 				'id'            => $row['id'],
Please login to merge, or discard this patch.
apps/dav/lib/carddav/carddavbackend.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -745,7 +745,9 @@
 block discarded – undo
745 745
 		$stmt->execute([ $addressBookId ]);
746 746
 		$currentToken = $stmt->fetchColumn(0);
747 747
 
748
-		if (is_null($currentToken)) return null;
748
+		if (is_null($currentToken)) {
749
+		    return null;
750
+		}
749 751
 
750 752
 		$result = [
751 753
 			'syncToken' => $currentToken,
Please login to merge, or discard this patch.
apps/files_trashbin/ajax/preview.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 	$preview->setScalingUp($scalingUp);
73 73
 
74 74
 	$preview->showPreview();
75
-}catch(\Exception $e) {
75
+} catch(\Exception $e) {
76 76
 	\OC_Response::setStatus(500);
77 77
 	\OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
78 78
 }
Please login to merge, or discard this patch.
apps/federation/backgroundjob/getsharedsecret.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
 			&& $status !== Http::STATUS_FORBIDDEN
178 178
 		) {
179 179
 			$this->retainJob = true;
180
-		}  else {
180
+		} else {
181 181
 			// reset token if we received a valid response
182 182
 			$this->dbHandler->addToken($target, '');
183 183
 		}
Please login to merge, or discard this patch.
apps/federation/templates/settings-admin.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,10 @@
 block discarded – undo
11 11
 	<em><?php p($l->t('Nextcloud Federation allows you to connect with other trusted Nextclouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.')); ?></em>
12 12
 
13 13
 	<p>
14
-		<input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) p('checked'); ?> />
14
+		<input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) {
15
+    p('checked');
16
+}
17
+?> />
15 18
 		<label for="autoAddServers"><?php p($l->t('Add server automatically once a federated share was created successfully')) ?></label>
16 19
 	</p>
17 20
 
Please login to merge, or discard this patch.