Completed
Push — release-2.1 ( 22b3cf...3bcfde )
by Michael
12:41 queued 06:00
created
Themes/default/ManageAttachments.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
 					}
177 177
 
178 178
 					function show_msg() {
179
-						$(\'#progress_msg\').html(\'<div><img src="', $settings['actual_images_url'], '/loading_sm.gif" alt="', $txt['ajax_in_progress'], '" width="35" height="35">&nbsp; ', $txt['attachment_transfer_progress'] , '<\/div>\');
179
+						$(\'#progress_msg\').html(\'<div><img src="', $settings['actual_images_url'], '/loading_sm.gif" alt="', $txt['ajax_in_progress'], '" width="35" height="35">&nbsp; ', $txt['attachment_transfer_progress'], '<\/div>\');
180 180
 						show_progress();
181 181
 					}
182 182
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -14 removed lines patch added patch discarded remove patch
@@ -116,9 +116,10 @@  discard block
 block discarded – undo
116 116
 				<h3 class="catbg">', $txt['attachment_transfer'], '</h3>
117 117
 			</div>';
118 118
 
119
-	if (!empty($context['results']))
120
-		echo '
119
+	if (!empty($context['results'])) {
120
+			echo '
121 121
 			<div class="noticebox">', $context['results'], '</div>';
122
+	}
122 123
 
123 124
 	echo '
124 125
 			<div class="windowbg2 noup">
@@ -129,9 +130,10 @@  discard block
 block discarded – undo
129 130
 						<dd><select name="from">
130 131
 							<option value="0">', $txt['attachment_transfer_select'], '</option>';
131 132
 
132
-	foreach ($context['attach_dirs'] as $id => $dir)
133
-		echo '
133
+	foreach ($context['attach_dirs'] as $id => $dir) {
134
+			echo '
134 135
 							<option value="', $id, '">', $dir, '</option>';
136
+	}
135 137
 	echo '
136 138
 						</select></dd>
137 139
 						<dt>', $txt['attachment_transfer_auto'], '</dt>
@@ -139,13 +141,14 @@  discard block
 block discarded – undo
139 141
 							<option value="0">', $txt['attachment_transfer_auto_select'], '</option>
140 142
 							<option value="-1">', $txt['attachment_transfer_forum_root'], '</option>';
141 143
 
142
-	if (!empty($context['base_dirs']))
143
-		foreach ($context['base_dirs'] as $id => $dir)
144
+	if (!empty($context['base_dirs'])) {
145
+			foreach ($context['base_dirs'] as $id => $dir)
144 146
 			echo '
145 147
 							<option value="', $id, '">', $dir, '</option>';
146
-	else
147
-			echo '
148
+	} else {
149
+				echo '
148 150
 							<option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>';
151
+	}
149 152
 
150 153
 	echo '
151 154
 						</select></dd>
@@ -153,16 +156,18 @@  discard block
 block discarded – undo
153 156
 						<dd><select name="to">
154 157
 							<option value="0">', $txt['attachment_transfer_select'], '</option>';
155 158
 
156
-	foreach ($context['attach_dirs'] as $id => $dir)
157
-		echo '
159
+	foreach ($context['attach_dirs'] as $id => $dir) {
160
+			echo '
158 161
 							<option value="', $id, '">', $dir, '</option>';
162
+	}
159 163
 	echo '
160 164
 						</select></dd>';
161 165
 
162
-	if (!empty($modSettings['attachmentDirFileLimit']))
163
-		echo '
166
+	if (!empty($modSettings['attachmentDirFileLimit'])) {
167
+			echo '
164 168
 						<dt>', $txt['attachment_transfer_empty'], '</dt>
165 169
 						<dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>';
170
+	}
166 171
 	echo '
167 172
 					</dl>
168 173
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -238,10 +243,11 @@  discard block
 block discarded – undo
238 243
 		// Loop through each error reporting the status
239 244
 		foreach ($context['repair_errors'] as $error => $number)
240 245
 		{
241
-			if (!empty($number))
242
-			echo '
246
+			if (!empty($number)) {
247
+						echo '
243 248
 				<input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '" class="input_check">
244 249
 				<label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>';
250
+			}
245 251
 		}
246 252
 
247 253
 		echo '		<br>
Please login to merge, or discard this patch.
Themes/default/ManageNews.template.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	// Are we done sending the newsletter?
21 21
 	if (!empty($context['newsletter_sent']))
22 22
 		echo '
23
-	<div class="infobox">', $txt['admin_news_newsletter_'. $context['newsletter_sent']] ,'</div>';
23
+	<div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>';
24 24
 
25 25
 	echo '
26 26
 	<div id="admincenter">
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		<form name="newsmodify" action="', $scripturl, '?action=admin;area=news;sa=mailingsend" method="post" accept-charset="', $context['character_set'], '">
201 201
 			<div class="cat_bar">
202 202
 				<h3 class="catbg">
203
-					<a href="', $scripturl, '?action=helpadmin;help=email_members" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['admin_newsletters'], '
203
+					<a href="', $scripturl, '?action=helpadmin;help=email_members" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['admin_newsletters'], '
204 204
 				</h3>
205 205
 			</div>
206 206
 			<div class="information">
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 				<div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
211 211
 					<dl>
212 212
 						<dt>
213
-							<strong id="error_serious">', $txt['error_while_submitting'] , '</strong>
213
+							<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
214 214
 						</dt>
215 215
 						<dd class="error" id="error_list">
216 216
 							', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), '
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 						<span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span>
223 223
 					</dt>
224 224
 					<dd id="pm_subject">
225
-						<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60"',isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/>
225
+						<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="60" maxlength="60"', isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/>
226 226
 					</dd>
227 227
 				</dl><hr class="clear">
228 228
 				<div id="bbcBox_message"></div>';
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		<form action="', $scripturl, '?action=admin;area=news;sa=mailingsend" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">
388 388
 			<div class="cat_bar">
389 389
 				<h3 class="catbg">
390
-					<a href="', $scripturl, '?action=helpadmin;help=email_members" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['admin_newsletters'], '
390
+					<a href="', $scripturl, '?action=helpadmin;help=email_members" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['admin_newsletters'], '
391 391
 				</h3>
392 392
 			</div>
393 393
 			<div class="windowbg">
Please login to merge, or discard this patch.
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,9 +18,10 @@  discard block
 block discarded – undo
18 18
 	global $context, $txt, $scripturl;
19 19
 
20 20
 	// Are we done sending the newsletter?
21
-	if (!empty($context['newsletter_sent']))
22
-		echo '
21
+	if (!empty($context['newsletter_sent'])) {
22
+			echo '
23 23
 	<div class="infobox">', $txt['admin_news_newsletter_'. $context['newsletter_sent']] ,'</div>';
24
+	}
24 25
 
25 26
 	echo '
26 27
 	<div id="admincenter">
@@ -39,9 +40,10 @@  discard block
 block discarded – undo
39 40
 					</dt>
40 41
 					<dd>';
41 42
 
42
-	foreach ($context['groups'] as $group)
43
-				echo '
43
+	foreach ($context['groups'] as $group) {
44
+					echo '
44 45
 						<label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
46
+	}
45 47
 
46 48
 	echo '
47 49
 						<br>
@@ -82,9 +84,10 @@  discard block
 block discarded – undo
82 84
 						</dt>
83 85
 						<dd>';
84 86
 
85
-	foreach ($context['groups'] as $group)
86
-				echo '
87
+	foreach ($context['groups'] as $group) {
88
+					echo '
87 89
 							<label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '" class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
90
+	}
88 91
 
89 92
 	echo '
90 93
 							<br>
@@ -228,9 +231,10 @@  discard block
 block discarded – undo
228 231
 				<div id="bbcBox_message"></div>';
229 232
 
230 233
 	// What about smileys?
231
-	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
232
-		echo '
234
+	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) {
235
+			echo '
233 236
 				<div id="smileyBox_message"></div>';
237
+	}
234 238
 
235 239
 	// Show BBC buttons, smileys and textbox.
236 240
 	echo '
@@ -251,9 +255,10 @@  discard block
 block discarded – undo
251 255
 			<input type="hidden" name="email_force" value="', $context['email_force'], '">
252 256
 			<input type="hidden" name="total_emails" value="', $context['total_emails'], '">';
253 257
 
254
-	foreach ($context['recipients'] as $key => $values)
255
-		echo '
258
+	foreach ($context['recipients'] as $key => $values) {
259
+			echo '
256 260
 			<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
261
+	}
257 262
 
258 263
 	echo '
259 264
 		<script>';
@@ -408,9 +413,10 @@  discard block
 block discarded – undo
408 413
 				<input type="hidden" name="parse_html" value="', $context['parse_html'], '">';
409 414
 
410 415
 	// All the things we must remember!
411
-	foreach ($context['recipients'] as $key => $values)
412
-		echo '
416
+	foreach ($context['recipients'] as $key => $values) {
417
+			echo '
413 418
 				<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
419
+	}
414 420
 
415 421
 	echo '
416 422
 			</div>
@@ -443,9 +449,10 @@  discard block
 block discarded – undo
443 449
 {
444 450
 	global $context, $txt;
445 451
 
446
-	if (!empty($context['saved_successful']))
447
-		echo '
452
+	if (!empty($context['saved_successful'])) {
453
+			echo '
448 454
 					<div class="infobox">', $txt['settings_saved'], '</div>';
455
+	}
449 456
 
450 457
 	template_show_list('news_lists');
451 458
 }
Please login to merge, or discard this patch.
Themes/default/Admin.template.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 							<div id="live_news" class="floatleft">
34 34
 								<div class="cat_bar">
35 35
 									<h3 class="catbg">
36
-										<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['live'], '
36
+										<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['live'], '
37 37
 									</h3>
38 38
 								</div>
39 39
 								<div class="windowbg nopadding">
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 								<tbody>
506 506
 									<tr class="windowbg">
507 507
 										<td class="half_table">
508
-											<a href="#" id="Tasks-link">', $txt['dvc_tasks'] ,'</a>
508
+											<a href="#" id="Tasks-link">', $txt['dvc_tasks'], '</a>
509 509
 										</td>
510 510
 										<td class="quarter_table">
511 511
 											<em id="yourTasks">??</em>
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 				echo '
769 769
 							<div class="cat_bar">
770 770
 								<h3 class="', !empty($config_var['class']) ? $config_var['class'] : 'catbg', '"', !empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '"' : '', '>
771
-									', ($config_var['help'] ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $config_var['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="'. $txt['help'].'"></span></a>' : ''), '
771
+									', ($config_var['help'] ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $config_var['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a>' : ''), '
772 772
 									', $config_var['label'], '
773 773
 								</h3>
774 774
 							</div>';
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 				// Show the [?] button.
831 831
 				if ($config_var['help'])
832 832
 					echo '
833
-							<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> ';
833
+							<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> ';
834 834
 
835 835
 				echo '
836 836
 										<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>
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 					$max = isset($config_var['max']) ? ' max="' . $config_var['max'] . '"' : '';
935 935
 
936 936
 					echo '
937
-											<input type="', $type ,'"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '" value="', $config_var['value'], '"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_text"', $min . $max . $step, '>';
937
+											<input type="', $type, '"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '" value="', $config_var['value'], '"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_text"', $min . $max . $step, '>';
938 938
 				}
939 939
 
940 940
 				echo isset($config_var['postinput']) ? '
@@ -1126,13 +1126,13 @@  discard block
 block discarded – undo
1126 1126
 
1127 1127
 	foreach ($context['cust_profile_fields_placement'] as $order => $name)
1128 1128
 		echo '
1129
-												<option value="', $order ,'"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_'. $name], '</option>';
1129
+												<option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>';
1130 1130
 
1131 1131
 	echo '
1132 1132
 											</select>
1133 1133
 										</dd>
1134 1134
 										<dt>
1135
-											<a id="field_show_enclosed" href="', $scripturl, '?action=helpadmin;help=field_show_enclosed" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1135
+											<a id="field_show_enclosed" href="', $scripturl, '?action=helpadmin;help=field_show_enclosed" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1136 1136
 											<strong><label for="enclose">', $txt['custom_edit_enclose'], ':</label></strong><br>
1137 1137
 											<span class="smalltext">', $txt['custom_edit_enclose_desc'], '</span>
1138 1138
 										</dt>
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 											<input type="checkbox" name="bbc" id="bbc_dd"', $context['field']['bbc'] ? ' checked' : '', ' class="input_check">
1178 1178
 										</dd>
1179 1179
 										<dt id="options_dt">
1180
-											<a href="', $scripturl, '?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1180
+											<a href="', $scripturl, '?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1181 1181
 											<strong><label for="options_dd">', $txt['custom_edit_options'], ':</label></strong><br>
1182 1182
 											<span class="smalltext">', $txt['custom_edit_options_desc'], '</span>
1183 1183
 										</dt>
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
 									<legend>', $txt['custom_edit_advanced'], '</legend>
1207 1207
 									<dl class="settings">
1208 1208
 										<dt id="mask_dt">
1209
-											<a id="custom_mask" href="', $scripturl, '?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1209
+											<a id="custom_mask" href="', $scripturl, '?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1210 1210
 											<strong><label for="mask">', $txt['custom_edit_mask'], ':</label></strong><br>
1211 1211
 											<span class="smalltext">', $txt['custom_edit_mask_desc'], '</span>
1212 1212
 										</dt>
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 			{
1323 1323
 				echo '
1324 1324
 							<li>
1325
-								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']';
1325
+								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']';
1326 1326
 
1327 1327
 				if ($result['help'])
1328 1328
 					echo '
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
 					<div id="admincenter">
1403 1403
 						<div id="section_header" class="cat_bar">
1404 1404
 							<h3 class="catbg">',
1405
-								$context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'] , '
1405
+								$context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'], '
1406 1406
 							</h3>
1407 1407
 						</div>
1408 1408
 						<div class="windowbg">';
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 			{
1556 1556
 				echo '
1557 1557
 								<tr class="windowbg">
1558
-									<td class="equal_table">', $key,  '</td>
1558
+									<td class="equal_table">', $key, '</td>
1559 1559
 									<td colspan="2">', $setting, '</td>
1560 1560
 								</tr>';
1561 1561
 			}
Please login to merge, or discard this patch.
Braces   +173 added lines, -125 removed lines patch added patch discarded remove patch
@@ -64,9 +64,10 @@  discard block
 block discarded – undo
64 64
 										<strong>', $txt['administrators'], ':</strong>
65 65
 										', implode(', ', $context['administrators']);
66 66
 	// If we have lots of admins... don't show them all.
67
-	if (!empty($context['more_admins_link']))
68
-		echo '
67
+	if (!empty($context['more_admins_link'])) {
68
+			echo '
69 69
 							(', $context['more_admins_link'], ')';
70
+	}
70 71
 
71 72
 	echo '
72 73
 									</div>
@@ -83,16 +84,18 @@  discard block
 block discarded – undo
83 84
 		foreach ($area['areas'] as $item_id => $item)
84 85
 		{
85 86
 			// No point showing the 'home' page here, we're already on it!
86
-			if ($area_id == 'forum' && $item_id == 'index')
87
-				continue;
87
+			if ($area_id == 'forum' && $item_id == 'index') {
88
+							continue;
89
+			}
88 90
 
89 91
 			$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'] : '');
90
-			if (!empty($item['icon_file']))
91
-				echo '
92
+			if (!empty($item['icon_file'])) {
93
+							echo '
92 94
 							<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>';
93
-			else
94
-				echo '
95
+			} else {
96
+							echo '
95 97
 							<a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>';
98
+			}
96 99
 		}
97 100
 
98 101
 		echo '
@@ -103,10 +106,11 @@  discard block
 block discarded – undo
103 106
 					</div>';
104 107
 
105 108
 	// The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization.
106
-	if (empty($modSettings['disable_smf_js']))
107
-		echo '
109
+	if (empty($modSettings['disable_smf_js'])) {
110
+			echo '
108 111
 					<script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
109 112
 					<script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>';
113
+	}
110 114
 
111 115
 	// This sets the announcements and current versions themselves ;).
112 116
 	echo '
@@ -185,9 +189,10 @@  discard block
 block discarded – undo
185 189
 								<em>', $version['version'], '</em>';
186 190
 
187 191
 		// more details for this item, show them a link
188
-		if ($context['can_admin'] && isset($version['more']))
189
-			echo
192
+		if ($context['can_admin'] && isset($version['more'])) {
193
+					echo
190 194
 								' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>';
195
+		}
191 196
 		echo '
192 197
 								<br>';
193 198
 	}
@@ -218,20 +223,22 @@  discard block
 block discarded – undo
218 223
 
219 224
 	foreach ($context['credits'] as $section)
