Completed
Push — release-2.1 ( 506664...8b5e1a )
by Colin
23:54 queued 15:34
created
Themes/default/Admin.template.php 1 patch
Braces   +179 added lines, -128 removed lines patch added patch discarded remove patch
@@ -65,9 +65,10 @@  discard block
 block discarded – undo
65 65
 										', implode(', ', $context['administrators']);
66 66
 
67 67
 	// If we have lots of admins... don't show them all.
68
-	if (!empty($context['more_admins_link']))
69
-		echo '
68
+	if (!empty($context['more_admins_link'])) {
69
+			echo '
70 70
 										(', $context['more_admins_link'], ')';
71
+	}
71 72
 
72 73
 	echo '
73 74
 									</div><!-- #version_details -->
@@ -84,17 +85,19 @@  discard block
 block discarded – undo
84 85
 		foreach ($area['areas'] as $item_id => $item)
85 86
 		{
86 87
 			// No point showing the 'home' page here, we're already on it!
87
-			if ($area_id == 'forum' && $item_id == 'index')
88
-				continue;
88
+			if ($area_id == 'forum' && $item_id == 'index') {
89
+							continue;
90
+			}
89 91
 
90 92
 			$url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : '');
91 93
 
92
-			if (!empty($item['icon_file']))
93
-				echo '
94
+			if (!empty($item['icon_file'])) {
95
+							echo '
94 96
 							<a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>';
95
-			else
96
-				echo '
97
+			} else {
98
+							echo '
97 99
 							<a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>';
100
+			}
98 101
 		}
99 102
 
100 103
 		echo '
@@ -105,10 +108,11 @@  discard block
 block discarded – undo
105 108
 					</div><!-- #admincenter -->';
106 109
 
107 110
 	// The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization.
108
-	if (empty($modSettings['disable_smf_js']))
109
-		echo '
111
+	if (empty($modSettings['disable_smf_js'])) {
112
+			echo '
110 113
 					<script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
111 114
 					<script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>';
115
+	}
112 116
 
113 117
 	// This sets the announcements and current versions themselves ;).
114 118
 	echo '
@@ -186,9 +190,10 @@  discard block
 block discarded – undo
186 190
 								<em>', $version['version'], '</em>';
187 191
 
188 192
 		// more details for this item, show them a link
189
-		if ($context['can_admin'] && isset($version['more']))
190
-			echo
193
+		if ($context['can_admin'] && isset($version['more'])) {
194
+					echo
191 195
 								' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>';
196
+		}
192 197
 		echo '
193 198
 								<br>';
194 199
 	}
@@ -219,21 +224,23 @@  discard block
 block discarded – undo
219 224
 
220 225
 	foreach ($context['credits'] as $section)
