Completed
Push — stable9 ( 11047b...318578 )
by Lukas
20:03 queued 09:36
created
apps/encryption/lib/migration.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -348,8 +348,9 @@
 block discarded – undo
348 348
 			$systemMountPoints = $this->getSystemMountPoints();
349 349
 			foreach ($systemMountPoints as $mountPoint) {
350 350
 				$normalizedMountPoint = \OC\Files\Filesystem::normalizePath($mountPoint['mountpoint']) . '/';
351
-				if (strpos($normalized, $normalizedMountPoint) === 0)
352
-					return $targetDir;
351
+				if (strpos($normalized, $normalizedMountPoint) === 0) {
352
+									return $targetDir;
353
+				}
353 354
 			}
354 355
 		} else if ($trash === false && $this->view->file_exists('/' . $user. '/files/' . $filePath)) {
355 356
 			return $targetDir;
Please login to merge, or discard this patch.
apps/encryption/templates/settings-admin.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,10 +8,13 @@  discard block
 block discarded – undo
8 8
 <form id="ocDefaultEncryptionModule" class="sub-section">
9 9
 	<?php if(!$_["initStatus"]): ?>
10 10
 		<?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
11
-	<?php else: ?>
11
+	<?php else {
12
+    : ?>
12 13
 		<p id="encryptHomeStorageSetting">
13 14
 			<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
14
-				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
15
+				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"');
16
+}
17
+?> />
15 18
 			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
16 19
 			<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
17 20
 		</p>
@@ -40,7 +43,10 @@  discard block
 block discarded – undo
40 43
 		</p>
41 44
 		<br/><br/>
42 45
 
43
-		<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
46
+		<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') {
47
+    print_unescaped('class="hidden"');
48
+}
49
+?>>
44 50
 			<?php p($l->t("Change recovery key password:")); ?>
45 51
 			<span class="msg"></span>
46 52
 			<br/>
Please login to merge, or discard this patch.
settings/templates/admin.php 1 patch
Braces   +144 added lines, -37 removed lines patch added patch discarded remove patch
@@ -207,75 +207,144 @@  discard block
 block discarded – undo
207 207
 			href="<?php p(link_to_docs('admin-sharing')); ?>"></a>
208 208
 		<p id="enable">
209 209
 			<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox"
210
-				   value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
210
+				   value="1" <?php if ($_['shareAPIEnabled'] === 'yes') {
211
+    print_unescaped('checked="checked"');
212
+}
213
+?> />
211 214
 			<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
212 215
 		</p>
213
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
216
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
217
+    p('hidden');
218
+}
219
+?>">
214 220
 			<input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox"
215
-				   value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
221
+				   value="1" <?php if ($_['allowLinks'] === 'yes') {
222
+    print_unescaped('checked="checked"');
223
+}
224
+?> />
216 225
 			<label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
217 226
 		</p>
218 227
 
219
-		<p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
228
+		<p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') {
229
+    p('hidden');
230
+}
231
+?>">
220 232
 			<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox"
221
-				   value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
233
+				   value="1" <?php if ($_['enforceLinkPassword']) {
234
+    print_unescaped('checked="checked"');
235
+}
236
+?> />
222 237
 			<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
223 238
 
224 239
 			<input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox"
225
-				   value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
240
+				   value="1" <?php if ($_['allowPublicUpload'] == 'yes') {
241
+    print_unescaped('checked="checked"');
242
+}
243
+?> />
226 244
 			<label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
227 245
 
228 246
 			<input type="checkbox" name="shareapi_allow_public_notification" id="allowPublicMailNotification" class="checkbox"
229
-				   value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') print_unescaped('checked="checked"'); ?> />
247
+				   value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') {
248
+    print_unescaped('checked="checked"');
249
+}
250
+?> />
230 251
 			<label for="allowPublicMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
231 252
 
232 253
 			<input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox"
233
-				   value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
254
+				   value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') {
255
+    print_unescaped('checked="checked"');
256
+}
257
+?> />
234 258
 			<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/>
