Completed
Push — release-2.1 ( 72357d...5fd6f8 )
by Michael
22s
created
Themes/default/images/icons/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/images/bbc/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/scripts/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/fonts/sound/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/fonts/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/ManageNews.template.php 1 patch
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,9 +18,10 @@  discard block
 block discarded – undo
18 18
 	global $context, $txt, $scripturl;
19 19
 
20 20
 	// Are we done sending the newsletter?
21
-	if (!empty($context['newsletter_sent']))
22
-		echo '
21
+	if (!empty($context['newsletter_sent'])) {
22
+			echo '
23 23
 	<div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>';
24
+	}
24 25
 
25 26
 	echo '
26 27
 	<div id="admincenter">
@@ -39,9 +40,10 @@  discard block
 block discarded – undo
39 40
 					</dt>
40 41
 					<dd>';
41 42
 
42
-	foreach ($context['groups'] as $group)
43
-				echo '
43
+	foreach ($context['groups'] as $group) {
44
+					echo '
44 45
 						<label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
46
+	}
45 47
 
46 48
 	echo '
47 49
 						<br>
@@ -82,9 +84,10 @@  discard block
 block discarded – undo
82 84
 						</dt>
83 85
 						<dd>';
84 86
 
85
-	foreach ($context['groups'] as $group)
86
-				echo '
87
+	foreach ($context['groups'] as $group) {
88
+					echo '
87 89
 							<label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '" class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
90
+	}
88 91
 
89 92
 	echo '
90 93
 							<br>
@@ -228,9 +231,10 @@  discard block
 block discarded – undo
228 231
 				<div id="bbcBox_message"></div>';
229 232
 
230 233
 	// What about smileys?
231
-	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
232
-		echo '
234
+	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) {
235
+			echo '
233 236
 				<div id="smileyBox_message"></div>';
237
+	}
234 238
 
235 239
 	// Show BBC buttons, smileys and textbox.
236 240
 	echo '
@@ -251,9 +255,10 @@  discard block
 block discarded – undo
251 255
 			<input type="hidden" name="email_force" value="', $context['email_force'], '">
252 256
 			<input type="hidden" name="total_emails" value="', $context['total_emails'], '">';
253 257
 
254
-	foreach ($context['recipients'] as $key => $values)
255
-		echo '
258
+	foreach ($context['recipients'] as $key => $values) {
259
+			echo '
256 260
 			<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
261
+	}
257 262
 
258 263
 	echo '
259 264
 		<script>';
@@ -408,9 +413,10 @@  discard block
 block discarded – undo
408 413
 				<input type="hidden" name="parse_html" value="', $context['parse_html'], '">';
409 414
 
410 415
 	// All the things we must remember!
411
-	foreach ($context['recipients'] as $key => $values)
412
-		echo '
416
+	foreach ($context['recipients'] as $key => $values) {
417
+			echo '
413 418
 				<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
419
+	}
414 420
 
415 421
 	echo '
416 422
 			</div>
@@ -443,9 +449,10 @@  discard block
 block discarded – undo
443 449
 {
444 450
 	global $context, $txt;
445 451
 
446
-	if (!empty($context['saved_successful']))
447
-		echo '
452
+	if (!empty($context['saved_successful'])) {
453
+			echo '
448 454
 					<div class="infobox">', $txt['settings_saved'], '</div>';
455
+	}
449 456
 
450 457
 	template_show_list('news_lists');
451 458
 }
Please login to merge, or discard this patch.
Themes/default/css/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/ManagePermissions.template.php 1 patch
Braces   +162 added lines, -125 removed lines patch added patch discarded remove patch
@@ -19,26 +19,28 @@  discard block
 block discarded – undo
19 19
 	global $context, $settings, $scripturl, $txt, $modSettings;
20 20
 
21 21
 	// Not allowed to edit?
22
-	if (!$context['can_modify'])
23
-		echo '
22
+	if (!$context['can_modify']) {
23
+			echo '
24 24
 	<div class="errorbox">
25 25
 		', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), '
26 26
 	</div>';
27
+	}
27 28
 
28 29
 	echo '
29 30
 	<div id="admin_form_wrapper">
30 31
 		<form action="', $scripturl, '?action=admin;area=permissions;sa=quick" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" id="permissionForm">';
31 32
 