221 226
 	{
222
-		if (isset($section['pretext']))
223
-			echo '
227
+		if (isset($section['pretext'])) {
228
+					echo '
224 229
 								<p>', $section['pretext'], '</p>
225 230
 								<hr>';
231
+		}
226 232
 
227 233
 		echo '
228 234
 								<dl>';
229 235
 
230 236
 		foreach ($section['groups'] as $group)
231 237
 		{
232
-			if (isset($group['title']))
233
-				echo '
238
+			if (isset($group['title'])) {
239
+							echo '
234 240
 									<dt>
235 241
 										<strong>', $group['title'], ':</strong>
236 242
 									</dt>';
243
+			}
237 244
 
238 245
 			echo '
239 246
 									<dd>', implode(', ', $group['members']), '</dd>';
@@ -242,10 +249,11 @@  discard block
 block discarded – undo
242 249
 		echo '
243 250
 								</dl>';
244 251
 
245
-		if (isset($section['posttext']))
246
-			echo '
252
+		if (isset($section['posttext'])) {
253
+					echo '
247 254
 								<hr>
248 255
 								<p>', $section['posttext'], '</p>';
256
+		}
249 257
 	}
250 258
 
251 259
 	echo '
@@ -261,9 +269,10 @@  discard block
 block discarded – undo
261 269
 						smfSupportVersions.forum = "', $context['forum_version'], '";';
262 270
 
263 271
 	// Don't worry, none of this is logged, it's just used to give information that might be of use.
264
-	foreach ($context['current_versions'] as $variable => $version)
265
-		echo '
272
+	foreach ($context['current_versions'] as $variable => $version) {
273
+			echo '
266 274
 						smfSupportVersions.', $variable, ' = "', $version['version'], '";';
275
+	}
267 276
 
268 277
 	// Now we just have to include the script and wait ;).
269 278
 	echo '
@@ -360,8 +369,8 @@  discard block
 block discarded – undo
360 369
 								<tbody>';
361 370
 
362 371
 	// Loop through every source file displaying its version - using javascript.
363
-	foreach ($context['file_versions'] as $filename => $version)
364
-		echo '
372
+	foreach ($context['file_versions'] as $filename => $version) {
373
+			echo '
365 374
 									<tr class="windowbg">
366 375
 										<td class="half_table">
367 376
 											', $filename, '
@@ -373,6 +382,7 @@  discard block
 block discarded – undo
373 382
 											<em id="currentSources', $filename, '">??</em>
374 383
 										</td>
375 384
 									</tr>';
385
+	}
376 386
 
377 387
 	// Default template files.
378 388
 	echo '
@@ -398,8 +408,8 @@  discard block
 block discarded – undo
398 408
 							<table id="Default" class="table_grid">
399 409
 								<tbody>';
400 410
 
401
-	foreach ($context['default_template_versions'] as $filename => $version)
402
-		echo '
411
+	foreach ($context['default_template_versions'] as $filename => $version) {
412
+			echo '
403 413
 									<tr class="windowbg">
404 414
 										<td class="half_table">
405 415
 											', $filename, '
@@ -411,6 +421,7 @@  discard block
 block discarded – undo
411 421
 											<em id="currentDefault', $filename, '">??</em>
412 422
 										</td>
413 423
 									</tr>';
424
+	}
414 425
 
415 426
 	// Now the language files...
416 427
 	echo '
@@ -438,8 +449,8 @@  discard block
 block discarded – undo
438 449
 
439 450
 	foreach ($context['default_language_versions'] as $language => $files)
440 451
 	{
441
-		foreach ($files as $filename => $version)
442
-			echo '
452
+		foreach ($files as $filename => $version) {
453
+					echo '
443 454
 									<tr class="windowbg">
444 455
 										<td class="half_table">
445 456
 											', $filename, '.<em>', $language, '</em>.php
@@ -451,6 +462,7 @@  discard block
 block discarded – undo
451 462
 											<em id="current', $filename, '.', $language, '">??</em>
452 463
 										</td>
453 464
 									</tr>';
465
+		}
454 466
 	}
455 467
 
456 468
 	echo '
@@ -480,8 +492,8 @@  discard block
 block discarded – undo
480 492
 							<table id="Templates" class="table_grid">
481 493
 								<tbody>';
482 494
 
483
-		foreach ($context['template_versions'] as $filename => $version)
484
-			echo '
495
+		foreach ($context['template_versions'] as $filename => $version) {
496
+					echo '
485 497
 									<tr class="windowbg">
486 498
 										<td class="half_table">
487 499
 											', $filename, '
@@ -493,6 +505,7 @@  discard block
 block discarded – undo
493 505
 											<em id="currentTemplates', $filename, '">??</em>
494 506
 										</td>
495 507
 									</tr>';
508
+		}
496 509
 
497 510
 		echo '
498 511
 								</tbody>
@@ -522,8 +535,8 @@  discard block
 block discarded – undo
522 535
 							<table id="Tasks" class="table_grid">
523 536
 								<tbody>';
524 537
 
525
-		foreach ($context['tasks_versions'] as $filename => $version)
526
-			echo '
538
+		foreach ($context['tasks_versions'] as $filename => $version) {
539
+					echo '
527 540
 									<tr class="windowbg">
528 541
 										<td class="half_table">
529 542
 											', $filename, '
@@ -535,6 +548,7 @@  discard block
 block discarded – undo
535 548
 											<em id="currentTasks', $filename, '">??</em>
536 549
 										</td>
537 550
 									</tr>';
551
+		}
538 552
 
539 553
 		echo '
540 554
 								</tbody>
@@ -576,9 +590,10 @@  discard block
 block discarded – undo
576 590
 {
577 591
 	global $context, $scripturl, $txt, $modSettings;
578 592
 
579
-	if (!empty($context['saved_successful']))
580
-		echo '
593
+	if (!empty($context['saved_successful'])) {
594
+			echo '
581 595
 					<div class="infobox">', $txt['settings_saved'], '</div>';
596
+	}
582 597
 
583 598
 	// First section is for adding/removing words from the censored list.
584 599
 	echo '
@@ -593,11 +608,12 @@  discard block
 block discarded – undo
593 608
 								<p>', $txt['admin_censored_where'], '</p>';
594 609
 
595 610
 	// Show text boxes for censoring [bad   ] => [good  ].
596
-	foreach ($context['censored_words'] as $vulgar => $proper)
597
-		echo '
611
+	foreach ($context['censored_words'] as $vulgar => $proper) {
612
+			echo '
598 613
 								<div class="block">
599 614
 									<input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> =&gt; <input type="text" name="censor_proper[]" value="', $proper, '" size="30">
600 615
 								</div>';
616
+	}
601 617
 
602 618
 	// Now provide a way to censor more words.
603 619
 	echo '
@@ -672,19 +688,21 @@  discard block
 block discarded – undo
672 688
 						<div class="windowbg noup">
673 689
 							', $txt['not_done_reason'];
674 690
 
675
-	if (!empty($context['continue_percent']))
676
-		echo '
691
+	if (!empty($context['continue_percent'])) {
692
+			echo '
677 693
 							<div class="progress_bar">
678 694
 								<span>', $context['continue_percent'], '%</span>
679 695
 								<div class="bar" style="width: ', $context['continue_percent'], '%;"></div>
680 696
 							</div>';
697
+	}
681 698
 
682
-	if (!empty($context['substep_enabled']))
683
-		echo '
699
+	if (!empty($context['substep_enabled'])) {
700
+			echo '
684 701
 							<div class="progress_bar progress_blue">
685 702
 								<span>', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</span>
686 703
 								<div class="bar" style="width: ', $context['substep_continue_percent'], '%;"></div>
687 704
 							</div>';
705
+	}
688 706
 
689 707
 	echo '
690 708
 							<form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">
@@ -719,35 +737,40 @@  discard block
 block discarded – undo
719 737
 {
720 738
 	global $context, $txt, $scripturl;
721 739
 
722
-	if (!empty($context['saved_successful']))
723
-		echo '
740
+	if (!empty($context['saved_successful'])) {
741
+			echo '
724 742
 					<div class="infobox">', $txt['settings_saved'], '</div>';
725
-	elseif (!empty($context['saved_failed']))
726
-		echo '
743
+	} elseif (!empty($context['saved_failed'])) {
744
+			echo '
727 745
 					<div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>';
746
+	}
728 747
 
729
-	if (!empty($context['settings_pre_javascript']))
730
-		echo '
748
+	if (!empty($context['settings_pre_javascript'])) {
749
+			echo '
731 750
 					<script>', $context['settings_pre_javascript'], '</script>';
751
+	}
732 752
 
733
-	if (!empty($context['settings_insert_above']))
734
-		echo $context['settings_insert_above'];
753
+	if (!empty($context['settings_insert_above'])) {
754
+			echo $context['settings_insert_above'];
755
+	}
735 756
 
736 757
 	echo '
737 758
 					<div id="admincenter">
738 759
 						<form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>';
739 760
 
740 761
 	// Is there a custom title?
741
-	if (isset($context['settings_title']))
742
-		echo '
762
+	if (isset($context['settings_title'])) {
763
+			echo '
743 764
 							<div class="cat_bar">
744 765
 								<h3 class="catbg">', $context['settings_title'], '</h3>
745 766
 							</div>';
767
+	}
746 768
 
747 769
 	// Have we got a message to display?
748
-	if (!empty($context['settings_message']))
749
-		echo '
770
+	if (!empty($context['settings_message'])) {
771
+			echo '
750 772
 							<div class="information">', $context['settings_message'], '</div>';
773
+	}
751 774
 
752 775
 	// Now actually loop through all the variables.
753 776
 	$is_open = false;
@@ -800,8 +823,9 @@  discard block
 block discarded – undo
800 823
 		// Hang about? Are you pulling my leg - a callback?!
801 824
 		if (is_array($config_var) && $config_var['type'] == 'callback')
802 825
 		{
803
-			if (function_exists('template_callback_' . $config_var['name']))
804
-				call_user_func('template_callback_' . $config_var['name']);
826
+			if (function_exists('template_callback_' . $config_var['name'])) {
827
+							call_user_func('template_callback_' . $config_var['name']);
828
+			}
805 829
 
806 830
 			continue;
807 831
 		}
@@ -831,9 +855,10 @@  discard block
 block discarded – undo
831 855
 				$text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time');
832 856
 
833 857
 				// Show the [?] button.
834
-				if ($config_var['help'])
835
-					echo '
858
+				if ($config_var['help']) {
859
+									echo '
836 860
 										<a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ';
861
+				}
837 862
 
838 863
 				echo '
839 864
 										<a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span>
@@ -842,23 +867,26 @@  discard block
 block discarded – undo
842 867
 										$config_var['preinput'];
843 868
 
844 869
 				// Show a check box.
845
-				if ($config_var['type'] == 'check')
846
-					echo '
870
+				if ($config_var['type'] == 'check') {
871
+									echo '
847 872
 										<input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1">';
873
+				}
848 874
 				// Escape (via htmlspecialchars.) the text box.
849
-				elseif ($config_var['type'] == 'password')
850
-					echo '
875
+				elseif ($config_var['type'] == 'password') {
876
+									echo '
851 877
 										<input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;"><br>
852 878
 										<input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), '>';
879
+				}
853 880
 				// Show a selection box.
854 881
 				elseif ($config_var['type'] == 'select')
855 882
 				{
856 883
 					echo '
857 884
 										<select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>';
858 885
 
859
-					foreach ($config_var['data'] as $option)
860
-						echo '
886
+					foreach ($config_var['data'] as $option) {
887
+											echo '
861 888
 											<option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>';
889
+					}
862 890
 					echo '
863 891
 										</select>';
864 892
 				}
@@ -875,16 +903,18 @@  discard block
 block discarded – undo
875 903
 
876 904
 					foreach ($context['board_list'] as $id_cat => $cat)
877 905
 					{
878
-						if (!$first)
879
-							echo '
906
+						if (!$first) {
907
+													echo '
880 908
 											<hr>';
909
+						}
881 910
 						echo '
882 911
 											<strong>', $cat['name'], '</strong>
883 912
 											<ul>';
884 913
 
885
-						foreach ($cat['boards'] as $id_board => $brd)
886
-							echo '
914
+						foreach ($cat['boards'] as $id_board => $brd) {
915
+													echo '
887 916
 												<li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat('&nbsp; &nbsp;', $brd['child_level']) : '', $brd['name'], '</label></li>';
917
+						}
888 918
 
889 919
 						echo '
890 920
 											</ul>';
@@ -894,12 +924,14 @@  discard block
 block discarded – undo
894 924
 										</fieldset>';
895 925
 				}
896 926
 				// Text area?
897
-				elseif ($config_var['type'] == 'large_text')
898
-					echo '
927
+				elseif ($config_var['type'] == 'large_text') {
928
+									echo '
899 929
 										<textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>';
930
+				}
900 931
 				// Permission group?
901
-				elseif ($config_var['type'] == 'permissions')
902
-					theme_inline_permissions($config_var['name']);
932
+				elseif ($config_var['type'] == 'permissions') {
933
+									theme_inline_permissions($config_var['name']);
934
+				}
903 935
 
904 936
 				// BBC selection?
905 937
 				elseif ($config_var['type'] == 'bbc')
@@ -911,22 +943,24 @@  discard block
 block discarded – undo
911 943
 
912 944
 					foreach ($context['bbc_columns'] as $bbcColumn)
913 945
 					{
914
-						foreach ($bbcColumn as $bbcTag)
915
-							echo '
946
+						foreach ($bbcColumn as $bbcTag) {
947
+													echo '
916 948
 												<li class="list_bbc floatleft">
917 949
 													<input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', '> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', '
918 950
 												</li>';
951
+						}
919 952
 					}
920 953
 					echo '					</ul>
921 954
 											<input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', '> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label>
922 955
 										</fieldset>';
923 956
 				}
924 957
 				// A simple message?
925
-				elseif ($config_var['type'] == 'var_message')
926
-					echo '
958
+				elseif ($config_var['type'] == 'var_message') {
959
+									echo '
927 960
 										<div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>
928 961
 											', $config_var['var_message'], '
929 962
 										</div>';
963
+				}
930 964
 				// Assume it must be a text box
931 965
 				else
932 966
 				{
@@ -951,62 +985,70 @@  discard block
 block discarded – undo
951 985
 											' . $config_var['postinput'] : '','
952 986
 									</dd>';
953 987
 			}
954
-		}
955
-		else
988
+		} else
956 989
 		{
957 990
 			// Just show a separator.
958
-			if ($config_var == '')
959
-				echo '
991
+			if ($config_var == '') {
992
+							echo '
960 993
 								</dl>
961 994
 								<hr>
962 995
 								<dl class="settings">';
963
-			else
964
-				echo '
996
+			} else {
997
+							echo '
965 998
 									<dd>
966 999
 										<strong>' . $config_var . '</strong>
967 1000
 									</dd>';
1001
+			}
968 1002
 		}