235 259
 
236 260
 		</p>
237
-		<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
261
+		<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
262
+    p('hidden');
263
+}
264
+?>">
238 265
 			<?php p($l->t( 'Expire after ' )); ?>
239 266
 			<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
240 267
 				   value='<?php p($_['shareExpireAfterNDays']) ?>' />
241 268
 			<?php p($l->t( 'days' )); ?>
242 269
 			<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
243
-				   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
270
+				   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') {
271
+    print_unescaped('checked="checked"');
272
+}
273
+?> />
244 274
 			<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
245 275
 		</p>
246
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
276
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
277
+    p('hidden');
278
+}
279
+?>">
247 280
 			<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox"
248
-				   value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
281
+				   value="1" <?php if ($_['allowResharing'] === 'yes') {
282
+    print_unescaped('checked="checked"');
283
+}
284
+?> />
249 285
 			<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
250 286
 		</p>
251
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
287
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
288
+    p('hidden');
289
+}
290
+?>">
252 291
 			<input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
253
-				   value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
292
+				   value="1" <?php if ($_['allowGroupSharing'] === 'yes') {
293
+    print_unescaped('checked="checked"');
294
+}
295
+?> />
254 296
 			<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
255 297
 		</p>
256
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
298
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
299
+    p('hidden');
300
+}
301
+?>">
257 302
 			<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
258
-				   value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
303
+				   value="1" <?php if ($_['onlyShareWithGroupMembers']) {
304
+    print_unescaped('checked="checked"');
305
+}
306
+?> />
259 307
 			<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
260 308
 		</p>
261
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
309
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
310
+    p('hidden');
311
+}
312
+?>">
262 313
 			<input type="checkbox" name="shareapi_allow_mail_notification" id="allowMailNotification" class="checkbox"
263
-				   value="1" <?php if ($_['allowMailNotification'] === 'yes') print_unescaped('checked="checked"'); ?> />
314
+				   value="1" <?php if ($_['allowMailNotification'] === 'yes') {
315
+    print_unescaped('checked="checked"');
316
+}
317
+?> />
264 318
 			<label for="allowMailNotification"><?php p($l->t('Allow users to send mail notification for shared files to other users'));?></label><br/>
265 319
 		</p>
266
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
320
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
321
+    p('hidden');
322
+}
323
+?>">
267 324
 			<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox"
268
-				   value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
325
+				   value="1" <?php if ($_['shareExcludeGroups']) {
326
+    print_unescaped('checked="checked"');
327
+}
328
+?> />
269 329
 			<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
270 330
 		</p>
271
-		<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
331
+		<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') {
332
+    p('hidden');
333
+}
334
+?>">
272 335
 			<input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px"/>
273 336
 			<br />
274 337
 			<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
275 338
 		</p>
276
-		<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
339
+		<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
340
+    p('hidden');
341
+}
342
+?>">
277 343
 			<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox"
278
-				<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> />
344
+				<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') {
345
+    print_unescaped('checked="checked"');
346
+}
347
+?> />
279 348
 			<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 needs to be entered.'));?></label><br />
280 349
 		</p>
281 350
 
@@ -302,15 +371,20 @@  discard block
 block discarded – undo
302 371
 				<span class="crondate" original-title="<?php p($absolute_time);?>">
303 372
 					<?php p($l->t("Last cron job execution: %s.", [$relative_time]));?>
304 373
 				</span>
305
-			<?php else: ?>
374
+			<?php else {
375
+    : ?>
306 376
 				<span class="status error"></span>
307
-				<span class="crondate" original-title="<?php p($absolute_time);?>">
377
+				<span class="crondate" original-title="<?php p($absolute_time);
378
+}
379
+?>">
308 380
 					<?php p($l->t("Last cron job execution: %s. Something seems wrong.", [$relative_time]));?>
309 381
 				</span>
310 382
 			<?php endif;