32
-		if (!empty($context['profile']))
33
-			echo '
33
+		if (!empty($context['profile'])) {
34
+					echo '
34 35
 			<div class="cat_bar">
35 36
 				<h3 class="catbg">', $txt['permissions_for_profile'], ': &quot;', $context['profile']['name'], '&quot;</h3>
36 37
 			</div>';
37
-		else
38
-			echo '
38
+		} else {
39
+					echo '
39 40
 			<div class="cat_bar">
40 41
 				<h3 class="catbg">', $txt['permissions_title'], '</h3>
41 42
 			</div>';
43
+		}
42 44
 
43 45
 		echo '
44 46
 			<table class="table_grid">
@@ -47,13 +49,14 @@  discard block
 block discarded – undo
47 49
 						<th>', $txt['membergroups_name'], '</th>
48 50
 						<th class="small_table">', $txt['membergroups_members_top'], '</th>';
49 51
 
50
-			if (empty($modSettings['permission_enable_deny']))
51
-				echo '
52
+			if (empty($modSettings['permission_enable_deny'])) {
53
+							echo '
52 54
 						<th class="small_table">', $txt['membergroups_permissions'], '</th>';
53
-			else
54
-				echo '
55
+			} else {
56
+							echo '
55 57
 						<th class="small_table">', $txt['permissions_allowed'], '</th>
56 58
 						<th class="small_table">', $txt['permissions_denied'], '</th>';
59
+			}
57 60
 
58 61
 			echo '
59 62
 						<th class="small_table">', $context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view'], '</th>
@@ -71,22 +74,24 @@  discard block
 block discarded – undo
71 74
 						<td>
72 75
 							', !empty($group['help']) ? ' <a class="help" href="' . $scripturl . '?action=helpadmin;help=' . $group['help'] . '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a>' : '<img class="icon" src="' . $settings['images_url'] . '/blank.png" alt="' . $txt['help'] . '">', '&nbsp;<span>', $group['name'], '</span>';
73 76
 
74
-		if (!empty($group['children']))
75
-			echo '
77
+		if (!empty($group['children'])) {
78
+					echo '
76 79
 							<br>
77 80
 							<span class="smalltext">', $txt['permissions_includes_inherited'], ': &quot;', implode('&quot;, &quot;', $group['children']), '&quot;</span>';
81
+		}
78 82
 
79 83
 		echo '
80 84
 						</td>
81 85
 						<td>', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>';
82 86
 
83
-		if (empty($modSettings['permission_enable_deny']))
84
-			echo '
87
+		if (empty($modSettings['permission_enable_deny'])) {
88
+					echo '
85 89
 						<td>', $group['num_permissions']['allowed'], '</td>';
86
-		else
87
-			echo '
90
+		} else {
91
+					echo '
88 92
 						<td ', $group['id'] == 1 ? ' style="font-style: italic;"' : '', '>', $group['num_permissions']['allowed'], '</td>
89 93
 						<td ', $group['id'] == 1 || $group['id'] == -1 ? ' style="font-style: italic;"' : (!empty($group['num_permissions']['denied']) ? ' class="red"' : ''), '>', $group['num_permissions']['denied'], '</td>';
94
+		}
90 95
 
91 96
 		echo '
92 97
 						<td>', $group['allow_modify'] ? '<a href="' . $scripturl . '?action=admin;area=permissions;sa=modify;group=' . $group['id'] . (empty($context['profile']) ? '' : ';pid=' . $context['profile']['id']) . '">' . ($context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view']) . '</a>' : '', '</td>
@@ -133,9 +138,10 @@  discard block
 block discarded – undo
133 138
 								<option value="empty">(', $txt['permissions_select_membergroup'], ')</option>';
134 139
 		foreach ($context['groups'] as $group)
135 140
 		{
136
-			if ($group['id'] != 1)
137
-				echo '
141
+			if ($group['id'] != 1) {
142
+							echo '
138 143
 								<option value="', $group['id'], '">', $group['name'], '</option>';
144
+			}
139 145
 		}
140 146
 
141 147
 		echo '
@@ -145,9 +151,10 @@  discard block
 block discarded – undo
145 151
 							<select name="add_remove">
146 152
 								<option value="add">', $txt['permissions_add'], '...</option>
147 153
 								<option value="clear">', $txt['permissions_remove'], '...</option>';