969 1003
 	}
970 1004
 
971
-	if ($is_open)
972
-		echo '
1005
+	if ($is_open) {
1006
+			echo '
973 1007
 								</dl>';
1008
+	}
974 1009
 
975
-	if (empty($context['settings_save_dont_show']))
976
-		echo '
1010
+	if (empty($context['settings_save_dont_show'])) {
1011
+			echo '
977 1012
 								<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button">';
1013
+	}
978 1014
 
979
-	if ($is_open)
980
-		echo '
1015
+	if ($is_open) {
1016
+			echo '
981 1017
 							</div><!-- .windowbg -->';
1018
+	}
982 1019
 
983 1020
 
984 1021
 	// At least one token has to be used!
985
-	if (isset($context['admin-ssc_token']))
986
-		echo '
1022
+	if (isset($context['admin-ssc_token'])) {
1023
+			echo '
987 1024
 							<input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">';
1025
+	}
988 1026
 
989
-	if (isset($context['admin-dbsc_token']))
990
-		echo '
1027
+	if (isset($context['admin-dbsc_token'])) {
1028
+			echo '
991 1029
 							<input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">';
1030
+	}
992 1031
 
993
-	if (isset($context['admin-mp_token']))
994
-		echo '
1032
+	if (isset($context['admin-mp_token'])) {
1033
+			echo '
995 1034
 							<input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">';
1035
+	}
996 1036
 
