Completed
Pull Request — release-2.1 (#3886)
by Fran
07:42
created
Themes/default/ManageBoards.template.php 1 patch
Braces   +90 added lines, -62 removed lines patch added patch discarded remove patch
@@ -25,18 +25,20 @@  discard block
 block discarded – undo
25 25
 		</div>
26 26
 		<div class="windowbg2 noup">';
27 27
 
28
-	if (!empty($context['move_board']))
29
-		echo '
28
+	if (!empty($context['move_board'])) {
29
+			echo '
30 30
 		<div class="noticebox">
31 31
 			', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', '
32 32
 		</div>';
33
+	}
33 34
 
34 35
 	// No categories so show a label.
35
-	if (empty($context['categories']))
36
-		echo '
36
+	if (empty($context['categories'])) {
37
+			echo '
37 38
 		<div class="windowbg centertext">
38 39
 			', $txt['mboards_no_cats'], '
39 40
 		</div>';
41
+	}
40 42
 
41 43
 	// Loop through every category, listing the boards in each as we go.
42 44
 	foreach ($context['categories'] as $category)
@@ -54,9 +56,10 @@  discard block
 block discarded – undo
54 56
 		<form action="', $scripturl, '?action=admin;area=manageboards;sa=newboard;cat=', $category['id'], '" method="post" accept-charset="', $context['character_set'], '">
55 57
 				<ul id="category_', $category['id'], '" class="nolist">';
56 58
 
57
-		if (!empty($category['move_link']))
58
-			echo '
59
+		if (!empty($category['move_link'])) {
60
+					echo '
59 61
 					<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="generic_icons select_above"></span></a></li>';
62
+		}
60 63
 
61 64
 		$recycle_board = '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" title="' . $txt['recycle_board'] . '"></a>';
62 65
 		$redirect_board = '<img src="' . $settings['images_url'] . '/new_redirect.png" alt="' . $txt['redirect_board_desc'] . '" title="' . $txt['redirect_board_desc'] . '">';
@@ -81,9 +84,10 @@  discard block
 block discarded – undo
81 84
 				echo '
82 85
 					<li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">';
83 86
 
84
-				foreach ($board['move_links'] as $link)
85
-					echo '
87
+				foreach ($board['move_links'] as $link) {
88
+									echo '
86 89
 						<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>';
90
+				}
87 91
 
88 92
 				echo '
89 93
 					</li>';
@@ -132,9 +136,10 @@  discard block
 block discarded – undo
132 136
 						<select name="cat_order">';
133 137
 
134 138
 		// Print every existing category into a select box.
135
-		foreach ($context['category_order'] as $order)
136
-			echo '
139
+		foreach ($context['category_order'] as $order) {
140
+					echo '
137 141
 							<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
142
+		}
138 143
 		echo '
139 144
 						</select>
140 145
 					</dd>';
@@ -168,21 +173,23 @@  discard block
 block discarded – undo
168 173
 	echo '
169 174
 				</dl>';
170 175
 
171
-	if (isset($context['category']['is_new']))
172
-		echo '
176
+	if (isset($context['category']['is_new'])) {
177
+			echo '
173 178
 					<input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">';
174
-	else
175
-		echo '
179
+	} else {
180
+			echo '
176 181
 					<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">
177 182
 					<input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button_submit you_sure">';
183
+	}
178 184
 	echo '
179 185
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
180 186
 					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
181 187
 
182 188
 	// If this category is empty we don't bother with the next confirmation screen.
183
-	if ($context['category']['is_empty'])
184
-		echo '
189
+	if ($context['category']['is_empty']) {
190
+			echo '
185 191
 					<input type="hidden" name="empty" value="1">';
192
+	}
186 193
 
187 194
 	echo '
188 195
 			</div>
@@ -209,9 +216,10 @@  discard block
 block discarded – undo
209 216
 				<p>', $txt['mboards_delete_cat_contains'], ':</p>
210 217
 				<ul>';
211 218
 
212
-	foreach ($context['category']['children'] as $child)
213
-		echo '
219
+	foreach ($context['category']['children'] as $child) {
220
+			echo '
214 221
 					<li>', $child, '</li>';
222
+	}
215 223
 
216 224
 	echo '
217 225
 				</ul>
@@ -225,10 +233,11 @@  discard block
 block discarded – undo
225 233
 					<label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>:
226 234
 					<select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>';
227 235
 
228
-	foreach ($context['category_order'] as $cat)
229
-		if ($cat['id'] != 0)
236
+	foreach ($context['category_order'] as $cat) {
237
+			if ($cat['id'] != 0)
230 238
 			echo '
231 239
 						<option value="', $cat['id'], '">', $cat['true_name'], '</option>';
240
+	}
232 241
 
233 242
 	echo '
234 243
 					</select>
@@ -272,9 +281,10 @@  discard block
 block discarded – undo
272 281
 					</dt>
273 282
 					<dd>
274 283
 						<select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">';
275
-		foreach ($context['categories'] as $category)
276
-			echo '
284
+		foreach ($context['categories'] as $category) {
285
+					echo '
277 286
 							<option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
287
+		}
278 288
 		echo '
279 289
 						</select>
280 290
 					</dd>';
@@ -301,9 +311,10 @@  discard block
 block discarded – undo
301 311
 	echo '
302 312
 						<select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '>
303 313
 							', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '';
304
-	foreach ($context['board_order'] as $order)
305
-		echo '
314
+	foreach ($context['board_order'] as $order) {
315
+			echo '
306 316
 							<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
317
+	}
307 318
 	echo '
308 319
 						</select>
309 320
 					</dd>';
@@ -332,13 +343,15 @@  discard block
 block discarded – undo
332 343
 					<dd>
333 344
 						<select name="profile">';
334 345
 
335
-	if (isset($context['board']['is_new']))
336
-		echo '
346
+	if (isset($context['board']['is_new'])) {
347
+			echo '
337 348
 							<option value="-1">[', $txt['permission_profile_inherit'], ']</option>';
349
+	}
338 350
 
339
-	foreach ($context['profiles'] as $id => $profile)
340
-		echo '
351
+	foreach ($context['profiles'] as $id => $profile) {
352
+			echo '
341 353
 							<option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
354
+	}
342 355
 
343 356
 	echo '
344 357
 						</select>
@@ -351,8 +364,8 @@  discard block
 block discarded – undo
351 364
 					</dt>
352 365
 					<dd>';
353 366
 
354
-	if (!empty($modSettings['deny_boards_access']))
355
-		echo '
367
+	if (!empty($modSettings['deny_boards_access'])) {
368
+			echo '
356 369
 						<table>
357 370
 							<tr>
358 371
 								<td></td>
@@ -360,10 +373,11 @@  discard block
 block discarded – undo
360 373
 								<th>', $txt['permissions_option_off'], '</th>
361 374
 								<th>', $txt['permissions_option_deny'], '</th>
362 375
 							</tr>';
376
+	}
363 377
 
364 378
 	// List all the membergroups so the user can choose who may access this board.
365
-	foreach ($context['groups'] as $group)
366
-		if (empty($modSettings['deny_boards_access']))
379
+	foreach ($context['groups'] as $group) {
380
+			if (empty($modSettings['deny_boards_access']))
367 381
 			echo '
368 382
 						<label for="groups_', $group['id'], '">
369 383
 							<input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), ' class="input_check">
@@ -371,8 +385,9 @@  discard block
 block discarded – undo
371 385
 								', $group['name'], '
372 386
 							</span>
373 387
 						</label><br>';
374
-		else
375
-			echo '
388
+	}
389
+		else {
390
+					echo '
376 391
 							<tr>
377 392
 								<td>
378 393
 									<label for="groups_', $group['id'], '_a">
@@ -392,16 +407,17 @@  discard block
 block discarded – undo
392 407
 								</td>
393 408
 								<td></td>
394 409
 							</tr>';
410
+		}
395 411
 