220 225
 	{
221
-		if (isset($section['pretext']))
222
-			echo '
226
+		if (isset($section['pretext'])) {
227
+					echo '
223 228
 								<p>', $section['pretext'], '</p><hr>';
229
+		}
224 230
 
225 231
 		echo '
226 232
 								<dl>';
227 233
 
228 234
 		foreach ($section['groups'] as $group)
229 235
 		{
230
-			if (isset($group['title']))
231
-				echo '
236
+			if (isset($group['title'])) {
237
+							echo '
232 238
 									<dt>
233 239
 										<strong>', $group['title'], ':</strong>
234 240
 									</dt>';
241
+			}
235 242
 
236 243
 			echo '
237 244
 									<dd>', implode(', ', $group['members']), '</dd>';
@@ -240,10 +247,11 @@  discard block
 block discarded – undo
240 247
 		echo '
241 248
 								</dl>';
242 249
 
243
-		if (isset($section['posttext']))
244
-			echo '
250
+		if (isset($section['posttext'])) {
251
+					echo '
245 252
 								<hr>
246 253
 								<p>', $section['posttext'], '</p>';
254
+		}
247 255
 	}
248 256
 
249 257
 	echo '
@@ -259,9 +267,10 @@  discard block
 block discarded – undo
259 267
 							smfSupportVersions.forum = "', $context['forum_version'], '";';
260 268
 
261 269
 	// Don't worry, none of this is logged, it's just used to give information that might be of use.
262
-	foreach ($context['current_versions'] as $variable => $version)
263
-		echo '
270
+	foreach ($context['current_versions'] as $variable => $version) {
271
+			echo '
264 272
 							smfSupportVersions.', $variable, ' = "', $version['version'], '";';
273
+	}
265 274
 
266 275
 	// Now we just have to include the script and wait ;).
267 276
 	echo '
@@ -358,8 +367,8 @@  discard block
 block discarded – undo
358 367
 							<tbody>';
359 368
 
360 369
 	// Loop through every source file displaying its version - using javascript.
361
-	foreach ($context['file_versions'] as $filename => $version)
362
-		echo '
370
+	foreach ($context['file_versions'] as $filename => $version) {
371
+			echo '
363 372
 								<tr class="windowbg">
364 373
 									<td class="half_table">
365 374
 										', $filename, '
@@ -371,6 +380,7 @@  discard block
 block discarded – undo
371 380
 										<em id="currentSources', $filename, '">??</em>
372 381
 									</td>
373 382
 								</tr>';
383
+	}
374 384
 
375 385
 	// Default template files.
376 386
 	echo '
@@ -396,8 +406,8 @@  discard block
 block discarded – undo
396 406
 							<table id="Default" class="table_grid">
397 407
 								<tbody>';
398 408
 
399
-	foreach ($context['default_template_versions'] as $filename => $version)
400
-		echo '
409
+	foreach ($context['default_template_versions'] as $filename => $version) {
410
+			echo '
401 411
 									<tr class="windowbg">
402 412
 										<td class="half_table">
403 413
 											', $filename, '
@@ -409,6 +419,7 @@  discard block
 block discarded – undo
409 419
 											<em id="currentDefault', $filename, '">??</em>
410 420
 										</td>
411 421
 									</tr>';
422
+	}
412 423
 
413 424
 	// Now the language files...
414 425
 	echo '
@@ -436,8 +447,8 @@  discard block
 block discarded – undo
436 447
 
437 448
 	foreach ($context['default_language_versions'] as $language => $files)
438 449
 	{
439
-		foreach ($files as $filename => $version)
440
-			echo '
450
+		foreach ($files as $filename => $version) {
451
+					echo '
441 452
 									<tr class="windowbg">
442 453
 										<td class="half_table">
443 454
 											', $filename, '.<em>', $language, '</em>.php
@@ -449,6 +460,7 @@  discard block
 block discarded – undo
449 460
 											<em id="current', $filename, '.', $language, '">??</em>
450 461
 										</td>
451 462
 									</tr>';
463
+		}
452 464
 	}
453 465
 
454 466
 	echo '
@@ -478,8 +490,8 @@  discard block
 block discarded – undo
478 490
 							<table id="Templates" class="table_grid">
479 491
 								<tbody>';
480 492
 
481
-		foreach ($context['template_versions'] as $filename => $version)
482
-			echo '
493
+		foreach ($context['template_versions'] as $filename => $version) {
494
+					echo '
483 495
 									<tr class="windowbg">
484 496
 										<td class="half_table">
485 497
 											', $filename, '
@@ -491,6 +503,7 @@  discard block
 block discarded – undo
491 503
 											<em id="currentTemplates', $filename, '">??</em>
492 504
 										</td>
493 505
 									</tr>';
506
+		}
494 507
 
495 508
 		echo '
496 509
 								</tbody>
@@ -520,8 +533,8 @@  discard block
 block discarded – undo
520 533
 							<table id="Tasks" class="table_grid">
521 534
 								<tbody>';
522 535
 
523
-		foreach ($context['tasks_versions'] as $filename => $version)
524
-			echo '
536
+		foreach ($context['tasks_versions'] as $filename => $version) {
537
+					echo '
525 538
 									<tr class="windowbg">
526 539
 										<td class="half_table">
527 540
 											', $filename, '
@@ -533,6 +546,7 @@  discard block
 block discarded – undo
533 546
 											<em id="currentTasks', $filename, '">??</em>
534 547
 										</td>
535 548
 									</tr>';
549
+		}
536 550
 
537 551
 		echo '
538 552
 								</tbody>
@@ -574,9 +588,10 @@  discard block
 block discarded – undo
574 588
 {
575 589
 	global $context, $scripturl, $txt, $modSettings;
576 590
 
577
-	if (!empty($context['saved_successful']))
578
-		echo '
591
+	if (!empty($context['saved_successful'])) {
592
+			echo '
579 593
 					<div class="infobox">', $txt['settings_saved'], '</div>';
594
+	}
580 595
 
581 596
 	// First section is for adding/removing words from the censored list.
582 597
 	echo '
@@ -591,11 +606,12 @@  discard block
 block discarded – undo
591 606
 								<p>', $txt['admin_censored_where'], '</p>';
592 607
 
593 608
 	// Show text boxes for censoring [bad   ] => [good  ].
594
-	foreach ($context['censored_words'] as $vulgar => $proper)
595
-		echo '
609
+	foreach ($context['censored_words'] as $vulgar => $proper) {
610
+			echo '
596 611
 								<div class="block">
597 612
 									<input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> =&gt; <input type="text" name="censor_proper[]" value="', $proper, '" size="30">
598 613
 								</div>';
614
+	}
599 615
 
600 616
 	// Now provide a way to censor more words.
601 617
 	echo '
@@ -669,19 +685,21 @@  discard block
 block discarded – undo
669 685
 						<div class="windowbg2 noup">
670 686
 							', $txt['not_done_reason'];
671 687
 
672
-	if (!empty($context['continue_percent']))
673
-		echo '
688
+	if (!empty($context['continue_percent'])) {
689
+			echo '
674 690
 							<div class="progress_bar">
675 691
 								<div class="full_bar">', $context['continue_percent'], '%</div>
676 692
 								<div class="green_percent" style="width: ', $context['continue_percent'], '%;">&nbsp;</div>
677 693
 							</div>';
694
+	}
678 695
 
679
-	if (!empty($context['substep_enabled']))
680
-		echo '
696
+	if (!empty($context['substep_enabled'])) {
697
+			echo '
681 698
 							<div class="progress_bar">
682 699
 								<div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div>
683 700
 								<div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;">&nbsp;</div>
684 701
 							</div>';
702
+	}
685 703
 
686 704
 	echo '
687 705
 							<form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">
@@ -716,35 +734,40 @@  discard block
 block discarded – undo
716 734
 {
717 735
 	global $context, $txt, $settings, $scripturl;
718 736
 
719
-	if (!empty($context['saved_successful']))
720
-		echo '
737
+	if (!empty($context['saved_successful'])) {
738
+			echo '
721 739
 					<div class="infobox">', $txt['settings_saved'], '</div>';
722
-	elseif (!empty($context['saved_failed']))
723
-		echo '
740
+	} elseif (!empty($context['saved_failed'])) {
741
+			echo '
724 742
 					<div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>';
743
+	}
725 744
 
726
-	if (!empty($context['settings_pre_javascript']))
727
-		echo '
745
+	if (!empty($context['settings_pre_javascript'])) {
746
+			echo '
728 747
 					<script>', $context['settings_pre_javascript'], '</script>';
748
+	}
729 749
 
730
-	if (!empty($context['settings_insert_above']))
731
-		echo $context['settings_insert_above'];
750
+	if (!empty($context['settings_insert_above'])) {
751
+			echo $context['settings_insert_above'];
752
+	}
732 753
 
733 754
 	echo '
734 755
 					<div id="admincenter">
735 756
 						<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'] . '"' : '', '>';
736 757
 
737 758
 	// Is there a custom title?
738
-	if (isset($context['settings_title']))
739
-		echo '
759
+	if (isset($context['settings_title'])) {
760
+			echo '
740 761
 							<div class="cat_bar">
741 762
 								<h3 class="catbg">', $context['settings_title'], '</h3>
742 763
 							</div>';
764
+	}
743 765
 
744 766
 	// Have we got a message to display?
745
-	if (!empty($context['settings_message']))
746
-		echo '
767
+	if (!empty($context['settings_message'])) {
768
+			echo '
747 769
 							<div class="information">', $context['settings_message'], '</div>';
770
+	}
748 771
 
749 772
 	// Now actually loop through all the variables.
750 773
 	$is_open = false;
@@ -797,8 +820,9 @@  discard block
 block discarded – undo
797 820
 		// Hang about? Are you pulling my leg - a callback?!
798 821
 		if (is_array($config_var) && $config_var['type'] == 'callback')
799 822
 		{
800
-			if (function_exists('template_callback_' . $config_var['name']))
801
-				call_user_func('template_callback_' . $config_var['name']);
823
+			if (function_exists('template_callback_' . $config_var['name'])) {
824
+							call_user_func('template_callback_' . $config_var['name']);
825
+			}
802 826
 
803 827
 			continue;
804 828
 		}
@@ -828,9 +852,10 @@  discard block
 block discarded – undo
828 852
 				$text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time');
829 853
 
830 854
 				// Show the [?] button.
831
-				if ($config_var['help'])
832
-					echo '
855
+				if ($config_var['help']) {
856
+									echo '
833 857
 							<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> ';
858
+				}
834 859
 
835 860
 				echo '
836 861
 										<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>
@@ -839,22 +864,25 @@  discard block
 block discarded – undo
839 864
 										$config_var['preinput'];
840 865
 
841 866
 				// Show a check box.
842
-				if ($config_var['type'] == 'check')
843
-					echo '
867
+				if ($config_var['type'] == 'check') {
868
+									echo '
844 869
 										<input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1" class="input_check">';
870
+				}
845 871
 				// Escape (via htmlspecialchars.) the text box.
846
-				elseif ($config_var['type'] == 'password')
847
-					echo '
872
+				elseif ($config_var['type'] == 'password') {
873
+									echo '
848 874
 										<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;" class="input_password"><br>
849 875
 										<input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_password">';
876
+				}
850 877
 				// Show a selection box.
851 878
 				elseif ($config_var['type'] == 'select')
852 879
 				{
853 880
 					echo '
854 881
 										<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'] . '"' : ''), '>';
855
-					foreach ($config_var['data'] as $option)
856
-						echo '
882
+					foreach ($config_var['data'] as $option) {
883
+											echo '
857 884
 											<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>';
885
+					}
858 886
 					echo '
859 887
 										</select>';
860 888
 				}
@@ -869,15 +897,17 @@  discard block
 block discarded – undo
869 897
 												<legend class="board_selector"><a href="#">', $txt['select_boards_from_list'], '</a></legend>';
870 898
 					foreach ($context['board_list'] as $id_cat => $cat)
871 899
 					{
872
-						if (!$first)
873
-							echo '
900
+						if (!$first) {
901
+													echo '
874 902
 											<hr>';
903
+						}
875 904
 						echo '
876 905
 											<strong>', $cat['name'], '</strong>
877 906
 											<ul>';
878
-						foreach ($cat['boards'] as $id_board => $brd)
879
-							echo '
907
+						foreach ($cat['boards'] as $id_board => $brd) {
908
+													echo '
880 909
 												<li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1" class="input_check"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat('&nbsp; &nbsp;', $brd['child_level']) : '', $brd['name'], '</label></li>';
910
+						}
881 911
 
882 912
 						echo '
883 913
 											</ul>';
@@ -887,12 +917,14 @@  discard block
 block discarded – undo
887 917
 											</fieldset>';
888 918
 				}
889 919
 				// Text area?
890
-				elseif ($config_var['type'] == 'large_text')
891
-					echo '
920
+				elseif ($config_var['type'] == 'large_text') {
921
+									echo '
892 922
 											<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>';
923
+				}
893 924
 				// Permission group?
894
-				elseif ($config_var['type'] == 'permissions')
895
-					theme_inline_permissions($config_var['name']);
925
+				elseif ($config_var['type'] == 'permissions') {
926
+									theme_inline_permissions($config_var['name']);
927
+				}
896 928
 				// BBC selection?
897 929
 				elseif ($config_var['type'] == 'bbc')
898 930
 				{
@@ -903,20 +935,22 @@  discard block
 block discarded – undo
903 935
 
904 936
 					foreach ($context['bbc_columns'] as $bbcColumn)
905 937
 					{
906
-						foreach ($bbcColumn as $bbcTag)
907
-							echo '
938
+						foreach ($bbcColumn as $bbcTag) {
939
+													echo '
908 940
 														<li class="list_bbc floatleft">
909 941
 															<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' : '', ' class="input_check"> <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>)' : '', '
910 942
 														</li>';
943
+						}
911 944
 					}
912 945
 					echo '							</ul>
913 946
 												<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' : '', ' class="input_check"> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label>
914 947
 											</fieldset>';
915 948
 				}
916 949
 				// A simple message?
917
-				elseif ($config_var['type'] == 'var_message')
918
-					echo '
950
+				elseif ($config_var['type'] == 'var_message') {
951
+									echo '
919 952
 											<div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>', $config_var['var_message'], '</div>';
953
+				}
920 954
 				// Assume it must be a text box
921 955
 				else
922 956
 				{
@@ -941,63 +975,70 @@  discard block
 block discarded – undo
941 975
 											' . $config_var['postinput'] : '',
942 976
 										'</dd>';
943 977
 			}
944
-		}
945
-
946
-		else
978
+		} else
947 979
 		{
948 980
 			// Just show a separator.
949
-			if ($config_var == '')
950
-				echo '
981
+			if ($config_var == '') {
982
+							echo '
951 983
 								</dl>
952 984
 								<hr>
953 985
 								<dl class="settings">';
954
-			else
955
-				echo '
986
+			} else {
987
+							echo '
956 988
 									<dd>
957 989
 										<strong>' . $config_var . '</strong>
958 990
 									</dd>';
991
+			}
959 992
 		}
960 993
 	}
961 994
 
962
-	if ($is_open)
963
-		echo '
995
+	if ($is_open) {
996
+			echo '
964 997
 								</dl>';
998
+	}
965 999
 
966
-	if (empty($context['settings_save_dont_show']))
967
-		echo '
1000
+	if (empty($context['settings_save_dont_show'])) {
1001
+			echo '
968 1002
 								<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit">';
1003
+	}
969 1004
 
970
-	if ($is_open)
971
-		echo '
1005
+	if ($is_open) {
1006
+			echo '
972 1007
 							</div>';
1008
+	}
973 1009
 
974 1010
 
975 1011
 	// At least one token has to be used!
976
-	if (isset($context['admin-ssc_token']))
977
-		echo '
1012
+	if (isset($context['admin-ssc_token'])) {
1013
+			echo '
978 1014
 							<input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">';
1015
+	}
979 1016
 
980
-	if (isset($context['admin-dbsc_token']))
981
-		echo '
1017
+	if (isset($context['admin-dbsc_token'])) {
1018
+			echo '
982 1019
 							<input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">';
1020
+	}
983 1021
 
984
-	if (isset($context['admin-mp_token']))
985
-		echo '
1022
+	if (isset($context['admin-mp_token'])) {
1023
+			echo '
986 1024
 							<input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">';
1025
+	}
987 1026
 
988 1027
 	echo '
989 1028
 							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
990 1029
 						</form>
991 1030
 					</div>';
992 1031
 
993
-	if (!empty($context['settings_post_javascript']))
994
-		echo '
1032
+	if (!empty($context['settings_post_javascript'])) {
1033
+			echo '
995 1034
 					<script>
996 1035
 					', $context['settings_post_javascript'], '
997 1036
 					</script>';
1037
+	}
998 1038
 
999
-	if (!empty($context['settings_insert_below']))
1000
-		echo $context['settings_insert_below'];
1039
+	if (!empty($context['settings_insert_below'])) {
1040
+			echo $context['settings_insert_below'];
1041
+	}
1001 1042
 
1002 1043
 	// We may have added a board listing. If we did, we need to make it work.
1003 1044
 	addInlineJavascript('
@@ -1020,9 +1061,10 @@  discard block
 block discarded – undo
1020 1061
 {
1021 1062
 	global $context, $txt;
1022 1063
 
1023
-	if (!empty($context['saved_successful']))
1024
-		echo '
1064
+	if (!empty($context['saved_successful'])) {
1065
+			echo '
1025 1066
 					<div class="infobox">', $txt['settings_saved'], '</div>';
1067
+	}
1026 1068
 
1027 1069
 	// Standard fields.
1028 1070
 	template_show_list('standard_profile_fields');
@@ -1054,11 +1096,12 @@  discard block
 block discarded – undo
1054 1096
 	if (isset($_GET['msg']))
1055 1097
 	{
1056 1098
 		loadLanguage('Errors');
1057
-		if (isset($txt['custom_option_' . $_GET['msg']]))
1058
-			echo '
1099
+		if (isset($txt['custom_option_' . $_GET['msg']])) {
1100
+					echo '
1059 1101
 					<div class="errorbox">',
1060 1102
 						$txt['custom_option_' . $_GET['msg']], '
1061 1103
 					</div>';
1104
+		}
1062 1105
 	}
1063 1106
 
1064 1107
 	echo '
@@ -1124,9 +1167,10 @@  discard block
 block discarded – undo
1124 1167
 										<dd>
1125 1168
 											<select name="placement" id="placement">';
1126 1169
 
1127
-	foreach ($context['cust_profile_fields_placement'] as $order => $name)
1128
-		echo '
1170
+	foreach ($context['cust_profile_fields_placement'] as $order => $name) {
1171
+			echo '
1129 1172
 												<option value="', $order ,'"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_'. $name], '</option>';
1173
+	}
1130 1174
 
1131 1175
 	echo '
1132 1176
 											</select>
@@ -1149,9 +1193,10 @@  discard block
 block discarded – undo
1149 1193
 										</dt>
1150 1194
 										<dd>
1151 1195
 											<select name="field_type" id="field_type" onchange="updateInputBoxes();">';
1152
-	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type)
1153
-		echo '
1196
+	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) {
1197
+			echo '
1154 1198
 												<option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>';
1199
+	}
1155 1200
 
1156 1201
 	echo '
1157 1202
 											</select>
@@ -1252,9 +1297,10 @@  discard block
 block discarded – undo
1252 1297
 								</fieldset>
1253 1298
 									<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">';
1254 1299
 
1255
-	if ($context['fid'])
1256
-		echo '
1300
+	if ($context['fid']) {
1301
+			echo '
1257 1302
 									<input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button_submit you_sure">';
1303
+	}
1258 1304
 
1259 1305
 	echo '
1260 1306
 							</div>
@@ -1297,8 +1343,7 @@  discard block
 block discarded – undo
1297 1343
 	{
1298 1344
 		echo '
1299 1345
 						<p class="centertext"><strong>', $txt['admin_search_results_none'], '</strong></p>';
1300
-	}
1301
-	else
1346
+	} else
1302 1347
 	{
1303 1348
 		echo '
1304 1349
 						<ol class="search_results">';
@@ -1324,9 +1369,10 @@  discard block
 block discarded – undo
1324 1369
 							<li>
1325 1370
 								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']';
1326 1371
 
1327
-				if ($result['help'])
1328
-					echo '
1372
+				if ($result['help']) {
1373
+									echo '
1329 1374
 								<p class="double_height">', $result['help'], '</p>';
1375
+				}
1330 1376
 
1331 1377
 				echo '
1332 1378
 							</li>';
@@ -1366,18 +1412,20 @@  discard block
 block discarded – undo
1366 1412
 									<strong>', $txt['setup_verification_answer'], '</strong>
1367 1413
 								</dd>';
1368 1414
 
1369
-		if (!empty($context['qa_by_lang'][$lang_id]))
1370
-			foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1415
+		if (!empty($context['qa_by_lang'][$lang_id])) {
1416
+					foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1371 1417
 			{
1372 1418
 				$question = $context['question_answers'][$q_id];
1419
+		}
1373 1420
 				echo '
1374 1421
 								<dt>
1375 1422
 									<input type="text" name="question[', $lang_id, '][', $q_id, ']" value="', $question['question'], '" size="50" class="input_text verification_question">
1376 1423
 								</dt>
1377 1424
 								<dd>';
1378
-				foreach ($question['answers'] as $answer)
1379
-					echo '
1425
+				foreach ($question['answers'] as $answer) {
1426
+									echo '
1380 1427
 									<input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="input_text verification_answer">';
1428
+				}
1381 1429
 
1382 1430
 				echo '
1383 1431
 									<div class="qa_add_answer"><a href="javascript:void(0);" onclick="return addAnswer(this);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div>
@@ -1416,11 +1464,12 @@  discard block
 block discarded – undo
1416 1464
 							', $txt['errors_found'], ':
1417 1465
 							<ul>';
1418 1466
 
1419
-			foreach ($context['repair_errors'] as $error)
1420
-				echo '
1467
+			foreach ($context['repair_errors'] as $error) {
1468
+							echo '
1421 1469
 								<li>
1422 1470
 									', $error, '
1423 1471
 								</li>';
1472
+			}
1424 1473
 
1425 1474
 			echo '
1426 1475
 							</ul>
@@ -1430,16 +1479,15 @@  discard block
 block discarded – undo
1430 1479
 							<p class="padding">
1431 1480
 								<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>
1432 1481
 							</p>';
1433
-		}
1434
-		else
1435
-			echo '
1482
+		} else {
1483
+					echo '
1436 1484
 							<p>', $txt['maintain_no_errors'], '</p>
1437 1485
 							<p class="padding">
1438 1486
 								<a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a>
1439 1487
 							</p>';
1488
+		}
1440 1489
 
1441
-	}
1442
-	else
1490
+	} else
1443 1491
 	{
1444 1492
 		if (!empty($context['redirect_to_recount']))
1445 1493
 		{
@@ -1451,8 +1499,7 @@  discard block
 block discarded – undo
1451 1499
 								<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1452 1500
 								<input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '">
1453 1501
 							</form>';
1454
-		}
1455
-		else
1502
+		} else
1456 1503
 		{
1457 1504
 			echo '
1458 1505
 							<p>', $txt['errors_fixed'], '</p>
@@ -1604,8 +1651,8 @@  discard block
 block discarded – undo
1604 1651
 function template_admin_quick_search()
1605 1652
 {
1606 1653
 	global $context, $txt, $scripturl;
1607
-	if ($context['user']['is_admin'])
1608
-		echo '
1654
+	if ($context['user']['is_admin']) {
1655
+			echo '
1609 1656
 								<span class="floatright">
1610 1657
 									<span class="generic_icons filter centericon"></span>
1611 1658
 									<input type="search" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text">
@@ -1616,6 +1663,7 @@  discard block
 block discarded – undo
1616 1663
 									</select>
1617 1664
 									<input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button_submit">
1618 1665
 								</span>';
1619
-}
1666
+	}
1667
+	}
1620 1668
 
1621 1669
 ?>
Please login to merge, or discard this patch.
Themes/default/Register.template.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
151 151
 							<span class="smalltext">', $field['desc'], '</span>
152 152
 						</dt>
153
-						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
153
+						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>';
154 154
 
155 155
 		echo '
156 156
 					</dl>';
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 		<meta charset="', $context['character_set'], '">
437 437
 		<title>', $txt['visual_verification_sound'], '</title>
438 438
 		<meta name="robots" content="noindex">
439
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
439
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
440 440
 		<style>';
441 441
 
442 442
 	// Just show the help text and a "close window" link.
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
543 543
 							<span class="smalltext">', $field['desc'], '</span>
544 544
 						</dt>
545
-						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
545
+						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>';
546 546
 
547 547
 	echo '
548 548
 						<dt>
Please login to merge, or discard this patch.
Braces   +72 added lines, -52 removed lines patch added patch discarded remove patch
@@ -28,13 +28,14 @@  discard block
 block discarded – undo
28 28
 			<div id="confirm_buttons">';
29 29
 
30 30
 	// Age restriction in effect?
31
-	if ($context['show_coppa'])
32
-		echo '
31
+	if ($context['show_coppa']) {
32
+			echo '
33 33
 				<input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button_submit"><br><br>
34 34
 				<input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button_submit">';
35
-	else
36
-		echo '
35
+	} else {
36
+			echo '
37 37
 				<input type="submit" name="accept_agreement" value="', $txt['agreement_agree'], '" class="button_submit">';
38
+	}
38 39
 
39 40
 	echo '
40 41
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -77,9 +78,10 @@  discard block
 block discarded – undo
77 78
 			<ul>';
78 79
 
79 80
 		// Cycle through each error and display an error message.
80
-		foreach ($context['registration_errors'] as $error)
81
-			echo '
81
+		foreach ($context['registration_errors'] as $error) {
82
+					echo '
82 83
 				<li>', $error, '</li>';
84
+		}
83 85
 
84 86
 		echo '
