Completed
Pull Request — master (#3590)
by Individual IT
11:38
created
settings/templates/admin/sharing.php 1 patch
Braces   +84 added lines, -21 removed lines patch added patch discarded remove patch
@@ -33,71 +33,134 @@
 block discarded – undo
33 33
 	   href="<?php p(link_to_docs('admin-sharing')); ?>"></a>
34 34
 	<p id="enable">
35 35
 		<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox"
36
-			   value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
36
+			   value="1" <?php if ($_['shareAPIEnabled'] === 'yes') {
37
+    print_unescaped('checked="checked"');
38
+}
39
+?> />
37 40
 		<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
38 41
 	</p>
39
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
42
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
43
+    p('hidden');
44
+}
45
+?>">
40 46
 		<input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox"
41
-			   value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
47
+			   value="1" <?php if ($_['allowLinks'] === 'yes') {
48
+    print_unescaped('checked="checked"');
49
+}
50
+?> />
42 51
 		<label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
43 52
 	</p>
44 53
 
45
-	<p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
54
+	<p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') {
55
+    p('hidden');
56
+}
57
+?>">
46 58
 		<input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox"
47
-			   value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
59
+			   value="1" <?php if ($_['allowPublicUpload'] == 'yes') {
60
+    print_unescaped('checked="checked"');
61
+}
62
+?> />
48 63
 		<label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
49 64
 
50 65
 		<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox"
51
-			   value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
66
+			   value="1" <?php if ($_['enforceLinkPassword']) {
67
+    print_unescaped('checked="checked"');
68
+}
69
+?> />
52 70
 		<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
53 71
 
54 72
 		<input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox"
55
-			   value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
73
+			   value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') {
74
+    print_unescaped('checked="checked"');
75
+}
76
+?> />
56 77
 		<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/>
57 78
 
58 79
 	</p>
59
-	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
80
+	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
81
+    p('hidden');
82
+}
83
+?>">
60 84
 		<?php p($l->t( 'Expire after ' )); ?>
61 85
 		<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
62 86
 			   value='<?php p($_['shareExpireAfterNDays']) ?>' />
63 87
 		<?php p($l->t( 'days' )); ?>
64 88
 		<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
65
-			   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
89
+			   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') {
90
+    print_unescaped('checked="checked"');
91
+}
92
+?> />
66 93
 		<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
67 94
 	</p>
68
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
95
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
96
+    p('hidden');
97
+}
98
+?>">
69 99
 		<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox"
70
-			   value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
100
+			   value="1" <?php if ($_['allowResharing'] === 'yes') {
101
+    print_unescaped('checked="checked"');
102
+}
103
+?> />
71 104
 		<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
72 105
 	</p>
73
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
106
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
107
+    p('hidden');
108
+}
109
+?>">
74 110
 		<input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
75
-			   value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
111
+			   value="1" <?php if ($_['allowGroupSharing'] === 'yes') {
112
+    print_unescaped('checked="checked"');
113
+}
114
+?> />
76 115
 		<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
77 116
 	</p>
78
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
117
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
118
+    p('hidden');
119
+}
120
+?>">
79 121
 		<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
80
-			   value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
122
+			   value="1" <?php if ($_['onlyShareWithGroupMembers']) {
123
+    print_unescaped('checked="checked"');
124
+}
125
+?> />
81 126
 		<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
82 127
 	</p>
83
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
128
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
129
+    p('hidden');
130
+}
131
+?>">
84 132
 		<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox"
85
-			   value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
133
+			   value="1" <?php if ($_['shareExcludeGroups']) {
134
+    print_unescaped('checked="checked"');
135
+}
136
+?> />
86 137
 		<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
87 138
 	</p>
88
-	<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
139
+	<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') {
140
+    p('hidden');
141
+}
142
+?>">
89 143
 		<input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/>
90 144
 		<br />
91 145
 		<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
92 146
 	</p>
93
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
147
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
148
+    p('hidden');
149
+}
150
+?>">
94 151
 		<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox"
