Passed
Push — patch_1-1-9 ( d927f0...e2616d )
by Spuds
01:06 queued 27s
created
themes/default/ProfileOptions.template.php 1 patch
Braces   +161 added lines, -56 removed lines patch added patch discarded remove patch
@@ -39,8 +39,10 @@  discard block
 block discarded – undo
39 39
 				<th scope="col">', $txt['status'], '</th>';
40 40
 
41 41
 	if ($context['can_send_email'])
42
-		echo '
42
+	{
43
+			echo '
43 44
 				<th scope="col">', $txt['email'], '</th>';
45
+	}
44 46
 
45 47
 	echo '
46 48
 				<th scope="col">', $txt['profile_contact'], '</th>
@@ -49,12 +51,14 @@  discard block
 block discarded – undo
49 51
 
50 52
 	// If they don't have any buddies don't list them!
51 53
 	if (empty($context['buddies']))
52
-		echo '
54
+	{
55
+			echo '
53 56
 			<tr>
54 57
 				<td colspan="5" class="centertext">
55 58
 					<strong>', $txt['no_buddies'], '</strong>
56 59
 				</td>
57 60
 			</tr>';
61
+	}
58 62
 
59 63
 	// Now loop through each buddy showing info on each.
60 64
 	foreach ($context['buddies'] as $buddy)
@@ -67,8 +71,10 @@  discard block
 block discarded – undo
67 71
 				</td>';
68 72
 
69 73
 		if ($context['can_send_email'])
70
-			echo '
74
+		{
75
+					echo '
71 76
 				<td>', template_member_email($buddy), '</td>';
77
+		}
72 78
 
73 79
 		//  Any custom profile (with icon) fields to show
74 80
 		$im = array();
@@ -76,8 +82,10 @@  discard block
 block discarded – undo
76 82
 		{
77 83
 
78 84
 			foreach ($buddy['custom_fields'] as $key => $cpf)
79
-				if ($cpf['placement'] == 1)
85
+			{
86
+							if ($cpf['placement'] == 1)
80 87
 					$im[] = $cpf['value'];
88
+			}
81 89
 		}
82 90
 
83 91
 		echo '
@@ -111,8 +119,10 @@  discard block
 block discarded – undo
111 119
 				</dl>';
112 120
 
113 121
 	if (!empty($context['token_check']))
114
-		echo '
122
+	{
123
+			echo '
115 124
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
125
+	}
116 126
 
117 127
 	echo '
118 128
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -152,8 +162,10 @@  discard block
 block discarded – undo
152 162
 				<th scope="col">', $txt['status'], '</th>';
153 163
 
154 164
 	if ($context['can_send_email'])
155
-		echo '
165
+	{
166
+			echo '
156 167
 				<th scope="col">', $txt['email'], '</th>';
168
+	}
157 169
 
158 170
 	echo '
159 171
 				<th scope="col"></th>
@@ -161,12 +173,14 @@  discard block
 block discarded – undo
161 173
 
162 174
 	// If they don't have anyone on their ignore list, don't list it!
163 175
 	if (empty($context['ignore_list']))
164
-		echo '
176
+	{
177
+			echo '
165 178
 			<tr>
166 179
 				<td colspan="4" class="centertext">
167 180
 					<strong>', $txt['no_ignore'], '</strong>
168 181
 				</td>
169 182
 			</tr>';
183
+	}
170 184
 
171 185
 	// Now loop through each buddy showing info on each.
172 186
 	foreach ($context['ignore_list'] as $member)
@@ -179,8 +193,10 @@  discard block
 block discarded – undo
179 193
 				</td>';
180 194
 
181 195
 		if ($context['can_send_email'])
182
-			echo '
196
+		{
197
+					echo '
183 198
 				<td>', template_member_email($member), '</td>';
199
+		}
184 200
 
185 201
 		echo '
186 202
 				<td class="righttext">
@@ -211,8 +227,10 @@  discard block
 block discarded – undo
211 227
 				</dl>';
212 228
 
213 229
 	if (!empty($context['token_check']))
214
-		echo '
230
+	{
231
+			echo '
215 232
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
233
+	}
216 234
 
217 235
 	echo '
218 236
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -249,31 +267,40 @@  discard block
 block discarded – undo
249 267
 
250 268
 	// Don't say "Profile" if this isn't the profile...
251 269
 	if (!empty($context['profile_header_text']))
252
-		echo '
270
+	{
271
+			echo '
253 272
 				', $context['profile_header_text'];
254
-	else
255
-		echo '
273
+	}
274
+	else {
275
+			echo '
256 276
 				', $txt['profile'];
277
+	}
257 278
 
258 279
 	echo '
259 280
 			</h2>';
260 281
 
261 282
 	// Have we some description?
262 283
 	if ($context['page_desc'])
263
-		echo '
284
+	{
285
+			echo '
264 286
 			<p class="description">', $context['page_desc'], '</p>';
287
+	}
265 288
 
266 289
 	echo '
267 290
 			<div class="content">';
268 291
 
269 292
 	// Any bits at the start?
270 293
 	if (!empty($context['profile_prehtml']))
271
-		echo '
294
+	{
295
+			echo '
272 296
 				<div>', $context['profile_prehtml'], '</div>';
297
+	}
273 298
 
274 299
 	if (!empty($context['profile_fields']))
275
-		echo '
300
+	{
301
+			echo '
276 302
 				<dl>';
303
+	}
277 304
 
278 305
 	// Start the big old loop 'of love.
279 306
 	$lastItem = 'hr';
@@ -281,7 +308,9 @@  discard block
 block discarded – undo
281 308
 	{
282 309
 		// We add a little hack to be sure we never get more than one hr in a row!
283 310
 		if ($lastItem === 'hr' && $field['type'] === 'hr')
284
-			continue;
311
+		{
312
+					continue;
313
+		}
285 314
 
286 315
 		$lastItem = $field['type'];
287 316
 		if ($field['type'] === 'hr')
@@ -307,8 +336,10 @@  discard block
 block discarded – undo
307 336
 
308 337
 			// Does it have any subtext to show?
309 338
 			if (!empty($field['subtext']))
310
-				echo '
339
+			{
340
+							echo '
311 341
 						<p class="smalltext">', $field['subtext'], '</p>';
342
+			}
312 343
 
313 344
 			echo '
314 345
 					</dt>
@@ -316,28 +347,38 @@  discard block
 block discarded – undo
316 347
 
317 348
 			// Want to put something in front of the box?
318 349
 			if (!empty($field['preinput']))
319
-				echo '
350
+			{
351
+							echo '
320 352
 						', $field['preinput'];
353
+			}
321 354
 
322 355
 			// What type of data are we showing?
323 356
 			if ($field['type'] === 'label')
324
-				echo '
357
+			{
358
+							echo '
325 359
 						', $field['value'];
360
+			}
326 361
 
327 362
 			// Maybe it's a text box - very likely!
328 363
 			elseif (in_array($field['type'], array('int', 'float', 'text', 'password')))
329
-				echo '
364
+			{
365
+							echo '
330 366
 						<input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '" />';
367
+			}
331 368
 
332 369
 			// Maybe it's an html5 input
333 370
 			elseif (in_array($field['type'], array('url', 'search', 'date', 'email', 'color')))
334
-				echo '
371
+			{
372
+							echo '
335 373
 						<input type="', $field['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', '" />';
374
+			}
336 375
 
337 376
 			// You "checking" me out? ;)
338 377
 			elseif ($field['type'] === 'check')
339
-				echo '
378
+			{
379
+							echo '
340 380
 						<input type="hidden" name="', $key, '" value="0" /><input type="checkbox" name="', $key, '" id="', $key, '" ', !empty($field['value']) ? ' checked="checked"' : '', ' value="1" ', $field['input_attr'], ' />';
381
+			}
341 382
 
342 383
 			// Always fun - select boxes!
343 384
 			elseif ($field['type'] === 'select')
@@ -362,9 +403,11 @@  discard block
 block discarded – undo
362 403
 
363 404
 					// Assuming we now have some!
364 405
 					if (is_array($field['options']))
365
-						foreach ($field['options'] as $value => $name)
406
+					{
407
+											foreach ($field['options'] as $value => $name)
366 408
 							echo '
367 409
 							<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
410
+					}
368 411
 				}
369 412
 
370 413
 				echo '
@@ -373,8 +416,10 @@  discard block
 block discarded – undo
373 416
 
374 417
 			// Something to end with?
375 418
 			if (!empty($field['postinput']))
376
-				echo '
419
+			{
420
+							echo '
377 421
 						', $field['postinput'];
422
+			}
378 423
 
379 424
 			echo '
380 425
 					</dd>';
@@ -382,15 +427,19 @@  discard block
 block discarded – undo
382 427
 	}
383 428
 
384 429
 	if (!empty($context['profile_fields']))
385
-		echo '
430
+	{
431
+			echo '
386 432
 				</dl>';
433
+	}
387 434
 
388 435
 	// Are there any custom profile fields - if so print them!
389 436
 	if (!empty($context['custom_fields']))
390 437
 	{
391 438
 		if ($lastItem !== 'hr')
392
-			echo '
439
+		{
440
+					echo '
393 441
 				<hr class="clear" />';
442
+		}
394 443
 
395 444
 		echo '
396 445
 				<dl>';
@@ -413,8 +462,10 @@  discard block
 block discarded – undo
413 462
 
414 463
 	// Any closing HTML?
415 464
 	if (!empty($context['profile_posthtml']))
416
-		echo '
465
+	{
466
+			echo '
417 467
 				<div>', $context['profile_posthtml'], '</div>';
468
+	}
418 469
 
419 470
 	// Only show the password box if it's actually needed.
420 471
 	template_profile_save();
@@ -431,18 +482,22 @@  discard block
 block discarded – undo
431 482
 
432 483
 	// If this part requires a password, make sure to give a warning.
433 484
 	if ($context['require_password'])
434
-		echo '
485
+	{
486
+			echo '
435 487
 				// Did you forget to type your password?
436 488
 				if (document.forms.creator.oldpasswrd.value === "")
437 489
 				{
438 490
 					alert("', $txt['required_security_reasons'], '");
439 491
 					return false;
440 492
 				}';
493
+	}
441 494
 
442 495
 	// Any onsubmit javascript?
443 496
 	if (!empty($context['profile_onsubmit_javascript']))
444
-		echo '
497
+	{
498
+			echo '
445 499
 				', $context['profile_onsubmit_javascript'];
500
+	}
446 501
 
447 502
 	echo '
448 503
 			}