311
-		else: ?>
383
+		else {
384
+		    : ?>
312 385
 			<span class="status error"></span>
313 386
 			<?php p($l->t("Cron was not executed yet!"));
387
+		}
314 388
 		endif; ?>
315 389
 	</p>
316 390
 	<?php endif; ?>
@@ -353,7 +427,10 @@  discard block
 block discarded – undo
353 427
 	<p id="enable">
354 428
 		<input type="checkbox"
355 429
 			   id="enableEncryption" class="checkbox"
356
-			   value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked" disabled="disabled"'); ?> />
430
+			   value="1" <?php if ($_['encryptionEnabled']) {
431
+    print_unescaped('checked="checked" disabled="disabled"');
432
+}
433
+?> />
357 434
 		<label
358 435
 			for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/>
359 436
 	</p>
@@ -372,8 +449,14 @@  discard block
 block discarded – undo
372 449
 			   value="<?php p($l->t("Enable encryption")); ?>" /></p>
373 450
 	</div>
374 451
 
375
-	<div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>">
376
-		<div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>">
452
+	<div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) {
453
+    p('hidden');
454
+}
455
+?>">
456
+		<div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) {
457
+    p('hidden');
458
+}
459
+?>">
377 460
 			<?php
378 461
 			if (empty($_['encryptionModules'])) {
379 462
 				p($l->t('No encryption module loaded, please enable an encryption module in the app menu.'));
@@ -391,12 +474,18 @@  discard block
 block discarded – undo
391 474
 							for="<?php p($id) ?>"><?php p($module['displayName']) ?></label>
392 475
 						<br/>
393 476
 
394
-						<?php if ($id === 'OC_DEFAULT_MODULE') print_unescaped($_['ocDefaultEncryptionModulePanel']); ?>
477
+						<?php if ($id === 'OC_DEFAULT_MODULE') {
478
+    print_unescaped($_['ocDefaultEncryptionModulePanel']);
479
+}
480
+?>
395 481
 					<?php endforeach; ?>
396 482
 				</fieldset>
397 483
 			<?php } ?>
398 484
 		</div>
399
-		<div id="migrationWarning" class="<?php if ($_['encryptionReady']) p('hidden'); ?>">
485
+		<div id="migrationWarning" class="<?php if ($_['encryptionReady']) {
486
+    p('hidden');
487
+}
488
+?>">
400 489
 			<?php
401 490
 			if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) {
402 491
 				p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run \'occ encryption:migrate\''));
@@ -431,11 +520,17 @@  discard block
 block discarded – undo
431 520
 			</select>
432 521
 
433 522
 			<label id="mail_smtpsecure_label" for="mail_smtpsecure"
434
-				   <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>>
523
+				   <?php if ($_['mail_smtpmode'] != 'smtp') {
524
+    print_unescaped(' class="hidden"');
525
+}
526
+?>>
435 527
 				<?php p($l->t( 'Encryption' )); ?>
436 528
 			</label>
437 529
 			<select name="mail_smtpsecure" id="mail_smtpsecure"
438
-					<?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>>
530
+					<?php if ($_['mail_smtpmode'] != 'smtp') {
531
+    print_unescaped(' class="hidden"');
532
+}
533
+?>>
439 534
 				<?php foreach ($mail_smtpsecure as $secure => $name):
440 535
 					$selected = '';
441 536
 					if ($secure == $_['mail_smtpsecure']):
@@ -454,7 +549,10 @@  discard block
 block discarded – undo
454 549
 				   value='<?php p($_['mail_domain']) ?>' />
455 550
 		</p>
456 551
 
457
-		<p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>>
552
+		<p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] != 'smtp') {
553
+    print_unescaped(' class="hidden"');
554
+}
555
+?>>
458 556
 			<label for="mail_smtpauthtype"><?php p($l->t( 'Authentication method' )); ?></label>
459 557
 			<select name='mail_smtpauthtype' id='mail_smtpauthtype'>
460 558
 				<?php foreach ($mail_smtpauthtype as $authtype => $name):