396
-	if (empty($modSettings['deny_boards_access']))
397
-		echo '
412
+	if (empty($modSettings['deny_boards_access'])) {
413
+			echo '
398 414
 						<span class="select_all_box">
399 415
 							<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[\');">
400 416
 						</span>
401 417
 						<br><br>
402 418
 					</dd>';
403
-	else
404
-		echo '
419
+	} else {
420
+			echo '
405 421
 							<tr class="select_all_box">
406 422
 								<td>
407 423
 								</td>
@@ -420,6 +436,7 @@  discard block
 block discarded – undo
420 436
 							</tr>
421 437
 						</table>
422 438
 					</dd>';
439
+	}
423 440
 
424 441
 	// Options to choose moderators, specify as announcement board and choose whether to count posts here.
425 442
 	echo '
@@ -474,8 +491,8 @@  discard block
 block discarded – undo
474 491
 					</dl>
475 492
 				</div>';
476 493
 
477
-		if ($context['board']['redirect'])
478
-			echo '
494
+		if ($context['board']['redirect']) {
495
+					echo '
479 496
 				<div id="reset_redirect_div">
480 497
 					<dl class="settings">
481 498
 						<dt>
@@ -488,6 +505,7 @@  discard block
 block discarded – undo
488 505
 						</dd>
489 506
 					</dl>
490 507
 				</div>';
508
+		}
491 509
 	}
492 510
 
493 511
 	echo '
@@ -515,9 +533,10 @@  discard block
 block discarded – undo
515 533
 							<select name="boardtheme" id="boardtheme" onchange="refreshOptions();">
516 534
 								<option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>';
517 535
 
518
-	foreach ($context['themes'] as $theme)
519
-		echo '
536
+	foreach ($context['themes'] as $theme) {
537
+			echo '
520 538
 									<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>';
539
+	}
521 540
 
522 541
 	echo '
523 542
 							</select>
@@ -536,9 +555,10 @@  discard block
 block discarded – undo
536 555
 					</dl>
537 556
 				</div>';
538 557
 
539
-	if (!empty($context['board']['is_recycle']))
540
-		echo '
558
+	if (!empty($context['board']['is_recycle'])) {
559
+			echo '
541 560
 				<div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>';
561
+	}
542 562
 
543 563
 	echo '
544 564
 				<input type="hidden" name="rid" value="', $context['redirect_location'], '">
@@ -546,21 +566,24 @@  discard block
 block discarded – undo
546 566
 				<input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">';
547 567
 
548 568
 	// If this board has no children don't bother with the next confirmation screen.
549
-	if ($context['board']['no_children'])
550
-		echo '
569
+	if ($context['board']['no_children']) {
570
+			echo '
551 571
 				<input type="hidden" name="no_children" value="1">';
572
+	}
552 573
 
553
-	if (isset($context['board']['is_new']))
554
-		echo '
574
+	if (isset($context['board']['is_new'])) {
575
+			echo '
555 576
 				<input type="hidden" name="cur_cat" value="', $context['board']['category'], '">
556 577
 				<input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">';
557
-	else
558
-		echo '
578
+	} else {
579
+			echo '
559 580
 				<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">';
581
+	}
560 582
 
561
-	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle']))
562
-		echo '
583
+	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) {
584
+			echo '
563 585
 				<input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button_submit you_sure">';
586
+	}
564 587
 	echo '
565 588
 			</div>
566 589
 		</form>
@@ -581,12 +604,13 @@  discard block
 block discarded – undo
581 604
 		sItemListContainerId: \'moderator_container\',
582 605
 		aListItems: [';
583 606
 
584
-	foreach ($context['board']['moderators'] as $id_member => $member_name)
585
-		echo '
607
+	foreach ($context['board']['moderators'] as $id_member => $member_name) {
608
+			echo '
586 609
 					{
587 610
 						sItemId: ', JavaScriptEscape($id_member), ',
588 611
 						sItemName: ', JavaScriptEscape($member_name), '
589 612
 					}', $id_member == $context['board']['last_moderator_id'] ? '' : ',';
613
+	}
590 614
 
591 615
 	echo '
592 616
 		]
@@ -606,12 +630,13 @@  discard block
 block discarded – undo
606 630
 		sItemListContainerId: \'moderator_group_container\',
607 631
 		aListItems: [';
608 632
 
609
-	foreach ($context['board']['moderator_groups'] as $id_group => $group_name)
610
-		echo '
633
+	foreach ($context['board']['moderator_groups'] as $id_group => $group_name) {
634
+			echo '
611 635
 					{
612 636
 						sItemId: ', JavaScriptEscape($id_group), ',
613 637
 						sItemName: ', JavaScriptEscape($group_name), '
614 638
 					}', $id_group == $context['board']['last_moderator_group_id'] ? '' : ',';
639
+	}
615 640
 
616 641
 		echo '
617 642
 			]
@@ -637,9 +662,10 @@  discard block
 block discarded – undo
637 662
 		echo '
638 663
 			document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";';
639 664
 
640
-		if ($context['board']['redirect'])
641
-			echo '
665
+		if ($context['board']['redirect']) {
666
+					echo '
642 667
 			document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";';
668
+		}
643 669
 	}
644 670
 
645 671
 	echo '
@@ -668,9 +694,10 @@  discard block
 block discarded – undo
668 694
 				<p>', $txt['mboards_delete_board_contains'], '</p>
669 695
 					<ul>';
670 696
 
671
-	foreach ($context['children'] as $child)
672
-		echo '
697
+	foreach ($context['children'] as $child) {
698
+			echo '
673 699
 						<li>', $child['node']['name'], '</li>';
700
+	}
674 701
 
675 702
 	echo '
676 703
 					</ul>
@@ -684,10 +711,11 @@  discard block
 block discarded – undo
684 711
 					<label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>:
685 712
 					<select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>';
686 713
 
687
-	foreach ($context['board_order'] as $board)
688
-		if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
714
+	foreach ($context['board_order'] as $board) {
715
+			if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
689 716
 			echo '
690 717
 						<option value="', $board['id'], '">', $board['name'], '</option>';
718
+	}
691 719
 
692 720
 	echo '
693 721
 					</select>
Please login to merge, or discard this patch.
Themes/default/Help.template.php 1 patch
Braces   +15 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,9 +86,10 @@  discard block
 block discarded – undo
86 86
 					<span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>';
87 87
 
88 88
 	// Only offer to search for buddies if we have some!
89
-	if (!empty($context['show_buddies']))
90
-		echo '
89
+	if (!empty($context['show_buddies'])) {
90
+			echo '
91 91
 					<span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>';
92
+	}
92 93
 
93 94
 	echo '
94 95
 					<div class="padding righttext">
@@ -103,10 +104,10 @@  discard block
 block discarded – undo
103 104
 					<h3 class="catbg">', $txt['find_results'], '</h3>
104 105
 				</div>';
105 106
 
106
-	if (empty($context['results']))
107
-		echo '
107
+	if (empty($context['results'])) {
108
+			echo '
108 109
 				<p class="error">', $txt['find_no_results'], '</p>';
109
-	else
110
+	} else
110 111
 	{
111 112
 		echo '
112 113
 				<ul class="padding">';
@@ -135,11 +136,12 @@  discard block
 block discarded – undo
135 136
 			<input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '">
136 137
 		</form>';
137 138
 
138
-	if (empty($context['results']))
139
-		echo '
139
+	if (empty($context['results'])) {
140
+			echo '
140 141
 		<script>
141 142
 			document.getElementById("search").focus();
142 143
 		</script>';
144
+	}
143 145
 
144 146
 	echo '
145 147
 	</body>
@@ -183,8 +185,8 @@  discard block
 block discarded – undo
183 185
 {
184 186
 	global $txt, $context, $modSettings;
185 187
 
186
-	if (!empty($modSettings['requireAgreement']))
187
-		echo '
188
+	if (!empty($modSettings['requireAgreement'])) {
189
+			echo '
188 190
 			<div class="cat_bar">
189 191
 				<h3 class="catbg">
190 192
 					', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], '
@@ -193,11 +195,12 @@  discard block
 block discarded – undo
193 195
 			<div class="roundframe">
194 196
 				', $context['agreement'], '
195 197
 			</div>';
196
-	else
197
-		echo '
198
+	} else {
199
+			echo '
198 200
 			<div class="noticebox">
199 201
 				', $txt['agreement_disabled'], '
200 202
 			</div>';
201
-}
203
+	}
204
+	}
202 205
 