85 87
 			</ul>
@@ -143,14 +145,15 @@  discard block
 block discarded – undo
143 145
 
144 146
 					<dl class="register_form">';
145 147
 
146
-		foreach ($context['custom_fields'] as $field)
147
-			if ($field['show_reg'] > 1)
148
+		foreach ($context['custom_fields'] as $field) {
149
+					if ($field['show_reg'] > 1)
148 150
 				echo '
149 151
 						<dt>
150 152
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
151 153
 							<span class="smalltext">', $field['desc'], '</span>
152 154
 						</dt>
153 155
 						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
156
+		}
154 157
 
155 158
 		echo '
156 159
 					</dl>';
@@ -184,41 +187,45 @@  discard block
 block discarded – undo
184 187
 					$callback_func = 'template_profile_' . $field['callback_func'];
185 188
 					$callback_func();
186 189
 				}
187
-			}
188
-			else
190
+			} else
189 191
 			{
190 192
 					echo '
191 193
 						<dt>
192 194
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['label'], ':</strong>';
193 195
 
194 196
 				// Does it have any subtext to show?
195
-				if (!empty($field['subtext']))
196
-					echo '
197
+				if (!empty($field['subtext'])) {
198
+									echo '
197 199
 							<span class="smalltext">', $field['subtext'], '</span>';
200
+				}
198 201
 
199 202
 				echo '
200 203
 						</dt>
201 204
 						<dd>';
202 205
 
203 206
 				// Want to put something infront of the box?
204
-				if (!empty($field['preinput']))
205
-					echo '
207
+				if (!empty($field['preinput'])) {
208
+									echo '
206 209
 							', $field['preinput'];
210
+				}
207 211
 
208 212
 				// What type of data are we showing?
209
-				if ($field['type'] == 'label')
210
-					echo '
213
+				if ($field['type'] == 'label') {
214
+									echo '
211 215
 							', $field['value'];
216
+				}
212 217
 
213 218
 				// Maybe it's a text box - very likely!
214
-				elseif (in_array($field['type'], array('int', 'float', 'text', 'password')))
215
-					echo '
219
+				elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) {
220
+									echo '
216 221
 							<input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '">';
222
+				}
217 223
 
218 224
 				// You "checking" me out? ;)
219
-				elseif ($field['type'] == 'check')
220
-					echo '
225
+				elseif ($field['type'] == 'check') {
226
+									echo '
221 227
 							<input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" class="input_check" ', $field['input_attr'], '>';
228
+				}
222 229
 
223 230
 				// Always fun - select boxes!
224 231
 				elseif ($field['type'] == 'select')
@@ -229,13 +236,15 @@  discard block
 block discarded – undo
229 236
 					if (isset($field['options']))
230 237
 					{
231 238
 						// Is this some code to generate the options?
232
-						if (!is_array($field['options']))
233
-							$field['options'] = eval($field['options']);
239
+						if (!is_array($field['options'])) {
240
+													$field['options'] = eval($field['options']);
241
+						}
234 242
 						// Assuming we now have some!
235
-						if (is_array($field['options']))
236
-							foreach ($field['options'] as $value => $name)
243
+						if (is_array($field['options'])) {
244
+													foreach ($field['options'] as $value => $name)
237 245
 								echo '
238 246
 								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
247
+						}
239 248
 					}
240 249
 
241 250
 					echo '
@@ -243,9 +252,10 @@  discard block
 block discarded – undo
243 252
 				}
244 253
 
245 254
 				// Something to end with?
246
-				if (!empty($field['postinput']))
247
-					echo '
255
+				if (!empty($field['postinput'])) {
256
+									echo '
248 257
 							', $field['postinput'];
258
+				}
249 259
 
250 260
 				echo '
251 261
 						</dd>';
@@ -258,13 +268,14 @@  discard block
 block discarded – undo
258 268
 	{
259 269
 		foreach ($context['custom_fields'] as $field)
260 270
 		{
261
-			if ($field['show_reg'] < 2)
262
-				echo '
271
+			if ($field['show_reg'] < 2) {
272
+							echo '
263 273
 						<dt>
264 274
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
265 275
 							<span class="smalltext">', $field['desc'], '</span>
266 276
 						</dt>
267 277
 						<dd>', $field['input_html'], '</dd>';
278
+			}
268 279
 		}
269 280
 	}
270 281
 
@@ -294,13 +305,14 @@  discard block
 block discarded – undo
294 305
 			<div id="confirm_buttons" class="flow_auto">';
295 306
 
296 307
 	// Age restriction in effect?
297
-	if (!$context['require_agreement'] && $context['show_coppa'])
298
-		echo '
308
+	if (!$context['require_agreement'] && $context['show_coppa']) {
309
+			echo '
299 310
 				<input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button_submit"><br><br>
300 311
 				<input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button_submit">';
301
-	else
302
-		echo '
312
+	} else {
313
+			echo '
303 314
 				<input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button_submit">';
315
+	}
304 316
 	echo '
305 317
 			</div>
306 318
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -445,19 +457,20 @@  discard block
 block discarded – undo
445 457
 	</head>
446 458
 	<body style="margin: 1ex;">
447 459
 		<div class="windowbg description" style="text-align: center;">';
448
-	if (isBrowser('is_ie') || isBrowser('is_ie11'))
449
-		echo '
460
+	if (isBrowser('is_ie') || isBrowser('is_ie11')) {
461
+			echo '
450 462
 			<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav">
451 463
 				<param name="AutoStart" value="1">
452 464
 				<param name="FileName" value="', $context['verification_sound_href'], '">
453 465
 			</object>';
454
-	else
455
-		echo '
466
+	} else {
467
+			echo '
456 468
 			<audio src="', $context['verification_sound_href'], '" controls>
457 469
 				<object type="audio/x-wav" data="', $context['verification_sound_href'], '">
458 470
 					<a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a>
459 471
 				</object>
460 472
 			</audio>';
473
+	}
461 474
 	echo '
462 475
 		<br>
463 476
 		<a href="', $context['verification_sound_href'], ';sound" rel="nofollow">', $txt['visual_verification_sound_again'], '</a><br>
@@ -484,11 +497,12 @@  discard block
 block discarded – undo
484 497
 				</div>
485 498
 				<div id="register_screen" class="windowbg2 noup">';
486 499
 
487
-	if (!empty($context['registration_done']))
488
-		echo '
500
+	if (!empty($context['registration_done'])) {
501
+			echo '
489 502
 					<div class="infobox">
490 503
 						', $context['registration_done'], '
491 504
 					</div>';
505
+	}
492 506
 
493 507
 	echo '
494 508
 					<dl class="register_form" id="admin_register_form">
@@ -524,9 +538,10 @@  discard block
 block discarded – undo
524 538
 						<dd>
525 539
 							<select name="group" id="group_select" tabindex="', $context['tabindex']++, '">';
526 540
 
527
-		foreach ($context['member_groups'] as $id => $name)
528
-			echo '
541
+		foreach ($context['member_groups'] as $id => $name) {
542
+					echo '
529 543
 								<option value="', $id, '">', $name, '</option>';
544
+		}
530 545
 
531 546
 		echo '
532 547
 							</select>
@@ -534,8 +549,8 @@  discard block
 block discarded – undo
534 549
 	}
535 550
 
536 551
 	// If there is any field marked as required, show it here!
537
-	if (!empty($context['custom_fields_required']) && !empty($context['custom_fields']))
538
-		foreach ($context['custom_fields'] as $field)
552
+	if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) {
553
+			foreach ($context['custom_fields'] as $field)
539 554
 			if ($field['show_reg'] > 1)
540 555
 				echo '
541 556
 						<dt>
@@ -543,6 +558,7 @@  discard block
 block discarded – undo
543 558
 							<span class="smalltext">', $field['desc'], '</span>
544 559
 						</dt>
545 560
 						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
561
+	}
546 562
 
547 563
 	echo '
548 564
 						<dt>
@@ -579,12 +595,13 @@  discard block
 block discarded – undo
579 595
 {
580 596
 	global $context, $scripturl, $txt;
581 597
 
582
-	if (!empty($context['saved_successful']))
583
-		echo '
598
+	if (!empty($context['saved_successful'])) {
599
+			echo '
584 600
 					<div class="infobox">', $txt['settings_saved'], '</div>';
585
-	elseif (!empty($context['could_not_save']))
586
-		echo '
601
+	} elseif (!empty($context['could_not_save'])) {
602
+			echo '
587 603
 					<div class="errorbox">', $txt['admin_agreement_not_saved'], '</div>';
604
+	}
588 605
 
589 606
 	// Just a big box to edit the text file ;).
590 607
 	echo '
@@ -594,9 +611,10 @@  discard block
 block discarded – undo
594 611
 			</div>';
595 612
 
596 613
 	// Warning for if the file isn't writable.
597
-	if (!empty($context['warning']))
598
-		echo '
614
+	if (!empty($context['warning'])) {
615
+			echo '
599 616
 			<p class="error">', $context['warning'], '</p>';
617
+	}
600 618
 
601 619
 	echo '
602 620
 			<div class="windowbg2 noup" id="registration_agreement">';
@@ -613,9 +631,10 @@  discard block
 block discarded – undo
613 631
 						<strong>', $txt['admin_agreement_select_language'], ':</strong>&nbsp;
614 632
 						<select name="agree_lang" onchange="document.getElementById(\'change_reg\').submit();" tabindex="', $context['tabindex']++, '">';
615 633
 
616
-		foreach ($context['editable_agreements'] as $file => $name)
617
-			echo '
634
+		foreach ($context['editable_agreements'] as $file => $name) {
635
+					echo '
618 636
 							<option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>';
637
+		}
619 638
 
620 639
 		echo '
621 640
 						</select>
@@ -655,9 +674,10 @@  discard block
 block discarded – undo
655 674
 {
656 675
 	global $context, $scripturl, $txt;
657 676
 
658
-	if (!empty($context['saved_successful']))
659
-		echo '
677
+	if (!empty($context['saved_successful'])) {
678
+			echo '
660 679
 	<div class="infobox">', $txt['settings_saved'], '</div>';
680
+	}
661 681
 
662 682
 	echo '
663 683
 		<form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '">
Please login to merge, or discard this patch.
Themes/default/Printpage.template.php 1 patch
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,11 +145,12 @@  discard block
 block discarded – undo
145 145
 				<div class="question">', $txt['poll_question'], ': <strong>', $context['poll']['question'], '</strong>';
146 146
 
147 147
 		$options = 1;
148
-		foreach ($context['poll']['options'] as $option)
149
-			echo '
148
+		foreach ($context['poll']['options'] as $option) {
149
+					echo '
150 150
 					<div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $options++, ': <strong>', $option['option'], '</strong>
151 151
 						', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', '
152 152
 					</div>';
153
+		}
153 154
 
154 155
 		echo '
155 156
 			</div>';
@@ -171,9 +172,10 @@  discard block
 block discarded – undo
171 172
 			echo '
172 173
 				<hr>';
173 174
 
174
-			foreach ($context['printattach'][$post['id_msg']] as $attach)
175
-				echo '
175
+			foreach ($context['printattach'][$post['id_msg']] as $attach) {
176
+							echo '
176 177
 					<img width="' . $attach['width'] . '" height="' . $attach['height'] . '" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="">';
178
+			}
177 179
 		}
178 180
 
179 181
 		echo '
@@ -213,11 +215,12 @@  discard block
 block discarded – undo
213 215
 		<div class="print_options">';
214 216
 
215 217
 	// which option is set, text or text&images
216
-	if (isset($_REQUEST['images']))
217
-		echo '
218
+	if (isset($_REQUEST['images'])) {
219
+			echo '
218 220
 			<a href="', $url_text, '">', $txt['print_page_text'], '</a> | <strong><a href="', $url_images, '">', $txt['print_page_images'], '</a></strong>';
219
-	else
220
-		echo '
221
+	} else {
222
+			echo '
221 223
 			<strong><a href="', $url_text, '">', $txt['print_page_text'], '</a></strong> | <a href="', $url_images, '">', $txt['print_page_images'], '</a>';
222
-}
224
+	}
225
+	}
223 226
 ?>
224 227
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/BoardIndex.template.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 		foreach ($context['news_lines'] as $news)
35 35
 		{
36 36
 			echo '
37
-			<li>', $news,'</li>';
37
+			<li>', $news, '</li>';
38 38
 		}
39 39
 
40 40
 		echo '
41 41
 		</ul>
42 42
 		<script>
43 43
 			jQuery("#smf_slider").slippry({
44
-				pause: ', $settings['newsfader_time'],',
44
+				pause: ', $settings['newsfader_time'], ',
45 45
 				adaptiveHeight: 0,
46 46
 				captions: 0,
47 47
 				controls: 0,
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 		// If this category even can collapse, show a link to collapse it.
79 79
 		if ($category['can_collapse'])
80 80
 			echo '
81
-					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>';
81
+					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';
82 82
 
83 83
 		echo '
84 84
 					', $category['link'], '
85 85
 				</h3>', !empty($category['description']) ? '
86 86
 				<div class="desc">' . $category['description'] . '</div>' : '', '
87 87
 			</div>
88
-			<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="'. $category['css_class'] .'"') : '') ,'>';
88
+			<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>';
89 89
 
90 90
 			/* Each board in each category's boards has:
91 91
 			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
 			foreach ($category['boards'] as $board)
95 95
 			{
96 96
 				echo '
97
-				<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : '') ,'">
97
+				<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
98 98
 					<div class="board_icon">
99 99
 						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>
100 100
 					</div>
101 101
 					<div class="info">
102 102
 						<a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '">
103 103
 							', $board['name'], '
104
-							<p class="board_description mobile_display">', $board['description'] , '</p>
104
+							<p class="board_description mobile_display">', $board['description'], '</p>
105 105
 						</a>';
106 106
 
107 107
 				// Has it outstanding posts for approval?
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
111 111
 
112 112
 				echo '
113
-						<p class="board_description">', $board['description'] , '</p>';
113
+						<p class="board_description">', $board['description'], '</p>';
114 114
 
115 115
 				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
116 116
 				if (!empty($board['link_moderators']))
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 						', $board['is_redirect'] ? '' : '<br> ' . comma_format($board['topics']) . ' ' . $txt['board_topics'], '
126 126
 						</p>
127 127
 					</div>
128
-					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">';
128
+					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden', '">';
129 129
 
130 130
 				if (!empty($board['last_post']['id']))
131 131
 					echo '
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 				</h4>
375 375
 			</div>
376 376
 			<p class="inline">
377
-				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - '. $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br>
377
+				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - ' . $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br>
378 378
 				', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  (' . $context['latest_post']['time'] . ')<br>' : ''), '
379 379
 				<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>
380 380
 			</p>';
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		// Showing membergroups?
423 423
 		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
424 424
 			echo '
425
-				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']). '</span>';
425
+				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']) . '</span>';
426 426
 	}
427 427
 
428 428
 	echo '
Please login to merge, or discard this patch.
Braces   +57 added lines, -39 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@  discard block
 block discarded – undo
67 67
 	foreach ($context['categories'] as $category)
68 68
 	{
69 69
 		// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
70
-		if (empty($category['boards']) && !$category['is_collapsed'])
71
-			continue;
70
+		if (empty($category['boards']) && !$category['is_collapsed']) {
71
+					continue;
72
+		}
72 73
 
73 74
 		echo '
74 75
 		<div class="main_container">
@@ -76,9 +77,10 @@  discard block
 block discarded – undo
76 77
 				<h3 class="catbg">';
77 78
 
78 79
 		// If this category even can collapse, show a link to collapse it.
79
-		if ($category['can_collapse'])
80
-			echo '
80
+		if ($category['can_collapse']) {
81
+					echo '
81 82
 					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>';
83
+		}
82 84
 
83 85
 		echo '
84 86
 					', $category['link'], '
@@ -105,17 +107,19 @@  discard block
 block discarded – undo
105 107
 						</a>';
106 108
 
107 109
 				// Has it outstanding posts for approval?
108
-				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
109
-					echo '
110
+				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
111
+									echo '
110 112
 						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
113
+				}
111 114
 
112 115
 				echo '
113 116
 						<p class="board_description">', $board['description'] , '</p>';
114 117
 
115 118
 				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
116
-				if (!empty($board['link_moderators']))
117
-					echo '
119
+				if (!empty($board['link_moderators'])) {
120
+									echo '
118 121
 						<p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
122
+				}
119 123
 
120 124
 				// Show some basic information about the number of posts, etc.
121 125
 					echo '
@@ -127,9 +131,10 @@  discard block
 block discarded – undo
127 131
 					</div>
128 132
 					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">';
129 133
 
130
-				if (!empty($board['last_post']['id']))
131
-					echo '
134
+				if (!empty($board['last_post']['id'])) {
135
+									echo '
132 136
 						<p>', $board['last_post']['last_post_message'], '</p>';
137
+				}
133 138
 				echo '
134 139
 					</div>';
135 140
 				// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
@@ -141,14 +146,16 @@  discard block
 block discarded – undo
141 146
 							id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
142 147
 					foreach ($board['children'] as $child)
143 148
 					{
144
-						if (!$child['is_redirect'])
145
-							$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
146
-						else
147
-							$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
149
+						if (!$child['is_redirect']) {
150
+													$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
151
+						} else {
152
+													$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
153
+						}
148 154
 
149 155
 						// Has it posts awaiting approval?
150
-						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
151
-							$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
156
+						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) {
157
+													$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
158
+						}
152 159
 
153 160
 						$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
154 161
 					}
@@ -172,10 +179,11 @@  discard block
 block discarded – undo
172 179
 	</div>';
173 180
 
174 181
 	// Show the mark all as read button?
175
-	if ($context['user']['is_logged'] && !empty($context['categories']))
176
-		echo '
182
+	if ($context['user']['is_logged'] && !empty($context['categories'])) {
183
+			echo '
177 184
 		<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
178
-}
185
+	}
186
+	}
179 187
 
180 188
 /**
181 189
  * The lower part of the outer layer of the board index
@@ -192,8 +200,9 @@  discard block
 block discarded – undo
192 200
 {
193 201
 	global $context, $options, $txt;
194 202
 
195
-	if (empty($context['info_center']))
196
-		return;
203
+	if (empty($context['info_center'])) {
204
+			return;
205
+	}
197 206
 
198 207
 	// Here's where the "Info Center" starts...
199 208
 	echo '
@@ -293,14 +302,15 @@  discard block
 block discarded – undo
293 302
 		/* Each post in latest_posts has:
294 303
 				board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
295 304
 				subject, short_subject (shortened with...), time, link, and href. */
296
-		foreach ($context['latest_posts'] as $post)
297
-			echo '
305
+		foreach ($context['latest_posts'] as $post) {
306
+					echo '
298 307
 					<tr class="windowbg">
299 308
 						<td class="recentpost"><strong>', $post['link'], '</strong></td>
300 309
 						<td class="recentposter">', $post['poster']['link'], '</td>
301 310
 						<td class="recentboard">', $post['board']['link'], '</td>
302 311
 						<td class="recenttime">', $post['time'], '</td>
303 312
 					</tr>';
313
+		}
304 314
 		echo '
305 315
 				</table>';
306 316
 	}
@@ -324,9 +334,10 @@  discard block
 block discarded – undo
324 334
 			</div>';
325 335
 
326 336
 	// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
327
-	if (!empty($context['calendar_holidays']))
328
-		echo '
337
+	if (!empty($context['calendar_holidays'])) {
338
+			echo '
329 339
 				<p class="inline holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '</p>';
340
+	}
330 341
 
331 342
 	// People's birthdays. Like mine. And yours, I guess. Kidding.
332 343
 	if (!empty($context['calendar_birthdays']))
@@ -335,9 +346,10 @@  discard block
 block discarded – undo
335 346
 				<p class="inline">
336 347
 					<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';
337 348
 		// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
338
-		foreach ($context['calendar_birthdays'] as $member)
339
-			echo '
349
+		foreach ($context['calendar_birthdays'] as $member) {
350
+					echo '
340 351
 					<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
352
+		}
341 353
 		echo '
342 354
 				</p>';
343 355
 	}
@@ -351,9 +363,10 @@  discard block
 block discarded – undo
351 363
 
352 364
 		// Each event in calendar_events should have:
353 365
 		//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
354
-		foreach ($context['calendar_events'] as $event)
355
-			echo '
366
+		foreach ($context['calendar_events'] as $event) {
367
+					echo '
356 368
 					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="generic_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', ';
369
+		}
357 370
 		echo '
358 371
 				</p>';
359 372
 	}
@@ -398,15 +411,19 @@  discard block
 block discarded – undo
398 411
 
399 412
 	// Handle hidden users and buddies.
400 413
 	$bracketList = array();
401
-	if ($context['show_buddies'])
402
-		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
403
-	if (!empty($context['num_spiders']))
404
-		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
405
-	if (!empty($context['num_users_hidden']))
406
-		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
414
+	if ($context['show_buddies']) {
415
+			$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
416
+	}
417
+	if (!empty($context['num_spiders'])) {
418
+			$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
419
+	}
420
+	if (!empty($context['num_users_hidden'])) {
421
+			$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
422
+	}
407 423
 
408
-	if (!empty($bracketList))
409
-		echo ' (' . implode(', ', $bracketList) . ')';
424
+	if (!empty($bracketList)) {
425
+			echo ' (' . implode(', ', $bracketList) . ')';
426
+	}
410 427
 