@@ -467,11 +565,17 @@  discard block
 block discarded – undo
467 565
 			</select>
468 566
 
469 567
 			<input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1"
470
-				   <?php if ($_['mail_smtpauth']) print_unescaped('checked="checked"'); ?> />
568
+				   <?php if ($_['mail_smtpauth']) {
569
+    print_unescaped('checked="checked"');
570
+}
571
+?> />
471 572
 			<label for="mail_smtpauth"><?php p($l->t( 'Authentication required' )); ?></label>
472 573
 		</p>
473 574
 
474
-		<p id="setting_smtphost" <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>>
575
+		<p id="setting_smtphost" <?php if ($_['mail_smtpmode'] != 'smtp') {
576
+    print_unescaped(' class="hidden"');
577
+}
578
+?>>
475 579
 			<label for="mail_smtphost"><?php p($l->t( 'Server address' )); ?></label>
476 580
 			<input type="text" name='mail_smtphost' id="mail_smtphost" placeholder="smtp.example.com"
477 581
 				   value='<?php p($_['mail_smtphost']) ?>' />
@@ -481,7 +585,10 @@  discard block
 block discarded – undo
481 585
 		</p>
482 586
 	</form>
483 587
 	<form class="mail_settings" id="mail_credentials_settings">
484
-		<p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>>
588
+		<p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] != 'smtp') {
589
+    print_unescaped(' class="hidden"');
590
+}
591
+?>>
485 592
 			<label for="mail_smtpname"><?php p($l->t( 'Credentials' )); ?></label>
486 593
 			<input type="text" name='mail_smtpname' id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>"
487 594
 				   value='<?php p($_['mail_smtpname']) ?>' />
Please login to merge, or discard this patch.
settings/templates/users/part.setquota.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,12 +3,18 @@
 block discarded – undo
3 3
 	<span><?php p($l->t('Default Quota'));?></span>
4 4
 	<?php if((bool) $_['isAdmin']): ?>
5 5
 		<select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-tipsy-gravity="s">
6
-			<option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'>
6
+			<option <?php if($_['default_quota'] === 'none') {
7
+    print_unescaped('selected="selected"');
8
+}
9
+?> value='none'>
7 10
 				<?php p($l->t('Unlimited'));?>
8 11
 			</option>
9 12
 			<?php foreach($_['quota_preset'] as $preset):?>
10 13
 				<?php if($preset !== 'default'):?>
11
-					<option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'>
14
+					<option <?php if($_['default_quota']==$preset) {
15
+    print_unescaped('selected="selected"');
16
+}
17
+?> value='<?php p($preset);?>'>
12 18
 						<?php p($preset);?>
13 19
 					</option>
14 20
 				<?php endif;?>
Please login to merge, or discard this patch.
settings/templates/personal.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,11 @@
 block discarded – undo
44 44
 		<div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div>
45 45
 		<input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield">
46 46
 		<p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p>
47
-		<?php else: ?>
48
-		<?php p($l->t('Picture provided by original account')); ?>
47
+		<?php else {
48
+    : ?>
49
+		<?php p($l->t('Picture provided by original account'));
50
+}
51
+?>
49 52
 		<?php endif; ?>
50 53
 	</div>
51 54
 
Please login to merge, or discard this patch.
settings/templates/certificates.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,11 @@
 block discarded – undo
23 23
 					<?php p($rootCert->getIssuerName()) ?>
24 24
 				</td>
25 25
 				<td <?php if ($rootCert != ''): ?>class="remove"
26
-					<?php else: ?>style="visibility:hidden;"
27
-					<?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
26
+					<?php else {
27
+    : ?>style="visibility:hidden;"
28
+					<?php endif;
29
+}
30
+?>><img alt="<?php p($l->t('Delete')); ?>"
28 31
 										 title="<?php p($l->t('Delete')); ?>"
29 32
 										 class="svg action"
30 33
 										 src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