203 206
 ?>
204 207
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/ManageMaintenance.template.php 1 patch
Braces   +36 added lines, -25 removed lines patch added patch discarded remove patch
@@ -18,11 +18,12 @@  discard block
 block discarded – undo
18 18
 	global $context, $txt, $scripturl, $modSettings;
19 19
 
20 20
 	// If maintenance has finished tell the user.
21
-	if (!empty($context['maintenance_finished']))
22
-		echo '
21
+	if (!empty($context['maintenance_finished'])) {
22
+			echo '
23 23
 			<div class="infobox">
24 24
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
25 25
 			</div>';
26
+	}
26 27
 
27 28
 	echo '
28 29
 	<div id="manage_maintenance">
@@ -107,11 +108,12 @@  discard block
 block discarded – undo
107 108
 	<div id="manage_maintenance">';
108 109
 
109 110
 	// If maintenance has finished tell the user.
110
-	if (!empty($context['maintenance_finished']))
111
-		echo '
111
+	if (!empty($context['maintenance_finished'])) {
112
+			echo '
112 113
 			<div class="infobox">
113 114
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
114 115
 			</div>';
116
+	}
115 117
 
116 118
 	echo '
117 119
 		<div class="cat_bar">
@@ -238,11 +240,12 @@  discard block
 block discarded – undo
238 240
 	<div id="manage_maintenance">';
239 241
 
240 242
 	// If maintenance has finished tell the user.
241
-	if (!empty($context['maintenance_finished']))
242
-	echo '
243
+	if (!empty($context['maintenance_finished'])) {
244
+		echo '
243 245
 		<div class="infobox">
244 246
 			', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
245 247
 		</div>';
248
+	}
246 249
 
247 250
 	echo '
248 251
 		<div class="cat_bar">
@@ -300,9 +303,10 @@  discard block
 block discarded – undo
300 303
 				<p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="membersIcon"></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p>
301 304
 				<div style="display: none; padding: 3px" id="membersPanel">';
302 305
 
303
-	foreach ($context['membergroups'] as $group)
304
-		echo '
306
+	foreach ($context['membergroups'] as $group) {
307
+			echo '
305 308
 					<label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked class="input_check"> ', $group['name'], '</label><br>';
309
+	}
306 310
 
307 311
 	echo '
308 312
 				</div>
@@ -346,11 +350,12 @@  discard block
 block discarded – undo
346 350
 	global $scripturl, $txt, $context, $settings, $modSettings;
347 351
 
348 352
 	// If maintenance has finished tell the user.
349
-	if (!empty($context['maintenance_finished']))
350
-		echo '
353
+	if (!empty($context['maintenance_finished'])) {
354
+			echo '
351 355
 			<div class="infobox">
352 356
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
353 357
 			</div>';
358
+	}
354 359
 
355 360
 	// Bit of javascript for showing which boards to prune in an otherwise hidden list.
356 361
 	echo '
@@ -418,19 +423,21 @@  discard block
 block discarded – undo
418 423
 								<ul>';
419 424
 
420 425
 		// Display a checkbox with every board.
421
-		foreach ($category['boards'] as $board)
422
-			echo '
426
+		foreach ($category['boards'] as $board) {
427
+					echo '
423 428
 									<li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"><label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked class="input_check">', $board['name'], '</label></li>';
429
+		}
424 430
 
425 431
 		echo '
426 432
 								</ul>
427 433
 							</fieldset>';
428 434
 
429 435
 		// Increase $i, and check if we're at the middle yet.
430
-		if (++$i == $middle)
431
-			echo '
436
+		if (++$i == $middle) {
437
+					echo '
432 438
 						</div>
433 439
 						<div class="floatright" style="width: 49%;">';
440
+		}
434 441
 	}
435 442
 
436 443
 	echo '
@@ -469,9 +476,10 @@  discard block
 block discarded – undo
469 476
 		echo '
470 477
 					<optgroup label="', $category['name'], '">';
471 478
 
472
-		foreach ($category['boards'] as $board)
473
-			echo '
479
+		foreach ($category['boards'] as $board) {
480
+					echo '
474 481
 						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
482
+		}
475 483
 
476 484
 		echo '
477 485
 					</optgroup>';
@@ -489,9 +497,10 @@  discard block
 block discarded – undo
489 497
 		echo '
490 498
 					<optgroup label="', $category['name'], '">';
491 499
 
492
-		foreach ($category['boards'] as $board)
493
-			echo '
500
+		foreach ($category['boards'] as $board) {
501
+					echo '
494 502
 						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
503
+		}
495 504
 
496 505
 		echo '
497 506
 					</optgroup>';
@@ -531,9 +540,10 @@  discard block
 block discarded – undo
531 540
 				', $txt['database_optimize_attempt'], '<br>';
532 541
 
533 542
 	// List each table being optimized...
534
-	foreach ($context['optimized_tables'] as $table)
535
-		echo '
543
+	foreach ($context['optimized_tables'] as $table) {
544
+			echo '
536 545
 				', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>';
546
+	}
537 547
 
538 548
 	// How did we go?
539 549
 	echo '
@@ -590,13 +600,14 @@  discard block
 block discarded – undo
590 600
 				', implode('</li><li>', $context['exceeding_messages']), '
591 601
 				</li>
592 602
 			</ul>';
593
-		if (!empty($context['exceeding_messages_morethan']))
594
-			echo '
603
+		if (!empty($context['exceeding_messages_morethan'])) {
604
+					echo '
595 605
 			<p>', $context['exceeding_messages_morethan'], '</p>';
596
-	}
597
-	else
598
-		echo '
606
+		}
607
+	} else {
608
+			echo '
599 609
 			<p class="infobox">', $txt['convert_to_text'], '</p>';
610
+	}
600 611
 
601 612
 	echo '
602 613
 			<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '">
Please login to merge, or discard this patch.
Themes/default/SplitTopics.template.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 				</div>
102 102
 				<ul id="messages_not_selected" class="split_messages smalltext">';
103 103
 
104
-	foreach ($context['not_selected']['messages'] as $message)
105
-		echo '
104
+	foreach ($context['not_selected']['messages'] as $message) {
105
+			echo '
106 106
 					<li class="windowbg" id="not_selected_', $message['id'], '">
107 107
 						<div class="message_header">
108 108
 							<a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="-&gt;"></span></a>
@@ -111,6 +111,7 @@  discard block
 block discarded – undo
111 111
 						</div>
112 112
 						<div class="post">', $message['body'], '</div>
113 113
 					</li>';
114
+	}
114 115
 
115 116
 	echo '
116 117
 					<li class="dummy">
@@ -130,8 +131,8 @@  discard block
 block discarded – undo
130 131
 				</div>
131 132
 				<ul id="messages_selected" class="split_messages smalltext">';
132 133
 
133
-	if (!empty($context['selected']['messages']))
134
-		foreach ($context['selected']['messages'] as $message)
134
+	if (!empty($context['selected']['messages'])) {
135
+			foreach ($context['selected']['messages'] as $message)
135 136
 			echo '
136 137
 					<li class="windowbg" id="selected_', $message['id'], '">
137 138
 						<div class="message_header">
@@ -141,6 +142,7 @@  discard block
 block discarded – undo
141 142
 						</div>
142 143
 						<div class="post">', $message['body'], '</div>
143 144
 					</li>';
145
+	}
144 146
 