997 1037
 	echo '
998 1038
 							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
999 1039
 						</form>
1000 1040
 					</div><!-- #admincenter -->';
1001 1041
 
1002
-	if (!empty($context['settings_post_javascript']))
1003
-		echo '
1042
+	if (!empty($context['settings_post_javascript'])) {
1043
+			echo '
1004 1044
 					<script>
1005 1045
 						', $context['settings_post_javascript'], '
1006 1046
 					</script>';
1047
+	}
1007 1048
 
1008
-	if (!empty($context['settings_insert_below']))
1009
-		echo $context['settings_insert_below'];
1049
+	if (!empty($context['settings_insert_below'])) {
1050
+			echo $context['settings_insert_below'];
1051
+	}
1010 1052
 
1011 1053
 	// We may have added a board listing. If we did, we need to make it work.
1012 1054
 	addInlineJavascript('
@@ -1029,9 +1071,10 @@  discard block
 block discarded – undo
1029 1071
 {
1030 1072
 	global $context, $txt;
1031 1073
 
1032
-	if (!empty($context['saved_successful']))
1033
-		echo '
1074
+	if (!empty($context['saved_successful'])) {
1075
+			echo '
1034 1076
 					<div class="infobox">', $txt['settings_saved'], '</div>';
1077
+	}
1035 1078
 
1036 1079
 	// Standard fields.
1037 1080
 	template_show_list('standard_profile_fields');
@@ -1065,11 +1108,12 @@  discard block
 block discarded – undo
1065 1108
 	{
1066 1109
 		loadLanguage('Errors');
1067 1110
 
1068
-		if (isset($txt['custom_option_' . $_GET['msg']]))
1069
-			echo '
1111
+		if (isset($txt['custom_option_' . $_GET['msg']])) {
1112
+					echo '
1070 1113
 					<div class="errorbox">',
1071 1114
 						$txt['custom_option_' . $_GET['msg']], '
1072 1115
 					</div>';
1116
+		}
1073 1117
 	}
1074 1118
 
1075 1119
 	echo '
@@ -1136,9 +1180,10 @@  discard block
 block discarded – undo
1136 1180
 										<dd>
1137 1181
 											<select name="placement" id="placement">';
1138 1182
 
1139
-	foreach ($context['cust_profile_fields_placement'] as $order => $name)
1140
-		echo '
1183
+	foreach ($context['cust_profile_fields_placement'] as $order => $name) {
1184
+			echo '
1141 1185
 												<option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>';
1186
+	}
1142 1187
 
1143 1188
 	echo '
1144 1189
 											</select>
@@ -1162,9 +1207,10 @@  discard block
 block discarded – undo
1162 1207
 										<dd>
1163 1208
 											<select name="field_type" id="field_type" onchange="updateInputBoxes();">';
1164 1209
 
1165
-	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type)
1166
-		echo '
1210
+	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) {
1211
+			echo '
1167 1212
 												<option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>';
1213
+	}
1168 1214
 