148
-		if (!empty($modSettings['permission_enable_deny']))
149
-			echo '
154
+		if (!empty($modSettings['permission_enable_deny'])) {
155
+					echo '
150 156
 								<option value="deny">', $txt['permissions_deny'], '...</option>';
157
+		}
151 158
 		echo '
152 159
 							</select>
153 160
 						</dt>
@@ -156,30 +163,34 @@  discard block
 block discarded – undo
156 163
 								<option value="">(', $txt['permissions_select_permission'], ')</option>';
157 164
 		foreach ($context['permissions'] as $permissionType)
158 165
 		{
159
-			if ($permissionType['id'] == 'membergroup' && !empty($context['profile']))
160
-				continue;
166
+			if ($permissionType['id'] == 'membergroup' && !empty($context['profile'])) {
167
+							continue;
168
+			}
161 169
 
162 170
 			foreach ($permissionType['columns'] as $column)
163 171
 			{
164 172
 				foreach ($column as $permissionGroup)
165 173
 				{
166
-					if ($permissionGroup['hidden'])
167
-						continue;
174
+					if ($permissionGroup['hidden']) {
175
+											continue;
176
+					}
168 177
 
169 178
 					echo '
170 179
 								<option value="" disabled>[', $permissionGroup['name'], ']</option>';
171 180
 					foreach ($permissionGroup['permissions'] as $perm)
172 181
 					{
173
-						if ($perm['hidden'])
174
-							continue;
182
+						if ($perm['hidden']) {
183
+													continue;
184
+						}
175 185
 
176
-						if ($perm['has_own_any'])
177
-							echo '
186
+						if ($perm['has_own_any']) {
187
+													echo '
178 188
 								<option value="', $permissionType['id'], '/', $perm['own']['id'], '">&nbsp;&nbsp;&nbsp;', $perm['name'], ' (', $perm['own']['name'], ')</option>
179 189
 								<option value="', $permissionType['id'], '/', $perm['any']['id'], '">&nbsp;&nbsp;&nbsp;', $perm['name'], ' (', $perm['any']['name'], ')</option>';
180
-						else
181
-							echo '
190
+						} else {
191
+													echo '
182 192
 								<option value="', $permissionType['id'], '/', $perm['id'], '">&nbsp;&nbsp;&nbsp;', $perm['name'], '</option>';
193
+						}
183 194
 					}
184 195
 				}
185 196
 			}
@@ -246,17 +257,18 @@  discard block
 block discarded – undo
246 257
 		}
247 258
 	</script>';
248 259
 
249
-		if (!empty($context['profile']))
250
-			echo '
260
+		if (!empty($context['profile'])) {
261
+					echo '
251 262
 			<input type="hidden" name="pid" value="', $context['profile']['id'], '">';
263
+		}
252 264
 
253 265
 		echo '
254 266
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
255 267
 			<input type="hidden" name="', $context['admin-mpq_token_var'], '" value="', $context['admin-mpq_token'], '">';
256
-	}
257
-	else
258
-		echo '
268
+	} else {
269
+			echo '
259 270
 			</table>';
271
+	}
260 272
 
261 273
 	echo '
262 274
 		</form>
@@ -296,9 +308,10 @@  discard block
 block discarded – undo
296 308
 				<h3 class="subbg">', $category['name'], '</h3>
297 309
 			</div>';
298 310
 
299
-		if (!empty($category['boards']))
300
-			echo '
311
+		if (!empty($category['boards'])) {
312
+					echo '
301 313
 				<ul class="perm_boards flow_hidden">';
314
+		}
302 315
 
303 316
 		foreach ($category['boards'] as $board)
304 317
 		{
@@ -315,33 +328,36 @@  discard block
 block discarded – undo
315 328
 				echo '
316 329
 							<select name="boardprofile[', $board['id'], ']">';
317 330
 
318
-				foreach ($context['profiles'] as $id => $profile)
319
-					echo '
331
+				foreach ($context['profiles'] as $id => $profile) {
332
+									echo '
320 333
 								<option value="', $id, '"', $id == $board['profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
334
+				}
321 335
 
322 336
 				echo '
323 337
 							</select>';
324
-			}
325
-			else
326
-				echo '
338
+			} else {
339
+							echo '
327 340
 							<a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $board['profile'], ';', $context['session_var'], '=', $context['session_id'], '">', $board['profile_name'], '</a>';
341
+			}
328 342
 