Please login to merge, or discard this patch.
resources/updater-fixes/sabre/dav/lib/DAV/CorePlugin.php 1 patch
Braces   +71 added lines, -27 removed lines patch added patch discarded remove patch
@@ -78,7 +78,9 @@  discard block
 block discarded – undo
78 78
         $path = $request->getPath();
79 79
         $node = $this->server->tree->getNodeForPath($path, 0);
80 80
 
81
-        if (!$node instanceof IFile) return;
81
+        if (!$node instanceof IFile) {
82
+            return;
83
+        }
82 84
 
83 85
         $body = $node->get();
84 86
 
@@ -132,17 +134,23 @@  discard block
 block discarded – undo
132 134
 
133 135
                 // It's a date. We must check if the entity is modified since
134 136
                 // the specified date.
135
-                if (!isset($httpHeaders['Last-Modified'])) $ignoreRangeHeader = true;
136
-                else {
137
+                if (!isset($httpHeaders['Last-Modified'])) {
138
+                    $ignoreRangeHeader = true;
139
+                } else {
137 140
                     $modified = new \DateTime($httpHeaders['Last-Modified']);
138
-                    if ($modified > $ifRangeDate) $ignoreRangeHeader = true;
141
+                    if ($modified > $ifRangeDate) {
142
+                        $ignoreRangeHeader = true;
143
+                    }
139 144
                 }
140 145
 
141 146
             } catch (\Exception $e) {
142 147
 
143 148
                 // It's an entity. We can do a simple comparison.
144
-                if (!isset($httpHeaders['ETag'])) $ignoreRangeHeader = true;
145
-                elseif ($httpHeaders['ETag'] !== $ifRange) $ignoreRangeHeader = true;
149
+                if (!isset($httpHeaders['ETag'])) {
150
+                    $ignoreRangeHeader = true;
151
+                } elseif ($httpHeaders['ETag'] !== $ifRange) {
152
+                    $ignoreRangeHeader = true;
153
+                }
146 154
             }
147 155
         }
148 156
 
@@ -154,18 +162,25 @@  discard block
 block discarded – undo
154 162
 
155 163
                 $start = $range[0];
156 164
                 $end = $range[1] ? $range[1] : $nodeSize - 1;
157
-                if ($start >= $nodeSize)
158
-                    throw new Exception\RequestedRangeNotSatisfiable('The start offset (' . $range[0] . ') exceeded the size of the entity (' . $nodeSize . ')');
165
+                if ($start >= $nodeSize) {
166
+                                    throw new Exception\RequestedRangeNotSatisfiable('The start offset (' . $range[0] . ') exceeded the size of the entity (' . $nodeSize . ')');
167
+                }
159 168
 
160
-                if ($end < $start) throw new Exception\RequestedRangeNotSatisfiable('The end offset (' . $range[1] . ') is lower than the start offset (' . $range[0] . ')');
161
-                if ($end >= $nodeSize) $end = $nodeSize - 1;
169
+                if ($end < $start) {
170
+                    throw new Exception\RequestedRangeNotSatisfiable('The end offset (' . $range[1] . ') is lower than the start offset (' . $range[0] . ')');
171
+                }
172
+                if ($end >= $nodeSize) {
173
+                    $end = $nodeSize - 1;
174
+                }
162 175
 
163 176
             } else {
164 177
 
165 178
                 $start = $nodeSize - $range[1];
166 179
                 $end  = $nodeSize - 1;
167 180
 
168
-                if ($start < 0) $start = 0;
181
+                if ($start < 0) {
182
+                    $start = 0;
183
+                }
169 184
 
170 185
             }
171 186
 
@@ -175,7 +190,9 @@  discard block
 block discarded – undo