1169 1215
 	echo '
1170 1216
 											</select>
@@ -1196,9 +1242,10 @@  discard block
 block discarded – undo
1196 1242
 										</dt>
1197 1243
 										<dd id="options_dd">';
1198 1244
 
1199
-	foreach ($context['field']['options'] as $k => $option)
1200
-		echo '
1245
+	foreach ($context['field']['options'] as $k => $option) {
1246
+			echo '
1201 1247
 											', $k == 0 ? '' : '<br>', '<input type="radio" name="default_select" value="', $k, '"', $context['field']['default_select'] == $option ? ' checked' : '', '><input type="text" name="select_option[', $k, ']" value="', $option, '">';
1248
+	}
1202 1249
 
1203 1250
 	echo '
1204 1251
 											<span id="addopt"></span>
@@ -1262,9 +1309,10 @@  discard block
 block discarded – undo
1262 1309
 								</fieldset>
1263 1310
 								<input type="submit" name="save" value="', $txt['save'], '" class="button">';
1264 1311
 
1265
-	if ($context['fid'])
1266
-		echo '
1312
+	if ($context['fid']) {
1313
+			echo '
1267 1314
 								<input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button you_sure">';
1315
+	}
1268 1316
 
1269 1317
 	echo '
1270 1318
 							</div><!-- .windowbg -->