329 343
 			echo '
330 344
 						</span>
331 345
 					</li>';
332 346
 		}
333 347
 
334
-		if (!empty($category['boards']))
335
-			echo '
348
+		if (!empty($category['boards'])) {
349
+					echo '
336 350
 				</ul>';
351
+		}
337 352
 	}
338 353
 
339
-	if ($context['edit_all'])
340
-		echo '
354
+	if ($context['edit_all']) {
355
+			echo '
341 356
 			<input type="submit" name="save_changes" value="', $txt['save'], '" class="button_submit">';
342
-	else
343
-		echo '
357
+	} else {
358
+			echo '
344 359
 			<a class="button_link" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>';
360
+	}
345 361
 
346 362
 	echo '
347 363
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -381,12 +397,13 @@  discard block
 block discarded – undo
381 397
 					<tr class="windowbg">
382 398
 						<td>';
383 399
 
384
-		if (!empty($context['show_rename_boxes']) && $profile['can_edit'])
385
-			echo '
400
+		if (!empty($context['show_rename_boxes']) && $profile['can_edit']) {
401
+					echo '
386 402
 							<input type="text" name="rename_profile[', $profile['id'], ']" value="', $profile['name'], '" class="input_text">';
387
-		else
388
-			echo '
403
+		} else {
404
+					echo '
389 405
 							<a href="', $scripturl, '?action=admin;area=permissions;sa=index;pid=', $profile['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $profile['name'], '</a>';
406
+		}
390 407
 
391 408
 		echo '
392 409
 						</td>
@@ -406,9 +423,10 @@  discard block
 block discarded – undo
406 423
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
407 424
 				<input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '">';
408 425
 
409
-	if ($context['can_edit_something'])
410
-		echo '
426
+	if ($context['can_edit_something']) {
427
+			echo '
411 428
 				<input type="submit" name="rename" value="', empty($context['show_rename_boxes']) ? $txt['permissions_profile_rename'] : $txt['permissions_commit'], '" class="button_submit">';
429
+	}
412 430
 
413 431
 	echo '
414 432
 				<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" class="button_submit" ', !empty($context['show_rename_boxes']) ? ' style="display:none"' : '', '/>
@@ -433,9 +451,10 @@  discard block
 block discarded – undo
433 451
 					<dd>
434 452
 						<select name="copy_from">';
435 453
 
436
-	foreach ($context['profiles'] as $id => $profile)
437
-		echo '
454
+	foreach ($context['profiles'] as $id => $profile) {
455
+			echo '
438 456
 							<option value="', $id, '">', $profile['name'], '</option>';
457
+	}
439 458
 
440 459
 	echo '
441 460
 						</select>
@@ -463,8 +482,7 @@  discard block
 block discarded – undo
463 482
 		<div class="errorbox">
464 483
 			', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), '
465 484
 		</div>';
466
-	}
467
-	else
485
+	} else
468 486
 	{
469 487
 		echo '
470 488
 		<script>
@@ -484,21 +502,23 @@  discard block
 block discarded – undo
484 502
 	<div id="admincenter">
485 503
 		<form id="permissions" action="', $scripturl, '?action=admin;area=permissions;sa=modify2;group=', $context['group']['id'], ';pid=', $context['profile']['id'], '" method="post" accept-charset="', $context['character_set'], '" name="permissionForm" onsubmit="return warnAboutDeny();">';
486 504
 
487
-	if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1)
488
-		echo '
505
+	if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) {
506
+			echo '
489 507
 			<div class="information">
490 508
 				', $txt['permissions_option_desc'], '
491 509
 			</div>';
510
+	}
492 511
 
493 512
 	echo '
494 513
 			<div class="cat_bar">
495 514
 				<h3 class="catbg">';
496
-	if ($context['permission_type'] == 'board')
497
-		echo '
515
+	if ($context['permission_type'] == 'board') {
516
+			echo '
498 517
 				', $txt['permissions_local_for'], ' &quot;', $context['group']['name'], '&quot; ', $txt['permissions_on'], ' &quot;', $context['profile']['name'], '&quot;';
499
-	else
500
-		echo '
518
+	} else {
519
+			echo '
501 520
 				', $context['permission_type'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'], ' - &quot;', $context['group']['name'], '&quot;';
521
+	}
502 522
 	echo '
503 523
 				</h3>
504 524
 			</div>';