411 428
 	echo $context['show_who'] ? '</a>' : '', '
412 429
 
@@ -420,9 +437,10 @@  discard block
 block discarded – undo
420 437
 				', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']);
421 438
 
422 439
 		// Showing membergroups?
423
-		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
424
-			echo '
440
+		if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) {
441
+					echo '
425 442
 				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']). '</span>';
443
+		}
426 444
 	}
427 445
 
428 446
 	echo '
Please login to merge, or discard this patch.
Themes/default/ModerationCenter.template.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	{
326 326
 		echo '
327 327
 			<div class="infobox">
328
-				', $txt['report_action_'. $context['report_post_action']], '
328
+				', $txt['report_action_' . $context['report_post_action']], '
329 329
 			</div>';
330 330
 	}
331 331
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 			// Cycle through the notes.
347 347
 			foreach ($context['notes'] as $note)
348 348
 				echo '
349
-							<li class="smalltext">', ($note['can_delete'] ? '<a href="'. $note['delete_href'] .';'. $context['mod-modnote-del_token_var'] .'='. $context['mod-modnote-del_token'] .'" data-confirm="'. $txt['mc_reportedp_delete_confirm'] .'" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'] ,' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>';
349
+							<li class="smalltext">', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>';
350 350
 
351 351
 			echo '
352 352
 						</ul>
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 
480 480
 	if ($post['can_delete'])
481 481
 		$output_html .= '
482
-							<a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="'. $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a>
482
+							<a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a>
483 483
 							<input type="checkbox" name="delete[]" value="' . $post['id'] . '" class="input_check">';
484 484
 
485 485
 	$output_html .= '
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	<head>
547 547
 		<meta charset="', $context['character_set'], '">
548 548
 		<title>', $context['page_title'], '</title>
549
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
549
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
550 550
 	</head>
551 551
 	<body>
552 552
 		<div class="cat_bar">
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 				<div class="errorbox"', empty($context['warning_errors']) ? ' style="display: none"' : '', ' id="errors">
591 591
 					<dl>
592 592
 						<dt>
593
-							<strong id="error_serious">', $txt['error_while_submitting'] , '</strong>
593
+							<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
594 594
 						</dt>
595 595
 						<dd class="error" id="error_list">
596 596
 							', empty($context['warning_errors']) ? '' : implode('<br>', $context['warning_errors']), '
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 				<div id="box_preview"', !empty($context['template_preview']) ? '' : ' style="display:none"', '>
601 601
 					<dl class="settings">
602 602
 						<dt>
603
-							<strong>', $txt['preview'] , '</strong>
603
+							<strong>', $txt['preview'], '</strong>
604 604
 						</dt>
605 605
 						<dd id="template_preview">
606 606
 							', !empty($context['template_preview']) ? $context['template_preview'] : '', '
Please login to merge, or discard this patch.
Braces   +56 added lines, -39 removed lines patch added patch discarded remove patch
@@ -55,18 +55,20 @@  discard block
 block discarded – undo
55 55
 			<div class="modbox">
56 56
 				<ul>';
57 57
 
58
-		foreach ($context['group_requests'] as $request)
59
-			echo '
58
+		foreach ($context['group_requests'] as $request) {
59
+					echo '
60 60
 				<li class="smalltext">
61 61
 					<a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], '
62 62
 				</li>';
63
+		}
63 64
 
64 65
 		// Don't have any watched users right now?
65
-		if (empty($context['group_requests']))
66
-			echo '
66
+		if (empty($context['group_requests'])) {
67
+					echo '
67 68
 				<li>
68 69
 					<strong class="smalltext">', $txt['mc_group_requests_none'], '</strong>
69 70
 				</li>';
71
+		}
70 72
 
71 73
 		echo '
72 74
 				</ul>
@@ -124,18 +126,20 @@  discard block
 block discarded – undo
124 126
 			<div class="modbox">
125 127
 				<ul>';
126 128
 
127
-		foreach ($context['watched_users'] as $user)
128
-			echo '
129
+		foreach ($context['watched_users'] as $user) {
130
+					echo '
129 131
 					<li>
130 132
 						<span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span>
131 133
 					</li>';
134
+		}
132 135
 
133 136
 		// Don't have any watched users right now?
134
-		if (empty($context['watched_users']))
135
-			echo '
137
+		if (empty($context['watched_users'])) {
138
+					echo '
136 139
 					<li>
137 140
 						<strong class="smalltext">', $txt['mc_watched_users_none'], '</strong>
138 141
 					</li>';
142
+		}
139 143
 
140 144
 		echo '
141 145
 				</ul>
@@ -193,18 +197,20 @@  discard block
 block discarded – undo
193 197
 			<div class="modbox">
194 198
 				<ul>';
195 199
 
196
-		foreach ($context['reported_posts'] as $post)
197
-			echo '
200
+		foreach ($context['reported_posts'] as $post) {
201
+					echo '
198 202
 					<li>
199 203
 						<span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span>
200 204
 					</li>';
205
+		}
201 206
 
202 207
 		// Don't have any watched users right now?
203
-		if (empty($context['reported_posts']))
204
-			echo '
208
+		if (empty($context['reported_posts'])) {
209
+					echo '
205 210
 					<li>
206 211
 						<strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong>
207 212
 					</li>';
213
+		}
208 214
 
209 215
 		echo '
210 216
 				</ul>
@@ -262,18 +268,20 @@  discard block
 block discarded – undo
262 268
 			<div class="modbox">
263 269
 				<ul>';
264 270
 
265
-		foreach ($context['reported_users'] as $user)
266
-			echo '
271
+		foreach ($context['reported_users'] as $user) {
272
+					echo '
267 273
 					<li>
268 274
 						<span class="smalltext">', $user['user']['link'], '</span>
269 275
 					</li>';
276
+		}
270 277
 
271 278
 		// Don't have any watched users right now?
272
-		if (empty($context['reported_users']))
273
-			echo '
279
+		if (empty($context['reported_users'])) {
280
+					echo '
274 281
 					<li>
275 282
 						<strong class="smalltext">', $txt['mc_reported_users_none'], '</strong>
276 283
 					</li>';
284
+		}
277 285
 
278 286
 		echo '
279 287
 				</ul>
@@ -344,9 +352,10 @@  discard block
 block discarded – undo
344 352
 						<ul class="moderation_notes">';
345 353
 
346 354
 			// Cycle through the notes.
347
-			foreach ($context['notes'] as $note)
348
-				echo '
355
+			foreach ($context['notes'] as $note) {
356
+							echo '
349 357
 							<li class="smalltext">', ($note['can_delete'] ? '<a href="'. $note['delete_href'] .';'. $context['mod-modnote-del_token_var'] .'='. $context['mod-modnote-del_token'] .'" data-confirm="'. $txt['mc_reportedp_delete_confirm'] .'" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'] ,' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>';
358
+			}
350 359
 
351 360
 			echo '
352 361
 						</ul>
@@ -388,16 +397,17 @@  discard block
 block discarded – undo
388 397
 	$remove_button = create_button('delete', 'remove_message', 'remove');
389 398
 
390 399
 	// No posts?
391
-	if (empty($context['unapproved_items']))
392
-		echo '
400
+	if (empty($context['unapproved_items'])) {
401
+			echo '
393 402
 		<div class="windowbg2">
394 403
 			<p class="centertext">', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '</p>
395 404
 		</div>';
396
-	else
397
-		echo '
405
+	} else {
406
+			echo '
398 407
 			<div class="pagesection floatleft">
399 408
 				', $context['page_index'], '
400 409
 			</div>';
410
+	}
401 411
 
402 412
 	foreach ($context['unapproved_items'] as $item)
403 413
 	{
@@ -414,14 +424,16 @@  discard block
 block discarded – undo
414 424
 			<span class="floatright">
415 425
 				<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>';
416 426
 
417
-		if ($item['can_delete'])
418
-			echo '
427
+		if ($item['can_delete']) {
428
+					echo '
419 429
 			', $context['menu_separator'], '
420 430
 				<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>';
431
+		}
421 432
 
422
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
423
-			echo '
433
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
434
+					echo '
424 435
 				<input type="checkbox" name="item[]" value="', $item['id'], '" checked class="input_check"> ';
436
+		}
425 437
 
426 438
 		echo '
427 439
 			</span>
@@ -431,8 +443,8 @@  discard block
 block discarded – undo
431 443
 	echo '
432 444
 		<div class="pagesection">';
433 445
 
434
-	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
435
-		echo '
446
+	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
447
+			echo '
436 448
 			<div class="floatright">
437 449
 				<select name="do" onchange="if (this.value != 0 &amp;&amp; confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();">
438 450
 					<option value="0">', $txt['with_selected'], ':</option>
@@ -442,12 +454,14 @@  discard block
 block discarded – undo
442 454
 				</select>
443 455
 				<noscript><input type="submit" name="mc_go" value="', $txt['go'], '" class="button_submit"></noscript>
444 456
 			</div>';
457
+	}
445 458
 
446
-	if (!empty($context['unapproved_items']))
447
-		echo '
459
+	if (!empty($context['unapproved_items'])) {
460
+			echo '
448 461
 			<div class="floatleft">
449 462
 				<div class="pagelinks">', $context['page_index'], '</div>
450 463
 			</div>';
464
+	}
451 465
 
452 466
 	echo '
453 467
 		</div>
@@ -467,8 +481,9 @@  discard block
 block discarded – undo
467 481
 	global $scripturl, $context, $txt, $delete_button;
468 482
 
469 483
 	// We'll have a delete please bob.
470
-	if (empty($delete_button))
471
-		$delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"');
484
+	if (empty($delete_button)) {
485
+			$delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"');
486
+	}
472 487
 
473 488
 	$output_html = '
474 489
 					<div>
@@ -477,10 +492,11 @@  discard block
 block discarded – undo
477 492
 						</div>
478 493
 						<div class="floatright">';
479 494
 
480
-	if ($post['can_delete'])
481
-		$output_html .= '
495
+	if ($post['can_delete']) {
496
+			$output_html .= '
482 497
 							<a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="'. $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a>
483 498
 							<input type="checkbox" name="delete[]" value="' . $post['id'] . '" class="input_check">';
499
+	}
484 500
 
485 501
 	$output_html .= '
486 502
 						</div>
@@ -522,12 +538,12 @@  discard block
 block discarded – undo
522 538
 				<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">
523 539
 			</div>
524 540
 		</form>';
525
-	}
526
-	else
527
-		echo '
541
+	} else {
542
+			echo '
528 543
 		<div class="windowbg">
529 544
 			<div class="centertext">', $txt['mc_no_settings'], '</div>
530 545
 		</div>';
546
+	}
531 547
 
532 548
 	echo '
533 549
 	</div>';
@@ -623,8 +639,8 @@  discard block
 block discarded – undo
623 639
 					</dd>
624 640
 				</dl>';
625 641
 
626
-	if ($context['template_data']['can_edit_personal'])
627
-		echo '
642
+	if ($context['template_data']['can_edit_personal']) {
643
+			echo '
628 644
 				<input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', ' class="input_check">
629 645
 					<label for="make_personal">
630 646
 						<strong>', $txt['mc_warning_template_personal'], '</strong>
@@ -632,6 +648,7 @@  discard block
 block discarded – undo
632 648
 					<br>
633 649
 					<span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span>
634 650
 					<br>';
651
+	}
635 652
 
636 653
 	echo '
637 654
 				<hr>
Please login to merge, or discard this patch.
Themes/default/ManageLanguages.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 				</h3>
81 81
 			</div>
82 82
 			<div class="windowbg">
83
-				<p>', $txt['package_ftp_why'],'</p>
83
+				<p>', $txt['package_ftp_why'], '</p>
84 84
 				<dl class="settings">
85 85
 					<dt
86 86
 						<label for="ftp_server">', $txt['package_ftp_server'], ':</label>
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,11 +36,12 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	// An error?
39
-	if (!empty($context['error_message']))
40
-		echo '
39
+	if (!empty($context['error_message'])) {
40
+			echo '
41 41
 	<div class="errorbox">
42 42
 		', $context['error_message'], '
43 43
 	</div>';
44
+	}
44 45
 
45 46
 	// Provide something of an introduction...
46 47
 	echo '
@@ -67,11 +68,12 @@  discard block
 block discarded – undo
67 68
 	// If the files are not writable, we might!
68 69
 	if (!empty($context['still_not_writable']))