@@ -1311,8 +1359,7 @@  discard block
 block discarded – undo
1311 1359
 							<p class="centertext">
1312 1360
 								<strong>', $txt['admin_search_results_none'], '</strong>
1313 1361
 							</p>';
1314
-	}
1315
-	else
1362
+	} else
1316 1363
 	{
1317 1364
 		echo '
1318 1365
 							<ol class="search_results">';
@@ -1339,9 +1386,10 @@  discard block
 block discarded – undo
1339 1386
 								<li>
1340 1387
 									<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']';
1341 1388
 
1342
-				if ($result['help'])
1343
-					echo '
1389
+				if ($result['help']) {
1390
+									echo '
1344 1391
 									<p class="double_height">', $result['help'], '</p>';
1392
+				}
1345 1393
 
1346 1394
 				echo '
1347 1395
 								</li>';
@@ -1381,10 +1429,11 @@  discard block
 block discarded – undo
1381 1429
 									<strong>', $txt['setup_verification_answer'], '</strong>
1382 1430
 								</dd>';
1383 1431
 
1384
-		if (!empty($context['qa_by_lang'][$lang_id]))
1385
-			foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1432
+		if (!empty($context['qa_by_lang'][$lang_id])) {
1433
+					foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1386 1434
 			{
1387 1435
 				$question = $context['question_answers'][$q_id];
1436
+		}
1388 1437
 
1389 1438
 				echo '
1390 1439
 								<dt>
@@ -1392,9 +1441,10 @@  discard block
 block discarded – undo
1392 1441
 								</dt>
1393 1442
 								<dd>';
1394 1443
 
1395
-				foreach ($question['answers'] as $answer)
1396
-					echo '
1444
+				foreach ($question['answers'] as $answer) {
1445
+									echo '
1397 1446
 									<input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="verification_answer">';
1447
+				}
1398 1448
 
1399 1449
 				echo '
1400 1450
 									<div class="qa_add_answer"><a href="javascript:void(0);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div>
@@ -1433,11 +1483,12 @@  discard block
 block discarded – undo
1433 1483
 							', $txt['errors_found'], ':
1434 1484
 							<ul>';
1435 1485
 
1436
-			foreach ($context['repair_errors'] as $error)
1437
-				echo '
1486
+			foreach ($context['repair_errors'] as $error) {
1487
+							echo '
1438 1488
 								<li>
1439 1489
 									', $error, '
1440 1490
 								</li>';
1491
+			}
1441 1492
 
1442 1493
 			echo '
1443 1494
 							</ul>
@@ -1447,15 +1498,14 @@  discard block
 block discarded – undo
1447 1498
 							<p class="padding">
1448 1499
 								<strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong>
1449 1500
 							</p>';
1450
-		}
1451
-		else
1452
-			echo '
1501
+		} else {
1502
+					echo '
1453 1503
 							<p>', $txt['maintain_no_errors'], '</p>
1454 1504
 							<p class="padding">
1455 1505
 								<a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a>
1456 1506
 							</p>';
1457
-	}
1458
-	else
1507
+		}
1508
+	} else
1459 1509
 	{
1460 1510
 		if (!empty($context['redirect_to_recount']))
1461 1511
 		{
@@ -1467,8 +1517,7 @@  discard block
 block discarded – undo
1467 1517
 								<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1468 1518
 								<input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '">
1469 1519
 							</form>';
1470
-		}
1471
-		else
1520
+		} else
1472 1521
 		{
1473 1522
 			echo '
1474 1523
 							<p>', $txt['errors_fixed'], '</p>
@@ -1559,9 +1608,10 @@  discard block
 block discarded – undo
1559 1608
 								<tr class="windowbg">
1560 1609
 									<td class="equal_table">', $key, '</td>';
1561 1610
 
1562
-				foreach ($setting as $key_lm => $value)
1563
-					echo '
1611
+				foreach ($setting as $key_lm => $value) {
1612
+									echo '
1564 1613
 									<td class="equal_table">', $value, '</td>';
1614
+				}
1565 1615
 
1566 1616
 				echo '
1567 1617
 								</tr>';
@@ -1621,8 +1671,8 @@  discard block
 block discarded – undo
1621 1671
 {
1622 1672
 	global $context, $txt;
1623 1673
 
1624
-	if ($context['user']['is_admin'])
1625
-		echo '
1674
+	if ($context['user']['is_admin']) {
1675
+			echo '
1626 1676
 								<span class="floatright admin_search">
1627 1677
 									<span class="generic_icons filter centericon"></span>
1628 1678
 									<input type="search" name="search_term" placeholder="', $txt['admin_search'], '">
@@ -1633,6 +1683,7 @@  discard block
 block discarded – undo
1633 1683
 									</select>
1634 1684
 									<input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button">
1635 1685
 								</span>';
1636
-}
1686
+	}
1687
+	}
1637 1688
 
1638 1689
 ?>
1639 1690
\ No newline at end of file
Please login to merge, or discard this patch.