145 147
 	echo '
146 148
 					<li class="dummy">
Please login to merge, or discard this patch.
Themes/default/Login.template.php 1 patch
Braces   +35 added lines, -24 removed lines patch added patch discarded remove patch
@@ -28,14 +28,16 @@  discard block
 block discarded – undo
28 28
 				<form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">';
29 29
 
30 30
 	// Did they make a mistake last time?
31
-	if (!empty($context['login_errors']))
32
-		echo '
31
+	if (!empty($context['login_errors'])) {
32
+			echo '
33 33
 					<div class="errorbox">', implode('<br>', $context['login_errors']), '</div><br>';
34
+	}
34 35
 
35 36
 	// Or perhaps there's some special description for this time?
36
-	if (isset($context['description']))
37
-		echo '
37
+	if (isset($context['description'])) {
38
+			echo '
38 39
 					<div class="information">', $context['description'], '</div>';
40
+	}
39 41
 
40 42
 	// Now just get the basic information - username, password, etc.
41 43
 	echo '
@@ -51,10 +53,11 @@  discard block
 block discarded – undo
51 53
 						<dt>', $txt['always_logged_in'], ':</dt>
52 54
 						<dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;"></dd>';
53 55
 	// If they have deleted their account, give them a chance to change their mind.
54
-	if (isset($context['login_show_undelete']))
55
-		echo '
56
+	if (isset($context['login_show_undelete'])) {
57
+			echo '
56 58
 						<dt class="alert">', $txt['undelete_account'], ':</dt>
57 59
 						<dd><input type="checkbox" name="undelete" class="input_check"></dd>';
60
+	}
58 61
 	echo '
59 62
 					</dl>
60 63
 					<p><input type="submit" value="', $txt['login'], '" class="button_submit"></p>
@@ -66,8 +69,8 @@  discard block
 block discarded – undo
66 69
 						setTimeout(function() {
67 70
 							document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus();
68 71
 						}, 150);';
69
-	if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2))
70
-		echo '
72
+	if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) {
73
+			echo '
71 74
 						form = $("#frmLogin");
72 75
 						form.submit(function(e) {
73 76
 							e.preventDefault();
@@ -100,16 +103,18 @@  discard block
 block discarded – undo
100 103
 
101 104
 							return false;
102 105
 						});';
106
+	}
103 107
 
104 108
 	echo '
105 109
 					</script>
106 110
 				</form>';
107 111
 
108 112
 	// It is a long story as to why we have this when we're clearly not going to use it.
109
-	if (!empty($context['from_ajax']))
110
-		echo '
113
+	if (!empty($context['from_ajax'])) {
114
+			echo '
111 115
 					<br>
112 116
 					<a href="javascript:self.close();"></a>';
117
+	}
113 118
 	echo '
114 119
 			</div>
115 120
 		</div>';
@@ -130,9 +135,10 @@  discard block
 block discarded – undo
130 135
 				</h3>
131 136
 			</div>
132 137
 			<div class="roundframe noup">';
133
-	if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error']))
134
-		echo '
138
+	if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) {
139
+			echo '
135 140
 				<div class="error">', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], '</div>';
141
+	}
136 142
 	echo '
137 143
 				<form action="', $context['tfa_url'], '" method="post" id="frmTfa">
138 144
 					<div id="tfaCode">
@@ -155,8 +161,8 @@  discard block
 block discarded – undo
155 161
 				</form>
156 162
 				<script>
157 163
 						form = $("#frmTfa");';
158
-	if (!empty($context['from_ajax']))
159
-		echo '
164
+	if (!empty($context['from_ajax'])) {
165
+			echo '
160 166
 						form.submit(function(e) {
161 167
 							// If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page
162 168
 							if (form.find("input[name=tfa_backup]:first").val().length > 0)
@@ -175,6 +181,7 @@  discard block
 block discarded – undo
175 181
 
176 182
 							return false;
177 183
 						});';
184
+	}
178 185
 	echo '