95
-			<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> />
152
+			<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') {
153
+    print_unescaped('checked="checked"');
154
+}
155
+?> />
96 156
 		<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 />
97 157
 	</p>
98 158
 	<p>
99 159
 		<input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate"
100
-			<?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> />
160
+			<?php if ($_['publicShareDisclaimerText'] !== null) {
161
+    print_unescaped('checked="checked"');
162
+}
163
+?> />
101 164
 		<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>
102 165
 		<span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span>
103 166
 		<br/>
Please login to merge, or discard this patch.
settings/templates/admin/encryption.php 1 patch
Braces   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,10 @@  discard block
 block discarded – undo
35 35
 	<p id="enable">
36 36
 		<input type="checkbox"
37 37
 			   id="enableEncryption" class="checkbox"
38
-			   value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked" disabled="disabled"'); ?> />
38
+			   value="1" <?php if ($_['encryptionEnabled']) {
39
+    print_unescaped('checked="checked" disabled="disabled"');
40
+}
41
+?> />
39 42
 		<label
40 43
 			for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/>
41 44
 	</p>
@@ -54,8 +57,14 @@  discard block
 block discarded – undo
54 57
 																										   value="<?php p($l->t("Enable encryption")); ?>" /></p>
55 58
 	</div>
56 59
 
57
-	<div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>">
58
-		<div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>">
60
+	<div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) {
61
+    p('hidden');
62
+}
63
+?>">
64
+		<div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) {
65
+    p('hidden');
66
+}
67
+?>">
59 68
 			<?php
60 69
 			if (empty($_['encryptionModules'])) {
61 70
 				p($l->t('No encryption module loaded, please enable an encryption module in the app menu.'));
@@ -76,7 +85,10 @@  discard block
 block discarded – undo
76 85
 				</fieldset>
77 86
 			<?php } ?>
78 87
 		</div>
79
-		<div id="migrationWarning" class="<?php if ($_['encryptionReady']) p('hidden'); ?>">
88
+		<div id="migrationWarning" class="<?php if ($_['encryptionReady']) {
89
+    p('hidden');
90
+}
91
+?>">
80 92
 			<?php
81 93
 			if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) {
82 94
 				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\''));
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
@@ -50,8 +50,11 @@
 block discarded – undo
50 50
 				<div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div>
51 51
 				<input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield">
52 52
 				<p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p>
53
-			<?php else: ?>
54
-				<?php p($l->t('Picture provided by original account')); ?>
53
+			<?php else {
54
+    : ?>
55
+				<?php p($l->t('Picture provided by original account'));
56
+}
57
+?>
55 58
 			<?php endif; ?>
56 59
 		</div>
57 60
 
Please login to merge, or discard this patch.
settings/templates/users/part.setquota.php 1 patch
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,12 +3,18 @@  discard block
 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;?>
@@ -28,8 +34,11 @@  discard block
 block discarded – undo
28 34
 		:
29 35
 		<?php if( $_['default_quota'] === 'none'): ?>
30 36
 			<?php p($l->t('Unlimited'));?>
31
-		<?php else: ?>
32
-			<?php p($_['default_quota']);?>
37
+		<?php else {
38
+    : ?>
39
+			<?php p($_['default_quota']);
40
+}
41
+?>
33 42
 		<?php endif; ?>
34 43
 	<?php endif; ?>
35 44
 </div>
Please login to merge, or discard this patch.
settings/templates/users/main.php 1 patch
Braces   +20 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,28 +46,40 @@  discard block
 block discarded – undo
46 46
 			<div id="userlistoptions">
47 47
 				<p>
48 48
 					<input type="checkbox" name="StorageLocation" value="StorageLocation" id="CheckboxStorageLocation" 
49
-						class="checkbox" <?php if ($_['show_storage_location'] === 'true') print_unescaped('checked="checked"'); ?> />
49
+						class="checkbox" <?php if ($_['show_storage_location'] === 'true') {
50
+    print_unescaped('checked="checked"');
51
+}
52
+?> />
50 53
 					<label for="CheckboxStorageLocation">