@@ -521,15 +541,17 @@  discard block
 block discarded – undo
521 541
 		template_modify_group_display('board');
522 542
 	}
523 543
 
524
-	if ($context['profile']['can_modify'])
525
-		echo '
544
+	if ($context['profile']['can_modify']) {
545
+			echo '
526 546
 			<div class="padding">
527 547
 				<input type="submit" value="', $txt['permissions_commit'], '" class="button_submit">
528 548
 			</div>';
549
+	}
529 550
 
530
-	foreach ($context['hidden_perms'] as $hidden_perm)
531
-		echo '
551
+	foreach ($context['hidden_perms'] as $hidden_perm) {
552
+			echo '
532 553
 			<input type="hidden" name="perm[', $hidden_perm[0], '][', $hidden_perm[1], ']" value="', $hidden_perm[2], '">';
554
+	}
533 555
 
534 556
 	echo '
535 557
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -557,17 +579,19 @@  discard block
 block discarded – undo
557 579
 
558 580
 		foreach ($column as $permissionGroup)
559 581
 		{
560
-			if (empty($permissionGroup['permissions']))
561
-				continue;
582
+			if (empty($permissionGroup['permissions'])) {
583
+							continue;
584
+			}
562 585
 
563 586
 			// Are we likely to have something in this group to display or is it all hidden?
564 587
 			$has_display_content = false;
565 588
 			if (!$permissionGroup['hidden'])
566 589
 			{
567 590
 				// Before we go any further check we are going to have some data to print otherwise we just have a silly heading.
568
-				foreach ($permissionGroup['permissions'] as $permission)
569
-					if (!$permission['hidden'])
591
+				foreach ($permissionGroup['permissions'] as $permission) {
592
+									if (!$permission['hidden'])
570 593
 						$has_display_content = true;
594
+				}
571 595
 
572 596
 				if ($has_display_content)
573 597
 				{
@@ -576,10 +600,11 @@  discard block
 block discarded – undo
576 600
 							<th></th>
577 601
 							<th', $context['group']['id'] == -1 ? ' colspan="2"' : '', ' class="smalltext">', $permissionGroup['name'], '</th>';
578 602
 
579
-					if ($context['group']['id'] != -1)
580
-						echo '
603
+					if ($context['group']['id'] != -1) {
604
+											echo '
581 605
 							<th>', $txt['permissions_option_own'], '</th>
582 606
 							<th>', $txt['permissions_option_any'], '</th>';
607
+					}
583 608
 
584 609
 						echo '
585 610
 						</tr>';
@@ -602,17 +627,18 @@  discard block
 block discarded – undo
602 627
 						// Guests can't do their own thing.
603 628
 						if ($context['group']['id'] != -1)
604 629
 						{
605
-							if (empty($modSettings['permission_enable_deny']))
606
-								echo '
630
+							if (empty($modSettings['permission_enable_deny'])) {
631
+															echo '
607 632
 								<input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']"', $permission['own']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" id="', $permission['own']['id'], '_on" class="input_check" ', $disable_field, '/>';
608
-							else
633
+							} else
609 634
 							{
610 635
 								echo '
611 636
 								<select name="perm[', $permission_type['id'], '][', $permission['own']['id'], ']" ', $disable_field, '>';
612 637
 
613
-								foreach (array('on', 'off', 'deny') as $c)
614
-									echo '
638
+								foreach (array('on', 'off', 'deny') as $c) {
639
+																	echo '
615 640
 									<option ', $permission['own']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>';
641
+								}
616 642
 							echo '
617 643
 								</select>';
618 644
 							}
@@ -622,39 +648,41 @@  discard block
 block discarded – undo
622 648
 							<td>';
623 649
 						}
624 650
 
625
-						if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1)
626
-							echo '
651
+						if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) {
652
+													echo '
627 653
 								<input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']"', $permission['any']['select'] == 'on' ? ' checked="checked"' : '', ' value="on" class="input_check" ', $disable_field, '/>';
628
-						else
654
+						} else
629 655
 						{
630 656
 							echo '
631 657
 								<select name="perm[', $permission_type['id'], '][', $permission['any']['id'], ']" ', $disable_field, '>';
632 658
 
633
-							foreach (array('on', 'off', 'deny') as $c)
634
-								echo '
659
+							foreach (array('on', 'off', 'deny') as $c) {
660
+															echo '
635 661
 									<option ', $permission['any']['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>';
662
+							}
636 663
 							echo '
637 664
 								</select>';
638 665
 						}
639
-					}
640
-					else
666
+					} else
641 667
 					{
642
-						if ($context['group']['id'] != -1)
643
-							echo '
668
+						if ($context['group']['id'] != -1) {
669
+													echo '
644 670
 							</td>
645 671
 							<td>';
672
+						}
646 673
 
647
-						if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1)
648
-							echo '
674
+						if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) {
675
+													echo '
649 676
 								<input type="checkbox" name="perm[', $permission_type['id'], '][', $permission['id'], ']"', $permission['select'] == 'on' ? ' checked="checked"' : '', ' value="on" class="input_check" ', $disable_field, '/>';
650
-						else
677
+						} else
651 678
 						{
652 679
 							echo '
653 680
 								<select name="perm[', $permission_type['id'], '][', $permission['id'], ']" ', $disable_field, '>';
654 681
 
655
-							foreach (array('on', 'off', 'deny') as $c)
656
-								echo '
682
+							foreach (array('on', 'off', 'deny') as $c) {
683
+															echo '
657 684
 									<option ', $permission['select'] == $c ? ' selected' : '', ' value="', $c, '">', $txt['permissions_option_' . $c], '</option>';
685
+							}
658 686
 							echo '
659 687
 								</select>';
660 688
 						}