@@ -450,12 +505,14 @@  discard block
 block discarded – undo
450 505
 
451 506
 	// Any final spellchecking stuff?
452 507
 	if (!empty($context['show_spellchecking']))
453
-		echo '
508
+	{
509
+			echo '
454 510
 		<form name="spell_form" id="spell_form" method="post" accept-charset="UTF-8" target="spellWindow" action="', $scripturl, '?action=spellcheck">
455 511
 			<input type="hidden" id="spellstring" name="spellstring" value="" />
456 512
 			<input type="hidden" id="fulleditor" name="fulleditor" value="" />
457 513
 		</form>';
458
-}
514
+	}
515
+	}
459 516
 
460 517
 /**
461 518
  * Personal Message settings.
@@ -493,8 +550,10 @@  discard block
 block discarded – undo
493 550
 									<option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected="selected"' : '', '>', $txt['email_notify_always'], '</option>';
494 551
 
495 552
 	if (!empty($modSettings['enable_buddylist']))
496
-		echo '
553
+	{
554
+			echo '
497 555
 										<option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected="selected"' : '', '>', $txt['email_notify_buddies'], '</option>';
556
+	}
498 557
 
499 558
 	echo '
500 559
 								</select>
@@ -562,7 +621,8 @@  discard block
 block discarded – undo
562 621
 							</dd>';
563 622
 
564 623
 	if ($context['allow_no_censored'])
565
-		echo '
624
+	{
625
+			echo '
566 626
 							<dt>
567 627
 								<label for="show_no_censored">', $txt['show_no_censored'], '</label>
568 628
 							</dt>
@@ -570,6 +630,7 @@  discard block
 block discarded – undo
570 630
 								<input type="hidden" name="default_options[show_no_censored]" value="0" />
571 631
 								<input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' />
572 632
 							</dd>';
633
+	}
573 634
 
574 635
 	echo '
575 636
 							<dt>
@@ -624,7 +685,8 @@  discard block
 block discarded – undo
624 685
 	}
625 686
 
626 687
 	if (!empty($modSettings['cal_enabled']))
627
-		echo '
688
+	{
689
+			echo '
628 690
 							<dt>
629 691
 								<label for="calendar_start_day">', $txt['calendar_start_day'], '</label>
630 692
 							</dt>
@@ -635,9 +697,11 @@  discard block
 block discarded – undo
635 697
 									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected="selected"' : '', '>', $txt['days'][6], '</option>
636 698
 								</select>
637 699
 								</dd>';
700
+	}
638 701
 
639 702
 	if (!empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_autosave_enabled']))
640
-		echo '
703
+	{
704
+			echo '
641 705
 							<dt>
642 706
 								<label for="drafts_autosave_enabled">', $txt['drafts_autosave_enabled'], '</label>
643 707
 							</dt>
@@ -645,6 +709,7 @@  discard block
 block discarded – undo
645 709
 								<input type="hidden" name="default_options[drafts_autosave_enabled]" value="0" />
646 710
 								<label for="drafts_autosave_enabled"><input type="checkbox" name="default_options[drafts_autosave_enabled]" id="drafts_autosave_enabled" value="1"', !empty($context['member']['options']['drafts_autosave_enabled']) ? ' checked="checked"' : '', ' /></label>
647 711
 							</dd>';
712
+	}
648 713
 
649 714
 	echo '
650 715
 							<dt>
@@ -719,7 +784,8 @@  discard block
 block discarded – undo
719 784
 
720 785
 	// Allow notification on announcements to be disabled?
721 786
 	if (!empty($modSettings['allow_disableAnnounce']))
722
-		echo '
787
+	{
788
+			echo '
723 789
 					<dt>
724 790
 						<label for="notify_announcements">', $txt['notify_important_email'], '</label>
725 791
 					</dt>
@@ -727,6 +793,7 @@  discard block
 block discarded – undo
727 793
 						<input type="hidden" name="notify_announcements" value="0" />
728 794
 						<input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' />
729 795
 					</dd>';
796
+	}
730 797
 
731 798
 	// Auto notification when you reply / start a topic?
732 799
 	echo '
@@ -741,7 +808,8 @@  discard block
 block discarded – undo
741 808
 
742 809
 	// Can the body of the post be sent, PBE will ensure it can
743 810
 	if (empty($modSettings['disallow_sendBody']))
744
-		echo '
811
+	{
812
+			echo '
745 813
 					<dt>
746 814
 						<label for="notify_send_body">', $txt['notify_send_body' . (!empty($modSettings['maillist_enabled']) ? '_pbe' : '')], '</label>
747 815
 					</dt>
@@ -750,6 +818,7 @@  discard block
 block discarded – undo
750 818
 						<input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' />
751 819
 						', (!empty($modSettings['maillist_enabled']) ? $txt['notify_send_body_pbe_post'] : ''), '
752 820
 					</dd>';
821
+	}
753 822
 
754 823
 	// How often do you want to hear from us, instant, daily, weekly?
755 824
 	echo '
@@ -823,10 +892,12 @@  discard block
 block discarded – undo
823 892
 
824 893
 	// Do we have an update message?
825 894
 	if (!empty($context['update_message']))
826
-		echo '
895
+	{
896
+			echo '
827 897
 			<div class="successbox">
828 898
 				', $context['update_message'], '
829 899
 			</div>';
900
+	}
830 901
 
831 902
 	// Requesting membership to a group?
832 903
 	if (!empty($context['group_request']))
@@ -862,10 +933,12 @@  discard block
 block discarded – undo
862 933
 					<tr  id="primdiv_', $group['id'], '">';
863 934
 
864 935
 			if ($context['can_edit_primary'])
865
-				echo '
936
+			{
937
+							echo '
866 938
 						<td>
867 939
 							<input type="radio" name="primary" id="primary_', $group['id'], '" value="', $group['id'], '" ', $group['is_primary'] ? 'checked="checked" ' : '', $group['can_be_primary'] ? '' : 'disabled="disabled" ', ' />
868 940
 						</td>';
941
+			}
869 942
 
870 943
 			echo '
871 944
 						<td>
@@ -877,8 +950,10 @@  discard block
 block discarded – undo
877 950
 
878 951
 			// Can they leave their group?
879 952
 			if ($group['can_leave'])
880
-				echo '
953
+			{
954
+							echo '
881 955
 							<a class="linkbutton" 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>';
956
+			}
882 957
 			echo '
883 958
 						</td>
884 959
 					</tr>';
@@ -889,10 +964,12 @@  discard block
 block discarded – undo
889 964
 			</table>';
890 965
 
891 966
 		if ($context['can_edit_primary'])
892
-			echo '
967
+		{
968
+					echo '
893 969
 			<div class="submitbutton">
894 970
 				<input type="submit" value="', $txt['make_primary'], '" />
895 971
 			</div>';
972
+		}
896 973
 
897 974
 		// Any groups they can join?
898 975
 		if (!empty($context['groups']['available']))
@@ -920,15 +997,21 @@  discard block
 block discarded – undo
920 997
 						<td class="lefttext">';
921 998
 
922 999
 				if ($group['type'] == 3)
923
-					echo '
1000
+				{
1001
+									echo '
924 1002
 							<a class="linkbutton_right" 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['join_group'], '</a>';
1003
+				}
925 1004
 				elseif ($group['type'] == 2 && $group['pending'])
926
-					echo '
1005
+				{
1006
+									echo '
927 1007
 							', $txt['approval_pending'];
1008
+				}
928 1009
 				elseif ($group['type'] == 2)
929
-					echo '
1010
+				{
1011
+									echo '
930 1012
 							<a class="linkbutton_right" href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['request_group'], '</a>';
931
-// @todo
1013
+				}
1014
+				// @todo
932 1015
 //				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
933 1016
 
934 1017
 				echo '
@@ -948,16 +1031,20 @@  discard block
 block discarded – undo
948 1031
 				prevDiv = "";';
949 1032
 
950 1033
 		if (isset($context['groups']['member'][$context['primary_group']]))
951
-			echo '
1034
+		{
1035
+					echo '
952 1036
 			initHighlightSelection("primdiv_' . $context['primary_group'] . '");';
1037
+		}
953 1038
 
954 1039
 		echo '
955 1040
 		</script>';
956 1041
 	}
957 1042
 
958 1043
 	if (!empty($context['token_check']))
959
-		echo '
1044
+	{
1045
+			echo '
960 1046
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
1047
+	}
961 1048
 
962 1049
 	echo '
963 1050
 				<input type="hidden" name="save" value="save" />
@@ -1011,11 +1098,13 @@  discard block
 block discarded – undo
1011 1098
 
1012 1099
 	// Fill the select box with all primary membergroups that can be assigned to a member.
1013 1100
 	foreach ($context['member_groups'] as $member_group)
1014
-		if (!empty($member_group['can_be_primary']))
1101
+	{
1102
+			if (!empty($member_group['can_be_primary']))
1015 1103
 			echo '
1016 1104
 									<option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected="selected"' : '', '>
1017 1105
 										', $member_group['name'], '
1018 1106
 									</option>';
1107
+	}
1019 1108
 
1020 1109
 	echo '
1021 1110
 								</select>
@@ -1031,11 +1120,13 @@  discard block
 block discarded – undo
1031 1120
 
1032 1121
 	// For each membergroup show a checkbox so members can be assigned to more than one group.
1033 1122
 	foreach ($context['member_groups'] as $member_group)
1034
-		if ($member_group['can_be_additional'])
1123
+	{
1124
+			if ($member_group['can_be_additional'])
1035 1125
 			echo '
1036 1126
 										<li>
1037 1127
 											<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="checked"' : '', ' /> ', $member_group['name'], '</label>
1038 1128
 										</li>';
1129
+	}
1039 1130
 
1040 1131
 	echo '
1041 1132
 									</ul>
@@ -1093,20 +1184,28 @@  discard block
 block discarded – undo
1093 1184
 
1094 1185
 	// If there is a limit at all!
1095 1186
 	if (!empty($context['signature_limits']['max_length']))
1096
-		echo '
1187
+	{
1188
+			echo '
1097 1189
 								<p class="smalltext">', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' <span id="signatureLeft">', $context['signature_limits']['max_length'], '</span></p>';
1190
+	}
1098 1191
 
1099 1192
 	if ($context['show_spellchecking'])
1100
-		echo '
1193
+	{
1194
+			echo '
1101 1195
 								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'creator\', \'signature\', false);"  tabindex="', $context['tabindex']++, '" class="right_submit" />';
1196
+	}
1102 1197
 
1103 1198
 	if (!empty($context['show_preview_button']))
1104
-		echo '
1199
+	{
1200
+			echo '
1105 1201
 								<input type="submit" name="preview_signature" id="preview_button" value="', $txt['preview_signature'], '"  tabindex="', $context['tabindex']++, '" class="right_submit" />';
1202
+	}
1106 1203
 
1107 1204
 	if ($context['signature_warning'])
1108
-		echo '
1205
+	{
1206
+			echo '
1109 1207
 								<span class="smalltext">', $context['signature_warning'], '</span>';
1208
+	}
1110 1209
 
1111 1210
 	// Some javascript used to count how many characters have been used so far in the signature.
1112 1211
 	echo '
@@ -1179,8 +1278,10 @@  discard block
 block discarded – undo
1179 1278
 
1180 1279
 		// This lists all the file categories.
1181 1280
 		foreach ($context['avatars'] as $avatar)
1182
-			echo '
1281
+		{
1282
+					echo '
1183 1283
 											<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected="selected"' : ''), '>', $avatar['name'], '</option>';
1284
+		}
1184 1285
 		echo '
1185 1286
 										</select>
1186 1287
 									</div>
@@ -1290,8 +1391,10 @@  discard block
 block discarded – undo
1290 1391
 
1291 1392
 	// Help the user by showing a list of common time formats.
1292 1393
 	foreach ($context['easy_timeformats'] as $time_format)
1293
-		echo '
1394
+	{
1395
+			echo '
1294 1396
 									<option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected="selected"' : '', '>', $time_format['title'], '</option>';
1397
+	}
1295 1398
 
1296 1399
 	echo '
1297 1400
 								</select>
@@ -1348,8 +1451,10 @@  discard block
 block discarded – undo
1348 1451
 								<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\';">';
1349 1452
 
1350 1453
 	foreach ($context['smiley_sets'] as $set)
1351
-		echo '
1454
+	{
1455
+			echo '
1352 1456
 									<option value="', $set['id'], '"', $set['selected'] ? ' selected="selected"' : '', '>', $set['name'], '</option>';
1457
+	}
1353 1458
 
1354 1459
 	echo '
1355 1460
 								</select>
Please login to merge, or discard this patch.
themes/default/Search.template.php 1 patch
Braces   +84 added lines, -32 removed lines patch added patch discarded remove patch
@@ -36,8 +36,10 @@  discard block
 block discarded – undo
36 36
 
37 37
 	// Any search errors to inform the user about
38 38
 	if (!empty($context['search_errors']))
39
-		echo '
39
+	{
40
+			echo '
40 41
 					<p class="errorbox">', implode('<br />', $context['search_errors']['messages']), '</p>';
42
+	}
41 43
 
42 44
 	// Start off showing our basic search form
43 45
 	echo '
@@ -51,8 +53,10 @@  discard block
 block discarded – undo
51 53
 						</div>';
52 54
 
53 55
 	if (empty($modSettings['search_simple_fulltext']))
54
-		echo '
56
+	{
57
+			echo '
55 58
 						<p class="smalltext">', $txt['search_example'], '</p>';
59
+	}
56 60
 
57 61
 	// Does the search require a visual verification screen to annoy them?
58 62
 	if (!empty($context['require_verification']))
@@ -123,9 +127,11 @@  discard block
 block discarded – undo
123 127
 
124 128
 	// If $context['search_params']['topic'] is set, that means we're searching just one topic.
125 129
 	if (!empty($context['search_params']['topic']))
126
-		echo '
130
+	{
131
+			echo '
127 132
 						<p>', $txt['search_specific_topic'], ' &quot;', $context['search_topic']['link'], '&quot;.</p>
128 133
 						<input type="hidden" name="topic" value="', $context['search_topic']['id'], '" />';
134
+	}
129 135
 
130 136
 	echo '
131 137
 					</fieldset>';
@@ -201,13 +207,15 @@  discard block
 block discarded – undo
201 207
 
202 208
 	// Let them know if we ignored a word in the search
203 209
 	if (!empty($context['search_ignored']))
204
-		echo '
210
+	{
211
+			echo '
205 212
 		<div id="search_results">
206 213
 			<h2 class="category_header">
207 214
 				', $txt['generic_warning'], '
208 215
 			</h2>
209 216
 			<p class="warningbox">', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>
210 217
 		</div>';
218
+	}
211 219
 
212 220
 	// Or perhaps they made a spelling error, lets give them a hint
213 221
 	if (!empty($context['did_you_mean']) || empty($context['topics']))
@@ -219,8 +227,10 @@  discard block
 block discarded – undo
219 227
 
220 228
 		// Did they make any typos or mistakes, perhaps?
221 229
 		if (isset($context['did_you_mean']))
222
-			echo '
230
+		{
231
+					echo '
223 232
 					<p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search;sa=results;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>';
233
+		}
224 234
 
225 235
 		echo '
226 236
 					<form action="', $scripturl, '?action=search;sa=results" method="post" accept-charset="UTF-8">
@@ -244,9 +254,11 @@  discard block
 block discarded – undo
244 254
 						</div>';
245 255
 
246 256
 		if (!empty($context['search_params']['brd']))
247
-			foreach ($context['search_params']['brd'] as $board_id)
257
+		{
258
+					foreach ($context['search_params']['brd'] as $board_id)
248 259
 				echo '
249 260
 						<input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '" />';
261
+		}
250 262
 
251 263
 		echo '
252 264
 					</form>
@@ -257,16 +269,20 @@  discard block
 block discarded – undo
257 269
 
258 270
 	// Quick moderation set to checkboxes? Oh, how fun :/.
259 271
 	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
260
-		echo '
272
+	{
273
+			echo '
261 274
 			<form id="topicForm" class="search_results_posts', $context['compact'] ? ' compact_view' : '', '" action="', $scripturl, '?action=quickmod" method="post" accept-charset="UTF-8" name="topicForm">';
275
+	}
262 276
 
263 277
 	echo '
264 278
 				<h2 class="category_header hdicon cat_img_search">
265 279
 					<span class="floatright">';
266 280
 
267 281
 	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
268
-		echo '
282
+	{
283
+			echo '
269 284
 						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" />';
285
+	}
270 286
 
271 287
 	echo '
272 288
 					</span>
@@ -275,17 +291,23 @@  discard block
 block discarded – undo
275 291
 
276 292
 	// Was anything even found?
277 293
 	if (!empty($context['topics']))
278
-		template_pagesection();
279
-	else
280
-		echo '
294
+	{
295
+			template_pagesection();
296
+	}
297
+	else {
298
+			echo '
281 299
 				<div class="well">', $txt['find_no_results'], '</div>';
300
+	}
282 301
 
283 302
 	if ($context['compact'])
284
-		echo '
303
+	{
304
+			echo '
285 305
 				<ul class="topic_listing compact_view search_results_posts">';
286
-	else
287
-		echo '
306
+	}
307
+	else {
308
+			echo '
288 309
 				<ul class="forumposts topic_listing search_results_posts">';
310
+	}
289 311
 
290 312
 	// While we have results to show ...
291 313
 	$controller = $context['get_topics'][0];
@@ -295,19 +317,27 @@  discard block
 block discarded – undo
295 317
 		{
296 318
 			// We start with locked and sticky topics.
297 319
 			if ($topic['is_sticky'] && $topic['is_locked'])
298
-				$color_class = 'locked_row sticky_row';
320
+			{
321
+							$color_class = 'locked_row sticky_row';
322
+			}
299 323
 			// Sticky topics should get a different color, too.
300 324
 			elseif ($topic['is_sticky'])
301
-				$color_class = 'sticky_row';
325
+			{
326
+							$color_class = 'sticky_row';
327
+			}
302 328
 			// Locked topics get special treatment as well.
303 329
 			elseif ($topic['is_locked'])
304
-				$color_class = 'locked_row';
330
+			{
331
+							$color_class = 'locked_row';
332
+			}
305 333
 			// Last, but not least: regular topics.
306
-			else
307
-				$color_class = 'basic_row';
334
+			else {
335
+							$color_class = 'basic_row';
336
+			}
337
+		}
338
+		else {
339
+					$color_class = 'basic_row';
308 340
 		}
309
-		else
310
-			$color_class = 'basic_row';
311 341
 
312 342
 		foreach ($topic['matches'] as $message)
313 343
 		{
@@ -321,11 +351,15 @@  discard block
 block discarded – undo
321 351
 						</div>';
322 352
 
323 353
 			if (!$context['compact'] || $message['body_highlighted'] != '')
324
-				echo '
354
+			{
355
+							echo '
325 356
 						<div class="topic_body">', $message['body_highlighted'], '</div>';
357
+			}
326 358
 
327 359
 			if (!empty($topic['buttons']))
328
-				template_quickbutton_strip($topic['buttons'], $topic['tests']);
360
+			{
361
+							template_quickbutton_strip($topic['buttons'], $topic['tests']);
362
+			}
329 363
 
330 364
 			if (!empty($options['display_quick_mod']))
331 365
 			{
@@ -340,24 +374,34 @@  discard block
 block discarded – undo
340 374
 				else
341 375
 				{
342 376
 					if ($topic['quick_mod']['remove'])
343
-						echo '
377
+					{
378
+											echo '
344 379
 							<a href="', $scripturl, '?action=quickmod;actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.png" style="width: 16px;" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
380
+					}
345 381
 
346 382
 					if ($topic['quick_mod']['lock'])
347
-						echo '
383
+					{
384
+											echo '
348 385
 							<a href="', $scripturl, '?action=quickmod;actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.png" style="width: 16px;" alt="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '" title="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '" /></a>';
386
+					}
349 387
 
350 388
 					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
351
-						echo '
389
+					{
390
+											echo '
352 391
 							<br />';
392
+					}
353 393
 
354 394
 					if ($topic['quick_mod']['sticky'])
355
-						echo '
395
+					{
396
+											echo '
356 397
 							<a href="', $scripturl, '?action=quickmod;actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.png" style="width: 16px;" alt="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '" title="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '" /></a>';
398
+					}
357 399
 
358 400
 					if ($topic['quick_mod']['move'])
359
-						echo '
401
+					{
402
+											echo '
360 403
 							<a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.png" style="width: 16px;" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
404
+					}
361 405
 				}
362 406
 
363 407
 				echo '
@@ -374,7 +418,9 @@  discard block
 block discarded – undo
374 418
 
375 419
 	// If we have results show a page index
376 420
 	if (!empty($context['topics']))
377
-		template_pagesection();
421
+	{
422
+			template_pagesection();
423
+	}
378 424
 
379 425
 	// Quick moderation enabled, then show an action area
380 426
 	if (!empty($context['topics']) && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
@@ -385,17 +431,21 @@  discard block
 block discarded – undo
385 431
 						<option value="">&nbsp;</option>';
386 432
 
387 433
 		foreach ($context['qmod_actions'] as $qmod_action)
388
-			if ($context['can_' . $qmod_action])
434
+		{
435
+					if ($context['can_' . $qmod_action])
389 436
 				echo '
390 437
 						<option value="' . $qmod_action . '">&#10148;&nbsp;', $txt['quick_mod_' . $qmod_action] . '</option>';
438
+		}
391 439
 
392 440
 		echo '
393 441
 					</select>';
394 442
 
395 443
 		// Show a list of boards they can move the topic to.
396 444
 		if ($context['can_move'])
397
-			echo '
445
+		{
446
+					echo '
398 447
 					<span id="quick_mod_jump_to">&nbsp;</span>';
448
+		}
399 449
 
400 450
 		echo '
401 451
 					<input type="hidden" name="redirect_url" value="', $scripturl . '?action=search;sa=results;params=' . $context['params'], '" />
@@ -410,7 +460,8 @@  discard block
 block discarded – undo
410 460
 			<div class="floatright" id="search_jump_to">&nbsp;</div>';
411 461
 
412 462
 	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move'])
413
-		addInlineJavascript('
463
+	{
464
+			addInlineJavascript('
414 465
 		aJumpTo[aJumpTo.length] = new JumpTo({
415 466
 			sContainerId: "quick_mod_jump_to",
416 467
 			sClassName: "qaction",
@@ -424,6 +475,7 @@  discard block
 block discarded – undo
424 475
 			bDisabled: true,
425 476
 			sCustomName: "move_to"
426 477
 		});', true);
478
+	}
427 479
 
428 480
 	addInlineJavascript('
429 481
 		aJumpTo[aJumpTo.length] = new JumpTo({
Please login to merge, or discard this patch.
themes/default/Memberlist.template.php 1 patch
Braces   +16 added lines, -9 removed lines patch added patch discarded remove patch
@@ -66,8 +66,10 @@  discard block
 block discarded – undo
66 66
 			<span class="floatleft">', $txt['members_list'], '</span>';
67 67
 
68 68
 	if (!empty($context['letter_links']))
69
-		echo '
69
+	{
70
+			echo '
70 71
 				<span class="floatright letter_links">', $context['letter_links'], '</span>';
72
+	}
71 73
 
72 74
 	echo '
73 75
 		</h2>
@@ -93,16 +95,19 @@  discard block
 block discarded – undo
93 95
 
94 96
 		// This is a selected column, so underline it or some such.
95 97
 		if ($column['selected'])
96
-			echo '
98
+		{
99
+					echo '
97 100
 					<div class="' . $column['class'] . '">
98 101
 						<a href="' . $column['href'] . '">' . $column['label'] . '<i class="icon icon-small i-sort-' . $sorticon . '-' . $context['sort_direction'] . '"></i></a>
99 102
 					</div>';
103
+		}
100 104
 		// This is just some column... show the link and be done with it.
101
-		else
102
-			echo '
105
+		else {
106
+					echo '
103 107
 					<div class="' . $column['class'] . '">
104 108
 						', $column['link'], '
105 109
 					</div>';
110
+		}
106 111
 	}
107 112
 
108 113
 	echo '
@@ -140,9 +145,10 @@  discard block
 block discarded – undo
140 145
 					{
141 146
 						echo template_member_email($member);
142 147
 					}
143
-					else
144
-						echo '
148
+					else {
149
+											echo '
145 150
 					', $member[$column];
151
+					}
146 152
 
147 153
 					echo '
148 154
 					</div>';
@@ -166,14 +172,15 @@  discard block
 block discarded – undo
166 172
 		</div>';
167 173
 	}
168 174
 	// No members?
169
-	else
170
-		echo '
175
+	else {
176
+			echo '
171 177
 			</ul>
172 178
 		</div>
173 179
 		<div class="infobox">
174 180
 			', $txt['search_no_results'], '
175 181
 		</div>';
176
-}
182
+	}
183
+	}
177 184
 
178 185
 /**
179 186
  * Shows the pagination
Please login to merge, or discard this patch.
themes/default/GenericHelpers.template.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@  discard block
 block discarded – undo
22 22
 	$all_selected = true;
23 23
 
24 24
 	if (!isset($current_group_list['id']))
25
-		$current_group_list['id'] = $group;
25
+	{
26
+			$current_group_list['id'] = $group;
27
+	}
26 28
 
27 29
 	echo '
28 30
 		<fieldset id="', $current_group_list['id'], '">
@@ -65,15 +67,19 @@  discard block
 block discarded – undo
65 67
 	global $context, $txt;
66 68
 
67 69
 	if (!empty($label))
68
-		echo '
70
+	{
71
+			echo '
69 72
 	<label for="', $name, '">', $label, ' </label>';
73
+	}
70 74
 
71 75
 	echo '
72 76
 	<select name="', $name, '" id="', $name, '" ', $extra, ' >';
73 77
 
74 78
 	if ($all)
75
-		echo '
79
+	{
80
+			echo '
76 81
 		<option value="">', $txt['icons_edit_icons_all_boards'], '</option>';
82
+	}
77 83
 
78 84
 	foreach ($context['categories'] as $category)
79 85
 	{
@@ -81,8 +87,10 @@  discard block
 block discarded – undo
81 87
 		<optgroup label="', $category['name'], '">';
82 88
 
83 89
 		foreach ($category['boards'] as $board)
84
-			echo '
90
+		{
91
+					echo '
85 92
 			<option value="', $board['id'], '"', !empty($board['selected']) ? ' selected="selected"' : '', !empty($context['current_board']) && $board['id'] == $context['current_board'] && $context['boards_current_disabled'] ? ' disabled="disabled"' : '', '>', $board['child_level'] > 0 ? str_repeat('&#8195;', $board['child_level'] - 1) . '&#8195;&#10148;' : '', $board['name'], '</option>';
93
+		}
86 94
 		echo '
87 95
 		</optgroup>';
88 96
 	}
Please login to merge, or discard this patch.
themes/default/GenericBoards.template.php 1 patch
Braces   +45 added lines, -20 removed lines patch added patch discarded remove patch
@@ -60,9 +60,12 @@  discard block
 block discarded – undo
60 60
 		$diff_alternate = $diff_current - 2 * ($categories[$last_group] + 1);
61 61
 
62 62
 		if (abs($diff_alternate) < $diff_current)
63
-			array_unshift($groups[1], $last_group);
64
-		else
65
-			$groups[0][] = $last_group;
63
+		{
64
+					array_unshift($groups[1], $last_group);
65
+		}
66
+		else {
67
+					$groups[0][] = $last_group;
68
+		}
66 69
 	}
67 70
 	// If we have less on the left, let's try picking one from the right
68 71
 	elseif ($diff_current < 0)
@@ -72,9 +75,12 @@  discard block
 block discarded – undo
72 75
 		$diff_alternate = $diff_current + 2 * ($categories[$first_group] + 1);
73 76
 
74 77
 		if (abs($diff_alternate) < abs($diff_current))
75
-			$groups[0][] = $first_group;
76
-		else
77
-			array_unshift($groups[1], $first_group);
78
+		{
79
+					$groups[0][] = $first_group;
80
+		}
81
+		else {
82
+					array_unshift($groups[1], $first_group);
83
+		}
78 84
 	}
79 85
 
80 86
 	return $groups;
@@ -106,18 +112,23 @@  discard block
 block discarded – undo
106 112
 
107 113
 		// If the board or children is new, show an indicator.
108 114
 		if ($board['new'] || $board['children_new'])
109
-			echo '
115
+		{
116
+					echo '
110 117
 							<span class="board_icon ', $board['new'] ? 'i-board-new' : 'i-board-sub', '" title="', $txt['new_posts'], '"></span>';
118
+		}
111 119
 
112 120
 		// Is it a redirection board?
113 121
 		elseif ($board['is_redirect'])
114
-			echo '
122
+		{
123
+					echo '
115 124
 							<span class="board_icon i-board-redirect" title="', sprintf($txt['redirect_board_to'], Util::htmlspecialchars($board['name'])), '"></span>';
125
+		}
116 126
 
117 127
 		// No new posts at all! The agony!!
118
-		else
119
-			echo '
128
+		else {
129
+					echo '
120 130
 							<span class="board_icon i-board-off" title="', $txt['old_posts'], '"></span>';
131
+		}
121 132
 
122 133
 		echo '
123 134
 						</a>
@@ -126,8 +137,10 @@  discard block
 block discarded – undo
126 137
 
127 138
 		// Has it outstanding posts for approval? @todo - Might change presentation here.
128 139
 		if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
129
-			echo '
140
+		{
141
+					echo '
130 142
 							<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"><i class="icon i-alert"></i></a>';
143
+		}
131 144
 
132 145
 		echo '
133 146
 						</h3>
@@ -135,8 +148,10 @@  discard block
 block discarded – undo
135 148
 
136 149
 		// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
137 150
 		if (!empty($board['moderators']))
138
-			echo '
151
+		{
152
+					echo '
139 153
 						<p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
154
+		}
140 155
 
141 156
 		// Show some basic information about the number of posts, etc.
142 157
 		echo '
@@ -156,11 +171,14 @@  discard block
 block discarded – undo
156 171
 						<p class="board_lastpost">';
157 172
 
158 173
 			if (!empty($board['last_post']['member']['avatar']))
159
-				echo '
174
+			{
175
+							echo '
160 176
 							<span class="board_avatar"><a href="', $board['last_post']['member']['href'], '"><img class="avatar" src="', $board['last_post']['member']['avatar']['href'], '" alt="" loading="lazy" /></a></span>';
161
-			else
162
-				echo '
177
+			}
178
+			else {
179
+							echo '
163 180
 							<span class="board_avatar"><a href="#"></a></span>';
181
+			}
164 182
 			echo '
165 183
 							', $board['last_post']['last_post_message'], '
166 184
 						</p>';
@@ -181,13 +199,18 @@  discard block
 block discarded – undo
181 199
 			foreach ($board['children'] as $child)
182 200
 			{
183 201
 				if (!$child['is_redirect'])
184
-					$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 ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>';
185
-				else
186
-					$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
202
+				{
203
+									$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 ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>';
204
+				}
205
+				else {
206
+									$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
207
+				}
187 208
 
188 209
 				// Has it posts awaiting approval?
189 210
 				if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
190
-					$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"><i class="icon i-alert"></i></a>';
211
+				{
212
+									$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"><i class="icon i-alert"></i></a>';
213
+				}
191 214
 
192 215
 				$children[] = $child['link'];
193 216
 			}
@@ -226,7 +249,8 @@  discard block
 block discarded – undo
226 249
 	global $context, $txt;
227 250
 
228 251
 	if ($select_all)
229
-		echo '
252
+	{
253
+			echo '
230 254
 						<h3 class="secondary_header panel_toggle">
231 255
 							<span>
232 256
 								<span id="advanced_panel_toggle" class="chevricon i-chevron-', $context['boards_check_all'] ? 'down' : 'up', ' hide" title="', $txt['hide'], '"></span>
@@ -234,6 +258,7 @@  discard block
 block discarded – undo
234 258
 							<a href="#" id="advanced_panel_link">', $txt['choose_board'], '</a>
235 259
 						</h3>
236 260
 						<div id="advanced_panel_div"', $context['boards_check_all'] ? ' class="hide"' : '', '>';
261
+	}
237 262
 
238 263
 	// Make two nice columns of boards, link each category header to toggle select all boards in each
239 264
 	$group_cats = optimizeBoardsSubdivision($context['boards_in_category'], $context['num_boards']);
Please login to merge, or discard this patch.
themes/default/ModerationCenter.template.php 1 patch
Braces   +63 added lines, -23 removed lines patch added patch discarded remove patch
@@ -112,17 +112,21 @@  discard block
 block discarded – undo
112 112
 									<ul>';
113 113
 
114 114
 	foreach ($context['group_requests'] as $request)
115
-		echo '
115
+	{
116
+			echo '
116 117
 										<li class="smalltext">
117 118
 											<a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], '
118 119
 										</li>';
120
+	}
119 121
 
120 122
 	// Don't have any watched users right now?
121 123
 	if (empty($context['group_requests']))
122
-		echo '
124
+	{
125
+			echo '
123 126
 										<li>
124 127
 											<strong class="smalltext">', $txt['mc_group_requests_none'], '</strong>
125 128
 										</li>';
129
+	}
126 130
 
127 131
 	echo '
128 132
 									</ul>
@@ -144,17 +148,21 @@  discard block
 block discarded – undo
144 148
 									<ul>';
145 149
 
146 150
 	foreach ($context['reported_posts'] as $report)
147
-		echo '
151
+	{
152
+			echo '
148 153
 										<li class="smalltext">
149 154
 											<a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], '
150 155
 										</li>';
156
+	}
151 157
 
152 158
 	// Don't have any watched users right now?
153 159
 	if (empty($context['reported_posts']))
154
-		echo '
160
+	{
161
+			echo '
155 162
 										<li>
156 163
 											<strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong>
157 164
 										</li>';
165
+	}
158 166
 
159 167
 	echo '
160 168
 									</ul>
@@ -176,17 +184,21 @@  discard block
 block discarded – undo
176 184
 							<ul>';
177 185
 
178 186
 	foreach ($context['watched_users'] as $user)
179
-		echo '
187
+	{
188
+			echo '
180 189
 								<li>
181 190
 									<span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span>
182 191
 								</li>';
192
+	}
183 193
 
184 194
 	// Don't have any watched users right now?
185 195
 	if (empty($context['watched_users']))
186
-		echo '
196
+	{
197
+			echo '
187 198
 								<li>
188 199
 									<strong class="smalltext">', $txt['mc_watched_users_none'], '</strong>
189 200
 								</li>';
201
+	}
190 202
 
191 203
 	echo '
192 204
 							</ul>
@@ -216,8 +228,10 @@  discard block
 block discarded – undo
216 228
 
217 229
 		// Cycle through the notes.
218 230
 		foreach ($context['notes'] as $note)
219
-			echo '
231
+		{
232
+					echo '
220 233
 									<li class="smalltext"><a href="', $note['delete_href'], '"><img src="', $settings['images_url'], '/pm_recipient_delete.png" alt="" /></a> <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>';
234
+		}
221 235
 
222 236
 		echo '
223 237
 								</ul>
@@ -274,7 +288,9 @@  discard block
 block discarded – undo
274 288
 						</h2>';
275 289
 
276 290
 	if (!empty($context['reports']))
277
-		template_pagesection();
291
+	{
292
+			template_pagesection();
293
+	}
278 294
 
279 295
 	foreach ($context['reports'] as $report)
280 296
 	{
@@ -284,7 +300,9 @@  discard block
 block discarded – undo
284 300
 		// Prepare the comments...
285 301
 		$comments = array();
286 302
 		foreach ($report['comments'] as $comment)
287
-			$comments[$comment['member']['id']] = $comment['member']['link'];
303
+		{
304
+					$comments[$comment['member']['id']] = $comment['member']['link'];
305
+		}
288 306
 		$report['date'] = $txt['mc_reportedp_last_reported'] . ': ' . $report['last_updated'] . '&nbsp;-&nbsp;' . '
289 307
 										' . $txt['mc_reportedp_reported_by'] . ': ' . implode(', ', $comments);
290 308
 
@@ -293,10 +311,13 @@  discard block
 block discarded – undo
293 311
 
294 312
 	// Were none found?
295 313
 	if (empty($context['reports']))
296
-		echo '
314
+	{
315
+			echo '
297 316
 						<p class="infobox">', $txt['mc_reportedp_none_found'], '</p>';
298
-	else
299
-		template_pagesection(false, '', array('extra' => !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 ? '<input type="submit" name="close_selected" value="' . $txt['mc_reportedp_close_selected'] . '" class="right_submit" />' : ''));
317
+	}
318
+	else {
319
+			template_pagesection(false, '', array('extra' => !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 ? '<input type="submit" name="close_selected" value="' . $txt['mc_reportedp_close_selected'] . '" class="right_submit" />' : ''));
320
+	}
300 321
 
301 322
 	echo '
302 323
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -320,12 +341,15 @@  discard block
 block discarded – undo
320 341
 
321 342
 	// No posts?
322 343
 	if (empty($context['unapproved_items']))
323
-		echo '
344
+	{
345
+			echo '
324 346
 						<div class="content">
325 347
 							<p class="centertext">', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '</p>
326 348
 						</div>';
327
-	else
328
-		template_pagesection();
349
+	}
350
+	else {
351
+			template_pagesection();
352
+	}
329 353
 
330 354
 	// Loop through and show each unapproved post
331 355
 	foreach ($context['unapproved_items'] as $item)
@@ -340,7 +364,8 @@  discard block
 block discarded – undo
340 364
 	// Quick moderation checkbox action selection
341 365
 	$quick_mod = '';
342 366
 	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['unapproved_items']))
343
-		$quick_mod = '
367
+	{
368
+			$quick_mod = '
344 369
 					<div class="floatright">
345 370
 						<select name="do" onchange="if (this.value != 0 &amp;&amp; confirm(\'' . $txt['mc_unapproved_sure'] . '\')) submit();">
346 371
 							<option value="0">' . $txt['with_selected'] . ':</option>
@@ -352,9 +377,12 @@  discard block
 block discarded – undo
352 377
 							<input type="submit" name="mc_go" value="' . $txt['go'] . '" />
353 378
 						</noscript>
354 379
 					</div>';
380
+	}
355 381
 
356 382
 	if (!empty($context['unapproved_items']))
357
-		template_pagesection(false, '', array('extra' => $quick_mod));
383
+	{
384
+			template_pagesection(false, '', array('extra' => $quick_mod));
385
+	}
358 386
 
359 387
 	echo '
360 388
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -391,23 +419,29 @@  discard block
 block discarded – undo
391 419
 							<h2 class="category_header">', $txt['mc_modreport_whoreported_title'], '</h2>';
392 420
 
393 421
 	foreach ($context['report']['comments'] as $comment)
394
-		echo '
422
+	{
423
+			echo '
395 424
 							<div class="content">
396 425
 								<p class="smalltext">', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '</p>
397 426
 								<p>', $comment['message'], '</p>
398 427
 							</div>';
428
+	}
399 429
 
400 430
 	echo '
401 431
 							<h2 class="category_header">', $txt['mc_modreport_mod_comments'], '</h2>
402 432
 							<div class="content">';
403 433
 
404 434
 	if (empty($context['report']['mod_comments']))
405
-		echo '
435
+	{
436
+			echo '
406 437
 								<p class="successbox">', $txt['mc_modreport_no_mod_comment'], '</p>';
438
+	}
407 439
 
408 440
 	foreach ($context['report']['mod_comments'] as $comment)
409
-		echo
441
+	{
442
+			echo
410 443
 		'<p>', $comment['member']['link'], ': ', $comment['message'], ' <em class="smalltext">(', $comment['time'], ')</em></p>';
444
+	}
411 445
 
412 446
 	echo '
413 447
 								<textarea rows="2" cols="60" style="width: 100%;" name="mod_comment"></textarea>
@@ -443,7 +477,8 @@  discard block
 block discarded – undo
443 477
 						<div class="inner">' . $post['body'] . '</div>';
444 478
 
445 479
 	if ($post['can_delete'])
446
-		$output_html .= '
480
+	{
481
+			$output_html .= '
447 482
 						<ul class="quickbuttons">
448 483
 							<li class="listlevel1">
449 484
 								<input type="checkbox" name="delete[]" value="' . $post['id'] . '" />
@@ -452,6 +487,7 @@  discard block
 block discarded – undo
452 487
 								<a class="linklevel1 remove_button" href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mc_watched_users_delete_post'] . '\');">' . $txt['remove'] . '</a>
453 488
 							</li>
454 489
 						</ul>';
490
+	}
455 491
 
456 492
 	$output_html .= '
457 493
 					</div>';
@@ -477,8 +513,10 @@  discard block
 block discarded – undo
477 513
 					<dd>';
478 514
 
479 515
 	foreach ($context['homepage_blocks'] as $k => $v)
480
-		echo '
516
+	{
517
+			echo '
481 518
 						<label for="mod_homepage_', $k, '"><input type="checkbox" id="mod_homepage_', $k, '" name="mod_homepage[', $k, ']"', in_array($k, $context['mod_settings']['user_blocks']) ? ' checked="checked"' : '', ' /> ', $v, '</label><br />';
519
+	}
482 520
 
483 521
 	echo '
484 522
 					</dd>';
@@ -615,7 +653,8 @@  discard block
 block discarded – undo
615 653
 				</dl>';
616 654
 
617 655
 	if ($context['template_data']['can_edit_personal'])
618
-		echo '
656
+	{
657
+			echo '
619 658
 				<input type="checkbox" name="make_personal" id="make_personal" ', $context['template_data']['personal'] ? 'checked="checked"' : '', ' />
620 659
 				<label for="make_personal">
621 660
 					<strong>', $txt['mc_warning_template_personal'], '</strong>
@@ -623,6 +662,7 @@  discard block
 block discarded – undo
623 662
 				<br />
624 663
 				<span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span>
625 664
 				<br />';
665
+	}
626 666
 
627 667
 	echo '
628 668
 				<hr />
Please login to merge, or discard this patch.
themes/default/GenericControls.template.php 1 patch
Braces   +40 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
 	// Allow addons to insert additional editor plugin scripts
34 34
 	if (!empty($editor_context['plugin_addons']) && is_array($editor_context['plugin_addons']))
35
-		$plugins = array_filter(array_merge($plugins, $editor_context['plugin_addons']));
35
+	{
36
+			$plugins = array_filter(array_merge($plugins, $editor_context['plugin_addons']));
37
+	}
36 38
 
37 39
 	// Add in special config objects to the editor, typically for plugin use
38 40
 	$plugin_options = array();
@@ -42,7 +44,8 @@  discard block
 block discarded – undo
42 44
 					}';
43 45
 
44 46
 	if (!empty($context['mentions_enabled']))
45
-		$plugin_options[] = '
47
+	{
48
+			$plugin_options[] = '
46 49
 					mentionOptions: {
47 50
 						editor_id: \'' . $editor_id . '\',
48 51
 						cache: {
@@ -51,10 +54,13 @@  discard block
 block discarded – undo
51 54
 							names: []
52 55
 						}
53 56
 					}';
57
+	}
54 58
 
55 59
 	// Allow addons to insert additional editor objects
56 60
 	if (!empty($editor_context['plugin_options']) && is_array($editor_context['plugin_options']))
57
-		$plugin_options = array_merge($plugin_options, $editor_context['plugin_options']);
61
+	{
62
+			$plugin_options = array_merge($plugin_options, $editor_context['plugin_options']);
63
+	}
58 64
 
59 65
 	echo '
60 66
 		<div id="editor_toolbar_container"></div>
@@ -93,13 +99,17 @@  discard block
 block discarded – undo
93 99
 		{
94 100
 			$countLocations--;
95 101
 			if ($location === 'postform')
96
-				echo '
102
+			{
103
+							echo '
97 104
 						dropdown:
98 105
 						{';
106
+			}
99 107
 			elseif ($location === 'popup')
100
-				echo '
108
+			{
109
+							echo '
101 110
 						popup:
102 111
 						{';
112
+			}
103 113
 
104 114
 			$numRows = count($smileyRows);
105 115
 
@@ -114,8 +124,10 @@  discard block
 block discarded – undo
114 124
 				}
115 125
 
116 126
 				if (empty($smileyRow['isLast']) && $numRows !== 1)
117
-					echo ',
127
+				{
128
+									echo ',
118 129
 						\'-', $emptyPlaceholder++, '\': \'\',';
130
+				}
119 131
 			}
120 132
 
121 133
 			echo '
@@ -125,10 +137,11 @@  discard block
 block discarded – undo
125 137
 		echo '
126 138
 					}';
127 139
 	}
128
-	else
129
-		echo ',
140
+	else {
141
+			echo ',
130 142
 					emoticons:
131 143
 					{}';
144
+	}
132 145
 
133 146
 	// Show all the editor command buttons
134 147
 	if ($bbcContainer !== null)
@@ -138,13 +151,16 @@  discard block
 block discarded – undo
138 151
 
139 152
 		// Create the tooltag rows to display the buttons in the editor
140 153
 		foreach ($context['bbc_toolbar'] as $i => $buttonRow)
141
-			echo $buttonRow[0], '||';
154
+		{
155
+					echo $buttonRow[0], '||';
156
+		}
142 157
 
143 158
 		echo ',emoticon",';
144 159
 	}
145
-	else
146
-		echo ',
160
+	else {
161
+			echo ',
147 162
 					toolbar: "source,emoticon",';
163
+	}
148 164
 
149 165
 	echo '
150 166
 				});
@@ -182,8 +198,10 @@  discard block
 block discarded – undo
182 198
 
183 199
 	// If this message has been edited in the past - display when it was.
184 200
 	if (isset($context['last_modified']))
185
-		echo '
201
+	{
202
+			echo '
186 203
 			<p class="lastedit">', $context['last_modified_text'], '</p>';
204
+	}
187 205
 
188 206
 	// Show the helpful shortcut text
189 207
 	echo '
@@ -192,13 +210,17 @@  discard block
 block discarded – undo
192 210
 		<input type="submit" name="', isset($editor_context['labels']['post_name']) ? $editor_context['labels']['post_name'] : 'post', '" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : $txt['post'], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="s" />';
193 211
 
194 212
 	if ($editor_context['preview_type'])
195
-		echo '
213
+	{
214
+			echo '
196 215
 		<input type="submit" name="preview" value="', isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $txt['preview'], '" tabindex="', $context['tabindex']++, '" onclick="', $editor_context['preview_type'] == 2 ? 'return event.ctrlKey || previewControl();' : 'return submitThisOnce(this);', '" accesskey="p" />';
216
+	}
197 217
 
198 218
 	// Show the spellcheck button?
199 219
 	if ($context['show_spellchecking'])
200
-		echo '
220
+	{
221
+			echo '
201 222
 		<input type="button" value="', $txt['spell_check'], '" tabindex="', $context['tabindex']++, '" onclick="spellCheckStart();" />';
223
+	}
202 224
 
203 225
 	foreach ($editor_context['buttons'] as $button)
204 226
 	{
@@ -214,9 +236,11 @@  discard block
 block discarded – undo
214 236
 
215 237
 	// Create an area to show the draft last saved on text
216 238
 	if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
217
-		echo '
239
+	{
240
+			echo '
218 241
 		<div class="draftautosave">
219 242
 			<span id="throbber" class="hide"><i class="icon icon-spin i-spinner"></i>&nbsp;</span>
220 243
 			<span id="draft_lastautosave"></span>
221 244
 		</div>';
222
-}
245
+	}
246
+	}
Please login to merge, or discard this patch.
themes/default/Xml.template.php 1 patch
Braces   +72 added lines, -29 removed lines patch added patch discarded remove patch
@@ -70,9 +70,10 @@  discard block
 block discarded – undo
70 70
 		<subject is_first="', $context['message']['first_in_topic'] ? '1' : '0', '"><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>
71 71
 		<body><![CDATA[', $context['message']['body'], ']]></body>';
72 72
 	}
73
-	else
74
-		echo '
73
+	else {
74
+			echo '
75 75
 		<error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '" in_body="', cleanXml($context['message']['error_in_body']) ? '1' : '0', '"><![CDATA[', implode('<br />', $context['message']['errors']), ']]></error>';
76
+	}
76 77
 
77 78
 	echo '
78 79
 	</message>
@@ -94,12 +95,15 @@  discard block
 block discarded – undo
94 95
 		echo '
95 96
 		<modified><![CDATA[', empty($context['message']['modified']['time']) ? '' : cleanXml('&#171; <em>' . sprintf($txt['last_edit_by'], $context['message']['modified']['time'], $context['message']['modified']['name']) . '</em> &#187;'), ']]></modified>';
96 97
 		if (!empty($context['message']['subject']))
97
-			echo '
98
+		{
99
+					echo '
98 100
 		<subject><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>';
101
+		}
99 102
 	}
100
-	else
101
-		echo '
103
+	else {
104
+			echo '
102 105
 		<error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '"><![CDATA[', cleanXml(implode('<br />', $context['message']['errors'])), ']]></error>';
106
+	}
103 107
 	echo '
104 108
 	</message>
105 109
 </elk>';
@@ -121,9 +125,11 @@  discard block
 block discarded – undo
121 125
 	<errors serious="', empty($context['errors']['type']) || $context['errors']['type'] != 'serious' ? '0' : '1', '" topic_locked="', $context['locked'] ? '1' : '0', '">';
122 126
 
123 127
 	if (!empty($context['post_error']['errors']))
124
-		foreach ($context['post_error']['errors'] as $key => $message)
128
+	{
129
+			foreach ($context['post_error']['errors'] as $key => $message)
125 130
 			echo '
126 131
 		<error code="', cleanXml($key), '"><![CDATA[', cleanXml($message), ']]></error>';
132
+	}
127 133
 
128 134
 	echo '
129 135
 		<caption name="guestname" class="', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? 'error' : '', '" />
@@ -139,13 +145,15 @@  discard block
 block discarded – undo
139 145
 		echo '
140 146
 	<new_posts>';
141 147
 		foreach ($context['previous_posts'] as $post)
142
-			echo '
148
+		{
149
+					echo '
143 150
 		<post id="', $post['id'], '">
144 151
 			<time><![CDATA[', $post['time'], ']]></time>
145 152
 			<poster><![CDATA[', cleanXml($post['poster']), ']]></poster>
146 153
 			<message><![CDATA[', cleanXml($post['body']), ']]></message>
147 154
 			<is_ignored>', $post['is_ignored'] ? '1' : '0', '</is_ignored>
148 155
 		</post>';
156
+		}
149 157
 		echo '
150 158
 	</new_posts>';
151 159
 	}
@@ -170,9 +178,11 @@  discard block
 block discarded – undo
170 178
 	<errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">';
171 179
 
172 180
 	if (!empty($context['post_error']['errors']))
173
-		foreach ($context['post_error']['errors'] as $key => $message)
181
+	{
182
+			foreach ($context['post_error']['errors'] as $key => $message)
174 183
 			echo '
175 184
 		<error code="', cleanXml($key), '"><![CDATA[', cleanXml($message), ']]></error>';
185
+	}
176 186
 
177 187
 	// This is the not so generic section, mainly used by PM preview, can be used by others as well
178 188
 	echo '
@@ -197,13 +207,17 @@  discard block
 block discarded – undo
197 207
 	echo '<', '?xml version="1.0" encoding="UTF-8"?', '>
198 208
 <elk>';
199 209
 	foreach ($context['yearly'] as $year)
200
-		foreach ($year['months'] as $month)
210
+	{
211
+			foreach ($year['months'] as $month)
201 212
 		{
202 213
 			echo '
203 214
 	<month id="', $month['date']['year'], $month['date']['month'], '">';
215
+	}
204 216
 			foreach ($month['days'] as $day)
205
-				echo '
217
+			{
218
+							echo '
206 219
 		<day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />';
220
+			}
207 221
 			echo '
208 222
 	</month>';
209 223
 		}
@@ -225,16 +239,19 @@  discard block
 block discarded – undo
225 239
 	foreach ($context['changes'] as $change)
226 240
 	{
227 241
 		if ($change['type'] == 'remove')
228
-			echo '
242
+		{
243
+					echo '
229 244
 	<change id="', $change['id'], '" curAction="remove" section="', $change['section'], '" />';
230
-		else
231
-			echo '
245
+		}
246
+		else {
247
+					echo '
232 248
 	<change id="', $change['id'], '" curAction="insert" section="', $change['section'], '">
233 249
 		<subject><![CDATA[', cleanXml($change['insert_value']['subject']), ']]></subject>
234 250
 		<time><![CDATA[', cleanXml($change['insert_value']['time']), ']]></time>
235 251
 		<body><![CDATA[', cleanXml($change['insert_value']['body']), ']]></body>
236 252
 		<poster><![CDATA[', cleanXml($change['insert_value']['poster']), ']]></poster>
237 253
 	</change>';
254
+		}
238 255
 	}
239 256
 
240 257
 	echo '
@@ -251,8 +268,10 @@  discard block
 block discarded – undo
251 268
 <elk>';
252 269
 
253 270
 	if (empty($context['topics']))
254
-		echo '
271
+	{
272
+			echo '
255 273
 		<noresults>', $txt['search_no_results'], '</noresults>';
274
+	}
256 275
 	else
257 276
 	{
258 277
 		echo '
@@ -323,8 +342,10 @@  discard block
 block discarded – undo
323 342
 		echo '
324 343
 	<item type="category" id="', $category['id'], '"><![CDATA[', cleanXml($category['name']), ']]></item>';
325 344
 		foreach ($category['boards'] as $board)
326
-			echo '
345
+		{
346
+					echo '
327 347
 	<item type="board" id="', $board['id'], '" childlevel="', $board['child_level'], '"><![CDATA[', cleanXml($board['name']), ']]></item>';
348
+		}
328 349
 	}
329 350
 
330 351
 	echo '
@@ -342,8 +363,10 @@  discard block
 block discarded – undo
342 363
 <elk>';
343 364
 
344 365
 	foreach ($context['icons'] as $icon)
345
-		echo '
366
+	{
367
+			echo '
346 368
 	<icon value="', $icon['value'], '" url="', $icon['url'], '"><![CDATA[', cleanXml($icon['name']), ']]></icon>';
369
+	}
347 370
 
348 371
 	echo '
349 372
 </elk>';
@@ -378,8 +401,10 @@  discard block
 block discarded – undo
378 401
 	foreach ($context['xml_data'] as $key => $val)
379 402
 	{
380 403
 		if ($key != 'error')
381
-			echo '
404
+		{
405
+					echo '
382 406
 			<', $key, '><![CDATA[', cleanXml($val), ']]></', $key, '>';
407
+		}
383 408
 	}
384 409
 
385 410
 	echo '
@@ -419,15 +444,19 @@  discard block
 block discarded – undo
419 444
 	{
420 445
 		// A group?
421 446
 		if (is_array($data) && isset($data['identifier']))
422
-			template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level);
447
+		{
448
+					template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level);
449
+		}
423 450
 		// An item...
424 451
 		elseif (is_array($data) && isset($data['value']))
425 452
 		{
426 453
 			echo "\n", str_repeat("\t", $level), '<', $child_ident;
427 454
 
428 455
 			if (!empty($data['attributes']))
429
-				foreach ($data['attributes'] as $k => $v)
456
+			{
457
+							foreach ($data['attributes'] as $k => $v)
430 458
 					echo ' ' . $k . '="' . $v . '"';
459
+			}
431 460
 
432 461
 			echo '><![CDATA[', cleanXml($data['value']), ']]></', $child_ident, '>';
433 462
 		}
@@ -453,7 +482,9 @@  discard block
 block discarded – undo
453 482
 	{
454 483
 		// Skip it, it's been set to null.
455 484
 		if ($val === null)
456
-			continue;
485
+		{
486
+					continue;
487
+		}
457 488
 
458 489
 		// If a tag was passed, use it instead of the key.
459 490
 		$key = isset($tag) ? $tag : $key;
@@ -470,9 +501,13 @@  discard block
 block discarded – undo
470 501
 
471 502
 		// If it's empty/0/nothing simply output an empty tag.
472 503
 		if ($val == '')
473
-			echo '<', $key, ' />';
504
+		{
505
+					echo '<', $key, ' />';
506
+		}
474 507
 		elseif ($xml_format == 'atom' && $key == 'category')
475
-			echo '<', $key, ' term="', $val, '" />';
508
+		{
509
+					echo '<', $key, ' term="', $val, '" />';
510
+		}
476 511
 		else
477 512
 		{
478 513
 			// Beginning tag.
@@ -483,9 +518,12 @@  discard block
 block discarded – undo
483 518
 				echo '<dc:format>text/html</dc:format>';
484 519
 			}
485 520
 			elseif ($xml_format == 'atom' && $key == 'summary')
486
-				echo '<', $key, ' type="html">';
487
-			else
488
-				echo '<', $key, '>';
521
+			{
522
+							echo '<', $key, ' type="html">';
523
+			}
524
+			else {
525
+							echo '<', $key, '>';
526
+			}
489 527
 
490 528
 			if (is_array($val))
491 529
 			{
@@ -495,10 +533,13 @@  discard block
 block discarded – undo
495 533
 			}
496 534
 			// A string with returns in it.... show this as a multiline element.
497 535
 			elseif (strpos($val, "\n") !== false || strpos($val, '<br />') !== false)
498
-				echo "\n", fix_possible_url($val), "\n", str_repeat("\t", $i), '</', $key, '>';
536
+			{
537
+							echo "\n", fix_possible_url($val), "\n", str_repeat("\t", $i), '</', $key, '>';
538
+			}
499 539
 			// A simple string.
500
-			else
501
-				echo fix_possible_url($val), '</', $key, '>';
540
+			else {
541
+							echo fix_possible_url($val), '</', $key, '>';
542
+			}
502 543
 		}
503 544
 	}
504 545
 }
@@ -520,8 +561,10 @@  discard block
 block discarded – undo
520 561
 				<rdf:Seq>';
521 562
 
522 563
 	foreach ($context['recent_posts_data'] as $item)
523
-		echo '
564
+	{
565
+			echo '
524 566
 					<rdf:li rdf:resource="', $item['link'], '" />';
567
+	}
525 568
 
526 569
 	echo '
527 570
 				</rdf:Seq>
Please login to merge, or discard this patch.
themes/default/GenericMessages.template.php 1 patch
Braces   +81 added lines, -30 removed lines patch added patch discarded remove patch
@@ -33,15 +33,18 @@  discard block
 block discarded – undo
33 33
 
34 34
 	// Show a link to the member's profile.
35 35
 	if (!empty($message['member']['id']))
36
-		$poster_div .= '
36
+	{
37
+			$poster_div .= '
37 38
 								<a class="linklevel1 name" href="' . $message['member']['href'] . '">
38 39
 									' . $message['member']['name'] . '
39 40
 								</a>';
40
-	else
41
-		$poster_div .= '
41
+	}
42
+	else {
43
+			$poster_div .= '
42 44
 								<a class="linklevel1 name">
43 45
 									' . $message['member']['name'] . '
44 46
 								</a>';
47
+	}
45 48
 
46 49
 	// The member info dropdown starts here.
47 50
 	$poster_div .= '
@@ -52,33 +55,45 @@  discard block
 block discarded – undo
52 55
 	{
53 56
 		// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
54 57
 		if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
55
-			$poster_div .= '
58
+		{
59
+					$poster_div .= '
56 60
 									<li class="listlevel2 postgroup">' . $message['member']['post_group'] . '</li>';
61
+		}
57 62
 
58 63
 		// Show how many posts they have made.
59 64
 		if (!isset($context['disabled_fields']['posts']))
60
-			$poster_div .= '
65
+		{
66
+					$poster_div .= '
61 67
 									<li class="listlevel2 postcount">' . $txt['member_postcount'] . ': ' . $message['member']['posts'] . '</li>';
68
+		}
62 69
 
63 70
 		if (!isset($context['disabled_fields']['date_registered']))
64
-			$poster_div .= '
71
+		{
72
+					$poster_div .= '
65 73
 									<li class="listlevel2 registered">' . $txt['date_joined'] . ': ' . standardTime($message['member']['registered_raw'], $txt['date_joined_format']) . '</li>';
74
+		}
66 75
 
67 76
 		// Is karma display enabled?  Total or +/-?
68 77
 		if ($modSettings['karmaMode'] == '1')
69
-			$poster_div .= '
78
+		{
79
+					$poster_div .= '
70 80
 									<li class="listlevel2 karma">' . $modSettings['karmaLabel'] . ' ' . ($message['member']['karma']['good'] - $message['member']['karma']['bad']) . '</li>';
81
+		}
71 82
 		elseif ($modSettings['karmaMode'] == '2')
72
-			$poster_div .= '
83
+		{
84
+					$poster_div .= '
73 85
 									<li class="listlevel2 karma">' . $modSettings['karmaLabel'] . ' +' . $message['member']['karma']['good'] . '/-' . $message['member']['karma']['bad'] . '</li>';
86
+		}
74 87
 
75 88
 		// Is this user allowed to modify this member's karma?
76 89
 		if (!empty($message['member']['karma']['allow']))
77
-			$poster_div .= '
90
+		{
91
+					$poster_div .= '
78 92
 									<li class="listlevel2 karma_allow">
79 93
 										<a class="linklevel2" href="' . $message['member']['karma']['applaud_url'] . '">' . $modSettings['karmaApplaudLabel'] . '</a>' .
80 94
 										(empty($modSettings['karmaDisableSmite']) ? '<a class="linklevel2" href="' . $message['member']['karma']['smite_url'] . '">' . $modSettings['karmaSmiteLabel'] . '</a>' : '') . '
81 95
 									</li>';
96
+		}
82 97
 
83 98
 		// Any custom fields to show as or above icons?
84 99
 		if (!empty($message['member']['custom_fields']))
@@ -98,7 +113,9 @@  discard block
 block discarded – undo
98 113
 			foreach ($message['member']['custom_fields'] as $custom)
99 114
 			{
100 115
 				if ($custom['placement'] != 1 || empty($custom['value']))
101
-					continue;
116
+				{
117
+									continue;
118
+				}
102 119
 
103 120
 				if (empty($shown))
104 121
 				{
@@ -113,9 +130,11 @@  discard block
 block discarded – undo
113 130
 			}
114 131
 
115 132
 			if ($shown)
116
-				$poster_div .= '
133
+			{
134
+							$poster_div .= '
117 135
 										</ol>
118 136
 									</li>';
137
+			}
119 138
 		}
120 139
 
121 140
 		// Show the website and email address buttons.
@@ -127,13 +146,17 @@  discard block
 block discarded – undo
127 146
 
128 147
 			// Don't show an icon if they haven't specified a website.
129 148
 			if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
130
-				$poster_div .= '
149
+			{
150
+							$poster_div .= '
131 151
 											<li class="cf_icon"><a href="' . $message['member']['website']['url'] . '" title="' . $message['member']['website']['title'] . '" target="_blank" rel="noopener noreferrer" class="new_win">' . ($settings['use_image_buttons'] ? '<i class="icon i-website" title="' . $message['member']['website']['title'] . '"></i>' : $txt['www']) . '</a></li>';
152
+			}
132 153
 
133 154
 			// Don't show the email address if they want it hidden.
134 155
 			if ($context['can_send_email'])
135
-				$poster_div .= '
156
+			{
157
+							$poster_div .= '
136 158
 											<li>' . template_msg_email($message['id'], $message['member']) . '</li>';
159
+			}
137 160
 
138 161
 			$poster_div .= '
139 162
 										</ol>
@@ -146,15 +169,19 @@  discard block
 block discarded – undo
146 169
 			foreach ($message['member']['custom_fields'] as $custom)
147 170
 			{
148 171
 				if (empty($custom['placement']) || empty($custom['value']))
149
-					$poster_div .= '
172
+				{
173
+									$poster_div .= '
150 174
 									<li class="listlevel2 custom">' . $custom['title'] . ': ' . $custom['value'] . '</li>';
175
+				}
151 176
 			}
152 177
 		}
153 178
 	}
154 179
 	// Otherwise, show the guest's email.
155 180
 	elseif (!empty($message['member']['email']) && $context['can_send_email'])
156
-		$poster_div .= '
181
+	{
182
+			$poster_div .= '
157 183
 									<li class="listlevel2 email">' . template_msg_email($message['id']) . '</li>';
184
+	}
158 185
 
159 186
 	// Stuff for the staff to wallop them with.
160 187
 	$poster_div .= '
@@ -169,8 +196,10 @@  discard block
 block discarded – undo
169 196
 
170 197
 		// Do they have a warning in place?
171 198
 		if ($message['member']['can_see_warning'] && !empty($options['hide_poster_area']))
172
-			$poster_div .= '
199
+		{
200
+					$poster_div .= '
173 201
 										<a class="linklevel2" href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '"><i class="warnicon i-warning-' . $message['member']['warning_status'] . '" title="' . $txt['user_warn_' . $message['member']['warning_status']] . '"></i><span class="warn_' . $message['member']['warning_status'] . '">' . $txt['warn_' . $message['member']['warning_status']] . '</span></a>';
202
+		}
174 203
 
175 204
 		$poster_div .= '
176 205
 									</li>';
@@ -178,28 +207,35 @@  discard block
 block discarded – undo
178 207
 
179 208
 	// Show the IP to this user for this post - because you can moderate?
180 209
 	if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
181
-		$poster_div .= '
210
+	{
211
+			$poster_div .= '
182 212
 									<li class="listlevel2 poster_ip">
183 213
 										<a class="linklevel2 help" title="' . $message['member']['ip'] . '" href="' . $scripturl . '?action=' . (!empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=history;sa=ip;u=' . $message['member']['id'] . ';searchip=' . $message['member']['ip']) . '">' . $message['member']['ip'] . '</a>
184 214
 										<a class="helpicon i-help" href="' . $scripturl . '?action=quickhelp;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);"></a>
185 215
 									</li>';
216
+	}
186 217
 	// Or, should we show it because this is you?
187 218
 	elseif ($message['can_see_ip'] && !empty($message['member']['ip']))
188
-		$poster_div .= '
219
+	{
220
+			$poster_div .= '
189 221
 									<li class="listlevel2 poster_ip">
190 222
 										<a class="linklevel2 help" title="' . $message['member']['ip'] . '" href="#" onclick="return false;">' . $message['member']['ip'] . '</a>
191 223
 										<a class="linklevel2 helpicon i-help"  title="' . $message['member']['ip'] . '" href="' . $scripturl . '?action=quickhelp;help=see_member_ip" onclick="return reqOverlayDiv(this.href);"><s>' . $txt['help'] . '</s></a>
192 224
 									</li>';
225
+	}
193 226
 	// Okay, are you at least logged in?  Then we can show something about why IPs are logged...
194 227
 	elseif (!$context['user']['is_guest'])
195
-		$poster_div .= '
228
+	{
229
+			$poster_div .= '
196 230
 									<li class="listlevel2 poster_ip">
197 231
 										<a class="linklevel2 helpicon i-help" href="' . $scripturl . '?action=quickhelp;help=see_member_ip" onclick="return reqOverlayDiv(this.href);"><s>' . $txt['help'] . '</s></a>' . $txt['logged'] . '
198 232
 									</li>';
233
+	}
199 234
 	// Otherwise, you see NOTHING!
200
-	else
201
-		$poster_div .= '
235
+	else {
236
+			$poster_div .= '
202 237
 									<li class="listlevel2 poster_ip">' . $txt['logged'] . '</li>';
238
+	}
203 239
 
204 240
 	// Done with the detail information about the poster.
205 241
 	$poster_div .= '
@@ -210,27 +246,35 @@  discard block
 block discarded – undo
210 246
 	if (empty($options['hide_poster_area']) && !$ignoring)
211 247
 	{
212 248
 		if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
213
-			$poster_div .= '
249
+		{
250
+					$poster_div .= '
214 251
 							<li class="listlevel1 poster_avatar">
215 252
 								<a class="linklevel1" href="' . $message['member']['href'] . '">
216 253
 									' . $message['member']['avatar']['image'] . '
217 254
 								</a>
218 255
 							</li>';
256
+		}
219 257
 
220 258
 		// Show the post group icons, but not for guests.
221 259
 		if (!$message['member']['is_guest'])
222
-			$poster_div .= '
260
+		{
261
+					$poster_div .= '
223 262
 							<li class="listlevel1 icons">' . $message['member']['group_icons'] . '</li>';
263
+		}
224 264
 
225 265
 		// Show the member's primary group (like 'Administrator') if they have one.
226 266
 		if (!empty($message['member']['group']))
227
-			$poster_div .= '
267
+		{
268
+					$poster_div .= '
228 269
 							<li class="listlevel1 membergroup">' . $message['member']['group'] . '</li>';
270
+		}
229 271
 
230 272
 		// Show the member's custom title, if they have one.
231 273
 		if (!empty($message['member']['title']))
232
-			$poster_div .= '
274
+		{
275
+					$poster_div .= '
233 276
 							<li class="listlevel1 title">' . $message['member']['title'] . '</li>';
277
+		}
234 278
 
235 279
 		// Show online and offline buttons? PHP could do with a little bit of cleaning up here for brevity, but it works.
236 280
 		// The plan is to make these buttons act sensibly, and link to your own inbox in your own posts (with new PM notification).
@@ -247,19 +291,24 @@  discard block
 block discarded – undo
247 291
 		elseif ($context['can_send_pm'] && !$message['is_message_author'] && !$message['member']['is_guest'])
248 292
 		{
249 293
 			if (!empty($modSettings['onlineEnable']))
250
-				$poster_div .= '
294
+			{
295
+							$poster_div .= '
251 296
 							<li class="listlevel1 poster_online"><a class="linklevel1" href="' . $scripturl . '?action=pm;sa=send;u=' . $message['member']['id'] . '" title="' . $message['member']['online']['member_online_text'] . '">' . $txt['send_message'] . ' ' . template_member_online($message['member'], false) . '</a></li>';
252
-			else
253
-				$poster_div .= '
297
+			}
298
+			else {
299
+							$poster_div .= '
254 300
 							<li class="listlevel1 poster_online"><a class="linklevel1" href="' . $scripturl . '?action=pm;sa=send;u=' . $message['member']['id'] . '">' . $txt['send_message'] . ' </a></li>';
301
+			}
255 302
 		}
256 303
 		// Not allowed to send a PM, online status disabled and not from a guest.
257 304
 		elseif (!$context['can_send_pm'] && !empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
258
-
305
+		{
306
+		
259 307
 			// Are we showing the warning status?
260 308
 			if (!$message['member']['is_guest'] && $message['member']['can_see_warning'])
261 309
 				$poster_div .= '
262 310
 							<li class="listlevel1 warning">' . ($context['can_issue_warning'] ? '<a class="linklevel1" href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '') . '<i class="warnicon i-warning-' . $message['member']['warning_status'] . '.png" title="' . $txt['user_warn_' . $message['member']['warning_status']] . '"></i>' . ($context['can_issue_warning'] ? '</a>' : '') . '<span class="warn_' . $message['member']['warning_status'] . '">' . $txt['warn_' . $message['member']['warning_status']] . '</span></li>';
311
+		}
263 312
 	}
264 313
 
265 314
 	return $poster_div;
@@ -295,7 +344,9 @@  discard block
 block discarded – undo
295 344
 				</section>';
296 345
 
297 346
 	if (!empty($msg['buttons']))
298
-		template_quickbutton_strip($msg['buttons'], !empty($msg['tests']) ? $msg['tests'] : array());
347
+	{
348
+			template_quickbutton_strip($msg['buttons'], !empty($msg['tests']) ? $msg['tests'] : array());
349
+	}
299 350
 
300 351
 	echo '
301 352
 			</article>';
Please login to merge, or discard this patch.