179 186
 						form.find("input[name=backup]").click(function(e) {
180 187
 							$("#tfaBackup").show();
@@ -206,10 +213,11 @@  discard block
 block discarded – undo
206 213
 				', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>';
207 214
 
208 215
 
209
-	if ($context['can_register'])
210
-		echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']);
211
-	else
212
-		echo $txt['login_below'];
216
+	if ($context['can_register']) {
217
+			echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']);
218
+	} else {
219
+			echo $txt['login_below'];
220
+	}
213 221
 
214 222
 	// And now the login information.
215 223
 	echo '
@@ -305,9 +313,10 @@  discard block
 block discarded – undo
305 313
 		</div>
306 314
 		<div class="roundframe centertext noup">';
307 315
 
308
-	if (!empty($context['incorrect_password']))
309
-		echo '
316
+	if (!empty($context['incorrect_password'])) {
317
+			echo '
310 318
 			<div class="error">', $txt['admin_incorrect_password'], '</div>';
319
+	}
311 320
 
312 321
 	echo '
313 322
 			<strong>', $txt['password'], ':</strong>
@@ -347,11 +356,12 @@  discard block
 block discarded – undo
347 356
 			<div class="roundframe">';
348 357
 
349 358
 	// You didn't even have an ID?
350
-	if (empty($context['member_id']))
351
-		echo '
359
+	if (empty($context['member_id'])) {
360
+			echo '
352 361
 				<dl>
353 362
 					<dt>', $txt['invalid_activation_username'], ':</dt>
354 363
 					<dd><input type="text" name="user" size="30" class="input_text"></dd>';
364
+	}
355 365
 
356 366
 	echo '
357 367
 					<dt>', $txt['invalid_activation_retry'], ':</dt>
@@ -388,13 +398,14 @@  discard block
 block discarded – undo
388 398
 					<dd><input type="password" name="passwd" size="30" class="input_password"></dd>
389 399
 				</dl>';
390 400
 
391
-	if ($context['can_activate'])
392
-		echo '
401
+	if ($context['can_activate']) {
402
+			echo '
393 403
 				<p>', $txt['invalid_activation_known'], '</p>
394 404
 				<dl>
395 405
 					<dt>', $txt['invalid_activation_retry'], ':</dt>
396 406
 					<dd><input type="text" name="code" size="30" class="input_text"></dd>
397 407
 				</dl>';
408
+	}
398 409
 
399 410
 	echo '
400 411
 				<p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button_submit"></p>
Please login to merge, or discard this patch.
Themes/default/ManageScheduledTasks.template.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
 	// We completed some tasks?
21 21
 	if (!empty($context['tasks_were_run']))
22 22
 	{
23
-		if (empty($context['scheduled_errors']))
24
-			echo '
23
+		if (empty($context['scheduled_errors'])) {
24
+					echo '
25 25
 	<div class="infobox">
26 26
 		', $txt['scheduled_tasks_were_run'], '
27 27
 	</div>';
28
-		else
28
+		} else
29 29
 		{
30 30
 			echo '
31 31
 	<div class="errorbox" id="errors">
Please login to merge, or discard this patch.
Themes/default/Xml.template.php 1 patch
Braces   +50 added lines, -37 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 		<subject is_first="', $context['message']['first_in_topic'] ? '1' : '0', '"><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>
75 75
 		<body><![CDATA[', $context['message']['body'], ']]></body>
76 76
 		<success><![CDATA[', $txt['quick_modify_message'], ']]></success>';
77
-	}
78
-	else
79
-		echo '
77
+	} else {
78
+			echo '
80 79
 		<error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '" in_body="', cleanXml($context['message']['error_in_body']) ? '1' : '0', '"><![CDATA[', implode('<br />', $context['message']['errors']), ']]></error>';
80
+	}
81 81
 	echo '
82 82
 	</message>
83 83
 </smf>';
@@ -101,13 +101,14 @@  discard block
 block discarded – undo
101 101
 
102 102
 		echo '
103 103
 		<modified><![CDATA[', empty($modified) ? '' : cleanXml('&#171; <em>' . $modified . '</em>&#187;'), ']]></modified>';
104
-		if (!empty($context['message']['subject']))
105
-			echo '
104
+		if (!empty($context['message']['subject'])) {
105
+					echo '
106 106
 		<subject><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>';
107
-	}
108
-	else
109
-		echo '
107
+		}
108
+	} else {
109
+			echo '
110 110
 		<error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '"><![CDATA[', cleanXml(implode('<br />', $context['message']['errors'])), ']]></error>';
111
+	}
111 112
 	echo '
112 113
 	</message>
113 114
 </smf>';
@@ -127,10 +128,11 @@  discard block
 block discarded – undo
127 128
 		<body><![CDATA[', $context['preview_message'], ']]></body>
128 129
 	</preview>
129 130
 	<errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '" topic_locked="', $context['locked'] ? '1' : '0', '">';
130
-	if (!empty($context['post_error']))
131
-		foreach ($context['post_error'] as $message)
131
+	if (!empty($context['post_error'])) {
132
+			foreach ($context['post_error'] as $message)
132 133
 			echo '
133 134
 		<error><![CDATA[', cleanXml($message), ']]></error>';
135
+	}
134 136
 	echo '
135 137
 		<caption name="guestname" class="', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? 'error' : '', '" />
136 138
 		<caption name="email" class="', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? 'error' : '', '" />
@@ -145,14 +147,15 @@  discard block
 block discarded – undo
145 147
 	{
146 148
 		echo '
147 149
 	<new_posts>';
148
-		foreach ($context['previous_posts'] as $post)
149
-			echo '
150
+		foreach ($context['previous_posts'] as $post) {
151
+					echo '
150 152
 		<post id="', $post['id'], '">
151 153
 			<time><![CDATA[', $post['time'], ']]></time>
152 154
 			<poster><![CDATA[', cleanXml($post['poster']), ']]></poster>
153 155
 			<message><![CDATA[', cleanXml($post['message']), ']]></message>
154 156
 			<is_ignored>', $post['is_ignored'] ? '1' : '0', '</is_ignored>
155 157
 		</post>';
158
+		}
156 159
 		echo '
157 160
 	</new_posts>';
158 161
 	}
@@ -176,10 +179,11 @@  discard block
 block discarded – undo
176 179
 		<body><![CDATA[', $context['preview_message'], ']]></body>
177 180
 	</preview>
178 181
 	<errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">';
179
-	if (!empty($context['post_error']['messages']))
180
-		foreach ($context['post_error']['messages'] as $message)
182
+	if (!empty($context['post_error']['messages'])) {
183
+			foreach ($context['post_error']['messages'] as $message)
181 184
 			echo '
182 185
 		<error><![CDATA[', cleanXml($message), ']]></error>';
186
+	}
183 187
 
184 188
 	echo '
185 189
 		<caption name="to" class="', isset($context['post_error']['no_to']) ? 'error' : '', '" />
@@ -208,10 +212,11 @@  discard block
 block discarded – undo
208 212
 		<body><![CDATA[', $context['preview_message'], ']]></body>
209 213
 	</preview>
210 214
 	<errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">';
211
-	if (!empty($context['post_error']['messages']))
212
-		foreach ($context['post_error']['messages'] as $message)
215
+	if (!empty($context['post_error']['messages'])) {
216
+			foreach ($context['post_error']['messages'] as $message)
213 217
 			echo '
214 218
 		<error><![CDATA[', cleanXml($message), ']]></error>';
219
+	}
215 220
 
216 221
 	echo '
217 222
 	</errors>';
@@ -227,19 +232,22 @@  discard block
 block discarded – undo
227 232
 {
228 233
 	global $context, $modSettings;
229 234
 
230
-	if (empty($context['yearly']))
231
-		return;
235
+	if (empty($context['yearly'])) {
236
+			return;
237
+	}
232 238
 
233 239
 	echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
234 240
 <smf>';
235
-	foreach ($context['yearly'] as $year)
236
-		foreach ($year['months'] as $month)
241
+	foreach ($context['yearly'] as $year) {
242
+			foreach ($year['months'] as $month)
237 243
 		{
238 244
 			echo '
239 245
 	<month id="', $month['date']['year'], $month['date']['month'], '">';
240
-			foreach ($month['days'] as $day)
241
-				echo '
246
+	}
247
+			foreach ($month['days'] as $day) {
248
+							echo '
242 249
 		<day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />';
250
+			}
243 251
 			echo '
244 252
 	</month>';
245 253
 		}
@@ -260,17 +268,18 @@  discard block
 block discarded – undo
260 268
 	<pageIndex section="selected" startFrom="', $context['selected']['start'], '"><![CDATA[', $context['selected']['page_index'], ']]></pageIndex>';
261 269
 	foreach ($context['changes'] as $change)
262 270
 	{
263
-		if ($change['type'] == 'remove')
264
-			echo '
271
+		if ($change['type'] == 'remove') {
272
+					echo '
265 273
 	<change id="', $change['id'], '" curAction="remove" section="', $change['section'], '" />';
266
-		else
267
-			echo '
274
+		} else {
275
+					echo '
268 276
 	<change id="', $change['id'], '" curAction="insert" section="', $change['section'], '">
269 277
 		<subject><![CDATA[', cleanXml($change['insert_value']['subject']), ']]></subject>
270 278
 		<time><![CDATA[', cleanXml($change['insert_value']['time']), ']]></time>
271 279
 		<body><![CDATA[', cleanXml($change['insert_value']['body']), ']]></body>
272 280
 		<poster><![CDATA[', cleanXml($change['insert_value']['poster']), ']]></poster>
273 281
 	</change>';
282
+		}
274 283
 	}
275 284
 	echo '
276 285
 </smf>';
@@ -301,10 +310,10 @@  discard block
 block discarded – undo
301 310
 	echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
302 311
 <smf>';
303 312
 
304
-	if (empty($context['topics']))
305
-		echo '
313
+	if (empty($context['topics'])) {
314
+			echo '
306 315
 		<noresults>', $txt['search_no_results'], '</noresults>';
307
-	else
316
+	} else
308 317
 	{
309 318
 		echo '
310 319
 		<results>';
@@ -370,9 +379,10 @@  discard block
 block discarded – undo
370 379
 	{
371 380
 		echo '
372 381
 	<item type="category" id="', $category['id'], '"><![CDATA[', cleanXml($category['name']), ']]></item>';
373
-		foreach ($category['boards'] as $board)
374
-			echo '
382
+		foreach ($category['boards'] as $board) {
383
+					echo '
375 384
 	<item type="board" id="', $board['id'], '" childlevel="', $board['child_level'], '"><![CDATA[', cleanXml($board['name']), ']]></item>';
385
+		}
376 386
 	}
377 387
 	echo '
378 388
 </smf>';
@@ -387,9 +397,10 @@  discard block
 block discarded – undo
387 397
 
388 398
 	echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
389 399
 <smf>';
390
-	foreach ($context['icons'] as $icon)
391
-		echo '
400
+	foreach ($context['icons'] as $icon) {
401
+			echo '
392 402
 	<icon value="', $icon['value'], '" url="', $icon['url'], '"><![CDATA[', cleanXml($icon['name']), ']]></icon>';
403
+	}
393 404
 	echo '
394 405
 </smf>';
395 406
 }
@@ -438,16 +449,18 @@  discard block
 block discarded – undo
438 449
 	foreach ($xml_data as $key => $data)
439 450
 	{
440 451
 		// A group?
441
-		if (is_array($data) && isset($data['identifier']))
442
-			template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level);
452
+		if (is_array($data) && isset($data['identifier'])) {
453
+					template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level);
454
+		}
443 455
 		// An item...
444 456
 		elseif (is_array($data) && isset($data['value']))
445 457
 		{
446 458
 			echo "\n", str_repeat("\t", $level), '<', $child_ident;
447 459
 
448
-			if (!empty($data['attributes']))
449
-				foreach ($data['attributes'] as $k => $v)
460
+			if (!empty($data['attributes'])) {
461
+							foreach ($data['attributes'] as $k => $v)
450 462
 					echo ' ' . $k . '="' . $v . '"';
463
+			}
451 464
 			echo '><![CDATA[', cleanXml($data['value']), ']]></', $child_ident, '>';
452 465
 		}
453 466
 
Please login to merge, or discard this patch.
Themes/default/ManageMembergroups.template.php 1 patch
Braces   +92 added lines, -65 removed lines patch added patch discarded remove patch
@@ -52,9 +52,10 @@  discard block
 block discarded – undo
52 52
 							<legend>', $txt['membergroups_edit_select_group_type'], '</legend>
53 53
 							<label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>';
54 54
 
55
-		if ($context['allow_protected'])
56
-			echo '
55
+		if ($context['allow_protected']) {
56
+					echo '
57 57
 							<label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>';
58
+		}
58 59
 
59 60
 		echo '
60 61
 							<label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br>
@@ -64,14 +65,15 @@  discard block
 block discarded – undo
64 65
 					</dd>';
65 66
 	}
66 67
 
67
-	if ($context['post_group'] || $context['undefined_group'])
68
-		echo '
68
+	if ($context['post_group'] || $context['undefined_group']) {
69
+			echo '
69 70
 					<dt id="min_posts_text">
70 71
 						<strong>', $txt['membergroups_min_posts'], ':</strong>
71 72
 					</dt>
72 73
 					<dd>
73 74
 						<input type="number" name="min_posts" id="min_posts_input" size="5" class="input_text">
74 75
 					</dd>';
76
+	}
75 77
 	if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups']))
76 78
 	{
77 79
 		echo '
@@ -87,9 +89,10 @@  discard block
 block discarded – undo
87 89
 							<select name="inheritperm" id="inheritperm_select" onclick="document.getElementById(\'perm_type_inherit\').checked = true;">
88 90
 								<option value="-1">', $txt['membergroups_guests'], '</option>
89 91
 								<option value="0" selected>', $txt['membergroups_members'], '</option>';
90
-		foreach ($context['groups'] as $group)
91
-			echo '
92
+		foreach ($context['groups'] as $group) {
93
+					echo '
92 94
 								<option value="', $group['id'], '">', $group['name'], '</option>';
95
+		}
93 96
 		echo '
94 97
 							</select>
95 98
 							<br>
@@ -98,9 +101,10 @@  discard block
 block discarded – undo
98 101
 							<select name="copyperm" id="copyperm_select" onclick="document.getElementById(\'perm_type_copy\').checked = true;">
99 102
 								<option value="-1">', $txt['membergroups_guests'], '</option>
100 103
 								<option value="0" selected>', $txt['membergroups_members'], '</option>';
101
-		foreach ($context['groups'] as $group)
102
-			echo '
104
+		foreach ($context['groups'] as $group) {
105
+					echo '
103 106
 								<option value="', $group['id'], '">', $group['name'], '</option>';
107
+		}
104 108
 		echo '
105 109
 							</select>
106 110
 							<br>
@@ -173,8 +177,8 @@  discard block
 block discarded – undo
173 177
 						<input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30" class="input_text">
174 178
 					</dd>';
175 179
 
176
-	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
177
-		echo '
180
+	if ($context['group']['id'] != 3 && $context['group']['id'] != 4) {
181
+			echo '
178 182
 
179 183
 					<dt id="group_desc_text">
180 184
 						<label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label>
@@ -182,6 +186,7 @@  discard block
 block discarded – undo
182 186
 					<dd>
183 187
 						<textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea>
184 188
 					</dd>';
189
+	}
185 190
 
186 191
 	// Group type...
187 192
 	if ($context['group']['allow_post_group'])
@@ -195,9 +200,10 @@  discard block
 block discarded – undo
195 200
 							<legend>', $txt['membergroups_edit_select_group_type'], '</legend>
196 201
 							<label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>';
197 202
 
198
-		if ($context['group']['allow_protected'])
199
-			echo '
203
+		if ($context['group']['allow_protected']) {
204
+					echo '
200 205
 							<label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>';
206
+		}
201 207
 
202 208
 		echo '
203 209
 							<label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br>
@@ -207,8 +213,8 @@  discard block
 block discarded – undo
207 213
 					</dd>';
208 214
 	}
209 215
 
210
-	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
211
-		echo '
216
+	if ($context['group']['id'] != 3 && $context['group']['id'] != 4) {
217
+			echo '
212 218
 					<dt id="group_moderators_text">
213 219
 						<label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label>
214 220
 					</dt>
@@ -226,6 +232,7 @@  discard block
 block discarded – undo
226 232
 							<option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option>
227 233
 						</select>
228 234
 					</dd>';
235
+	}
229 236
 
230 237
 	// Can they inherit permissions?
231 238
 	if ($context['group']['id'] > 1 && $context['group']['id'] != 3)
@@ -242,9 +249,10 @@  discard block
 block discarded – undo
242 249
 							<option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>';
243 250
 
244 251
 		// For all the inheritable groups show an option.
245
-		foreach ($context['inheritable_groups'] as $id => $group)
246
-			echo '
252
+		foreach ($context['inheritable_groups'] as $id => $group) {
253
+					echo '
247 254
 							<option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>';
255
+		}
248 256
 
249 257
 		echo '
250 258
 						</select>
@@ -252,8 +260,8 @@  discard block
 block discarded – undo
252 260
 					</dd>';
253 261
 	}