@@ -684,11 +712,11 @@  discard block
 block discarded – undo
684 712
 	echo '
685 713
 											<fieldset id="', $context['current_permission'], '">
686 714
 												<legend><a href="javascript:void(0);" onclick="document.getElementById(\'', $context['current_permission'], '\').style.display = \'none\';document.getElementById(\'', $context['current_permission'], '_groups_link\').style.display = \'block\'; return false;" class="toggle_up"> ', $txt['avatar_select_permission'], '</a></legend>';
687
-	if (empty($modSettings['permission_enable_deny']))
688
-		echo '
715
+	if (empty($modSettings['permission_enable_deny'])) {
716
+			echo '
689 717
 												<ul>';
690
-	else
691
-		echo '
718
+	} else {
719
+			echo '
692 720
 												<div class="information">', $txt['permissions_option_desc'], '</div>
693 721
 												<dl class="settings">
694 722
 													<dt>
@@ -698,46 +726,51 @@  discard block
 block discarded – undo
698 726
 													</dt>
699 727
 													<dd>
700 728
 													</dd>';
729
+	}
701 730
 	foreach ($context['member_groups'] as $group)
702 731
 	{
703
-		if (!empty($modSettings['permission_enable_deny']))
704
-			echo '
732
+		if (!empty($modSettings['permission_enable_deny'])) {
733
+					echo '
705 734
 													<dt>';
706
-		else
707
-			echo '
735
+		} else {
736
+					echo '
708 737
 													<li>';
738
+		}
709 739
 
710
-		if (empty($modSettings['permission_enable_deny']))
711
-			echo '
740
+		if (empty($modSettings['permission_enable_deny'])) {
741
+					echo '
712 742
 														<input type="checkbox" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', ' class="input_check">';
713
-		else
714
-			echo '
743
+		} else {
744
+					echo '
715 745
 														<span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="on"', $group['status'] == 'on' ? ' checked' : '', ' class="input_radio"></span>
716 746
 														<span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="off"', $group['status'] == 'off' ? ' checked' : '', ' class="input_radio"></span>
717 747
 														<span class="perms"><input type="radio" name="', $context['current_permission'], '[', $group['id'], ']" value="deny"', $group['status'] == 'deny' ? ' checked' : '', ' class="input_radio"></span>';
748
+		}
718 749
 
719
-		if (!empty($modSettings['permission_enable_deny']))
720
-			echo '
750
+		if (!empty($modSettings['permission_enable_deny'])) {
751
+					echo '
721 752
 													</dt>
722 753
 													<dd>
723 754
 														<span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span>
724 755
 													</dd>';
725
-		else
726
-			echo '
756
+		} else {
757
+					echo '
727 758
 														<span', $group['is_postgroup'] ? ' style="font-style: italic;"' : '', '>', $group['name'], '</span>
728 759
 													</li>';
760
+		}
729 761
 	}
730 762
 
