Completed
Push — stable10 ( 8aba8f...8ba57b )
by Lukas
01:07 queued 40s
created
lib/private/AppConfig.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,9 @@
 block discarded – undo
265 265
 	 * Load all the app config values
266 266
 	 */
267 267
 	protected function loadConfigValues() {
268
-		if ($this->configLoaded) return;
268
+		if ($this->configLoaded) {
269
+		    return;
270
+		}
269 271
 
270 272
 		$this->cache = [];
271 273
 
Please login to merge, or discard this patch.
settings/templates/admin/sharing.php 1 patch
Braces   +92 added lines, -23 removed lines patch added patch discarded remove patch
@@ -33,75 +33,144 @@
 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
 		<input type="checkbox" name="shareapi_allow_public_notification" id="allowPublicMailNotification" class="checkbox"
59
-			   value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') print_unescaped('checked="checked"'); ?> />
80
+			   value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') {
81
+    print_unescaped('checked="checked"');
82
+}
83
+?> />
60 84
 		<label for="allowPublicMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
61 85
 
62 86
 	</p>
63
-	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
87
+	<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
88
+    p('hidden');
89
+}
90
+?>">
64 91
 		<?php p($l->t( 'Expire after ' )); ?>
65 92
 		<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
66 93
 			   value='<?php p($_['shareExpireAfterNDays']) ?>' />
67 94
 		<?php p($l->t( 'days' )); ?>
68 95
 		<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
69
-			   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
96
+			   value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') {
97
+    print_unescaped('checked="checked"');
98
+}
99
+?> />
70 100
 		<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
71 101
 	</p>
72
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
102
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
103
+    p('hidden');
104
+}
105
+?>">
73 106
 		<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox"
74
-			   value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
107
+			   value="1" <?php if ($_['allowResharing'] === 'yes') {
108
+    print_unescaped('checked="checked"');
109
+}
110
+?> />
75 111
 		<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
76 112
 	</p>
77
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
113
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
114
+    p('hidden');
115
+}
116
+?>">
78 117
 		<input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
79
-			   value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
118
+			   value="1" <?php if ($_['allowGroupSharing'] === 'yes') {
119
+    print_unescaped('checked="checked"');
120
+}
121
+?> />
80 122
 		<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
81 123
 	</p>
82
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
124
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
125
+    p('hidden');
126
+}
127
+?>">
83 128
 		<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
84
-			   value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
129
+			   value="1" <?php if ($_['onlyShareWithGroupMembers']) {
130
+    print_unescaped('checked="checked"');
131
+}
132
+?> />
85 133
 		<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
86 134
 	</p>
87
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
135
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
136
+    p('hidden');
137
+}
138
+?>">
88 139
 		<input type="checkbox" name="shareapi_allow_mail_notification" id="allowMailNotification" class="checkbox"
89
-			   value="1" <?php if ($_['allowMailNotification'] === 'yes') print_unescaped('checked="checked"'); ?> />
140
+			   value="1" <?php if ($_['allowMailNotification'] === 'yes') {
141
+    print_unescaped('checked="checked"');
142
+}
143
+?> />
90 144
 		<label for="allowMailNotification"><?php p($l->t('Allow users to send mail notification for shared files to other users'));?></label><br/>
91 145
 	</p>
92
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
146
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
147
+    p('hidden');
148
+}
149
+?>">
93 150
 		<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox"
94
-			   value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
151
+			   value="1" <?php if ($_['shareExcludeGroups']) {
152
+    print_unescaped('checked="checked"');
153
+}
154
+?> />
95 155
 		<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
96 156
 	</p>
97
-	<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
157
+	<p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') {
158
+    p('hidden');
159
+}
160
+?>">
98 161
 		<input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px"/>
99 162
 		<br />
100 163
 		<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
101 164
 	</p>
102
-	<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
165
+	<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
166
+    p('hidden');
167
+}
168
+?>">
103 169
 		<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox"
104
-			<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> />
170
+			<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') {
171
+    print_unescaped('checked="checked"');
172
+}
173
+?> />
105 174
 		<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 />
106 175
 	</p>
107 176
 </div>
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/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" 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/ajax/setlanguage.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
 	if(array_search($lang, $languageCodes) or $lang === 'en') {
39 39
 		\OC::$server->getConfig()->setUserValue( OC_User::getUser(), 'core', 'lang', $lang );
40 40
 		OC_JSON::success(array("data" => array( "message" => $l->t("Language changed") )));
41
-	}else{
41
+	} else{
42 42
 		OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
43 43
 	}
44
-}else{
44
+} else{
45 45
 	OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
46 46
 }
Please login to merge, or discard this patch.
settings/ajax/togglegroups.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,15 +71,13 @@
 block discarded – undo
71 71
 	$error = $l->t("Unable to remove user from group %s", $group);
72 72
 	$success = OC_Group::removeFromGroup( $username, $group );
73 73
 	$usersInGroup=OC_Group::usersInGroup($group);
74
-}
75
-else{
74
+} else{
76 75
 	$success = OC_Group::addToGroup( $username, $group );
77 76
 }
78 77
 
79 78
 // Return Success story
80 79
 if( $success ) {
81 80
 	OC_JSON::success(array("data" => array( "username" => $username, "action" => $action, "groupname" => $group )));
82
-}
83
-else{
81
+} else{
84 82
 	OC_JSON::error(array("data" => array( "message" => $error )));
85 83
 }
Please login to merge, or discard this patch.
settings/personal.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
 	$potentialName = (string) $l->t('__language_name__');
86 86
 	if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
87 87
 		$ln=array('code'=>$lang, 'name'=> $potentialName);
88
-	}elseif(isset($languageNames[$lang])) {
88
+	} elseif(isset($languageNames[$lang])) {
89 89
 		$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
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.