254 262
 
255
-	if ($context['group']['allow_post_group'])
256
-		echo '
263
+	if ($context['group']['allow_post_group']) {
264
+			echo '
257 265
 
258 266
 					<dt id="min_posts_text">
259 267
 						<label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label>
@@ -261,6 +269,7 @@  discard block
 block discarded – undo
261 269
 					<dd>
262 270
 						<input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6" class="input_text">
263 271
 					</dd>';
272
+	}
264 273
 	echo '
265 274
 					<dt>
266 275
 						<label for="online_color_input"><strong>', $txt['membergroups_online_color'], ':</strong></label>
@@ -301,9 +310,10 @@  discard block
 block discarded – undo
301 310
 	}
302 311
 
303 312
 	// No? Hide the entire control.
304
-	else
305
-		echo '
313
+	else {
314
+			echo '
306 315
 					<input type="hidden" name="icon_image" value="">';
316
+	}
307 317
 
308 318
 	echo '
309 319
 					<dt>
@@ -314,8 +324,8 @@  discard block
 block discarded – undo
314 324
 						<input type="text" name="max_messages" id="max_messages_input" value="', $context['group']['id'] == 1 ? 0 : $context['group']['max_messages'], '" size="6"', $context['group']['id'] == 1 ? ' disabled' : '', ' class="input_text">
315 325
 					</dd>';
316 326
 	//Force 2FA for this membergroup?
317
-	if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2)
318
-	echo '
327
+	if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) {
328
+		echo '
319 329
 					<dt>
320 330
 						<label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br>
321 331
 						<span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span>
@@ -323,6 +333,7 @@  discard block
 block discarded – undo
323 333
 					<dd>
324 334
 						<input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', ' class="input_check">
325 335
 					</dd>';
336
+	}
326 337
 
327 338
 	if (!empty($context['categories']))