731
-	if (empty($modSettings['permission_enable_deny']))
732
-		echo '
763
+	if (empty($modSettings['permission_enable_deny'])) {
764
+			echo '
733 765
 													<li>
734 766
 														<input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \''. $context['current_permission'] . '[\');">
735 767
 														<span>', $txt['check_all'], '</span>
736 768
 													</li>
737 769
 												</ul>';
738
-	else
739
-		echo '
770
+	} else {
771
+			echo '
740 772
 												</dl>';
773
+	}
741 774
 
742 775
 	echo '
743 776
 											</fieldset>
@@ -777,9 +810,10 @@  discard block
 block discarded – undo
777 810
 	if (!empty($modSettings['postmod_active']))
778 811
 	{
779 812
 		// Got advanced permissions - if so warn!
780
-		if (!empty($modSettings['permission_enable_deny']))
781
-			echo '
813
+		if (!empty($modSettings['permission_enable_deny'])) {
814
+					echo '
782 815
 							<div class="information">', $txt['permissions_post_moderation_deny_note'], '</div>';
816
+		}
783 817
 
784 818
 		echo '
785 819
 							<div class="padding">
@@ -794,10 +828,11 @@  discard block
 block discarded – undo
794 828
 									', $txt['permissions_post_moderation_select'], ':
795 829
 									<select name="pid" onchange="document.forms.postmodForm.submit();">';
796 830
 
797
-		foreach ($context['profiles'] as $profile)
798
-			if ($profile['can_modify'])
831
+		foreach ($context['profiles'] as $profile) {
832
+					if ($profile['can_modify'])
799 833
 				echo '
800 834
 										<option value="', $profile['id'], '"', $profile['id'] == $context['current_profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
835
+		}
801 836
 
802 837
 		echo '
803 838
 									</select>
@@ -818,11 +853,12 @@  discard block
 block discarded – undo
818 853
 											', $txt['permissions_post_moderation_replies_any'], '
819 854
 										</th>';
820 855
 
821
-		if ($modSettings['attachmentEnable'] == 1)
822
-			echo '
856
+		if ($modSettings['attachmentEnable'] == 1) {
857
+					echo '
823 858
 										<th class="centercol" colspan="3">
824 859
 											', $txt['permissions_post_moderation_attachments'], '
825 860
 										</th>';
861
+		}
826 862
 
827 863
 		echo '
828 864
 									</tr>
@@ -840,11 +876,12 @@  discard block
 block discarded – undo
840 876
 										<th><span class="generic_icons post_moderation_moderate"></span></th>
841 877
 										<th><span class="generic_icons post_moderation_deny"></span></th>';
842 878
 
843
-		if ($modSettings['attachmentEnable'] == 1)
844
-			echo '
879
+		if ($modSettings['attachmentEnable'] == 1) {
880
+					echo '
845 881
 										<th><span class="generic_icons post_moderation_allow"></span></th>
846 882
 										<th><span class="generic_icons post_moderation_moderate"></span></th>
847 883
 										<th><span class="generic_icons post_moderation_deny"></span></th>';
884
+		}
848 885
 
849 886
 		echo '
850 887
 									</tr>
@@ -857,9 +894,10 @@  discard block
 block discarded – undo
857 894
 									<tr class="windowbg">
858 895
 										<td class="half_table">
859 896
 											<span ', ($group['color'] ? 'style="color: ' . $group['color'] . '"' : ''), '>', $group['name'], '</span>';
860
-				if (!empty($group['children']))
861
-					echo '
897
+				if (!empty($group['children'])) {
898
+									echo '
862 899
 											<br><span class="smalltext">', $txt['permissions_includes_inherited'], ': &quot;', implode('&quot;, &quot;', $group['children']), '&quot;</span>';
900
+				}
863 901
 
864 902
 				echo '
865 903
 										</td>
@@ -872,8 +910,7 @@  discard block
 block discarded – undo
872 910
 				{
873 911
 				echo '
874 912
 										<td colspan="3"></td>';
875
-				}
876
-				else
913
+				} else
877 914
 				{
878 915
 					echo '
879 916
 										<td class="centercol"><input type="radio" name="replies_own[', $group['id'], ']" value="allow"', $group['replies_own'] == 'allow' ? ' checked' : '', ' class="input_radio"></td>
Please login to merge, or discard this patch.
Themes/default/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
Please login to merge, or discard this patch.