175 190
             if (!stream_get_meta_data($body)['seekable'] || fseek($body, $start, SEEK_SET) === -1) {
176 191
                 $consumeBlock = 8192;
177 192
                 for ($consumed = 0; $start - $consumed > 0;){
178
-                    if (feof($body)) throw new Exception\RequestedRangeNotSatisfiable('The start offset (' . $start . ') exceeded the size of the entity (' . $consumed . ')');
193
+                    if (feof($body)) {
194
+                        throw new Exception\RequestedRangeNotSatisfiable('The start offset (' . $start . ') exceeded the size of the entity (' . $consumed . ')');
195
+                    }
179 196
                     $consumed += strlen(fread($body, min($start - $consumed, $consumeBlock)));
180 197
                 }
181 198
             }
@@ -187,7 +204,9 @@  discard block
 block discarded – undo
187 204
 
188 205
         } else {
189 206
 
190
-            if ($nodeSize) $response->setHeader('Content-Length', $nodeSize);
207
+            if ($nodeSize) {
208
+                $response->setHeader('Content-Length', $nodeSize);
209
+            }
191 210
             $response->setStatus(200);
192 211
             $response->setBody($body);
193 212
 
@@ -281,7 +300,9 @@  discard block
 block discarded – undo
281 300
 
282 301
         $path = $request->getPath();
283 302
 
284
-        if (!$this->server->emit('beforeUnbind', [$path])) return false;
303
+        if (!$this->server->emit('beforeUnbind', [$path])) {
304
+            return false;
305
+        }
285 306
         $this->server->tree->delete($path);
286 307
         $this->server->emit('afterUnbind', [$path]);
287 308
 
@@ -329,7 +350,9 @@  discard block
 block discarded – undo
329 350
 
330 351
         $depth = $this->server->getHTTPDepth(1);
331 352
         // The only two options for the depth of a propfind is 0 or 1 - as long as depth infinity is not enabled
332
-        if (!$this->server->enablePropfindDepthInfinity && $depth != 0) $depth = 1;
353
+        if (!$this->server->enablePropfindDepthInfinity && $depth != 0) {
354
+            $depth = 1;
355
+        }
333 356
 
334 357
         $newProperties = $this->server->getPropertiesForPath($path, $propFindXml->properties, $depth);
335 358
 
@@ -506,14 +529,18 @@  discard block
 block discarded – undo
506 529
             $node = $this->server->tree->getNodeForPath($path);
507 530
 
508 531
             // If the node is a collection, we'll deny it
509
-            if (!($node instanceof IFile)) throw new Exception\Conflict('PUT is not allowed on non-files.');
532
+            if (!($node instanceof IFile)) {
533
+                throw new Exception\Conflict('PUT is not allowed on non-files.');
534
+            }
510 535
 
511 536
             if (!$this->server->updateFile($path, $body, $etag)) {
512 537
                 return false;
513 538
             }
514 539
 
515 540
             $response->setHeader('Content-Length', '0');
516
-            if ($etag) $response->setHeader('ETag', $etag);
541
+            if ($etag) {
542
+                $response->setHeader('ETag', $etag);
543
+            }
517 544
             $response->setStatus(204);
518 545
 
519 546
         } else {
@@ -526,7 +553,9 @@  discard block
 block discarded – undo
526 553
             }
527 554
 
528 555
             $response->setHeader('Content-Length', '0');
529
-            if ($etag) $response->setHeader('ETag', $etag);
556
+            if ($etag) {
557
+                $response->setHeader('ETag', $etag);
558
+            }
530 559
             $response->setStatus(201);
531 560
 
532 561
         }
@@ -570,8 +599,9 @@  discard block
 block discarded – undo
570 599
 
571 600
             $properties = $mkcol->getProperties();
572 601
 
573
-            if (!isset($properties['{DAV:}resourcetype']))
574
-                throw new Exception\BadRequest('The mkcol request must include a {DAV:}resourcetype property');
602
+            if (!isset($properties['{DAV:}resourcetype'])) {
603
+                            throw new Exception\BadRequest('The mkcol request must include a {DAV:}resourcetype property');
604
+            }
575 605
 
576 606
             $resourceType = $properties['{DAV:}resourcetype']->getValue();
577 607
             unset($properties['{DAV:}resourcetype']);
@@ -623,12 +653,20 @@  discard block
 block discarded – undo