328 339
 	{
@@ -332,10 +343,11 @@  discard block
 block discarded – undo
332 343
 						<span class="smalltext">' . $txt['membergroups_new_board_post_groups'] . '</span>' : '', '
333 344
 					</dt>
334 345
 					<dd>';
335
-		if (!empty($context['can_manage_boards']))
336
-			echo $txt['membergroups_can_manage_access'];
337
-		else
338
-			template_add_edit_group_boards_list();
346
+		if (!empty($context['can_manage_boards'])) {
347
+					echo $txt['membergroups_can_manage_access'];
348
+		} else {
349
+					template_add_edit_group_boards_list();
350
+		}
339 351
 
340 352
 		echo '
341 353
 					</dd>';
@@ -364,20 +376,21 @@  discard block
 block discarded – undo
364 376
 				sItemListContainerId: \'moderator_container\',
365 377
 				aListItems: [';
366 378
 
367
-			foreach ($context['group']['moderators'] as $id_member => $member_name)
368
-				echo '
379
+			foreach ($context['group']['moderators'] as $id_member => $member_name) {
380
+							echo '
369 381
 							{
370 382
 								sItemId: ', JavaScriptEscape($id_member), ',
371 383
 								sItemName: ', JavaScriptEscape($member_name), '
372 384
 							}', $id_member == $context['group']['last_moderator_id'] ? '' : ',';
385
+			}
373 386
 
374 387
 			echo '
375 388
 				]
376 389
 			});
377 390
 		</script>';
378 391
 
379
-	if ($context['group']['allow_post_group'])
380
-		echo '
392
+	if ($context['group']['allow_post_group']) {
393
+			echo '
381 394
 		<script>
382 395
 			function swapPostGroup(isChecked)
383 396
 			{
@@ -425,7 +438,8 @@  discard block
 block discarded – undo
425 438
 
426 439
 			swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', ');
427 440
 		</script>';
428
-}
441
+	}
442
+	}
429 443
 