69 70
 	{
70
-		if (!empty($context['package_ftp']['error']))
71
-			echo '
71
+		if (!empty($context['package_ftp']['error'])) {
72
+					echo '
72 73
 			<div class="errorbox">
73 74
 				', $context['package_ftp']['error'], '
74 75
 			</div>';
76
+		}
75 77
 
76 78
 		echo '
77 79
 			<div class="cat_bar">
@@ -243,11 +245,12 @@  discard block
 block discarded – undo
243 245
 
244 246
 	// Is it not writable?
245 247
 	// Show an error.
246
-	if (!empty($context['entries_not_writable_message']))
247
-		echo '
248
+	if (!empty($context['entries_not_writable_message'])) {
249
+			echo '
248 250
 			<div class="errorbox">
249 251
 				', $context['entries_not_writable_message'], '
250 252
 			</div>';
253
+	}
251 254
 
252 255
 	// Already have some file entries?
253 256
 	if (!empty($context['file_entries']))
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 2 patches
Spacing   +30 added lines, -31 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	echo '
56 56
 		<div class="profile_user_avatar floatleft">
57
-			<a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['member']['avatar']['image'],'</a>
57
+			<a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['member']['avatar']['image'], '</a>
58 58
 		</div>
59 59
 		<div class="profile_user_info floatleft">
60 60
 			<span class="profile_username"><a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['user']['name'], '</a></span>
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 		echo '
330 330
 					<dt>', $txt['profile_warning_level'], ': </dt>
331 331
 					<dd>
332
-						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning') , '">', $context['member']['warning'], '%</a>';
332
+						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning'), '">', $context['member']['warning'], '%</a>';
333 333
 
334 334
 		// Can we provide information on what this means?
335 335
 		if (!empty($context['warning_status']))
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 		// If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves.
348 348
 		if (!empty($context['activate_message']))
349 349
 			echo '
350
-					<dt class="clear"><span class="alert">', $context['activate_message'], '</span>&nbsp;(<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="'. $txt['profileConfirm'] .'"' : ''), '>', $context['activate_link_text'], '</a>)</dt>';
350
+					<dt class="clear"><span class="alert">', $context['activate_message'], '</span>&nbsp;(<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="' . $txt['profileConfirm'] . '"' : ''), '>', $context['activate_link_text'], '</a>)</dt>';
351 351
 
352 352
 		// If the current member is banned, show a message and possibly a link to the ban.
353 353
 		if (!empty($context['member']['bans']))
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 		foreach ($context['posts'] as $post)
474 474
 		{
475 475
 			echo '
476
-			<div class="', $post['css_class'] ,'">
476
+			<div class="', $post['css_class'], '">
477 477
 				<div class="counter">', $post['counter'], '</div>
478 478
 				<div class="topic_details">
479 479
 					<h5><strong><a href="', $scripturl, '?board=', $post['board']['id'], '.0">', $post['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $post['topic'], '.', $post['start'], '#msg', $post['id'], '">', $post['subject'], '</a></strong></h5>
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 			// How about... even... remove it entirely?!
510 510
 			if ($post['can_delete'])
511 511
 				echo '
512
-						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
512
+						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
513 513
 
514 514
 			if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
515 515
 				echo '
@@ -580,9 +580,9 @@  discard block
 block discarded – undo
580 580
 					<td>', $alert['time'], '</td>
581 581
 					<td>
582 582
 						<ul class="quickbuttons">
583
-							<li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=remove;aid=', $id ,';', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'] ,'</a></li>
584
-							<li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=', ($alert['is_read'] != 0 ? 'unread' : 'read') ,';aid=', $id ,';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons ', $alert['is_read'] != 0 ? 'unread_button' : 'read_button','"></span>', ($alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short']),'</a></li>
585
-							<li><input type="checkbox" name="mark[', $id ,']" value="', $id ,'"></li>
583
+							<li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=remove;aid=', $id, ';', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'], '</a></li>
584
+							<li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=', ($alert['is_read'] != 0 ? 'unread' : 'read'), ';aid=', $id, ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons ', $alert['is_read'] != 0 ? 'unread_button' : 'read_button', '"></span>', ($alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short']), '</a></li>
585
+							<li><input type="checkbox" name="mark[', $id, ']" value="', $id, '"></li>
586 586
 						</ul>
587 587
 					</td>
588 588
 				</tr>';
@@ -592,17 +592,17 @@  discard block
 block discarded – undo
592 592
 			</table>
593 593
 			<div class="pagesection">
594 594
 				<div class="floatleft">
595
-					', $context['pagination'] ,'
595
+					', $context['pagination'], '
596 596
 				</div>
597 597
 				<div class="floatright">
598
-					', $txt['check_all'] ,': <input type="checkbox" name="select_all" id="select_all">
598
+					', $txt['check_all'], ': <input type="checkbox" name="select_all" id="select_all">
599 599
 					<select name="mark_as">
600
-						<option value="read">', $txt['quick_mod_markread'] ,'</option>
601
-						<option value="unread">', $txt['quick_mod_markunread'] ,'</option>
602
-						<option value="remove">', $txt['quick_mod_remove'] ,'</option>
600
+						<option value="read">', $txt['quick_mod_markread'], '</option>
601
+						<option value="unread">', $txt['quick_mod_markunread'], '</option>
602
+						<option value="remove">', $txt['quick_mod_remove'], '</option>
603 603
 					</select>
604 604
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
605
-					<input type="submit" name="req" value="', $txt['quick_mod_go'] ,'" class="button_submit you_sure">
605
+					<input type="submit" name="req" value="', $txt['quick_mod_go'], '" class="button_submit you_sure">
606 606
 				</div>
607 607
 			</div>
608 608
 		</form>';
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 				<div class="floatright">
660 660
 					<ul class="quickbuttons">
661 661
 						<li><a href="', $scripturl, '?action=post;', (empty($draft['topic']['id']) ? 'board=' . $draft['board']['id'] : 'topic=' . $draft['topic']['id']), '.0;id_draft=', $draft['id_draft'], '"><span class="generic_icons reply_button"></span>', $txt['draft_edit'], '</a></li>
662
-						<li><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';area=showdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
662
+						<li><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';area=showdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
663 663
 					</ul>
664 664
 				</div>
665 665
 			</div>';
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 	if (empty($context['buddies']))
716 716
 		echo '
717 717
 			<tr class="windowbg">
718
-				<td colspan="', allowedTo('moderate_forum') ? '10' : '9','"><strong>', $txt['no_buddies'], '</strong></td>
718
+				<td colspan="', allowedTo('moderate_forum') ? '10' : '9', '"><strong>', $txt['no_buddies'], '</strong></td>
719 719
 			</tr>';
720 720
 
721 721
 		// Now loop through each buddy showing info on each.
@@ -818,14 +818,14 @@  discard block
 block discarded – undo
818 818
 				<th scope="col">', $txt['email'], '</th>';
819 819
 
820 820
 	echo '
821
-				<th scope="col">', $txt['ignore_remove'] ,'</th>
821
+				<th scope="col">', $txt['ignore_remove'], '</th>
822 822
 			</tr>';
823 823
 
824 824
 	// If they don't have anyone on their ignore list, don't list it!
825 825
 	if (empty($context['ignore_list']))
826 826
 		echo '
827 827
 			<tr class="windowbg">
828
-				<td colspan="', allowedTo('moderate_forum') ? '4' : '3','"><strong>', $txt['no_ignore'], '</strong></td>
828
+				<td colspan="', allowedTo('moderate_forum') ? '4' : '3', '"><strong>', $txt['no_ignore'], '</strong></td>
829 829
 			</tr>';
830 830
 
831 831
 	// Now loop through each buddy showing info on each.
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 	else
1064 1064
 	{
1065 1065
 		echo '
1066
-		<div class="information">',$txt['showPermissions_help'],'</div>
1066
+		<div class="information">',$txt['showPermissions_help'], '</div>
1067 1067
 		<div id="permissions" class="flow_hidden">';
1068 1068
 
1069 1069
 		if (!empty($context['no_access_boards']))
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 
1111 1111
 				if ($permission['is_denied'])
1112 1112
 					echo '
1113
-									<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']),'</span>';
1113
+									<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']), '</span>';
1114 1114
 				else
1115 1115
 					echo '
1116 1116
 									', $txt['showPermissions_given'], ':&nbsp;', implode(', ', $permission['groups']['allowed']);
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
 	{
1844 1844
 		echo '
1845 1845
 				<tr class="title_bar">
1846
-					<th>', $txt['alert_group_' . $alert_group],'</th>
1846
+					<th>', $txt['alert_group_' . $alert_group], '</th>
1847 1847
 					<th>', $txt['receive_alert'], '</th>
1848 1848
 					<th>', $txt['receive_mail'], '</th>
1849 1849
 				</tr>
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
 		{
1894 1894
 			echo '
1895 1895
 				<tr class="windowbg">
1896
-					<td>', $txt['alert_' . $alert_id], isset($alert_details['help']) ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $alert_details['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help floatright"><span class="generic_icons help" title="'. $txt['help'].'"></span></a>' : '', '</td>';
1896
+					<td>', $txt['alert_' . $alert_id], isset($alert_details['help']) ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $alert_details['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help floatright"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a>' : '', '</td>';
1897 1897
 
1898 1898
 			foreach ($context['alert_bits'] as $type => $bitmask)
1899 1899
 			{
@@ -2075,7 +2075,7 @@  discard block
 block discarded – undo
2075 2075
 						<a href="', $scripturl, '?action=profile;save;u=', $context['id_member'], ';area=groupmembership;', $context['session_var'], '=', $context['session_id'], ';gid=', $group['id'], ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '" class="button floatright">', $txt['join_group'], '</a>';
2076 2076
 				elseif ($group['type'] == 2 && $group['pending'])
2077 2077
 					echo '
2078
-						<span class="floatright">', $txt['approval_pending'],'</span>';
2078
+						<span class="floatright">', $txt['approval_pending'], '</span>';
2079 2079
 				elseif ($group['type'] == 2)
2080 2080
 					echo '
2081 2081
 						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], '" class="button floatright">', $txt['request_group'], '</a>';
@@ -2379,7 +2379,7 @@  discard block
 block discarded – undo
2379 2379
 			<div id="box_preview"', !empty($context['warning_data']['body_preview']) ? '' : ' style="display:none"', '>
2380 2380
 				<dl class="settings">
2381 2381
 					<dt>
2382
-						<strong>', $txt['preview'] , '</strong>
2382
+						<strong>', $txt['preview'], '</strong>
2383 2383
 					</dt>
2384 2384
 					<dd id="body_preview">
2385 2385
 						', !empty($context['warning_data']['body_preview']) ? $context['warning_data']['body_preview'] : '', '
@@ -2798,7 +2798,7 @@  discard block
 block discarded – undo
2798 2798
 								', !empty($context['member']['avatar']['allow_server_stored']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_server_stored" value="server_stored"' . ($context['member']['avatar']['choice'] == 'server_stored' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_server_stored"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['choose_avatar_gallery'] . '</label><br />' : '', '
2799 2799
 								', !empty($context['member']['avatar']['allow_external']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_external" value="external"' . ($context['member']['avatar']['choice'] == 'external' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_external"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['my_own_pic'] . '</label><br />' : '', '
2800 2800
 								', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label><br />' : '', '
2801
-								', !empty($context['member']['avatar']['allow_gravatar']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_gravatar" value="gravatar"'. ($context['member']['avatar']['choice'] == 'gravatar' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_gravatar"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['use_gravatar'] . '</label>' : '', '
2801
+								', !empty($context['member']['avatar']['allow_gravatar']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_gravatar" value="gravatar"' . ($context['member']['avatar']['choice'] == 'gravatar' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_gravatar"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['use_gravatar'] . '</label>' : '', '
2802 2802
 							</dt>
2803 2803
 							<dd>';
2804 2804
 
@@ -2965,7 +2965,7 @@  discard block
 block discarded – undo
2965 2965
 	echo '
2966 2966
 							<dt>
2967 2967
 								<strong><label for="easyformat">', $txt['time_format'], ':</label></strong><br>
2968
-								<a href="', $scripturl, '?action=helpadmin;help=time_format" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
2968
+								<a href="', $scripturl, '?action=helpadmin;help=time_format" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
2969 2969
 								<span class="smalltext">&nbsp;<label for="time_format">', $txt['date_format'], '</label></span>
2970 2970
 							</dt>
2971 2971
 							<dd>
@@ -3031,8 +3031,7 @@  discard block
 block discarded – undo
3031 3031
 							<div class="roundframe">
3032 3032
 								<div>
3033 3033
 		', !empty($context['tfa_backup']) ? '
3034
-									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' :
3035
-			($modSettings['tfa_mode'] == 2 ? '
3034
+									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? '
3036 3035
 									<div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), '
3037 3036
 									<div class="smalltext">', $txt['tfa_desc'], '</div>
3038 3037
 									<div id="basicinfo" style="width: 60%">
@@ -3040,7 +3039,7 @@  discard block
 block discarded – undo
3040 3039
 											<div class="title_top">
3041 3040
 												<strong>', $txt['tfa_step1'], '</strong><br />
3042 3041
 												', !empty($context['tfa_pass_error']) ? '<div class="error smalltext">' . $txt['tfa_pass_invalid'] . '</div>' : '', '
3043
-												<input type="password" name="passwd" style="width: 200px;"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '' ,'>
3042
+												<input type="password" name="passwd" style="width: 200px;"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '', '>
3044 3043
 											</div>
3045 3044
 											<div class="title_top">
3046 3045
 												<strong>', $txt['tfa_step2'], '</strong>
@@ -3048,9 +3047,9 @@  discard block
 block discarded – undo
3048 3047
 												<div class="tfacode">', $context['tfa_secret'], '</div>
3049 3048
 											</div>
3050 3049
 											<div class="title_top">
3051
-												<strong>', $txt['tfa_step3'] , '</strong><br />
3050
+												<strong>', $txt['tfa_step3'], '</strong><br />
3052 3051
 												', !empty($context['tfa_error']) ? '<div class="error smalltext">' . $txt['tfa_code_invalid'] . '</div>' : '', '
3053
-												<input type="text" name="tfa_code" style="width: 200px;"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '' ,'>
3052
+												<input type="text" name="tfa_code" style="width: 200px;"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '', '>
3054 3053
 												<input type="submit" name="save" value="', $txt['tfa_enable'], '" class="button_submit" style="float: none;" />
3055 3054
 											</div>
3056 3055
 											<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />
Please login to merge, or discard this patch.
Braces   +442 added lines, -322 removed lines patch added patch discarded remove patch
@@ -18,23 +18,25 @@  discard block
 block discarded – undo
18 18
 	global $context;
19 19
 
20 20
 	// Prevent Chrome from auto completing fields when viewing/editing other members profiles
21
-	if (isBrowser('is_chrome') && !$context['user']['is_owner'])
22
-		echo '
21
+	if (isBrowser('is_chrome') && !$context['user']['is_owner']) {
22
+			echo '
23 23
 	<script>
24 24
 		disableAutoComplete();
25 25
 	</script>';
26
+	}
26 27
 
27 28
 	// If an error occurred while trying to save previously, give the user a clue!
28 29
 	echo '
29 30
 					', template_error_message();
30 31
 
31 32
 	// If the profile was update successfully, let the user know this.
32
-	if (!empty($context['profile_updated']))
33
-		echo '
33
+	if (!empty($context['profile_updated'])) {
34
+			echo '
34 35
 					<div class="infobox">
35 36
 						', $context['profile_updated'], '
36 37
 					</div>';
37
-}
38
+	}
39
+	}
38 40
 
39 41
 /**
40 42
  * Template for any HTML needed below the profile (closing off divs/tables, etc.)
@@ -102,8 +104,7 @@  discard block
 block discarded – undo
102 104
 	if (empty($context['unread_alerts']))
103 105
 	{
104 106
 		template_alerts_all_read();
105
-	}
106
-	else
107
+	} else
107 108
 	{
108 109
 		foreach ($context['unread_alerts'] as $id_alert => $details)
109 110
 		{
@@ -164,10 +165,11 @@  discard block
 block discarded – undo
164 165
 			<div class="custom_fields_above_name">
165 166
 				<ul >';
166 167
 
167
-		foreach ($context['print_custom_fields']['above_member'] as $field)
168
-			if (!empty($field['output_html']))
168
+		foreach ($context['print_custom_fields']['above_member'] as $field) {
169
+					if (!empty($field['output_html']))
169 170
 				echo '
170 171
 					<li>', $field['output_html'], '</li>';
172
+		}
171 173
 
172 174
 		echo '
173 175
 				</ul>
@@ -188,10 +190,11 @@  discard block
 block discarded – undo
188 190
 			<div class="custom_fields_below_avatar">
189 191
 				<ul >';
190 192
 
191
-		foreach ($context['print_custom_fields']['below_avatar'] as $field)
192
-			if (!empty($field['output_html']))
193
+		foreach ($context['print_custom_fields']['below_avatar'] as $field) {
194
+					if (!empty($field['output_html']))
193 195
 				echo '
194 196
 					<li>', $field['output_html'], '</li>';
197
+		}
195 198
 
196 199
 		echo '
197 200
 				</ul>
@@ -202,22 +205,25 @@  discard block
 block discarded – undo
202 205
 		echo '
203 206
 			<ul class="clear">';
204 207
 	// Email is only visible if it's your profile or you have the moderate_forum permission
205
-	if ($context['member']['show_email'])
206
-		echo '
208
+	if ($context['member']['show_email']) {
209
+			echo '
207 210
 				<li><a href="mailto:', $context['member']['email'], '" title="', $context['member']['email'], '" rel="nofollow"><span class="generic_icons mail" title="' . $txt['email'] . '"></span></a></li>';
211
+	}
208 212
 
209 213
 	// Don't show an icon if they haven't specified a website.
210
-	if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website']))
211
-		echo '
214
+	if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website'])) {
215
+			echo '
212 216
 				<li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<span class="generic_icons www" title="' . $context['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>';
217
+	}
213 218
 
214 219
 	// Are there any custom profile fields as icons?
215 220
 	if (!empty($context['print_custom_fields']['icons']))
216 221
 	{
217
-		foreach ($context['print_custom_fields']['icons'] as $field)
218
-			if (!empty($field['output_html']))
222
+		foreach ($context['print_custom_fields']['icons'] as $field) {
223
+					if (!empty($field['output_html']))
219 224
 				echo '
220 225
 					<li class="custom_field">', $field['output_html'], '</li>';
226
+		}
221 227
 	}
222 228
 
223 229
 	echo '
@@ -225,23 +231,26 @@  discard block
 block discarded – undo
225 231
 			<span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['text'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<span class="' . ($context['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $context['member']['online']['text'] . '"></span>' : $context['member']['online']['label'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['label'] . '</span>' : '';
226 232
 
227 233
 	// Can they add this member as a buddy?
228
-	if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
229
-		echo '
234
+	if (!empty($context['can_have_buddy']) && !$context['user']['is_owner']) {
235
+			echo '
230 236
 				<br><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';
237
+	}
231 238
 
232 239
 	echo '
233 240
 			</span>';
234 241
 
235
-	if (!$context['user']['is_owner'] && $context['can_send_pm'])
236
-		echo '
242
+	if (!$context['user']['is_owner'] && $context['can_send_pm']) {
243
+			echo '
237 244
 			<a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '" class="infolinks">', $txt['profile_sendpm_short'], '</a>';
245
+	}
238 246
 
239 247
 	echo '
240 248
 			<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '" class="infolinks">', $txt['showPosts'], '</a>';
241 249
 
242
-	if ($context['user']['is_owner'] && !empty($modSettings['drafts_post_enabled']))
243
-		echo '
250
+	if ($context['user']['is_owner'] && !empty($modSettings['drafts_post_enabled'])) {
251
+			echo '
244 252
 			<a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '" class="infolinks">', $txt['drafts_show'], '</a>';
253
+	}
245 254
 
246 255
 	echo '
247 256
 			<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '" class="infolinks">', $txt['statPanel'], '</a>';
@@ -253,10 +262,11 @@  discard block
 block discarded – undo
253 262
 			<div class="custom_fields_bottom">
254 263
 				<ul class="nolist">';
255 264
 
256
-		foreach ($context['print_custom_fields']['bottom_poster'] as $field)
257
-			if (!empty($field['output_html']))
265
+		foreach ($context['print_custom_fields']['bottom_poster'] as $field) {
266
+					if (!empty($field['output_html']))
258 267
 				echo '
259 268
 					<li>', $field['output_html'], '</li>';
269
+		}
260 270
 
261 271
 		echo '
262 272
 				</ul>
@@ -270,15 +280,17 @@  discard block
 block discarded – undo
270 280
 		<div id="detailedinfo">
271 281
 			<dl>';
272 282
 
273
-	if ($context['user']['is_owner'] || $context['user']['is_admin'])
274
-		echo '
283
+	if ($context['user']['is_owner'] || $context['user']['is_admin']) {
284
+			echo '
275 285
 				<dt>', $txt['username'], ': </dt>
276 286
 				<dd>', $context['member']['username'], '</dd>';
287
+	}
277 288
 
278
-	if (!isset($context['disabled_fields']['posts']))
279
-		echo '
289
+	if (!isset($context['disabled_fields']['posts'])) {
290
+			echo '
280 291
 				<dt>', $txt['profile_posts'], ': </dt>
281 292
 				<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
293
+	}
282 294
 
283 295
 	if ($context['member']['show_email'])
284 296
 	{
@@ -287,15 +299,17 @@  discard block
 block discarded – undo
287 299
 				<dd><a href="mailto:', $context['member']['email'], '">', $context['member']['email'], '</a></dd>';
288 300
 	}
289 301
 
290
-	if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title']))
291
-		echo '
302
+	if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title'])) {
303
+			echo '
292 304
 				<dt>', $txt['custom_title'], ': </dt>
293 305
 				<dd>', $context['member']['title'], '</dd>';
306
+	}
294 307
 
295
-	if (!empty($context['member']['blurb']))
296
-		echo '
308
+	if (!empty($context['member']['blurb'])) {
309
+			echo '
297 310
 				<dt>', $txt['personal_text'], ': </dt>
298 311
 				<dd>', $context['member']['blurb'], '</dd>';
312
+	}
299 313
 
300 314
 	echo '
301 315
 				<dt>', $txt['age'], ':</dt>
@@ -310,11 +324,12 @@  discard block
 block discarded – undo
310 324
 		echo '
311 325
 				<dl>';
312 326
 
313
-		foreach ($context['print_custom_fields']['standard'] as $field)
314
-			if (!empty($field['output_html']))
327
+		foreach ($context['print_custom_fields']['standard'] as $field) {
328
+					if (!empty($field['output_html']))
315 329
 				echo '
316 330
 					<dt>', $field['name'], ':</dt>
317 331
 					<dd>', $field['output_html'], '</dd>';
332
+		}
318 333
 
319 334
 		echo '
320 335
 				</dl>';
@@ -332,9 +347,10 @@  discard block
 block discarded – undo
332 347
 						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning') , '">', $context['member']['warning'], '%</a>';
333 348
 
334 349
 		// Can we provide information on what this means?
335
-		if (!empty($context['warning_status']))
336
-			echo '
350
+		if (!empty($context['warning_status'])) {
351
+					echo '
337 352
 						<span class="smalltext">(', $context['warning_status'], ')</span>';
353
+		}
338 354
 
339 355
 		echo '
340 356
 					</dd>';
@@ -345,9 +361,10 @@  discard block
 block discarded – undo
345 361
 	{
346 362
 
347 363
 		// If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves.
348
-		if (!empty($context['activate_message']))
349
-			echo '
364
+		if (!empty($context['activate_message'])) {
365
+					echo '
350 366
 					<dt class="clear"><span class="alert">', $context['activate_message'], '</span>&nbsp;(<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="'. $txt['profileConfirm'] .'"' : ''), '>', $context['activate_link_text'], '</a>)</dt>';
367
+		}
351 368
 
352 369
 		// If the current member is banned, show a message and possibly a link to the ban.
353 370
 		if (!empty($context['member']['bans']))
@@ -357,9 +374,10 @@  discard block
 block discarded – undo
357 374
 					<dt class="clear" id="ban_info" style="display: none;">
358 375
 						<strong>', $txt['user_banned_by_following'], ':</strong>';
359 376
 
360
-			foreach ($context['member']['bans'] as $ban)
361
-				echo '
377
+			foreach ($context['member']['bans'] as $ban) {
378
+							echo '
362 379
 						<br><span class="smalltext">', $ban['explanation'], '</span>';
380
+			}
363 381
 
364 382
 			echo '
365 383
 					</dt>';
@@ -373,30 +391,34 @@  discard block
 block discarded – undo
373 391
 	// If the person looking is allowed, they can check the members IP address and hostname.
374 392
 	if ($context['can_see_ip'])
375 393
 	{
376
-		if (!empty($context['member']['ip']))
377
-		echo '
394
+		if (!empty($context['member']['ip'])) {
395
+				echo '
378 396
 					<dt>', $txt['ip'], ': </dt>
379 397
 					<dd><a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['member']['ip'], ';u=', $context['member']['id'], '">', $context['member']['ip'], '</a></dd>';
398
+		}
380 399
 
381
-		if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip']))
382
-			echo '
400
+		if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip'])) {
401
+					echo '
383 402
 					<dt>', $txt['hostname'], ': </dt>
384 403
 					<dd>', $context['member']['hostname'], '</dd>';
404
+		}
385 405
 	}
386 406
 
387 407
 	echo '
388 408
 					<dt>', $txt['local_time'], ':</dt>
389 409
 					<dd>', $context['member']['local_time'], '</dd>';
390 410
 
391
-	if (!empty($modSettings['userLanguage']) && !empty($context['member']['language']))
392
-		echo '
411
+	if (!empty($modSettings['userLanguage']) && !empty($context['member']['language'])) {
412
+			echo '
393 413
 					<dt>', $txt['language'], ':</dt>
394 414
 					<dd>', $context['member']['language'], '</dd>';
415
+	}
395 416
 
396
-	if ($context['member']['show_last_login'])
397
-		echo '
417
+	if ($context['member']['show_last_login']) {
418
+			echo '
398 419
 					<dt>', $txt['lastLoggedIn'], ': </dt>
399 420
 					<dd>', $context['member']['last_login'], (!empty($context['member']['is_hidden']) ? ' (' . $txt['hidden'] . ')' : ''), '</dd>';
421
+	}
400 422
 
401 423
 	echo '
402 424
 				</dl>';
@@ -408,10 +430,11 @@  discard block
 block discarded – undo
408 430
 				<div class="custom_fields_above_signature">
409 431
 					<ul class="nolist">';
410 432
 
411
-		foreach ($context['print_custom_fields']['above_signature'] as $field)
412
-			if (!empty($field['output_html']))
433
+		foreach ($context['print_custom_fields']['above_signature'] as $field) {
434
+					if (!empty($field['output_html']))
413 435
 				echo '
414 436
 						<li>', $field['output_html'], '</li>';
437
+		}
415 438
 
416 439
 		echo '
417 440
 					</ul>
@@ -419,12 +442,13 @@  discard block
 block discarded – undo
419 442
 	}
420 443
 
421 444
 	// Show the users signature.
422
-	if ($context['signature_enabled'] && !empty($context['member']['signature']))
423
-		echo '
445
+	if ($context['signature_enabled'] && !empty($context['member']['signature'])) {
446
+			echo '
424 447
 				<div class="signature">
425 448
 					<h5>', $txt['signature'], ':</h5>
426 449
 					', $context['member']['signature'], '
427 450
 				</div>';
451
+	}
428 452
 
429 453
 	// Are there any custom profile fields for below the signature?
430 454
 	if (!empty($context['print_custom_fields']['below_signature']))
@@ -433,10 +457,11 @@  discard block
 block discarded – undo
433 457
 				<div class="custom_fields_below_signature">
434 458
 					<ul class="nolist">';
435 459
 
436
-		foreach ($context['print_custom_fields']['below_signature'] as $field)
437
-			if (!empty($field['output_html']))
460
+		foreach ($context['print_custom_fields']['below_signature'] as $field) {
461
+					if (!empty($field['output_html']))
438 462
 				echo '
439 463
 						<li>', $field['output_html'], '</li>';
464
+		}
440 465
 
441 466
 		echo '
442 467
 					</ul>
@@ -481,62 +506,70 @@  discard block
 block discarded – undo
481 506
 				</div>
482 507
 				<div class="list_posts">';
483 508
 
484
-			if (!$post['approved'])
485
-				echo '
509
+			if (!$post['approved']) {
510
+							echo '
486 511
 					<div class="approve_post">
487 512
 						<em>', $txt['post_awaiting_approval'], '</em>
488 513
 					</div>';
514
+			}
489 515
 
490 516
 			echo '
491 517
 					', $post['body'], '
492 518
 				</div>';
493 519
 
494
-			if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
495
-				echo '
520
+			if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
521
+							echo '
496 522
 				<div class="floatright">
497 523
 					<ul class="quickbuttons">';
524
+			}
498 525
 
499 526
 			// If they *can* reply?
500
-			if ($post['can_reply'])
501
-				echo '
527
+			if ($post['can_reply']) {
528
+							echo '
502 529
 						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>';
530
+			}
503 531
 
504 532
 			// If they *can* quote?
505
-			if ($post['can_quote'])
506
-				echo '
533
+			if ($post['can_quote']) {
534
+							echo '
507 535
 						<li><a href="', $scripturl . '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>';
536
+			}
508 537
 
509 538
 			// How about... even... remove it entirely?!
510
-			if ($post['can_delete'])
511
-				echo '
539
+			if ($post['can_delete']) {
540
+							echo '
512 541
 						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
542
+			}
513 543
 
514
-			if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
515
-				echo '
544
+			if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
545
+							echo '
516 546
 					</ul>
517 547
 				</div>';
548
+			}
518 549
 
519 550
 			echo '
520 551
 			</div>';
521 552
 		}
553
+	} else {
554
+			template_show_list('attachments');
522 555
 	}
523
-	else
524
-		template_show_list('attachments');
525 556
 
526 557
 	// No posts? Just end with a informative message.
527
-	if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts'])))
528
-		echo '
558
+	if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts']))) {
559
+			echo '
529 560
 			<div class="windowbg2">
530 561
 				', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), '
531 562
 			</div>';
563
+	}
532 564
 
533 565
 	// Show more page numbers.
534
-	if (!empty($context['page_index']))
535
-		echo '
566
+	if (!empty($context['page_index'])) {
567
+			echo '
536 568
 		<div class="pagesection">
537 569
 			<div class="pagelinks">', $context['page_index'], '</div>
538 570
 		</div>';
539
-}
571
+	}
572
+	}
540 573
 
541 574
 /**
542 575
  * Template for showing alerts within the alerts popup
@@ -546,11 +579,12 @@  discard block
 block discarded – undo
546 579
 	global $context, $txt, $scripturl;
547 580
 
548 581
 	// Do we have an update message?
549
-	if (!empty($context['update_message']))
550
-		echo '
582
+	if (!empty($context['update_message'])) {
583
+			echo '
551 584
 		<div class="infobox">
552 585
 			', $context['update_message'], '.
553 586
 		</div>';
587
+	}
554 588
 
555 589
 	echo '
556 590
 		<div class="cat_bar">
@@ -559,13 +593,12 @@  discard block
 block discarded – undo
559 593
 			</h3>
560 594
 		</div>';
561 595
 
562
-	if (empty($context['alerts']))
563
-		echo '
596
+	if (empty($context['alerts'])) {
597
+			echo '
564 598
 		<div class="information">
565 599
 			', $txt['alerts_none'], '
566 600
 		</div>';
567
-
568
-	else
601
+	} else
569 602
 	{
570 603
 		// Start the form.
571 604
 		echo '
@@ -627,12 +660,12 @@  discard block
 block discarded – undo
627 660
 		</div>' : '';
628 661
 
629 662
 	// No drafts? Just show an informative message.
630
-	if (empty($context['drafts']))
631
-		echo '
663
+	if (empty($context['drafts'])) {
664
+			echo '
632 665
 		<div class="windowbg2 centertext">
633 666
 			', $txt['draft_none'], '
634 667
 		</div>';
635
-	else
668
+	} else
636 669
 	{
637 670
 		// For every draft to be displayed, give it its own div, and show the important details of the draft.
638 671
 		foreach ($context['drafts'] as $draft)
@@ -643,11 +676,13 @@  discard block
 block discarded – undo
643 676
 					<div class="topic_details">
644 677
 						<h5><strong><a href="', $scripturl, '?board=', $draft['board']['id'], '.0">', $draft['board']['name'], '</a> / ', $draft['topic']['link'], '</strong> &nbsp; &nbsp;';
645 678
 
646
-			if (!empty($draft['sticky']))
647
-				echo '<span class="generic_icons sticky" title="', $txt['sticky_topic'], '"></span>';
679
+			if (!empty($draft['sticky'])) {
680
+							echo '<span class="generic_icons sticky" title="', $txt['sticky_topic'], '"></span>';
681
+			}
648 682
 
649
-			if (!empty($draft['locked']))
650
-				echo '<span class="generic_icons lock" title="', $txt['locked_topic'], '"></span>';
683
+			if (!empty($draft['locked'])) {
684
+							echo '<span class="generic_icons lock" title="', $txt['locked_topic'], '"></span>';
685
+			}
651 686
 
652 687
 			echo '
653 688
 						</h5>
@@ -680,12 +715,13 @@  discard block
 block discarded – undo
680 715
 {
681 716
 	global $context, $scripturl, $txt;
682 717
 
683
-	if (!empty($context['saved_successful']))
684
-		echo '
718
+	if (!empty($context['saved_successful'])) {
719
+			echo '
685 720
 					<div class="infobox">', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '</div>';
686
-	elseif (!empty($context['saved_failed']))
687
-		echo '
721
+	} elseif (!empty($context['saved_failed'])) {
722
+			echo '
688 723
 					<div class="errorbox">', $context['saved_failed'], '</div>';
724
+	}
689 725
 
690 726
 	echo '
691 727
 	<div id="edit_buddies">
@@ -699,24 +735,27 @@  discard block
 block discarded – undo
699 735
 				<th scope="col" class="quarter_table">', $txt['name'], '</th>
700 736
 				<th scope="col">', $txt['status'], '</th>';
701 737
 
702
-	if (allowedTo('moderate_forum'))
703
-		echo '
738
+	if (allowedTo('moderate_forum')) {
739
+			echo '
704 740
 				<th scope="col">', $txt['email'], '</th>';
741
+	}
705 742
 
706
-	if (!empty($context['custom_pf']))
707
-		foreach ($context['custom_pf'] as $column)
743
+	if (!empty($context['custom_pf'])) {
744
+			foreach ($context['custom_pf'] as $column)
708 745
 				echo '<th scope="col">', $column['label'], '</th>';
746
+	}
709 747
 
710 748
 	echo '
711 749
 				<th scope="col">', $txt['remove'], '</th>
712 750
 			</tr>';
713 751
 
714 752
 	// If they don't have any buddies don't list them!
715
-	if (empty($context['buddies']))
716
-		echo '
753
+	if (empty($context['buddies'])) {
754
+			echo '
717 755
 			<tr class="windowbg">
718 756
 				<td colspan="', allowedTo('moderate_forum') ? '10' : '9','"><strong>', $txt['no_buddies'], '</strong></td>
719 757
 			</tr>';
758
+	}
720 759
 
721 760
 		// Now loop through each buddy showing info on each.
722 761
 	else
@@ -728,15 +767,17 @@  discard block
 block discarded – undo
728 767
 					<td>', $buddy['link'], '</td>
729 768
 					<td><a href="', $buddy['online']['href'], '"><span class="' . ($buddy['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $buddy['online']['text'] . '"></span></a></td>';
730 769
 
731
-			if ($buddy['show_email'])
732
-				echo '
770
+			if ($buddy['show_email']) {
771
+							echo '
733 772
 					<td><a href="mailto:' . $buddy['email'] . '" rel="nofollow"><span class="generic_icons mail icon" title="' . $txt['email'] . ' ' . $buddy['name'] . '"></span></a></td>';
773
+			}
734 774
 
735 775
 			// Show the custom profile fields for this user.
736
-			if (!empty($context['custom_pf']))
737
-				foreach ($context['custom_pf'] as $key => $column)
776
+			if (!empty($context['custom_pf'])) {
777
+							foreach ($context['custom_pf'] as $key => $column)
738 778
 					echo '
739 779
 						<td class="lefttext">', $buddy['options'][$key], '</td>';
780
+			}
740 781
 
741 782
 			echo '
742 783
 					<td><a href="', $scripturl, '?action=profile;area=lists;sa=buddies;u=', $context['id_member'], ';remove=', $buddy['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons delete" title="', $txt['buddy_remove'], '"></span></a></td>
@@ -766,9 +807,10 @@  discard block
 block discarded – undo
766 807
 			</dl>
767 808
 		</div>';
768 809
 
769
-	if (!empty($context['token_check']))
770
-		echo '
810
+	if (!empty($context['token_check'])) {
811
+			echo '
771 812
 			<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
813
+	}
772 814
 
773 815
 	echo '
774 816
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -794,12 +836,13 @@  discard block
 block discarded – undo
794 836
 {
795 837
 	global $context, $scripturl, $txt;
796 838
 
797
-	if (!empty($context['saved_successful']))
798
-		echo '
839
+	if (!empty($context['saved_successful'])) {
840
+			echo '
799 841
 					<div class="infobox">', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '</div>';
800
-	elseif (!empty($context['saved_failed']))
801
-		echo '
842
+	} elseif (!empty($context['saved_failed'])) {
843
+			echo '
802 844
 					<div class="errorbox">', $context['saved_failed'], '</div>';
845
+	}
803 846
 
804 847
 	echo '
805 848
 	<div id="edit_buddies">
@@ -813,20 +856,22 @@  discard block
 block discarded – undo
813 856
 				<th scope="col" class="quarter_table">', $txt['name'], '</th>
814 857
 				<th scope="col">', $txt['status'], '</th>';
815 858
 
816
-	if (allowedTo('moderate_forum'))
817
-		echo '
859
+	if (allowedTo('moderate_forum')) {
860
+			echo '
818 861
 				<th scope="col">', $txt['email'], '</th>';
862
+	}
819 863
 
820 864
 	echo '
821 865
 				<th scope="col">', $txt['ignore_remove'] ,'</th>
822 866
 			</tr>';
823 867
 
824 868
 	// If they don't have anyone on their ignore list, don't list it!
825
-	if (empty($context['ignore_list']))
826
-		echo '
869
+	if (empty($context['ignore_list'])) {
870
+			echo '
827 871
 			<tr class="windowbg">
828 872
 				<td colspan="', allowedTo('moderate_forum') ? '4' : '3','"><strong>', $txt['no_ignore'], '</strong></td>
829 873
 			</tr>';
874
+	}
830 875
 
831 876
 	// Now loop through each buddy showing info on each.
832 877
 	foreach ($context['ignore_list'] as $member)
@@ -836,9 +881,10 @@  discard block
 block discarded – undo
836 881
 				<td>', $member['link'], '</td>
837 882
 				<td><a href="', $member['online']['href'], '"><span class="' . ($member['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $member['online']['text'] . '"></span></a></td>';
838 883
 
839
-		if ($member['show_email'])
840
-			echo '
884
+		if ($member['show_email']) {
885
+					echo '
841 886
 				<td><a href="mailto:' . $member['email'] . '" rel="nofollow"><span class="generic_icons mail icon" title="' . $txt['email'] . ' ' . $member['name'] . '"></span></a></td>';
887
+		}
842 888
 		echo '
843 889
 				<td><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore;remove=', $member['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons delete" title="', $txt['ignore_remove'], '"></span></a></td>
844 890
 			</tr>';
@@ -865,9 +911,10 @@  discard block
 block discarded – undo
865 911
 			</dl>
866 912
 		</div>';
867 913
 
868
-	if (!empty($context['token_check']))
869
-		echo '
914
+	if (!empty($context['token_check'])) {
915
+			echo '
870 916
 		<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
917
+	}
871 918
 
872 919
 	echo '
873 920
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -912,9 +959,10 @@  discard block
 block discarded – undo
912 959
 					<a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip'], ';u=', $context['member']['id'], '">', $context['last_ip'], '</a>';
913 960
 
914 961
 	// Second address detected?
915
-	if (!empty($context['last_ip2']))
916
-		echo '
962
+	if (!empty($context['last_ip2'])) {
963
+			echo '
917 964
 					, <a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip2'], ';u=', $context['member']['id'], '">', $context['last_ip2'], '</a>';
965
+	}
918 966
 
919 967
 	echo '
920 968
 				</dd>';
@@ -979,9 +1027,10 @@  discard block
 block discarded – undo
979 1027
 				<h3 class="catbg">', $txt['whois_title'], ' ', $context['ip'], '</h3>
980 1028
 			</div>
981 1029
 			<div class="windowbg2 noup">';
982
-			foreach ($context['whois_servers'] as $server)
983
-			echo '
1030
+			foreach ($context['whois_servers'] as $server) {
1031
+						echo '
984 1032
 				<a href="', $server['url'], '" target="_blank" class="new_win"', isset($context['auto_whois_server']) && $context['auto_whois_server']['name'] == $server['name'] ? ' style="font-weight: bold;"' : '', '>', $server['name'], '</a><br>';
1033
+			}
985 1034
 			echo '
986 1035
 			</div>
987 1036
 			<br>';
@@ -992,10 +1041,10 @@  discard block
 block discarded – undo
992 1041
 		<div class="cat_bar">
993 1042
 			<h3 class="catbg">', $txt['members_from_ip'], ' ', $context['ip'], '</h3>
994 1043
 		</div>';
995
-	if (empty($context['ips']))
996
-		echo '
1044
+	if (empty($context['ips'])) {
1045
+			echo '
997 1046
 		<p class="windowbg2 description"><em>', $txt['no_members_from_ip'], '</em></p>';
998
-	else
1047
+	} else
999 1048
 	{
1000 1049
 		echo '
1001 1050
 		<table class="table_grid">
@@ -1008,12 +1057,13 @@  discard block
 block discarded – undo
1008 1057
 			<tbody>';
1009 1058
 
1010 1059
 		// Loop through each of the members and display them.
1011
-		foreach ($context['ips'] as $ip => $memberlist)
1012
-			echo '
1060
+		foreach ($context['ips'] as $ip => $memberlist) {
1061
+					echo '
1013 1062
 				<tr class="windowbg">
1014 1063
 					<td><a href="', $context['base_url'], ';searchip=', $ip, '">', $ip, '</a></td>
1015 1064
 					<td>', implode(', ', $memberlist), '</td>
1016 1065
 				</tr>';
1066
+		}
1017 1067
 
1018 1068
 		echo '
1019 1069
 			</tbody>
@@ -1059,8 +1109,7 @@  discard block
 block discarded – undo
1059 1109
 	{
1060 1110
 		echo '
1061 1111
 		<div class="information">', $txt['showPermissions_all'], '</div>';
1062
-	}
1063
-	else
1112
+	} else
1064 1113
 	{
1065 1114
 		echo '
1066 1115
 		<div class="information">',$txt['showPermissions_help'],'</div>
@@ -1074,9 +1123,10 @@  discard block
 block discarded – undo
1074 1123
 				</div>
1075 1124
 				<div class="windowbg smalltext">
1076 1125
 					', $txt['showPermissions_restricted_boards_desc'], ':<br>';
1077
-				foreach ($context['no_access_boards'] as $no_access_board)
1078
-					echo '
1126
+				foreach ($context['no_access_boards'] as $no_access_board) {
1127
+									echo '
1079 1128
 						<a href="', $scripturl, '?board=', $no_access_board['id'], '.0">', $no_access_board['name'], '</a>', $no_access_board['is_last'] ? '' : ', ';
1129
+				}
1080 1130
 				echo '
1081 1131
 				</div>';
1082 1132
 		}
@@ -1108,12 +1158,13 @@  discard block
 block discarded – undo
1108 1158
 								</td>
1109 1159
 								<td class="smalltext">';
1110 1160
 
1111
-				if ($permission['is_denied'])
1112
-					echo '
1161
+				if ($permission['is_denied']) {
1162
+									echo '
1113 1163
 									<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']),'</span>';
1114
-				else
1115
-					echo '
1164
+				} else {
1165
+									echo '
1116 1166
 									', $txt['showPermissions_given'], ':&nbsp;', implode(', ', $permission['groups']['allowed']);
1167
+				}
1117 1168
 
1118 1169
 					echo '
1119 1170
 								</td>
@@ -1123,10 +1174,10 @@  discard block
 block discarded – undo
1123 1174
 						</tbody>
1124 1175
 					</table>
1125 1176
 				</div><br>';
1126
-		}
1127
-		else
1128
-			echo '
1177
+		} else {
1178
+					echo '
1129 1179
 			<p class="windowbg2">', $txt['showPermissions_none_general'], '</p>';
1180
+		}
1130 1181
 
1131 1182
 		// Board permission section.
1132 1183
 		echo '
@@ -1136,14 +1187,16 @@  discard block
 block discarded – undo
1136 1187
 						<a id="board_permissions"></a>', $txt['showPermissions_select'], ':
1137 1188
 						<select name="board" onchange="if (this.options[this.selectedIndex].value) this.form.submit();">
1138 1189
 							<option value="0"', $context['board'] == 0 ? ' selected' : '', '>', $txt['showPermissions_global'], '&nbsp;</option>';
1139
-				if (!empty($context['boards']))
1140
-					echo '
1190
+				if (!empty($context['boards'])) {
1191
+									echo '
1141 1192
 							<option value="" disabled>---------------------------</option>';
1193
+				}
1142 1194
 
1143 1195
 				// Fill the box with any local permission boards.
1144
-				foreach ($context['boards'] as $board)
1145
-					echo '
1196
+				foreach ($context['boards'] as $board) {
1197
+									echo '
1146 1198
 							<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
1199
+				}
1147 1200
 
1148 1201
 				echo '
1149 1202
 						</select>
@@ -1174,8 +1227,7 @@  discard block
 block discarded – undo
1174 1227
 				{
1175 1228
 					echo '
1176 1229
 							<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']), '</span>';
1177
-				}
1178
-				else
1230
+				} else
1179 1231
 				{
1180 1232
 					echo '
1181 1233
 							', $txt['showPermissions_given'], ': &nbsp;', implode(', ', $permission['groups']['allowed']);
@@ -1187,10 +1239,10 @@  discard block
 block discarded – undo
1187 1239
 			echo '
1188 1240
 				</tbody>
1189 1241
 			</table>';
1190
-		}
1191
-		else
1192
-			echo '
1242
+		} else {
1243
+					echo '
1193 1244
 			<p class="windowbg2">', $txt['showPermissions_none_board'], '</p>';
1245
+		}
1194 1246
 	echo '
1195 1247
 			</div>
1196 1248
 		</div>';
@@ -1232,9 +1284,10 @@  discard block
 block discarded – undo
1232 1284
 			</div>';
1233 1285
 
1234 1286
 	// If they haven't post at all, don't draw the graph.
1235
-	if (empty($context['posts_by_time']))
1236
-		echo '
1287
+	if (empty($context['posts_by_time'])) {
1288
+			echo '
1237 1289
 			<p class="centertext padding">', $txt['statPanel_noPosts'], '</p>';
1290
+	}
1238 1291
 	// Otherwise do!
1239 1292
 	else
1240 1293
 	{
@@ -1273,11 +1326,10 @@  discard block
 block discarded – undo
1273 1326
 					</h3>
1274 1327
 				</div>';
1275 1328
 
1276
-	if (empty($context['popular_boards']))
1277
-		echo '
1329
+	if (empty($context['popular_boards'])) {
1330
+			echo '
1278 1331
 				<p class="centertext padding">', $txt['statPanel_noPosts'], '</p>';
1279
-
1280
-	else
1332
+	} else
1281 1333
 	{
1282 1334
 		echo '
1283 1335
 				<dl class="stats">';
@@ -1308,10 +1360,10 @@  discard block
 block discarded – undo
1308 1360
 					</h3>
1309 1361
 				</div>';
1310 1362
 
1311
-	if (empty($context['board_activity']))
1312
-		echo '
1363
+	if (empty($context['board_activity'])) {
1364
+			echo '
1313 1365
 				<p class="centertext padding">', $txt['statPanel_noPosts'], '</p>';
1314
-	else
1366
+	} else
1315 1367
 	{
1316 1368
 		echo '
1317 1369
 				<dl class="stats">';
@@ -1359,41 +1411,46 @@  discard block
 block discarded – undo
1359 1411
 				<h3 class="catbg profile_hd">';
1360 1412
 
1361 1413
 		// Don't say "Profile" if this isn't the profile...
1362
-		if (!empty($context['profile_header_text']))
1363
-			echo '
1414
+		if (!empty($context['profile_header_text'])) {
1415
+					echo '
1364 1416
 					', $context['profile_header_text'];
1365
-		else
1366
-			echo '
1417
+		} else {
1418
+					echo '
1367 1419
 					', $txt['profile'];
1420
+		}
1368 1421
 
1369 1422
 		echo '
1370 1423
 				</h3>
1371 1424
 			</div>';
1372 1425
 
1373 1426
 	// Have we some description?
1374
-	if ($context['page_desc'])
1375
-		echo '
1427
+	if ($context['page_desc']) {
1428
+			echo '
1376 1429
 			<p class="information">', $context['page_desc'], '</p>';
1430
+	}
1377 1431
 
1378 1432
 	echo '
1379 1433
 			<div class="roundframe">';
1380 1434
 
1381 1435
 	// Any bits at the start?
1382
-	if (!empty($context['profile_prehtml']))
1383
-		echo '
1436
+	if (!empty($context['profile_prehtml'])) {
1437
+			echo '
1384 1438
 				<div>', $context['profile_prehtml'], '</div>';
1439
+	}
1385 1440
 
1386
-	if (!empty($context['profile_fields']))
1387
-		echo '
1441
+	if (!empty($context['profile_fields'])) {
1442
+			echo '
1388 1443
 				<dl>';
1444
+	}
1389 1445
 
1390 1446
 	// Start the big old loop 'of love.
1391 1447
 	$lastItem = 'hr';
1392 1448
 	foreach ($context['profile_fields'] as $key => $field)
1393 1449
 	{
1394 1450
 		// We add a little hack to be sure we never get more than one hr in a row!
1395
-		if ($lastItem == 'hr' && $field['type'] == 'hr')
1396
-			continue;
1451
+		if ($lastItem == 'hr' && $field['type'] == 'hr') {
1452
+					continue;
1453
+		}
1397 1454
 
1398 1455
 		$lastItem = $field['type'];
1399 1456
 		if ($field['type'] == 'hr')
@@ -1402,48 +1459,50 @@  discard block
 block discarded – undo
1402 1459
 				</dl>
1403 1460
 				<hr>
1404 1461
 				<dl>';
1405
-		}
1406
-		elseif ($field['type'] == 'callback')
1462
+		} elseif ($field['type'] == 'callback')
1407 1463
 		{
1408 1464
 			if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func']))
1409 1465
 			{
1410 1466
 				$callback_func = 'template_profile_' . $field['callback_func'];
1411 1467
 				$callback_func();
1412 1468
 			}
1413
-		}
1414
-		else
1469
+		} else
1415 1470
 		{
1416 1471
 			echo '
1417 1472
 					<dt>
1418 1473
 						<strong', !empty($field['is_error']) ? ' class="error"' : '', '>', $field['type'] !== 'label' ? '<label for="' . $key . '">' : '', $field['label'], $field['type'] !== 'label' ? '</label>' : '', '</strong>';
1419 1474
 
1420 1475
 			// Does it have any subtext to show?
1421
-			if (!empty($field['subtext']))
1422
-				echo '
1476
+			if (!empty($field['subtext'])) {
1477
+							echo '
1423 1478
 						<br>
1424 1479
 						<span class="smalltext">', $field['subtext'], '</span>';
1480
+			}
1425 1481
 
1426 1482
 			echo '
1427 1483
 					</dt>
1428 1484
 					<dd>';
1429 1485
 
1430 1486
 			// Want to put something infront of the box?
1431
-			if (!empty($field['preinput']))
1432
-				echo '
1487
+			if (!empty($field['preinput'])) {
1488
+							echo '
1433 1489
 						', $field['preinput'];
1490
+			}
1434 1491
 
1435 1492
 			// What type of data are we showing?
1436
-			if ($field['type'] == 'label')
1437
-				echo '
1493
+			if ($field['type'] == 'label') {
1494
+							echo '
1438 1495
 						', $field['value'];
1496
+			}
1439 1497
 
1440 1498
 			// Maybe it's a text box - very likely!
1441 1499
 			elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'time', 'url')))
1442 1500
 			{
1443
-				if ($field['type'] == 'int' || $field['type'] == 'float')
1444
-					$type = 'number';
1445
-				else
1446
-					$type = $field['type'];
1501
+				if ($field['type'] == 'int' || $field['type'] == 'float') {
1502
+									$type = 'number';
1503
+				} else {
1504
+									$type = $field['type'];
1505
+				}
1447 1506
 				$step = $field['type'] == 'float' ? ' step="0.1"' : '';
1448 1507
 
1449 1508
 
@@ -1451,9 +1510,10 @@  discard block
 block discarded – undo
1451 1510
 						<input type="', $type, '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '"', $step, '>';
1452 1511
 			}
1453 1512
 			// You "checking" me out? ;)
1454
-			elseif ($field['type'] == 'check')
1455
-				echo '
1513
+			elseif ($field['type'] == 'check') {
1514
+							echo '
1456 1515
 						<input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" class="input_check" ', $field['input_attr'], '>';
1516
+			}
1457 1517
 
1458 1518
 			// Always fun - select boxes!
1459 1519
 			elseif ($field['type'] == 'select')
@@ -1464,13 +1524,15 @@  discard block
 block discarded – undo
1464 1524
 				if (isset($field['options']))
1465 1525
 				{
1466 1526
 					// Is this some code to generate the options?
1467
-					if (!is_array($field['options']))
1468
-						$field['options'] = $field['options']();
1527
+					if (!is_array($field['options'])) {
1528
+											$field['options'] = $field['options']();
1529
+					}
1469 1530
 					// Assuming we now have some!
1470
-					if (is_array($field['options']))
1471
-						foreach ($field['options'] as $value => $name)
1531
+					if (is_array($field['options'])) {
1532
+											foreach ($field['options'] as $value => $name)
1472 1533
 							echo '
1473 1534
 								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
1535
+					}
1474 1536
 				}
1475 1537
 
1476 1538
 				echo '
@@ -1478,25 +1540,28 @@  discard block
 block discarded – undo
1478 1540
 			}
1479 1541
 
1480 1542
 			// Something to end with?
1481
-			if (!empty($field['postinput']))
1482
-				echo '
1543
+			if (!empty($field['postinput'])) {
1544
+							echo '
1483 1545
 							', $field['postinput'];
1546
+			}
1484 1547
 
1485 1548
 			echo '
1486 1549
 					</dd>';
1487 1550
 		}
1488 1551
 	}
1489 1552
 
1490
-	if (!empty($context['profile_fields']))
1491
-		echo '
1553
+	if (!empty($context['profile_fields'])) {
1554
+			echo '
1492 1555
 				</dl>';
1556
+	}
1493 1557
 
1494 1558
 	// Are there any custom profile fields - if so print them!
1495 1559
 	if (!empty($context['custom_fields']))
1496 1560
 	{
1497
-		if ($lastItem != 'hr')
1498
-			echo '
1561
+		if ($lastItem != 'hr') {
1562
+					echo '
1499 1563
 				<hr>';
1564
+		}
1500 1565
 
1501 1566
 		echo '
1502 1567
 				<dl>';
@@ -1519,13 +1584,14 @@  discard block
 block discarded – undo
1519 1584
 	}
1520 1585
 
1521 1586
 	// Any closing HTML?
1522
-	if (!empty($context['profile_posthtml']))
1523
-		echo '
1587
+	if (!empty($context['profile_posthtml'])) {
1588
+			echo '
1524 1589
 				<div>', $context['profile_posthtml'], '</div>';
1590
+	}
1525 1591
 
1526 1592
 	// Only show the password box if it's actually needed.
1527
-	if ($context['require_password'])
1528
-		echo '
1593
+	if ($context['require_password']) {
1594
+			echo '
1529 1595
 				<dl>
1530 1596
 					<dt>
1531 1597
 						<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], ': </label></strong><br>
@@ -1535,18 +1601,21 @@  discard block
 block discarded – undo
1535 1601
 						<input type="password" name="oldpasswrd" id="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password">
1536 1602
 					</dd>
1537 1603
 				</dl>';
1604
+	}
1538 1605
 
1539 1606
 	// The button shouldn't say "Change profile" unless we're changing the profile...
1540
-	if (!empty($context['submit_button_text']))
1541
-		echo '
1607
+	if (!empty($context['submit_button_text'])) {
1608
+			echo '
1542 1609
 				<input type="submit" name="save" value="', $context['submit_button_text'], '" class="button_submit">';
1543
-	else
1544
-		echo '
1610
+	} else {
1611
+			echo '
1545 1612
 				<input type="submit" name="save" value="', $txt['change_profile'], '" class="button_submit">';
1613
+	}
1546 1614
 
1547
-	if (!empty($context['token_check']))
1548
-		echo '
1615
+	if (!empty($context['token_check'])) {
1616
+			echo '
1549 1617
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
1618
+	}
1550 1619
 
1551 1620
 	echo '
1552 1621
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -1556,10 +1625,11 @@  discard block
 block discarded – undo
1556 1625
 		</form>';
1557 1626
 
1558 1627
 	// Any final spellchecking stuff?
1559
-	if (!empty($context['show_spellchecking']))
1560
-		echo '
1628
+	if (!empty($context['show_spellchecking'])) {
1629
+			echo '
1561 1630
 		<form name="spell_form" id="spell_form" method="post" accept-charset="', $context['character_set'], '" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value=""></form>';
1562
-}
1631
+	}
1632
+	}
1563 1633
 
1564 1634
 /**
1565 1635
  * Personal Message settings.
@@ -1596,10 +1666,11 @@  discard block
 block discarded – undo
1596 1666
 										<select name="pm_receive_from" id="pm_receive_from">
1597 1667
 												<option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected' : '', '>', $txt['pm_receive_from_everyone'], '</option>';
1598 1668
 
1599
-	if (!empty($modSettings['enable_buddylist']))
1600
-		echo '
1669
+	if (!empty($modSettings['enable_buddylist'])) {
1670
+			echo '
1601 1671
 												<option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected' : '', '>', $txt['pm_receive_from_ignore'], '</option>
1602 1672
 												<option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected' : '', '>', $txt['pm_receive_from_buddies'], '</option>';
1673
+	}
1603 1674
 
1604 1675
 	echo '
1605 1676
 												<option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected' : '', '>', $txt['pm_receive_from_admins'], '</option>
@@ -1655,8 +1726,8 @@  discard block
 block discarded – undo
1655 1726
 								<input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked' : '', ' class="input_check">
1656 1727
 							</dd>';
1657 1728
 
1658
-	if (!empty($modSettings['allow_no_censored']))
1659
-		echo '
1729
+	if (!empty($modSettings['allow_no_censored'])) {
1730
+			echo '
1660 1731
 							<dt>
1661 1732
 								<label for="show_no_censored">' . $txt['show_no_censored'] . '</label>
1662 1733
 							</dt>
@@ -1664,6 +1735,7 @@  discard block
 block discarded – undo
1664 1735
 								<input type="hidden" name="default_options[show_no_censored]" value="0">
1665 1736
 								<input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked' : '') . ' class="input_check">
1666 1737
 							</dd>';
1738
+	}
1667 1739
 
1668 1740
 	echo '
1669 1741
 							<dt>
@@ -1674,8 +1746,8 @@  discard block
 block discarded – undo
1674 1746
 								<input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked' : '', ' class="input_check">
1675 1747
 							</dd>';
1676 1748
 
1677
-	if (!empty($modSettings['enable_buddylist']))
1678
-		echo '
1749
+	if (!empty($modSettings['enable_buddylist'])) {
1750
+			echo '
1679 1751
 							<dt>
1680 1752
 								<label for="posts_apply_ignore_list">', $txt['posts_apply_ignore_list'], '</label>
1681 1753
 							</dt>
@@ -1683,6 +1755,7 @@  discard block
 block discarded – undo
1683 1755
 								<input type="hidden" name="default_options[posts_apply_ignore_list]" value="0">
1684 1756
 								<input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked' : '', ' class="input_check">
1685 1757
 							</dd>';
1758
+	}
1686 1759
 
1687 1760
 	echo '
1688 1761
 							<dt>
@@ -1694,8 +1767,8 @@  discard block
 block discarded – undo
1694 1767
 							</dd>';
1695 1768
 
1696 1769
 	// Choose WYSIWYG settings?
1697
-	if (empty($modSettings['disable_wysiwyg']))
1698
-		echo '
1770
+	if (empty($modSettings['disable_wysiwyg'])) {
1771
+			echo '
1699 1772
 							<dt>
1700 1773
 								<label for="wysiwyg_default">', $txt['wysiwyg_default'], '</label>
1701 1774
 							</dt>
@@ -1703,6 +1776,7 @@  discard block
 block discarded – undo
1703 1776
 								<input type="hidden" name="default_options[wysiwyg_default]" value="0">
1704 1777
 								<input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked' : '', ' class="input_check">
1705 1778
 							</dd>';
1779
+	}
1706 1780
 
1707 1781
 	if (empty($modSettings['disableCustomPerPage']))
1708 1782
 	{
@@ -1733,8 +1807,8 @@  discard block
 block discarded – undo
1733 1807
 							</dd>';
1734 1808
 	}
1735 1809
 
1736
-	if (!empty($modSettings['cal_enabled']))
1737
-		echo '
1810
+	if (!empty($modSettings['cal_enabled'])) {
1811
+			echo '
1738 1812
 							<dt>
1739 1813
 								<label for="calendar_start_day">', $txt['calendar_start_day'], ':</label>
1740 1814
 							</dt>
@@ -1745,9 +1819,10 @@  discard block
 block discarded – undo
1745 1819
 									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected' : '', '>', $txt['days'][6], '</option>
1746 1820
 								</select>
1747 1821
 							</dd>';
1822
+	}
1748 1823
 
1749
-	if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_autosave_enabled']))
1750
-		echo '
1824
+	if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_autosave_enabled'])) {
1825
+			echo '
1751 1826
 							<dt>
1752 1827
 								<label for="drafts_autosave_enabled">', $txt['drafts_autosave_enabled'], '</label>
1753 1828
 							</dt>
@@ -1755,8 +1830,9 @@  discard block
 block discarded – undo
1755 1830
 								<input type="hidden" name="default_options[drafts_autosave_enabled]" value="0">
1756 1831
 								<input type="checkbox" name="default_options[drafts_autosave_enabled]" id="drafts_autosave_enabled" value="1"', !empty($context['member']['options']['drafts_autosave_enabled']) ? ' checked' : '', ' class="input_check">
1757 1832
 							</dd>';
1758
-	if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_show_saved_enabled']))
1759
-		echo '
1833
+	}
1834
+	if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_show_saved_enabled'])) {
1835
+			echo '
1760 1836
 							<dt>
1761 1837
 								<label for="drafts_show_saved_enabled">', $txt['drafts_show_saved_enabled'], '</label>
1762 1838
 							</dt>
@@ -1764,6 +1840,7 @@  discard block
 block discarded – undo
1764 1840
 								<input type="hidden" name="default_options[drafts_show_saved_enabled]" value="0">
1765 1841
 								<input type="checkbox" name="default_options[drafts_show_saved_enabled]" id="drafts_show_saved_enabled" value="1"', !empty($context['member']['options']['drafts_show_saved_enabled']) ? ' checked' : '', ' class="input_check">
1766 1842
 							</dd>';
1843
+	}
1767 1844
 
1768 1845
 	echo '
1769 1846
 							<dt>
@@ -1809,8 +1886,8 @@  discard block
 block discarded – undo
1809 1886
 				<dl class="settings">';
1810 1887
 
1811 1888
 	// Allow notification on announcements to be disabled?
1812
-	if (!empty($modSettings['allow_disableAnnounce']))
1813
-		echo '
1889
+	if (!empty($modSettings['allow_disableAnnounce'])) {
1890
+			echo '
1814 1891
 					<dt>
1815 1892
 						<label for="notify_announcements">', $txt['notify_important_email'], '</label>
1816 1893
 					</dt>
@@ -1818,9 +1895,10 @@  discard block
 block discarded – undo
1818 1895
 						<input type="hidden" name="notify_announcements" value="0">
1819 1896
 						<input type="checkbox" id="notify_announcements" name="notify_announcements" value="1"', !empty($context['member']['notify_announcements']) ? ' checked' : '', ' class="input_check">
1820 1897
 					</dd>';
1898
+	}
1821 1899
 
1822
-	if (!empty($modSettings['enable_ajax_alerts']))
1823
-		echo '
1900
+	if (!empty($modSettings['enable_ajax_alerts'])) {
1901
+			echo '
1824 1902
 					<dt>
1825 1903
 						<label for="notify_send_body">', $txt['notify_alert_timeout'], '</label>
1826 1904
 					</dt>
@@ -1828,6 +1906,7 @@  discard block
 block discarded – undo
1828 1906
 						<input type="number" size="4" id="notify_alert_timeout" name="opt_alert_timeout" min="0" value="', $context['member']['alert_timeout'], '" class="input_text">
1829 1907
 					</dd>
1830 1908
 		';
1909
+	}
1831 1910
 
1832 1911
 	echo '
1833 1912
 				</dl>
@@ -1857,9 +1936,10 @@  discard block
 block discarded – undo
1857 1936
 					<td colspan="3">';
1858 1937
 				$label = $txt['alert_opt_' . $opts[1]];
1859 1938
 				$label_pos = isset($opts['label']) ? $opts['label'] : '';
1860
-				if ($label_pos == 'before')
1861
-					echo '
1939
+				if ($label_pos == 'before') {
1940
+									echo '
1862 1941
 					<label for="opt_', $opts[1], '">', $label, '</label>';
1942
+				}
1863 1943
 
1864 1944
 				$this_value = isset($context['alert_prefs'][$opts[1]]) ? $context['alert_prefs'][$opts[1]] : 0;
1865 1945
 				switch ($opts[0])
@@ -1871,17 +1951,19 @@  discard block
 block discarded – undo
1871 1951
 					case 'select':
1872 1952
 						echo '
1873 1953
 						<select name="opt_', $opts[1], '" id="opt_', $opts[1], '">';
1874
-						foreach ($opts['opts'] as $k => $v)
1875
-							echo '
1954
+						foreach ($opts['opts'] as $k => $v) {
1955
+													echo '
1876 1956
 							<option value="', $k, '"', $this_value == $k ? ' selected' : '', '>', $v, '</option>';
1957
+						}
1877 1958
 						echo '
1878 1959
 						</select>';
1879 1960
 						break;
1880 1961
 				}
1881 1962
 
1882
-				if ($label_pos == 'after')
1883
-					echo '
1963
+				if ($label_pos == 'after') {
1964
+									echo '
1884 1965
 					<label for="opt_', $opts[1], '">', $label, '</label>';
1966
+				}
1885 1967
 
1886 1968
 				echo '
1887 1969
 					</td>
@@ -1995,11 +2077,12 @@  discard block
 block discarded – undo
1995 2077
 			<p class="information">', $txt['groupMembership_info'], '</p>';
1996 2078
 
1997 2079
 	// Do we have an update message?
1998
-	if (!empty($context['update_message']))
1999
-		echo '
2080
+	if (!empty($context['update_message'])) {
2081
+			echo '
2000 2082
 			<div class="infobox">
2001 2083
 				', $context['update_message'], '.
2002 2084
 			</div>';
2085
+	}
2003 2086
 
2004 2087
 	echo '
2005 2088
 		<div id="groups">';
@@ -2021,8 +2104,7 @@  discard block
 block discarded – undo
2021 2104
 					</div>
2022 2105
 				</div>
2023 2106
 			</div>';
2024
-	}
2025
-	else
2107
+	} else
2026 2108
 	{
2027 2109
 		echo '
2028 2110
 			<div class="title_bar">
@@ -2034,27 +2116,30 @@  discard block
 block discarded – undo
2034 2116
 			echo '
2035 2117
 					<div class="windowbg" id="primdiv_', $group['id'], '">';
2036 2118
 
2037
-				if ($context['can_edit_primary'])
2038
-					echo '
2119
+				if ($context['can_edit_primary']) {
2120
+									echo '
2039 2121
 						<input type="radio" name="primary" id="primary_', $group['id'], '" value="', $group['id'], '"', $group['is_primary'] ? ' checked' : '', ' onclick="highlightSelected(\'primdiv_' . $group['id'] . '\');"', $group['can_be_primary'] ? '' : ' disabled', ' class="input_radio">';
2122
+				}
2040 2123
 
2041 2124
 				echo '
2042 2125
 						<label for="primary_', $group['id'], '"><strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br><span class="smalltext">' . $group['desc'] . '</span>' : ''), '</label>';
2043 2126
 
2044 2127
 				// Can they leave their group?
2045
-				if ($group['can_leave'])
2046
-					echo '
2128
+				if ($group['can_leave']) {
2129
+									echo '
2047 2130
 						<a href="' . $scripturl . '?action=profile;save;u=' . $context['id_member'] . ';area=groupmembership;' . $context['session_var'] . '=' . $context['session_id'] . ';gid=' . $group['id'] . ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '">' . $txt['leave_group'] . '</a>';
2131
+				}
2048 2132
 
2049 2133
 				echo '
2050 2134
 					</div>';
2051 2135
 		}
2052 2136
 
2053
-		if ($context['can_edit_primary'])
2054
-			echo '
2137
+		if ($context['can_edit_primary']) {
2138
+					echo '
2055 2139
 			<div class="padding righttext">
2056 2140
 				<input type="submit" value="', $txt['make_primary'], '" class="button_submit">
2057 2141
 			</div>';
2142
+		}
2058 2143
 
2059 2144
 		// Any groups they can join?
2060 2145
 		if (!empty($context['groups']['available']))
@@ -2070,15 +2155,16 @@  discard block
 block discarded – undo
2070 2155
 					<div class="windowbg">
2071 2156
 						<strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br><span class="smalltext">' . $group['desc'] . '</span>' : ''), '';
2072 2157
 
2073
-				if ($group['type'] == 3)
2074
-					echo '
2158
+				if ($group['type'] == 3) {
2159
+									echo '
2075 2160
 						<a href="', $scripturl, '?action=profile;save;u=', $context['id_member'], ';area=groupmembership;', $context['session_var'], '=', $context['session_id'], ';gid=', $group['id'], ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '" class="button floatright">', $txt['join_group'], '</a>';
2076
-				elseif ($group['type'] == 2 && $group['pending'])
2077
-					echo '
2161
+				} elseif ($group['type'] == 2 && $group['pending']) {
2162
+									echo '
2078 2163
 						<span class="floatright">', $txt['approval_pending'],'</span>';
2079
-				elseif ($group['type'] == 2)
2080
-					echo '
2164
+				} elseif ($group['type'] == 2) {
2165
+									echo '
2081 2166
 						<a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], '" class="button floatright">', $txt['request_group'], '</a>';
2167
+				}
2082 2168
 
2083 2169
 				echo '
2084 2170
 					</div>';
@@ -2101,9 +2187,10 @@  discard block
 block discarded – undo
2101 2187
 
2102 2188
 			prevDiv.className = "windowbg";
2103 2189
 		}';
2104
-		if (isset($context['groups']['member'][$context['primary_group']]))
2105
-			echo '
2190
+		if (isset($context['groups']['member'][$context['primary_group']])) {
2191
+					echo '
2106 2192
 		highlightSelected("primdiv_' . $context['primary_group'] . '");';
2193
+		}
2107 2194
 		echo '
2108 2195
 	</script>';
2109 2196
 	}
@@ -2111,9 +2198,10 @@  discard block
 block discarded – undo
2111 2198
 	echo '
2112 2199
 		</div>';
2113 2200
 
2114
-	if (!empty($context['token_check']))
2115
-		echo '
2201
+	if (!empty($context['token_check'])) {
2202
+			echo '
2116 2203
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
2204
+	}
2117 2205
 
2118 2206
 	echo '
2119 2207
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -2160,14 +2248,15 @@  discard block
 block discarded – undo
2160 2248
 
2161 2249
 		foreach ($category['boards'] as $board)
2162 2250
 		{
2163
-			if ($i == $limit)
2164
-				echo '
2251
+			if ($i == $limit) {
2252
+							echo '
2165 2253
 						</ul>
2166 2254
 					</li>
2167 2255
 				</ul>
2168 2256
 				<ul class="ignoreboards floatright">
2169 2257
 					<li class="category">
2170 2258
 						<ul>';
2259
+			}
2171 2260
 
2172 2261
 			echo '
2173 2262
 							<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
@@ -2213,10 +2302,11 @@  discard block
 block discarded – undo
2213 2302
 
2214 2303
 	// Work out the starting color.
2215 2304
 	$context['current_color'] = $context['colors'][0];
2216
-	foreach ($context['colors'] as $limit => $color)
2217
-		if ($context['member']['warning'] >= $limit)
2305
+	foreach ($context['colors'] as $limit => $color) {
2306
+			if ($context['member']['warning'] >= $limit)
2218 2307
 			$context['current_color'] = $color;
2219
-}
2308
+	}
2309
+	}
2220 2310
 
2221 2311
 // Show all warnings of a user?
2222 2312
 function template_viewWarning()
@@ -2255,14 +2345,15 @@  discard block
 block discarded – undo
2255 2345
 				</dd>';
2256 2346
 
2257 2347
 		// There's some impact of this?
2258
-		if (!empty($context['level_effects'][$context['current_level']]))
2259
-			echo '
2348
+		if (!empty($context['level_effects'][$context['current_level']])) {
2349
+					echo '
2260 2350
 				<dt>
2261 2351
 					<strong>', $txt['profile_viewwarning_impact'], ':</strong>
2262 2352
 				</dt>
2263 2353
 				<dd>
2264 2354
 					', $context['level_effects'][$context['current_level']], '
2265 2355
 				</dd>';
2356
+		}
2266 2357
 
2267 2358
 		echo '
2268 2359
 			</dl>
@@ -2300,10 +2391,11 @@  discard block
 block discarded – undo
2300 2391
 
2301 2392
 			// Otherwise see what we can do...';
2302 2393
 
2303
-	foreach ($context['notification_templates'] as $k => $type)
2304
-		echo '
2394
+	foreach ($context['notification_templates'] as $k => $type) {
2395
+			echo '
2305 2396
 			if (index == ', $k, ')
2306 2397
 				document.getElementById(\'warn_body\').value = "', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";';
2398
+	}
2307 2399
 
2308 2400
 	echo '
2309 2401
 		}
@@ -2313,10 +2405,11 @@  discard block
 block discarded – undo
2313 2405
 			// Also set the right effect.
2314 2406
 			effectText = "";';
2315 2407
 
2316
-	foreach ($context['level_effects'] as $limit => $text)
2317
-		echo '
2408
+	foreach ($context['level_effects'] as $limit => $text) {
2409
+			echo '
2318 2410
 			if (slideAmount >= ', $limit, ')
2319 2411
 				effectText = "', $text, '";';
2412
+	}
2320 2413
 
2321 2414
 	echo '
2322 2415
 			setInnerHTML(document.getElementById(\'cur_level_div\'), slideAmount + \'% (\' + effectText + \')\');
@@ -2331,31 +2424,34 @@  discard block
 block discarded – undo
2331 2424
 			</h3>
2332 2425
 		</div>';
2333 2426
 
2334
-	if (!$context['user']['is_owner'])
2335
-		echo '
2427
+	if (!$context['user']['is_owner']) {
2428
+			echo '
2336 2429
 		<p class="information">', $txt['profile_warning_desc'], '</p>';
2430
+	}
2337 2431
 
2338 2432
 	echo '
2339 2433
 		<div class="windowbg">
2340 2434
 			<dl class="settings">';
2341 2435
 
2342
-	if (!$context['user']['is_owner'])
2343
-		echo '
2436
+	if (!$context['user']['is_owner']) {
2437
+			echo '
2344 2438
 				<dt>
2345 2439
 					<strong>', $txt['profile_warning_name'], ':</strong>
2346 2440
 				</dt>
2347 2441
 				<dd>
2348 2442
 					<strong>', $context['member']['name'], '</strong>
2349 2443
 				</dd>';
2444
+	}
2350 2445
 
2351 2446
 	echo '
2352 2447
 				<dt>
2353 2448
 					<strong>', $txt['profile_warning_level'], ':</strong>';
2354 2449
 
2355 2450
 	// Is there only so much they can apply?
2356
-	if ($context['warning_limit'])
2357
-		echo '
2451
+	if ($context['warning_limit']) {
2452
+			echo '
2358 2453
 					<br><span class="smalltext">', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), '</span>';
2454
+	}
2359 2455
 
2360 2456
 	echo '
2361 2457
 				</dt>
@@ -2408,9 +2504,10 @@  discard block
 block discarded – undo
2408 2504
 						<option value="-1">', $txt['profile_warning_notify_template'], '</option>
2409 2505
 						<option value="-1" disabled>------------------------------</option>';
2410 2506
 
2411
-		foreach ($context['notification_templates'] as $id_template => $template)
2412
-			echo '
2507
+		foreach ($context['notification_templates'] as $id_template => $template) {
2508
+					echo '
2413 2509
 						<option value="', $id_template, '">', $template['title'], '</option>';
2510
+		}
2414 2511
 
2415 2512
 		echo '
2416 2513
 					</select>
@@ -2422,9 +2519,10 @@  discard block
 block discarded – undo
2422 2519
 			</dl>
2423 2520
 			<div class="righttext">';
2424 2521
 
2425
-	if (!empty($context['token_check']))
2426
-		echo '
2522
+	if (!empty($context['token_check'])) {
2523
+			echo '
2427 2524
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
2525
+	}
2428 2526
 
2429 2527
 	echo '
2430 2528
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -2440,8 +2538,8 @@  discard block
 block discarded – undo
2440 2538
 	echo '
2441 2539
 	<script>';
2442 2540
 
2443
-	if (!$context['user']['is_owner'])
2444
-		echo '
2541
+	if (!$context['user']['is_owner']) {
2542
+			echo '
2445 2543
 		modifyWarnNotify();
2446 2544
 		$(document).ready(function() {
2447 2545
 			$("#preview_button").click(function() {
@@ -2480,6 +2578,7 @@  discard block
 block discarded – undo
2480 2578
 			});
2481 2579
 			return false;
2482 2580
 		}';
2581
+	}
2483 2582
 
2484 2583
 	echo '
2485 2584
 	</script>';
@@ -2502,16 +2601,18 @@  discard block
 block discarded – undo
2502 2601
 			</div>';
2503 2602
 
2504 2603
 	// If deleting another account give them a lovely info box.
2505
-	if (!$context['user']['is_owner'])
2506
-		echo '
2604
+	if (!$context['user']['is_owner']) {
2605
+			echo '
2507 2606
 			<p class="information">', $txt['deleteAccount_desc'], '</p>';
2607
+	}
2508 2608
 	echo '
2509 2609
 			<div class="windowbg2">';
2510 2610
 
2511 2611
 	// If they are deleting their account AND the admin needs to approve it - give them another piece of info ;)
2512
-	if ($context['needs_approval'])
2513
-		echo '
2612
+	if ($context['needs_approval']) {
2613
+			echo '
2514 2614
 				<div class="errorbox">', $txt['deleteAccount_approval'], '</div>';
2615
+	}
2515 2616
 
2516 2617
 	// If the user is deleting their own account warn them first - and require a password!
2517 2618
 	if ($context['user']['is_owner'])
@@ -2523,9 +2624,10 @@  discard block
 block discarded – undo
2523 2624
 					<input type="password" name="oldpasswrd" size="20" class="input_password">&nbsp;&nbsp;&nbsp;&nbsp;
2524 2625
 					<input type="submit" value="', $txt['yes'], '" class="button_submit">';
2525 2626
 
2526
-		if (!empty($context['token_check']))
2527
-			echo '
2627
+		if (!empty($context['token_check'])) {
2628
+					echo '
2528 2629
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
2630
+		}
2529 2631
 
2530 2632
 		echo '
2531 2633
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -2551,9 +2653,10 @@  discard block
 block discarded – undo
2551 2653
 						<option value="topics">', $txt['deleteAccount_topics'], '</option>
2552 2654
 					</select>';
2553 2655
 
2554
-			if ($context['show_perma_delete'])
2555
-				echo '
2656
+			if ($context['show_perma_delete']) {
2657
+							echo '
2556 2658
 					<br><label for="perma_delete"><input type="checkbox" name="perma_delete" id="perma_delete" value="1" class="input_check">', $txt['deleteAccount_permanent'], ':</label>';
2659
+			}
2557 2660
 
2558 2661
 			echo '
2559 2662
 				</div>';
@@ -2566,9 +2669,10 @@  discard block
 block discarded – undo
2566 2669
 				<div>
2567 2670
 					<input type="submit" value="', $txt['delete'], '" class="button_submit">';
2568 2671
 
2569
-		if (!empty($context['token_check']))
2570
-			echo '
2672
+		if (!empty($context['token_check'])) {
2673
+					echo '
2571 2674
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
2675
+		}
2572 2676
 
2573 2677
 		echo '
2574 2678
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -2594,8 +2698,8 @@  discard block
 block discarded – undo
2594 2698
 					<hr>';
2595 2699
 
2596 2700
 	// Only show the password box if it's actually needed.
2597
-	if ($context['require_password'])
2598
-		echo '
2701
+	if ($context['require_password']) {
2702
+			echo '
2599 2703
 					<dl>
2600 2704
 						<dt>
2601 2705
 							<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '>', $txt['current_password'], ': </strong><br>
@@ -2605,13 +2709,15 @@  discard block
 block discarded – undo
2605 2709
 							<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password">
2606 2710
 						</dd>
2607 2711
 					</dl>';
2712
+	}
2608 2713
 
2609 2714
 	echo '
2610 2715
 					<div class="righttext">';
2611 2716
 
2612
-		if (!empty($context['token_check']))
2613
-			echo '
2717
+		if (!empty($context['token_check'])) {
2718
+					echo '
2614 2719
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
2720
+		}
2615 2721
 
2616 2722
 	echo '
2617 2723
 						<input type="submit" value="', $txt['change_profile'], '" class="button_submit">
@@ -2638,9 +2744,10 @@  discard block
 block discarded – undo
2638 2744
 			<ul id="list_errors">';
2639 2745
 
2640 2746
 		// Cycle through each error and display an error message.
2641
-		foreach ($context['post_errors'] as $error)
2642
-			echo '
2747
+		foreach ($context['post_errors'] as $error) {
2748
+					echo '
2643 2749
 				<li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>';
2750
+		}
2644 2751
 
2645 2752
 		echo '
2646 2753
 			</ul>';
@@ -2666,12 +2773,13 @@  discard block
 block discarded – undo
2666 2773
 								<select name="id_group" ', ($context['user']['is_owner'] && $context['member']['group_id'] == 1 ? 'onchange="if (this.value != 1 &amp;&amp; !confirm(\'' . $txt['deadmin_confirm'] . '\')) this.value = 1;"' : ''), '>';
2667 2774
 
2668 2775
 		// Fill the select box with all primary member groups that can be assigned to a member.
2669
-		foreach ($context['member_groups'] as $member_group)
2670
-			if (!empty($member_group['can_be_primary']))
2776
+		foreach ($context['member_groups'] as $member_group) {
2777
+					if (!empty($member_group['can_be_primary']))
2671 2778
 				echo '
2672 2779
 									<option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected' : '', '>
2673 2780
 										', $member_group['name'], '
2674 2781
 									</option>';
2782
+		}
2675 2783
 		echo '
2676 2784
 								</select>
2677 2785
 							</dd>
@@ -2683,10 +2791,11 @@  discard block
 block discarded – undo
2683 2791
 									<input type="hidden" name="additional_groups[]" value="0">';
2684 2792
 
2685 2793
 		// For each membergroup show a checkbox so members can be assigned to more than one group.
2686
-		foreach ($context['member_groups'] as $member_group)
2687
-			if ($member_group['can_be_additional'])
2794
+		foreach ($context['member_groups'] as $member_group) {
2795
+					if ($member_group['can_be_additional'])
2688 2796
 				echo '
2689 2797
 									<label for="additional_groups-', $member_group['id'], '"><input type="checkbox" name="additional_groups[]" value="', $member_group['id'], '" id="additional_groups-', $member_group['id'], '"', $member_group['is_additional'] ? ' checked' : '', ' class="input_check"> ', $member_group['name'], '</label><br>';
2798
+		}
2690 2799
 		echo '
2691 2800
 								</span>
2692 2801
 								<a href="javascript:void(0);" onclick="document.getElementById(\'additional_groupsList\').style.display = \'block\'; document.getElementById(\'additional_groupsLink\').style.display = \'none\'; return false;" id="additional_groupsLink" style="display: none;" class="toggle_down">', $txt['additional_membergroups_show'], '</a>
@@ -2746,9 +2855,10 @@  discard block
 block discarded – undo
2746 2855
 								<span class="smalltext">', $txt['sig_info'], '</span><br>
2747 2856
 								<br>';
2748 2857
 
2749
-	if ($context['show_spellchecking'])
2750
-		echo '
2858
+	if ($context['show_spellchecking']) {
2859
+			echo '
2751 2860
 								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'creator\', \'signature\');" class="button_submit">';
2861
+	}
2752 2862
 
2753 2863
 		echo '
2754 2864
 							</dt>
@@ -2756,17 +2866,20 @@  discard block
 block discarded – undo
2756 2866
 								<textarea class="editor" onkeyup="calcCharLeft();" id="signature" name="signature" rows="5" cols="50" style="min-width: 50%; max-width: 99%;">', $context['member']['signature'], '</textarea><br>';
2757 2867
 
2758 2868
 	// If there is a limit at all!
2759
-	if (!empty($context['signature_limits']['max_length']))
2760
-		echo '
2869
+	if (!empty($context['signature_limits']['max_length'])) {
2870
+			echo '
2761 2871
 								<span class="smalltext">', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' <span id="signatureLeft">', $context['signature_limits']['max_length'], '</span></span><br>';
2872
+	}
2762 2873
 
2763
-	if (!empty($context['show_preview_button']))
2764
-		echo '
2874
+	if (!empty($context['show_preview_button'])) {
2875
+			echo '
2765 2876
 								<input type="button" name="preview_signature" id="preview_button" value="', $txt['preview_signature'], '" class="button_submit">';
2877
+	}
2766 2878
 
2767
-	if ($context['signature_warning'])
2768
-		echo '
2879
+	if ($context['signature_warning']) {
2880
+			echo '
2769 2881
 								<span class="smalltext">', $context['signature_warning'], '</span>';
2882
+	}
2770 2883
 
2771 2884
 	// Some javascript used to count how many characters have been used so far in the signature.
2772 2885
 	echo '
@@ -2810,9 +2923,10 @@  discard block
 block discarded – undo
2810 2923
 									<div>
2811 2924
 										<select name="cat" id="cat" size="10" onchange="changeSel(\'\');" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'server_stored\');">';
2812 2925
 		// This lists all the file categories.
2813
-		foreach ($context['avatars'] as $avatar)
2814
-			echo '
2926
+		foreach ($context['avatars'] as $avatar) {
2927
+					echo '
2815 2928
 											<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected' : ''), '>', $avatar['name'], '</option>';
2929
+		}
2816 2930
 		echo '
2817 2931
 										</select>
2818 2932
 									</div>
@@ -2867,16 +2981,17 @@  discard block
 block discarded – undo
2867 2981
 								<div id="avatar_gravatar">
2868 2982
 									<img src="' . $context['member']['avatar']['href'] . '" alt="" />';
2869 2983
 
2870
-		if (empty($modSettings['gravatarAllowExtraEmail']))
2871
-			echo '
2984
+		if (empty($modSettings['gravatarAllowExtraEmail'])) {
2985
+					echo '
2872 2986
 									<div class="smalltext">', $txt['gravatar_noAlternateEmail'], '</div>';
2873
-		else
2987
+		} else
2874 2988
 		{
2875 2989
 			// Depending on other stuff, the stored value here might have some odd things in it from other areas.
2876
-			if ($context['member']['avatar']['external'] == $context['member']['email'])
2877
-				$textbox_value = '';
2878
-			else
2879
-				$textbox_value = $context['member']['avatar']['external'];
2990
+			if ($context['member']['avatar']['external'] == $context['member']['email']) {
2991
+							$textbox_value = '';
2992
+			} else {
2993
+							$textbox_value = $context['member']['avatar']['external'];
2994
+			}
2880 2995
 
2881 2996
 			echo '
2882 2997
 									<div class="smalltext">', $txt['gravatar_alternateEmail'], '</div>
@@ -2948,8 +3063,9 @@  discard block
 block discarded – undo
2948 3063
 	$h = !empty($modSettings['avatar_max_height_' . $type]) ? comma_format($modSettings['avatar_max_height_' . $type]) : 0;
2949 3064
 
2950 3065
 	$suffix = (!empty($w) ? 'w' : '') . (!empty($h) ? 'h' : '');
2951
-	if (empty($suffix))
2952
-		return;
3066
+	if (empty($suffix)) {
3067
+			return;
3068
+	}
2953 3069
 
2954 3070
 	echo '
2955 3071
 									<div class="smalltext">', sprintf($txt['avatar_max_size_' . $suffix], $w, $h), '</div>';
@@ -2971,9 +3087,10 @@  discard block
 block discarded – undo
2971 3087
 							<dd>
2972 3088
 								<select name="easyformat" id="easyformat" onchange="document.forms.creator.time_format.value = this.options[this.selectedIndex].value;" style="margin-bottom: 4px;">';
2973 3089
 	// Help the user by showing a list of common time formats.
2974
-	foreach ($context['easy_timeformats'] as $time_format)
2975
-		echo '
3090
+	foreach ($context['easy_timeformats'] as $time_format) {
3091
+			echo '
2976 3092
 									<option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected' : '', '>', $time_format['title'], '</option>';
3093
+	}
2977 3094
 	echo '
2978 3095
 								</select><br>
2979 3096
 								<input type="text" name="time_format" id="time_format" value="', $context['member']['time_format'], '" size="30" class="input_text">
@@ -3009,9 +3126,10 @@  discard block
 block discarded – undo
3009 3126
 							</dt>
3010 3127
 							<dd>
3011 3128
 								<select name="smiley_set" id="smiley_set" onchange="document.getElementById(\'smileypr\').src = this.selectedIndex == 0 ? \'', $settings['images_url'], '/blank.png\' : \'', $modSettings['smileys_url'], '/\' + (this.selectedIndex != 1 ? this.options[this.selectedIndex].value : \'', !empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'], '\') + \'/smiley.gif\';">';
3012
-	foreach ($context['smiley_sets'] as $set)
3013
-		echo '
3129
+	foreach ($context['smiley_sets'] as $set) {
3130
+			echo '
3014 3131
 									<option value="', $set['id'], '"', $set['selected'] ? ' selected' : '', '>', $set['name'], '</option>';
3132
+	}
3015 3133
 	echo '
3016 3134
 								</select> <img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.gif' : $settings['images_url'] . '/blank.png', '" alt=":)"  style="padding-left: 20px;">
3017 3135
 							</dd>';
@@ -3062,10 +3180,11 @@  discard block
 block discarded – undo
3062 3180
 									</div>
3063 3181
 									<div class="clear"></div>';
3064 3182
 
3065
-	if (!empty($context['from_ajax']))
3066
-		echo '
3183
+	if (!empty($context['from_ajax'])) {
3184
+			echo '
3067 3185
 									<br>
3068 3186
 									<a href="javascript:self.close();"></a>';
3187
+	}
3069 3188
 
3070 3189
 	echo '
3071 3190
 								</div>
@@ -3104,15 +3223,16 @@  discard block
 block discarded – undo
3104 3223
 								<br /><div class="smalltext">', $txt['tfa_profile_desc'], '</div>
3105 3224
 							</dt>
3106 3225
 							<dd>';
3107
-	if (!$context['tfa_enabled'] && $context['user']['is_owner'])
3108
-		echo '
3226
+	if (!$context['tfa_enabled'] && $context['user']['is_owner']) {
3227
+			echo '
3109 3228
 								<a href="', !empty($modSettings['force_ssl']) && $modSettings['force_ssl'] < 2 ? strtr($scripturl, array('http://' => 'https://')) : $scripturl, '?action=profile;area=tfasetup" id="enable_tfa">', $txt['tfa_profile_enable'], '</a>';
3110
-	elseif (!$context['tfa_enabled'])
3111
-		echo '
3229
+	} elseif (!$context['tfa_enabled']) {
3230
+			echo '
3112 3231
 								', $txt['tfa_profile_disabled'];
3113
-	else
3114
-		echo '
3232
+	} else {
3233
+			echo '
3115 3234
 							', sprintf($txt['tfa_profile_enabled'], $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=tfasetup;disable');
3235
+	}
3116 3236
 	echo '
3117 3237
 							</dd>';
3118 3238
 }
Please login to merge, or discard this patch.