623 653
 
624 654
         if ($moveInfo['destinationExists']) {
625 655
 
626
-            if (!$this->server->emit('beforeUnbind', [$moveInfo['destination']])) return false;
656
+            if (!$this->server->emit('beforeUnbind', [$moveInfo['destination']])) {
657
+                return false;
658
+            }
627 659
 
628 660
         }
629
-        if (!$this->server->emit('beforeUnbind', [$path])) return false;
630
-        if (!$this->server->emit('beforeBind', [$moveInfo['destination']])) return false;
631
-        if (!$this->server->emit('beforeMove', [$path, $moveInfo['destination']])) return false;
661
+        if (!$this->server->emit('beforeUnbind', [$path])) {
662
+            return false;
663
+        }
664
+        if (!$this->server->emit('beforeBind', [$moveInfo['destination']])) {
665
+            return false;
666
+        }
667
+        if (!$this->server->emit('beforeMove', [$path, $moveInfo['destination']])) {
668
+            return false;
669
+        }
632 670
 
633 671
         if ($moveInfo['destinationExists']) {
634 672
 
@@ -674,11 +712,15 @@  discard block
 block discarded – undo
674 712
         $copyInfo = $this->server->getCopyAndMoveInfo($request);
675 713
 
676 714
         if ($copyInfo['destinationExists']) {
677
-            if (!$this->server->emit('beforeUnbind', [$copyInfo['destination']])) return false;
715
+            if (!$this->server->emit('beforeUnbind', [$copyInfo['destination']])) {
716
+                return false;
717
+            }
678 718
             $this->server->tree->delete($copyInfo['destination']);
679 719
 
680 720
         }
681
-        if (!$this->server->emit('beforeBind', [$copyInfo['destination']])) return false;
721
+        if (!$this->server->emit('beforeBind', [$copyInfo['destination']])) {
722
+            return false;
723
+        }
682 724
         $this->server->tree->copy($path, $copyInfo['destination']);
683 725
         $this->server->emit('afterBind', [$copyInfo['destination']]);
684 726
 
@@ -871,7 +913,9 @@  discard block
 block discarded – undo
871 913
             // If we already have a sync-token from the current propFind
872 914
             // request, we can re-use that.
873 915
             $val = $propFind->get('{http://sabredav.org/ns}sync-token');
874
-            if ($val) return $val;
916
+            if ($val) {
917
+                return $val;
918
+            }
875 919
 
876 920
             $val = $propFind->get('{DAV:}sync-token');
877 921
             if ($val && is_scalar($val)) {
Please login to merge, or discard this patch.
resources/updater-fixes/sabre/dav/lib/CardDAV/Backend/PDO.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -255,7 +255,9 @@  discard block
 block discarded – undo
255 255
 
256 256
         $result = $stmt->fetch(\PDO::FETCH_ASSOC);
257 257
 
258
-        if (!$result) return false;
258
+        if (!$result) {
259
+            return false;
260
+        }
259 261
 
260 262
         $result['etag'] = '"' . $result['etag'] . '"';
261 263
         return $result;
@@ -464,7 +466,9 @@  discard block
 block discarded – undo
464 466
         $stmt->execute([ $addressBookId ]);
465 467
         $currentToken = $stmt->fetchColumn(0);
466 468
 
467
-        if (is_null($currentToken)) return null;
469
+        if (is_null($currentToken)) {
470
+            return null;
471
+        }
468 472
 
469 473
         $result = [
470 474
             'syncToken' => $currentToken,
@@ -476,7 +480,9 @@  discard block
 block discarded – undo
476 480
         if ($syncToken) {
477 481
 
478 482
             $query = "SELECT uri, operation FROM " . $this->addressBookChangesTableName . " WHERE synctoken >= ? AND synctoken < ? AND addressbookid = ? ORDER BY synctoken";
479
-            if ($limit > 0) $query .= " LIMIT " . (int)$limit;
483
+            if ($limit > 0) {
484
+                $query .= " LIMIT " . (int)$limit;
485
+            }
480 486
 
481 487
             // Fetching all changes
482 488
             $stmt = $this->pdo->prepare($query);
Please login to merge, or discard this patch.
resources/updater-fixes/sabre/dav/lib/CalDAV/Plugin.php 1 patch
Braces   +21 added lines, -13 removed lines patch added patch discarded remove patch
@@ -396,8 +396,9 @@  discard block
 block discarded – undo
396 396
             // Therefore we simply expose it as a property.
397 397
             $propFind->handle('{' . self::NS_CALDAV . '}calendar-data', function() use ($node) {
398 398
                 $val = $node->get();
399
-                if (is_resource($val))
400
-                    $val = stream_get_contents($val);
399
+                if (is_resource($val)) {
400
+                                    $val = stream_get_contents($val);
401
+                }
401 402
 
402 403
                 // Taking out \r to not screw up the xml output
403 404
                 return str_replace("\r", "", $val);
@@ -721,8 +722,9 @@  discard block
 block discarded – undo
721 722
      */
722 723
     function beforeWriteContent($path, DAV\IFile $node, &$data, &$modified) {
723 724
 
724
-        if (!$node instanceof ICalendarObject)
725
-            return;
725
+        if (!$node instanceof ICalendarObject) {
726
+                    return;
727
+        }
726 728
 
727 729
         // We're onyl interested in ICalendarObject nodes that are inside of a
728 730
         // real calendar. This is to avoid triggering validation and scheduling
@@ -730,8 +732,9 @@  discard block
 block discarded – undo
730 732
         list($parent) = Uri\split($path);
731 733
         $parentNode = $this->server->tree->getNodeForPath($parent);
732 734
 
733
-        if (!$parentNode instanceof ICalendar)
734
-            return;
735
+        if (!$parentNode instanceof ICalendar) {
736
+                    return;
737
+        }
735 738
 
736 739
         $this->validateICalendar(
737 740
             $data,
@@ -759,8 +762,9 @@  discard block
 block discarded – undo
759 762
      */
760 763
     function beforeCreateFile($path, &$data, DAV\ICollection $parentNode, &$modified) {
761 764
 
762
-        if (!$parentNode instanceof ICalendar)
763
-            return;
765
+        if (!$parentNode instanceof ICalendar) {
766
+                    return;
767
+        }
764 768
 
765 769
         $this->validateICalendar(
766 770
             $data,
@@ -798,7 +802,9 @@  discard block
 block discarded – undo
798 802
         // Converting the data to unicode, if needed.
799 803
         $data = DAV\StringUtil::ensureUTF8($data);
800 804
 
801
-        if ($before !== md5($data)) $modified = true;
805
+        if ($before !== md5($data)) {
806
+            $modified = true;
807
+        }
802 808
 
803 809
         try {
804 810
 
@@ -869,8 +875,9 @@  discard block
 block discarded – undo
869 875
 
870 876
             }
871 877
         }
872
-        if (!$foundType)
873
-            throw new DAV\Exception\BadRequest('iCalendar object must contain at least 1 of VEVENT, VTODO or VJOURNAL');
878
+        if (!$foundType) {
879
+                    throw new DAV\Exception\BadRequest('iCalendar object must contain at least 1 of VEVENT, VTODO or VJOURNAL');
880
+        }
874 881
 
875 882
         // We use an extra variable to allow event handles to tell us wether
876 883
         // the object was modified or not.
@@ -915,8 +922,9 @@  discard block
 block discarded – undo
915 922
      */
916 923
     function htmlActionsPanel(DAV\INode $node, &$output) {
917 924
 
918
-        if (!$node instanceof CalendarHome)
919
-            return;
925
+        if (!$node instanceof CalendarHome) {
926
+                    return;
927
+        }
920 928
 
921 929
         $output .= '<tr><td colspan="2"><form method="post" action="">
922 930
             <h3>Create new calendar</h3>
Please login to merge, or discard this patch.