51 54
 						<?php p($l->t('Show storage location')) ?>
52 55
 					</label>
53 56
 				</p>
54 57
 				<p>
55 58
 					<input type="checkbox" name="LastLogin" value="LastLogin" id="CheckboxLastLogin"
56
-						class="checkbox" <?php if ($_['show_last_login'] === 'true') print_unescaped('checked="checked"'); ?> />
59
+						class="checkbox" <?php if ($_['show_last_login'] === 'true') {
60
+    print_unescaped('checked="checked"');
61
+}
62
+?> />
57 63
 					<label for="CheckboxLastLogin">
58 64
 						<?php p($l->t('Show last log in')) ?>
59 65
 					</label>
60 66
 				</p>
61 67
 				<p>
62 68
 					<input type="checkbox" name="UserBackend" value="UserBackend" id="CheckboxUserBackend"
63
-						class="checkbox" <?php if ($_['show_backend'] === 'true') print_unescaped('checked="checked"'); ?> />
69
+						class="checkbox" <?php if ($_['show_backend'] === 'true') {
70
+    print_unescaped('checked="checked"');
71
+}
72
+?> />
64 73
 					<label for="CheckboxUserBackend">
65 74
 						<?php p($l->t('Show user backend')) ?>
66 75
 					</label>
67 76
 				</p>
68 77
 				<p>
69 78
 					<input type="checkbox" name="MailOnUserCreate" value="MailOnUserCreate" id="CheckboxMailOnUserCreate"
70
-						class="checkbox" <?php if ($_['send_email'] === 'true') print_unescaped('checked="checked"'); ?> />
79
+						class="checkbox" <?php if ($_['send_email'] === 'true') {
80
+    print_unescaped('checked="checked"');
81
+}
82
+?> />
71 83
 					<label for="CheckboxMailOnUserCreate">
72 84
 						<?php p($l->t('Send email to new user')) ?>
73 85
 					</label>
@@ -77,7 +89,10 @@  discard block
 block discarded – undo
77 89
 				</p>
78 90
 				<p>
79 91
 					<input type="checkbox" name="EmailAddress" value="EmailAddress" id="CheckboxEmailAddress"
80
-						class="checkbox" <?php if ($_['show_email'] === 'true') print_unescaped('checked="checked"'); ?> />
92
+						class="checkbox" <?php if ($_['show_email'] === 'true') {
93
+    print_unescaped('checked="checked"');
94
+}
95
+?> />
81 96
 					<label for="CheckboxEmailAddress">
82 97
 						<?php p($l->t('Show email address')) ?>
83 98
 					</label>
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="action"
30 33
 										 src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
Please login to merge, or discard this patch.
settings/ajax/setquota.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 // Return Success story
67 67
 if($username) {
68 68
 	$targetUserObject->setQuota($quota);
69
-}else{//set the default quota when no username is specified
69
+} else{//set the default quota when no username is specified
70 70
 	if($quota === 'default') {//'default' as default quota makes no sense
71 71
 		$quota='none';
72 72
 	}
Please login to merge, or discard this patch.
settings/personal.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 		$ln = array('code' => $lang, 'name' => $potentialName);
88 88
 	} elseif ($lang === 'en') {
89 89
 		$ln = ['code' => $lang, 'name' => 'English (US)'];
90
-	}else{//fallback to language code
90
+	} else{//fallback to language code
91 91
 		$ln=array('code'=>$lang, 'name'=>$lang);
92 92
 	}
93 93
 
Please login to merge, or discard this patch.
settings/users.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 		];
83 83
 	}
84 84
 	$subAdmins = $result;
85
-}else{
85
+} else{
86 86
 	/* Retrieve group IDs from $groups array, so we can pass that information into OC_Group::displayNamesInGroups() */
87 87
 	$gids = array();
88 88
 	foreach($groups as $group) {
Please login to merge, or discard this patch.