430 444
 /**
431 445
  * The template for determining which boards a group has access to.
@@ -442,13 +456,13 @@  discard block
 block discarded – undo
442 456
 
443 457
 	foreach ($context['categories'] as $category)
444 458
 	{
445
-		if (empty($modSettings['deny_boards_access']))
446
-			echo '
459
+		if (empty($modSettings['deny_boards_access'])) {
460
+					echo '
447 461
 									<li class="category">
448 462
 										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a>
449 463
 									<ul style="width:100%">';
450
-		else
451
-			echo '
464
+		} else {
465
+					echo '
452 466
 									<li class="category">
453 467
 										<strong>', $category['name'], '</strong>
454 468
 										<span class="select_all_box">
@@ -461,16 +475,17 @@  discard block
 block discarded – undo
461 475
 											</select>
462 476
 										</span>
463 477
 										<ul style="width:100%" id="boards_list_', $category['id'], '">';
478
+		}
464 479
 
465 480
 		foreach ($category['boards'] as $board)
466 481
 		{
467
-			if (empty($modSettings['deny_boards_access']))
468
-				echo '
482
+			if (empty($modSettings['deny_boards_access'])) {
483
+							echo '
469 484
 										<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
470 485
 											<input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', ' class="input_check"> <label for="brd', $board['id'], '">', $board['name'], '</label>
471 486
 										</li>';
472
-			else
473
-				echo '
487
+			} else {
488
+							echo '
474 489
 											<li class="board" style="width:100%">
475 490
 												<span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span>
476 491
 												<span style="width:50%;float:right">
@@ -479,6 +494,7 @@  discard block
 block discarded – undo
479 494
 													<input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', ' class="input_check"> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label>
480 495
 												</span>
481 496
 											</li>';
497
+			}
482 498
 		}
483 499
 
484 500
 		echo '
@@ -489,13 +505,13 @@  discard block
 block discarded – undo
489 505
 	echo '
490 506
 							</ul>';
491 507
 
492
-	if (empty($modSettings['deny_boards_access']))
493
-		echo '
508
+	if (empty($modSettings['deny_boards_access'])) {
509
+			echo '
494 510
 								<br class="clear"><br>
495 511
 								<input type="checkbox" id="checkall_check" class="input_check" onclick="invertAll(this, this.form, \'boardaccess\');"> <label for="checkall_check"><em>', $txt['check_all'], '</em></label>
496 512
 							</fieldset>';
497
-	else
498
-		echo '
513
+	} else {
514
+			echo '
499 515
 								<br class="clear">
500 516
 								<span class="select_all_box">
501 517
 									<em>', $txt['all'], ': </em>
@@ -511,15 +527,17 @@  discard block
 block discarded – undo
511 527
 									});
512 528
 								});
513 529
 							</script>';
530
+	}
514 531
 
515
-	if ($collapse)
516
-		echo '
532
+	if ($collapse) {
533
+			echo '
517 534
 							<a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a>
518 535
 							<script>
519 536
 								document.getElementById("visible_boards_link").style.display = "";
520 537
 								document.getElementById("visible_boards").style.display = "none";
521 538
 							</script>';
522
-}
539
+	}
540
+	}
523 541
 
524 542
 /**
525 543
  * Templatine for viewing the members of a group.
@@ -543,14 +561,15 @@  discard block
 block discarded – undo
543 561
 						<span ', $context['group']['online_color'] ? 'style="color: ' . $context['group']['online_color'] . ';"' : '', '>', $context['group']['name'], '</span> ', $context['group']['icons'], '
544 562
 					</dd>';
545 563
 	//Any description to show?
546
-	if (!empty($context['group']['description']))
547
-		echo '
564
+	if (!empty($context['group']['description'])) {
565
+			echo '
548 566
 					<dt>
549 567
 						<strong>' . $txt['membergroups_members_description'] . ':</strong>
550 568
 					</dt>
551 569
 					<dd>
552 570
 						', $context['group']['description'] ,'
553 571
 					</dd>';
572
+	}
554 573
 
555 574
 	echo '
556 575
 					<dt>
@@ -563,8 +582,9 @@  discard block
 block discarded – undo
563 582
 	if (!empty($context['group']['moderators']))
564 583
 	{
565 584
 		$moderators = array();
566
-		foreach ($context['group']['moderators'] as $moderator)
567
-			$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
585
+		foreach ($context['group']['moderators'] as $moderator) {
586
+					$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
587
+		}
568 588
 
569 589
 		echo '
570 590
 					<dt>
@@ -590,27 +610,30 @@  discard block
 block discarded – undo
590 610
 					<tr class="title_bar">
591 611
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>';
592 612
 
593
-	if ($context['can_send_email'])
594
-		echo '
613
+	if ($context['can_send_email']) {
614
+			echo '
595 615
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>';
616
+	}
596 617
 
597 618
 	echo '
598 619
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
599 620
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
600 621
 						<th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>';
601
-	if (!empty($context['group']['assignable']))
602
-		echo '
622
+	if (!empty($context['group']['assignable'])) {
623
+			echo '
603 624
 						<th style="width: 4%"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>';
625
+	}
604 626
 	echo '
605 627
 					</tr>
606 628
 				</thead>
607 629
 				<tbody>';
608 630
 
609
-	if (empty($context['members']))
610
-		echo '
631
+	if (empty($context['members'])) {
632
+			echo '
611 633
 					<tr class="windowbg">
612 634
 						<td colspan="6">', $txt['membergroups_members_no_members'], '</td>
613 635
 					</tr>';
636
+	}
614 637
 
615 638
 	foreach ($context['members'] as $member)
616 639
 	{
@@ -629,9 +652,10 @@  discard block
 block discarded – undo
629 652
 						<td>', $member['last_online'], '</td>
630 653
 						<td>', $member['registered'], '</td>
631 654
 						<td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>';
632
-		if (!empty($context['group']['assignable']))
633
-			echo '
655
+		if (!empty($context['group']['assignable'])) {
656
+					echo '
634 657
 						<td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" class="input_check" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>';
658
+		}
635 659
 		echo '
636 660
 					</tr>';
637 661
 	}
@@ -640,11 +664,12 @@  discard block
 block discarded – undo
640 664
 				</tbody>
641 665
 			</table>';
642 666
 
643
-	if (!empty($context['group']['assignable']))
644
-		echo '
667
+	if (!empty($context['group']['assignable'])) {
668
+			echo '
645 669
 			<div class="floatright">
646 670
 				<input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button_submit ">
647 671
 			</div>';
672
+	}
648 673
 
649 674
 	echo '
650 675
 			<div class="pagesection flow_hidden">
@@ -678,8 +703,8 @@  discard block
 block discarded – undo
678 703
 		</form>
679 704
 	</div>';
680 705
 
681
-	if (!empty($context['group']['assignable']))
682
-		echo '
706
+	if (!empty($context['group']['assignable'])) {
707
+			echo '
683 708
 		<script>
684 709
 			var oAddMemberSuggest = new smc_AutoSuggest({
685 710
 				sSelf: \'oAddMemberSuggest\',
@@ -695,7 +720,8 @@  discard block
 block discarded – undo
695 720
 				sItemListContainerId: \'toAddItemContainer\'
696 721
 			});
697 722
 		</script>';
698
-}
723
+	}
724
+	}
699 725
 
700 726
 /**
701 727
  * Allow the moderator to enter a reason to each user being rejected.
@@ -715,8 +741,8 @@  discard block
 block discarded – undo
715 741
 				<dl class="settings">';
716 742
 
717 743
 	// Loop through and print out a reason box for each...
718
-	foreach ($context['group_requests'] as $request)
719
-		echo '
744
+	foreach ($context['group_requests'] as $request) {
745
+			echo '
720 746
 					<dt>
721 747
 						<strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong>
722 748
 					</dt>
@@ -724,6 +750,7 @@  discard block
 block discarded – undo
724 750
 						<input type="hidden" name="groupr[]" value="', $request['id'], '">
725 751
 						<textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea>
726 752
 					</dd>';
753
+	}
727 754
 
728 755
 	echo '
729 756
 				</dl>
Please login to merge, or discard this patch.
Themes/default/Who.template.php 1 patch
Braces   +39 added lines, -27 removed lines patch added patch discarded remove patch
@@ -31,9 +31,10 @@  discard block
 block discarded – undo
31 31
 					<div class="selectbox floatright" id="upper_show">', $txt['who_show1'], '
32 32
 						<select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">';
33 33
 
34
-	foreach ($context['show_methods'] as $value => $label)
35
-		echo '
34
+	foreach ($context['show_methods'] as $value => $label) {
35
+			echo '
36 36
 							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>';
37
+	}
37 38
 	echo '
38 39
 						</select>
39 40
 						<noscript>
@@ -71,9 +72,10 @@  discard block
 block discarded – undo
71 72
 									', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '
72 73
 								</span>';
73 74
 
74
-		if (!empty($member['ip']))
75
-			echo '
75
+		if (!empty($member['ip'])) {
76
+					echo '
76 77
 								(<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)';
78
+		}
77 79
 
78 80
 		echo '
79 81
 							</td>
@@ -103,9 +105,10 @@  discard block
 block discarded – undo
103 105
 					<div class="selectbox floatright">', $txt['who_show1'], '
104 106
 						<select name="show" onchange="document.forms.whoFilter.submit();">';
105 107
 
106
-	foreach ($context['show_methods'] as $value => $label)
107
-		echo '
108
+	foreach ($context['show_methods'] as $value => $label) {
109
+			echo '
108 110
 							<option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>';
111
+	}
109 112
 	echo '
110 113
 						</select>
111 114
 						<noscript>
@@ -134,17 +137,19 @@  discard block
 block discarded – undo
134 137
 
135 138
 	foreach ($context['credits'] as $section)
136 139
 	{
137
-		if (isset($section['pretext']))
138
-		echo '
140
+		if (isset($section['pretext'])) {
141
+				echo '
139 142
 		<div class="windowbg noup">
140 143
 			<p>', $section['pretext'], '</p>
141 144
 		</div>';
145
+		}
142 146
 
143
-		if (isset($section['title']))
144
-		echo '
147
+		if (isset($section['title'])) {
148
+				echo '
145 149
 		<div class="cat_bar">
146 150
 			<h3 class="catbg">', $section['title'], '</h3>
147 151
 		</div>';
152
+		}
148 153
 
149 154
 		echo '
150 155
 		<div class="windowbg2 noup">
@@ -152,17 +157,18 @@  discard block
 block discarded – undo
152 157
 
153 158
 		foreach ($section['groups'] as $group)
154 159
 		{
155
-			if (isset($group['title']))
156
-				echo '
160
+			if (isset($group['title'])) {
161
+							echo '
157 162
 				<dt>
158 163
 					<strong>', $group['title'], '</strong>
159 164
 				</dt>
160 165
 				<dd>';
166
+			}
161 167
 
162 168
 			// Try to make this read nicely.
163
-			if (count($group['members']) <= 2)
164
-				echo implode(' ' . $txt['credits_and'] . ' ', $group['members']);
165
-			else
169
+			if (count($group['members']) <= 2) {
170
+							echo implode(' ' . $txt['credits_and'] . ' ', $group['members']);
171
+			} else
166 172
 			{
167 173
 				$last_peep = array_pop($group['members']);
168 174
 				echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep;
@@ -175,9 +181,10 @@  discard block
 block discarded – undo
175 181
 		echo '
176 182
 			</dl>';
177 183
 
178
-		if (isset($section['posttext']))
179
-			echo '
184
+		if (isset($section['posttext'])) {
185
+					echo '
180 186
 				<p class="posttext">', $section['posttext'], '</p>';
187
+		}
181 188
 
182 189
 		echo '
183 190
 		</div>';
@@ -192,26 +199,29 @@  discard block
 block discarded – undo
192 199
 		</div>
193 200
 		<div class="windowbg noup">';
194 201
 
195
-		if (!empty($context['credits_software_graphics']['graphics']))
196
-			echo '
202
+		if (!empty($context['credits_software_graphics']['graphics'])) {
203
+					echo '
197 204
 			<dl>
198 205
 				<dt><strong>', $txt['credits_graphics'], '</strong></dt>
199 206
 				<dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd>
200 207
 			</dl>';
208
+		}
201 209
 
202
-		if (!empty($context['credits_software_graphics']['software']))
203
-			echo '
210
+		if (!empty($context['credits_software_graphics']['software'])) {
211
+					echo '
204 212
 			<dl>
205 213
 				<dt><strong>', $txt['credits_software'], '</strong></dt>
206 214
 				<dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd>
207 215
 			</dl>';
216
+		}
208 217
 
209
-		if (!empty($context['credits_software_graphics']['fonts']))
210
-			echo '
218
+		if (!empty($context['credits_software_graphics']['fonts'])) {
219
+					echo '
211 220
 			<dl>
212 221
 				<dt><strong>', $txt['credits_fonts'], '</strong></dt>
213 222
 				<dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd>
214 223
 			</dl>';
224
+		}
215 225
 		echo '
216 226
 		</div>';
217 227
 	}
@@ -226,16 +236,18 @@  discard block
 block discarded – undo
226 236
 		<div class="windowbg noup">';
227 237
 
228 238
 		// Display the credits.
229
-		if (!empty($context['credits_modifications']))
230
-			echo '
239
+		if (!empty($context['credits_modifications'])) {
240
+					echo '
231 241
 			', implode('
232 242
 			<br>', $context['credits_modifications']);
243
+		}
233 244
 
234 245
 		// Legacy.
235
-		if (!empty($context['copyrights']['mods']))
236
-			echo (empty($context['credits_modifications']) ? '<br>' : ''),
246
+		if (!empty($context['copyrights']['mods'])) {
247
+					echo (empty($context['credits_modifications']) ? '<br>' : ''),
237 248
 			implode('
238 249
 			<br>', $context['copyrights']['mods']);
250
+		}
239 251
 
240 252
 		echo '
241 253
 		</div>';
Please login to merge, or discard this patch.