Passed
Push — patch_1-1-9 ( 70f5ab...f2626d )
by Spuds
21:21 queued 15:06
created
themes/default/Display.template.php 2 patches
Braces   +159 added lines, -57 removed lines patch added patch discarded remove patch
@@ -67,10 +67,13 @@  discard block
 block discarded – undo
67 67
 
68 68
 			// Show just numbers...?
69 69
 			if ($settings['display_who_viewing'] == 1)
70
-				echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
70
+			{
71
+							echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
72
+			}
71 73
 			// Or show the actual people viewing the topic?
72
-			else
73
-				echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
74
+			else {
75
+							echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
76
+			}
74 77
 
75 78
 			// Now show how many guests are here too.
76 79
 			echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
@@ -79,10 +82,12 @@  discard block
 block discarded – undo
79 82
 
80 83
 		// Is this topic a redirect?
81 84
 		if (!empty($context['topic_redirected_from']))
82
-			echo '
85
+		{
86
+					echo '
83 87
 				<span id="redirectfrom">
84 88
 					' . sprintf($txt['no_redir'], '<a href="' . $context['topic_redirected_from']['redir_href'] . '">' . $context['topic_redirected_from']['subject'] . '</a>'), '
85 89
 				</span>';
90
+		}
86 91
 		echo '
87 92
 			</div>';
88 93
 	}
@@ -109,7 +114,9 @@  discard block
 block discarded – undo
109 114
 	while ($message = $controller->{$context['get_message'][1]}())
110 115
 	{
111 116
 		if ($message['can_remove'])
112
-			$removableMessageIDs[] = $message['id'];
117
+		{
118
+					$removableMessageIDs[] = $message['id'];
119
+		}
113 120
 
114 121
 		// Are we ignoring this message?
115 122
 		if (!empty($message['is_ignored']))
@@ -117,14 +124,17 @@  discard block
 block discarded – undo
117 124
 			$ignoring = true;
118 125
 			$ignoredMsgs[] = $message['id'];
119 126
 		}
120
-		else
121
-			$ignoring = false;
127
+		else {
128
+					$ignoring = false;
129
+		}
122 130
 
123 131
 		// Show the message anchor and a "new" anchor if this message is new.
124 132
 		if ($message['id'] != $context['first_message'] && ($message['first_new']))
125
-			echo '
133
+		{
134
+					echo '
126 135
 				<a id="new">&nbsp;</a>	
127 136
 				<hr class="new_post_separator" />';
137
+		}
128 138
 
129 139
 		echo '
130 140
 				<article class="post_wrapper forumposts', $message['classes'], $message['approved'] ? '' : ' approvebg', '">', $message['id'] != $context['first_message'] ? '
@@ -132,10 +142,12 @@  discard block
 block discarded – undo
132 142
 
133 143
 		// Showing the sidebar posting area?
134 144
 		if (empty($options['hide_poster_area']))
135
-			echo '
145
+		{
146
+					echo '
136 147
 					<aside>
137 148
 						<ul class="poster">', template_build_poster_div($message, $ignoring), '</ul>
138 149
 					</aside>';
150
+		}
139 151
 
140 152
 		echo '
141 153
 					<div class="postarea', empty($options['hide_poster_area']) ? '' : '2', '">
@@ -151,10 +163,12 @@  discard block
 block discarded – undo
151 163
 									<ul class="menulevel2">';
152 164
 
153 165
 			foreach ($context['follow_ups'][$message['id']] as $follow_up)
154
-				echo '
166
+			{
167
+							echo '
155 168
 										<li class="listlevel2">
156 169
 											<a class="linklevel2" href="', $scripturl, '?topic=', $follow_up['follow_up'], '.0">', $follow_up['subject'], '</a>
157 170
 										</li>';
171
+			}
158 172
 
159 173
 			echo '
160 174
 									</ul>
@@ -175,18 +189,22 @@  discard block
 block discarded – undo
175 189
 
176 190
 		// Ignoring this user? Hide the post.
177 191
 		if ($ignoring)
178
-			echo '
192
+		{
193
+					echo '
179 194
 						<details id="msg_', $message['id'], '_ignored_prompt">
180 195
 							', $txt['ignoring_user'], '
181 196
 							<a href="#" id="msg_', $message['id'], '_ignored_link" class="hide">', $txt['show_ignore_user_post'], '</a>
182 197
 						</details>';
198
+		}
183 199
 
184 200
 		// Awaiting moderation?
185 201
 		if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
186
-			echo '
202
+		{
203
+					echo '
187 204
 						<div class="approve_post">
188 205
 							', $txt['post_awaiting_approval'], '
189 206
 						</div>';
207
+		}
190 208
 
191 209
 		// Show the post itself, finally!
192 210
 		echo '
@@ -200,7 +218,9 @@  discard block
 block discarded – undo
200 218
 
201 219
 		// Assuming there are attachments...
202 220
 		if (!empty($message['attachment']))
203
-			template_display_attachments($message, $ignoring);
221
+		{
222
+					template_display_attachments($message, $ignoring);
223
+		}
204 224
 
205 225
 		// Show the quickbuttons, for various operations on posts.
206 226
 		echo '
@@ -209,22 +229,28 @@  discard block
 block discarded – undo
209 229
 
210 230
 		// Show a checkbox for quick moderation?
211 231
 		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
212
-			echo '
232
+		{
233
+					echo '
213 234
 							<li class="listlevel1 inline_mod_check hide" id="in_topic_mod_check_', $message['id'], '"></li>';
235
+		}
214 236
 
215 237
 		// Show "Last Edit: Time by Person" if this post was edited.
216 238
 		if ($settings['show_modify'])
217
-			echo '
239
+		{
240
+					echo '
218 241
 							<li id="modified_', $message['id'], '" class="listlevel1 modified', !empty($message['modified']['name']) ? '"' : ' hide"', '>
219 242
 								', !empty($message['modified']['name']) ? $message['modified']['last_edit_text'] : '', '
220 243
 							</li>';
244
+		}
221 245
 
222 246
 		// Maybe they can modify the post (this is the more button)
223 247
 		if ($message['can_modify'] || ($context['can_report_moderator']))
224
-			echo '
248
+		{
249
+					echo '
225 250
 							<li class="listlevel1 subsections" aria-haspopup="true">
226 251
 								<a href="#" ', !empty($options['use_click_menu']) ? '' : 'onclick="event.stopPropagation();return false;" ', 'class="linklevel1 post_options">', $txt['post_options'], '
227 252
 							</a>';
253
+		}
228 254
 
229 255
 		if ($message['can_modify'] || $message['can_remove'] || !empty($context['can_follow_up']) || ($context['can_split'] && !empty($context['real_num_replies'])) || $context['can_restore_msg'] || $message['can_approve'] || $message['can_unapprove'] || $context['can_report_moderator'])
230 256
 		{
@@ -234,67 +260,85 @@  discard block
 block discarded – undo
234 260
 
235 261
 			// Can the user modify the contents of this post?
236 262
 			if ($message['can_modify'])
237
-				echo '
263
+			{
264
+							echo '
238 265
 									<li class="listlevel2">
239 266
 										<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '" class="linklevel2 modify_button">', $txt['modify'], '</a>
240 267
 									</li>';
268
+			}
241 269
 
242 270
 			// How about... even... remove it entirely?!
243 271
 			if ($message['can_remove'])
244
-				echo '
272
+			{
273
+							echo '
245 274
 									<li class="listlevel2">
246 275
 										<a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="linklevel2 remove_button">', $txt['remove'], '</a>
247 276
 									</li>';
277
+			}
248 278
 
249 279
 			// Can they quote to a new topic? @todo - This needs rethinking for GUI layout.
250 280
 			if (!empty($context['can_follow_up']))
251
-				echo '
281
+			{
282
+							echo '
252 283
 									<li class="listlevel2">
253 284
 										<a href="', $scripturl, '?action=post;board=', $context['current_board'], ';quote=', $message['id'], ';followup=', $message['id'], '" class="linklevel2 quotetonew_button">', $txt['quote_new'], '</a>
254 285
 									</li>';
286
+			}
255 287
 
256 288
 			// What about splitting it off the rest of the topic?
257 289
 			if ($context['can_split'] && !empty($context['real_num_replies']) && $context['topic_first_message'] !== $message['id'])
258
-				echo '
290
+			{
291
+							echo '
259 292
 									<li class="listlevel2">
260 293
 										<a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '" class="linklevel2 split_button">', $txt['split_topic'], '</a>
261 294
 									</li>';
295
+			}
262 296
 
263 297
 			// Can we restore topics?
264 298
 			if ($context['can_restore_msg'])
265
-				echo '
299
+			{
300
+							echo '
266 301
 									<li class="listlevel2">
267 302
 										<a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="linklevel2 restore_button">', $txt['restore_message'], '</a>
268 303
 									</li>';
304
+			}
269 305
 
270 306
 			// Maybe we can approve it, maybe we should?
271 307
 			if ($message['can_approve'])
272
-				echo '
308
+			{
309
+							echo '
273 310
 									<li class="listlevel2">
274 311
 										<a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"  class="linklevel2 approve_button">', $txt['approve'], '</a>
275 312
 									</li>';
313
+			}
276 314
 
277 315
 			// Maybe we can unapprove it?
278 316
 			if ($message['can_unapprove'])
279
-				echo '
317
+			{
318
+							echo '
280 319
 									<li class="listlevel2">
281 320
 										<a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"  class="linklevel2 unapprove_button">', $txt['unapprove'], '</a>
282 321
 									</li>';
322
+			}
283 323
 
284 324
 			// Maybe they want to report this post to the moderator(s)?
285 325
 			if ($context['can_report_moderator'])
286
-				echo '
326
+			{
327
+							echo '
287 328
 									<li class="listlevel2">
288 329
 										<a href="' . $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $message['counter'] . ';msg=' . $message['id'] . '" class="linklevel2 warn_button">' . $txt['report_to_mod'] . '</a>
289 330
 									</li>';
331
+			}
290 332
 
291 333
 			// Anything else added by mods for example?
292 334
 			if (!empty($context['additional_drop_buttons']))
293
-				foreach ($context['additional_drop_buttons'] as $key => $button)
335
+			{
336
+							foreach ($context['additional_drop_buttons'] as $key => $button)
294 337
 					echo '
295 338
 									<li class="listlevel2">
296 339
 										<a href="' . $button['href'] . '" class="linklevel2 ', $key, '">' . $button['text'] . '</a>
297 340
 									</li>';
341
+			}
298 342
 
299 343
 			echo '
300 344
 								</ul>
@@ -306,50 +350,61 @@  discard block
 block discarded – undo
306 350
 		{
307 351
 			// Can they like/unlike this post?
308 352
 			if ($message['can_like'] || $message['can_unlike'])
309
-				echo '
353
+			{
354
+							echo '
310 355
 							<li class="listlevel1', !empty($message['like_counter']) ? ' liked"' : '"', '>
311 356
 								<a class="linklevel1 ', $message['can_unlike'] ? 'unreact_button' : 'react_button', '" href="javascript:void(0)"', !empty($message['like_counter']) ? ' title="' . $txt['liked_by'] . ' ' . implode(', ', $context['likes'][$message['id']]['member']) . '"' : '', ' onclick="likePosts.prototype.likeUnlikePosts(event,', $message['id'], ', ', $context['current_topic'], '); return false;">',
312 357
 									!empty($message['like_counter']) ? '<span class="likes_indicator">' . $message['like_counter'] . '</span>&nbsp;' . $txt['likes'] : $txt['like_post'], '
313 358
 								</a>
314 359
 							</li>';
360
+			}
315 361
 
316 362
 			// Or just view the count
317
-			else
318
-				echo '
363
+			else {
364
+							echo '
319 365
 							<li class="listlevel1', !empty($message['like_counter']) ? ' liked"' : '"', '>
320 366
 								<a href="javascript:void(0)" role="button" title="', !empty($message['like_counter']) ? $txt['liked_by'] . ' ' . implode(', ', $context['likes'][$message['id']]['member']) : '', '" class="linklevel1 reacts_button">',
321 367
 									!empty($message['like_counter']) ? '<span class="likes_indicator">' . $message['like_counter'] . '</span>&nbsp;' . $txt['likes'] : '&nbsp;', '
322 368
 								</a>
323 369
 							</li>';
370
+			}
324 371
 		}
325 372
 
326 373
 		// Can the user quick modify the contents of this post?  Show the quick (inline) modify button.
327 374
 		if ($message['can_modify'])
328
-			echo '
375
+		{
376
+					echo '
329 377
 							<li id="modify_button_', $message['id'], '" class="listlevel1 quick_edit hide">
330 378
 								<a class="linklevel1 quick_edit" role="button" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')">', $txt['quick_edit'], '</a>
331 379
 							</li>';
380
+		}
332 381
 
333 382
 		// Can they reply? Have they turned on quick reply?
334 383
 		if ($context['can_quote'] && !empty($options['display_quick_reply']))
335
-			echo '
384
+		{
385
+					echo '
336 386
 							<li class="listlevel1">
337 387
 								<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');" class="linklevel1 quote_button">', $txt['quote'], '</a>
338 388
 							</li>';
389
+		}
339 390
 		// So... quick reply is off, but they *can* reply?
340 391
 		elseif ($context['can_quote'])
341
-			echo '
392
+		{
393
+					echo '
342 394
 							<li class="listlevel1">
343 395
 								<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" class="linklevel1 quote_button">', $txt['quote'], '</a>
344 396
 							</li>';
397
+		}
345 398
 
346 399
 		// Anything else added by mods for example?
347 400
 		if (!empty($context['additional_quick_buttons']))
348
-			foreach ($context['additional_quick_buttons'] as $key => $button)
401
+		{
402
+					foreach ($context['additional_quick_buttons'] as $key => $button)
349 403
 				echo '
350 404
 								<li class="listlevel1">
351 405
 									<a href="' . $button['href'] . '" class="linklevel1 ', $key, '">' . $button['text'] . '</a>
352 406
 								</li>';
407
+		}
353 408
 
354 409
 		echo '
355 410
 						</ul>
@@ -364,7 +419,9 @@  discard block
 block discarded – undo
364 419
 			foreach ($message['member']['custom_fields'] as $custom)
365 420
 			{
366 421
 				if ($custom['placement'] != 2 || empty($custom['value']))
367
-					continue;
422
+				{
423
+									continue;
424
+				}
368 425
 
369 426
 				if (empty($shown))
370 427
 				{
@@ -379,15 +436,19 @@  discard block
 block discarded – undo
379 436
 			}
380 437
 
381 438
 			if ($shown)
382
-				echo '
439
+			{
440
+							echo '
383 441
 								</ul>
384 442
 							</div>';
443
+			}
385 444
 		}
386 445
 
387 446
 		// Show the member's signature?
388 447
 		if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
389
-			echo '
448
+		{
449
+					echo '
390 450
 							<div id="msg_', $message['id'], '_signature" class="signature', $ignoring ? ' hide"' : '"', '>', $message['member']['signature'], '</div>';
451
+		}
391 452
 
392 453
 		echo '
393 454
 						</footer>
@@ -452,7 +513,8 @@  discard block
 block discarded – undo
452 513
 
453 514
 		// Guests just need more.
454 515
 		if ($context['user']['is_guest'])
455
-			echo '
516
+		{
517
+					echo '
456 518
 							<dl>
457 519
 								<dt>
458 520
 									<label for="guestname">', $txt['name'], ':</label> <input type="text" name="guestname" id="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
@@ -461,11 +523,14 @@  discard block
 block discarded – undo
461 523
 									<label for="email">', $txt['email'], ':</label> <input type="text" name="email" id="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
462 524
 								</dd>
463 525
 							</dl>';
526
+		}
464 527
 
465 528
 		// Is visual verification enabled?
466 529
 		if (!empty($context['require_verification']))
467
-			template_verification_controls($context['visual_verification_id'], '
530
+		{
531
+					template_verification_controls($context['visual_verification_id'], '
468 532
 							<strong>' . $txt['verification'] . ':</strong>', '<br />');
533
+		}
469 534
 
470 535
 		// Using the full editor or a plain text box?
471 536
 		if (empty($options['use_editor_quick_reply']))
@@ -479,14 +544,18 @@  discard block
 block discarded – undo
479 544
 
480 545
 			// Spellcheck button?
481 546
 			if ($context['show_spellchecking'])
482
-				echo '
547
+			{
548
+							echo '
483 549
 								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\', ', (empty($options['use_editor_quick_reply']) ? 'false' : 'true'), ')" tabindex="', $context['tabindex']++, '" />';
550
+			}
484 551
 
485 552
 			// Draft save button?
486 553
 			if (!empty($context['drafts_save']))
487
-				echo '
554
+			{
555
+							echo '
488 556
 								<input type="button" name="save_draft" value="', $txt['draft_save'], '" onclick="return confirm(' . JavaScriptEscape($txt['draft_save_note']) . ') && submitThisOnce(this);" accesskey="d" tabindex="', $context['tabindex']++, '" />
489 557
 								<input type="hidden" id="id_draft" name="id_draft" value="', empty($context['id_draft']) ? 0 : $context['id_draft'], '" />';
558
+			}
490 559
 
491 560
 			echo '
492 561
 							</div>';
@@ -505,11 +574,13 @@  discard block
 block discarded – undo
505 574
 
506 575
 		// Show the draft last saved on area
507 576
 		if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
508
-			echo '
577
+		{
578
+					echo '
509 579
 							<div class="draftautosave">
510 580
 								<span id="throbber" class="hide"><i class="icon icon-spin i-spinner"></i>&nbsp;</span>
511 581
 								<span id="draft_lastautosave"></span>
512 582
 							</div>';
583
+		}
513 584
 
514 585
 		echo '
515 586
 						</form>
@@ -525,8 +596,10 @@  discard block
 block discarded – undo
525 596
 
526 597
 			// Mentions enabled
527 598
 			if (!empty($modSettings['mentions_enabled']))
528
-				echo '
599
+			{
600
+							echo '
529 601
 				add_elk_mention(\'#message\');';
602
+			}
530 603
 
531 604
 			echo '
532 605
 			</script>';
@@ -567,18 +640,21 @@  discard block
 block discarded – undo
567 640
 
568 641
 	// Spell check for quick modify and quick reply (w/o the editor)
569 642
 	if ($context['show_spellchecking'] && empty($options['use_editor_quick_reply']))
570
-		echo '
643
+	{
644
+			echo '
571 645
 			<form name="spell_form" id="spell_form" method="post" accept-charset="UTF-8" target="spellWindow" action="', $scripturl, '?action=spellcheck">
572 646
 				<input type="hidden" id="spellstring" name="spellstring" value="" />
573 647
 				<input type="hidden" id="fulleditor" name="fulleditor" value="" />
574 648
 			</form>';
649
+	}
575 650
 
576 651
 	// Quick moderation options
577 652
 	echo '
578 653
 			<script>';
579 654
 
580 655
 	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
581
-		echo '
656
+	{
657
+			echo '
582 658
 				var oInTopicModeration = new InTopicModeration({
583 659
 					sSelf: \'oInTopicModeration\',
584 660
 					sCheckboxContainerMask: \'in_topic_mod_check_\',
@@ -603,6 +679,7 @@  discard block
 block discarded – undo
603 679
 					sSplitButtonConfirm: \'', $txt['quickmod_confirm'], '\',
604 680
 					sFormId: \'quickModForm\'
605 681
 				});';
682
+	}
606 683
 
607 684
 	// Quick modify can be used
608 685
 	echo '
@@ -665,8 +742,10 @@  discard block
 block discarded – undo
665 742
 				});';
666 743
 
667 744
 	if (!empty($ignoredMsgs))
668
-		echo '
745
+	{
746
+			echo '
669 747
 				ignore_toggles([', implode(', ', $ignoredMsgs), '], ', JavaScriptEscape($txt['show_ignore_user_post']), ');';
748
+	}
670 749
 
671 750
 	echo '
672 751
 			</script>';
@@ -703,9 +782,11 @@  discard block
 block discarded – undo
703 782
 						<dd class="statsbar">';
704 783
 
705 784
 			if ($context['allow_poll_view'])
706
-				echo '
785
+			{
786
+							echo '
707 787
 							', $option['bar_ndt'], '
708 788
 							<span class="righttext poll-percent">[ ', $option['votes'], ' ] (', $option['percent'], '%)</span>';
789
+			}
709 790
 
710 791
 			echo '
711 792
 						</dd>';
@@ -715,10 +796,12 @@  discard block
 block discarded – undo
715 796
 					</dl>';
716 797
 
717 798
 		if ($context['allow_poll_view'])
718
-			echo '
799
+		{
800
+					echo '
719 801
 					<p>
720 802
 						<strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '
721 803
 					</p>';
804
+		}
722 805
 	}
723 806
 	// They are allowed to vote! Go to it!
724 807
 	else
@@ -728,16 +811,20 @@  discard block
 block discarded – undo
728 811
 
729 812
 		// Show a warning if they are allowed more than one option.
730 813
 		if ($context['poll']['allowed_warning'])
731
-			echo '
814
+		{
815
+					echo '
732 816
 						<p>', $context['poll']['allowed_warning'], '</p>';
817
+		}
733 818
 
734 819
 		echo '
735 820
 						<ul class="options">';
736 821
 
737 822
 		// Show each option with its button - a radio likely.
738 823
 		foreach ($context['poll']['options'] as $option)
739
-			echo '
824
+		{
825
+					echo '
740 826
 							<li>', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
827
+		}
741 828
 
742 829
 		echo '
743 830
 						</ul>
@@ -750,10 +837,12 @@  discard block
 block discarded – undo
750 837
 
751 838
 	// Is the clock ticking?
752 839
 	if (!empty($context['poll']['expire_time']))
753
-		echo '
840
+	{
841
+			echo '
754 842
 					<p>
755 843
 						<strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '
756 844
 					</p>';
845
+	}
757 846
 
758 847
 	echo '
759 848
 				</div>
@@ -780,10 +869,12 @@  discard block
 block discarded – undo
780 869
 					<ul>';
781 870
 
782 871
 	foreach ($context['linked_calendar_events'] as $event)
783
-		echo '
872
+	{
873
+			echo '
784 874
 						<li>
785 875
 							', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '"><i class="icon i-modify" title="' . $txt['modify'] . '"></i></a> ' : ''), '<strong>', $event['title'], '</strong>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
786 876
 						</li>';
877
+	}
787 878
 
788 879
 	echo '
789 880
 					</ul>
@@ -873,8 +964,10 @@  discard block
 block discarded – undo
873 964
 									<legend>', $txt['attach_awaiting_approve'];
874 965
 
875 966
 			if ($context['can_approve'])
876
-				echo '
967
+			{
968
+							echo '
877 969
 										&nbsp;<a class="linkbutton" href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>';
970
+			}
878 971
 
879 972
 			echo '
880 973
 									</legend>';
@@ -886,16 +979,21 @@  discard block
 block discarded – undo
886 979
 		if ($attachment['is_image'])
887 980
 		{
888 981
 			if ($attachment['thumbnail']['has_thumb'])
889
-				echo '
982
+			{
983
+							echo '
890 984
 											<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" ', $attachment['thumbnail']['lightbox'], '>
891 985
 												<img class="attachment_image" src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" loading="lazy" />
892 986
 											</a>';
893
-			else
894
-				echo '
987
+			}
988
+			else {
989
+							echo '
895 990
 											<img class="attachment_image" src="', $attachment['href'], ';image" alt="" style="max-width:100%; max-height:' . $attachment['height'] . 'px;" loading="lazy" />';
991
+			}
896 992
 		}
897 993
 		elseif (!empty($modSettings['attachmentShowImages']))
898
-			echo '							<img class="attachment_image" src="', $attachment['href'], ';thumb" alt="" style="max-width:' . $modSettings['attachmentThumbWidth'] . 'px; max-height:' . $modSettings['attachmentThumbHeight'] . 'px;" loading="lazy" />';
994
+		{
995
+					echo '							<img class="attachment_image" src="', $attachment['href'], ';thumb" alt="" style="max-width:' . $modSettings['attachmentThumbWidth'] . 'px; max-height:' . $modSettings['attachmentThumbHeight'] . 'px;" loading="lazy" />';
996
+		}
899 997
 
900 998
 		echo '
901 999
 											<a href="', $attachment['href'], '" class="attachment_name">
@@ -904,8 +1002,10 @@  discard block
 block discarded – undo
904 1002
 											<span class="attachment_details">', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . sprintf($txt['attach_viewed'], $attachment['downloads']) : ' ' . sprintf($txt['attach_downloaded'], $attachment['downloads'])) . '</span>';
905 1003
 
906 1004
 		if (!$attachment['is_approved'] && $context['can_approve'])
907
-			echo '
1005
+		{
1006
+					echo '
908 1007
 											<a class="linkbutton" href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>&nbsp;|&nbsp;<a class="linkbutton" href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>';
1008
+		}
909 1009
 
910 1010
 			echo '
911 1011
 										</div>';
@@ -913,8 +1013,10 @@  discard block
 block discarded – undo
913 1013
 
914 1014
 	// If we had unapproved attachments clean up.
915 1015
 	if ($last_approved_state == 0)
916
-		echo '
1016
+	{
1017
+			echo '
917 1018
 								</fieldset>';
1019
+	}
918 1020
 
919 1021
 	echo '
920 1022
 							</footer>';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
 
191 191
 		// Show the post itself, finally!
192 192
 		echo '
193
-						<section id="msg_', $message['id'], '" data-msgid="',$message['id'], '" class="messageContent', $ignoring ? ' hide"' : '"', '>',
193
+						<section id="msg_', $message['id'], '" data-msgid="', $message['id'], '" class="messageContent', $ignoring ? ' hide"' : '"', '>',
194 194
 							$message['body'], '
195 195
 						</section>';
196 196
 
Please login to merge, or discard this patch.
themes/default/ProfileInfo.template.php 1 patch
Braces   +126 added lines, -50 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@  discard block
 block discarded – undo
68 68
 		foreach ($tabs as $tab)
69 69
 		{
70 70
 			if (isset($context['summarytabs'][$tab]['href']))
71
-				continue;
71
+			{
72
+							continue;
73
+			}
72 74
 
73 75
 			// Start a tab
74 76
 			$tab_num++;
@@ -130,10 +132,12 @@  discard block
 block discarded – undo
130 132
 
131 133
 	// No posts? Just end the table with a informative message.
132 134
 	if (empty($context['posts']))
133
-		echo '
135
+	{
136
+			echo '
134 137
 				<div class="content">
135 138
 					', $context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none'], '
136 139
 				</div>';
140
+	}
137 141
 	else
138 142
 	{
139 143
 		// For every post to be displayed, give it its own div, and show the important details of the post.
@@ -144,11 +148,13 @@  discard block
 block discarded – undo
144 148
 			$post['class'] = 'content';
145 149
 
146 150
 			if (!$post['approved'])
147
-				$post['body'] = '
151
+			{
152
+							$post['body'] = '
148 153
 						<div class="approve_post">
149 154
 							<em>' . $txt['post_awaiting_approval'] . '</em>
150 155
 						</div>' . '
151 156
 					' . $post['body'];
157
+			}
152 158
 
153 159
 			template_simple_message($post);
154 160
 		}
@@ -191,8 +197,10 @@  discard block
 block discarded – undo
191 197
 				<div class="content smalltext">', $txt['showPermissions_restricted_boards_desc'], ':<br />';
192 198
 
193 199
 			foreach ($context['no_access_boards'] as $no_access_board)
194
-				echo '
200
+			{
201
+							echo '
195 202
 					', $no_access_board['name'], $no_access_board['is_last'] ? '' : ', ';
203
+			}
196 204
 
197 205
 			echo '
198 206
 				</div>';
@@ -225,11 +233,14 @@  discard block
 block discarded – undo
225 233
 								<td class="smalltext">';
226 234
 
227 235
 				if ($permission['is_denied'])
228
-					echo '
236
+				{
237
+									echo '
229 238
 									<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']), '</span>';
230
-				else
231
-					echo '
239
+				}
240
+				else {
241
+									echo '
232 242
 									', $txt['showPermissions_given'], ':&nbsp;', implode(', ', $permission['groups']['allowed']);
243
+				}
233 244
 
234 245
 				echo '
235 246
 								</td>
@@ -241,9 +252,10 @@  discard block
 block discarded – undo
241 252
 					</table>
242 253
 				</div><br />';
243 254
 		}
244
-		else
245
-			echo '
255
+		else {
256
+					echo '
246 257
 			<p class="description">', $txt['showPermissions_none_general'], '</p>';
258
+		}
247 259
 
248 260
 		// Board permission section.
249 261
 		echo '
@@ -255,13 +267,17 @@  discard block
 block discarded – undo
255 267
 							<option value="0"', $context['board'] == 0 ? ' selected="selected"' : '', '>', $txt['showPermissions_global'], '&nbsp;</option>';
256 268
 
257 269
 		if (!empty($context['boards']))
258
-			echo '
270
+		{
271
+					echo '
259 272
 							<option value="" disabled="disabled">', str_repeat('&#8212;', strlen($txt['showPermissions_global'])), '</option>';
273
+		}
260 274
 
261 275
 		// Fill the box with any local permission boards.
262 276
 		foreach ($context['boards'] as $board)
263
-			echo '
277
+		{
278
+					echo '
264 279
 							<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
280
+		}
265 281
 
266 282
 		echo '
267 283
 						</select>
@@ -290,11 +306,14 @@  discard block
 block discarded – undo
290 306
 							<td class="smalltext">';
291 307
 
292 308
 				if ($permission['is_denied'])
293
-					echo '
309
+				{
310
+									echo '
294 311
 								<span class="alert">', $txt['showPermissions_denied'], ':&nbsp;', implode(', ', $permission['groups']['denied']), '</span>';
295
-				else
296
-					echo '
312
+				}
313
+				else {
314
+									echo '
297 315
 								', $txt['showPermissions_given'], ': &nbsp;', implode(', ', $permission['groups']['allowed']);
316
+				}
298 317
 
299 318
 				echo '
300 319
 							</td>
@@ -305,9 +324,10 @@  discard block
 block discarded – undo
305 324
 					</tbody>
306 325
 				</table>';
307 326
 		}
308
-		else
309
-			echo '
327
+		else {
328
+					echo '
310 329
 			<p class="description">', $txt['showPermissions_none_board'], '</p>';
330
+		}
311 331
 
312 332
 		echo '
313 333
 			</div>
@@ -353,8 +373,10 @@  discard block
 block discarded – undo
353 373
 
354 374
 	// If they haven't post at all, don't draw the graph.
355 375
 	if (empty($context['posts_by_time']))
356
-		echo '
376
+	{
377
+			echo '
357 378
 				<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
379
+	}
358 380
 	// Otherwise do!
359 381
 	else
360 382
 	{
@@ -394,8 +416,10 @@  discard block
 block discarded – undo
394 416
 				<div class="content content_noframe">';
395 417
 
396 418
 	if (empty($context['popular_boards']))
397
-		echo '
419
+	{
420
+			echo '
398 421
 					<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
422
+	}
399 423
 
400 424
 	else
401 425
 	{
@@ -431,8 +455,10 @@  discard block
 block discarded – undo
431 455
 				<div class="content content_noframe">';
432 456
 
433 457
 	if (empty($context['board_activity']))
434
-		echo '
458
+	{
459
+			echo '
435 460
 					<span>', $txt['statPanel_noPosts'], '</span>';
461
+	}
436 462
 	else
437 463
 	{
438 464
 		echo '
@@ -498,13 +524,15 @@  discard block
 block discarded – undo
498 524
 
499 525
 	// There's some impact of this?
500 526
 	if (!empty($context['level_effects'][$context['current_level']]))
501
-		echo '
527
+	{
528
+			echo '
502 529
 				<dt>
503 530
 					<strong>', $txt['profile_viewwarning_impact'], ':</strong>
504 531
 				</dt>
505 532
 				<dd>
506 533
 					', $context['level_effects'][$context['current_level']], '
507 534
 				</dd>';
535
+	}
508 536
 
509 537
 	echo '
510 538
 			</dl>
@@ -545,37 +573,49 @@  discard block
 block discarded – undo
545 573
 
546 574
 	// The username if allowed
547 575
 	if ($context['user']['is_owner'] || $context['user']['is_admin'])
548
-		echo '
576
+	{
577
+			echo '
549 578
 						<dt>', $txt['username'], ':</dt>
550 579
 						<dd>', $context['member']['username'], '</dd>';
580
+	}
551 581
 
552 582
 	// Some posts stats for fun
553 583
 	if (!isset($context['disabled_fields']['posts']))
554
-		echo '
584
+	{
585
+			echo '
555 586
 						<dt>', $txt['profile_posts'], ':</dt>
556 587
 						<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
588
+	}
557 589
 
558 590
 	// Title?
559 591
 	if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title']))
560
-		echo '
592
+	{
593
+			echo '
561 594
 						<dt>', $txt['custom_title'], ':</dt>
562 595
 						<dd>', $context['member']['title'], '</dd>';
596
+	}
563 597
 
564 598
 	// If karma is enabled show the members karma.
565 599
 	if ($modSettings['karmaMode'] == '1')
566
-		echo '
600
+	{
601
+			echo '
567 602
 						<dt>', $modSettings['karmaLabel'], '</dt>
568 603
 						<dd>', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</dd>';
604
+	}
569 605
 	elseif ($modSettings['karmaMode'] == '2')
570
-		echo '
606
+	{
607
+			echo '
571 608
 						<dt>', $modSettings['karmaLabel'], '</dt>
572 609
 						<dd>+', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '</dd>';
610
+	}
573 611
 
574 612
 	// What do they like?
575 613
 	if (!empty($modSettings['likes_enabled']))
576
-		echo '
614
+	{
615
+			echo '
577 616
 						<dt>', $txt['likes'], ': </dt>
578 617
 						<dd>', $txt['likes_profile_given'], ': ', $context['member']['likes']['given'], ' / ', $txt['likes_profile_received'], ': ', $context['member']['likes']['received'], '</dd>';
618
+	}
579 619
 
580 620
 	// Some links to this users fine work
581 621
 	echo '
@@ -585,9 +625,11 @@  discard block
 block discarded – undo
585 625
 							<br />';
586 626
 
587 627
 	if ($context['user']['is_owner'] && !empty($modSettings['drafts_enabled']))
588
-		echo '
628
+	{
629
+			echo '
589 630
 							<a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '">', $txt['drafts_show'], '</a>
590 631
 							<br />';
632
+	}
591 633
 	echo '
592 634
 							<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
593 635
 						</dd>';
@@ -635,21 +677,27 @@  discard block
 block discarded – undo
635 677
 	if ($context['can_see_ip'])
636 678
 	{
637 679
 		if (!empty($context['member']['ip']))
638
-			echo '
680
+		{
681
+					echo '
639 682
 						<dt>', $txt['ip'], ':</dt>
640 683
 						<dd><a href="', $scripturl, '?action=profile;area=history;sa=ip;searchip=', $context['member']['ip'], ';u=', $context['member']['id'], '">', $context['member']['ip'], '</a></dd>';
684
+		}
641 685
 
642 686
 		if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip']))
643
-			echo '
687
+		{
688
+					echo '
644 689
 						<dt>', $txt['hostname'], ':</dt>
645 690
 						<dd>', $context['member']['hostname'], '</dd>';
691
+		}
646 692
 	}
647 693
 
648 694
 	// Users language
649 695
 	if (!empty($modSettings['userLanguage']) && !empty($context['member']['language']))
650
-		echo '
696
+	{
697
+			echo '
651 698
 						<dt>', $txt['language'], ':</dt>
652 699
 						<dd>', $context['member']['language'], '</dd>';
700
+	}
653 701
 
654 702
 	// And their time settings
655 703
 	echo '
@@ -658,9 +706,11 @@  discard block
 block discarded – undo
658 706
 
659 707
 	// What are they up to?
660 708
 	if (!isset($context['disabled_fields']['action']) && !empty($context['member']['action']))
661
-		echo '
709
+	{
710
+			echo '
662 711
 						<dt>', $txt['profile_action'], ':</dt>
663 712
 						<dd>', $context['member']['action'], '</dd>';
713
+	}
664 714
 
665 715
 	// nuff about them, lets get back to me!
666 716
 	echo '
@@ -769,14 +819,18 @@  discard block
 block discarded – undo
769 819
 		}
770 820
 
771 821
 		if (!empty($cf_show))
772
-			echo '
822
+		{
823
+					echo '
773 824
 				</ul>';
825
+		}
774 826
 	}
775 827
 
776 828
 	// No way to contact this member at all ... welcome home freak!
777 829
 	if ($ci_empty === true)
778
-		echo
830
+	{
831
+			echo
779 832
 		$txt['profile_contact_no'];
833
+	}
780 834
 
781 835
 	echo '
782 836
 			</div>
@@ -807,7 +861,9 @@  discard block
 block discarded – undo
807 861
 		foreach ($context['custom_fields'] as $field)
808 862
 		{
809 863
 			if ($field['placement'] != 2 || empty($field['output_html']))
810
-				continue;
864
+			{
865
+							continue;
866
+			}
811 867
 
812 868
 			if (empty($shown))
813 869
 			{
@@ -840,10 +896,13 @@  discard block
 block discarded – undo
840 896
 	}
841 897
 
842 898
 	if (empty($shown))
843
-		echo $txt['profile_signature_no'];
844
-	else
845
-		echo '
899
+	{
900
+			echo $txt['profile_signature_no'];
901
+	}
902
+	else {
903
+			echo '
846 904
 				</dl>';
905
+	}
847 906
 
848 907
 	// Done with this block
849 908
 	echo '
@@ -889,12 +948,16 @@  discard block
 block discarded – undo
889 948
 		}
890 949
 
891 950
 		if (!empty($shown))
892
-			echo '
951
+		{
952
+					echo '
893 953
 				</dl>';
954
+		}
894 955
 	}
895 956
 
896 957
 	if (empty($shown))
897
-		echo $txt['profile_additonal_no'];
958
+	{
959
+			echo $txt['profile_additonal_no'];
960
+	}
898 961
 
899 962
 	echo '
900 963
 			</div>
@@ -933,8 +996,10 @@  discard block
 block discarded – undo
933 996
 
934 997
 			// Can we provide information on what this means?
935 998
 			if (!empty($context['warning_status']))
936
-				echo '
999
+			{
1000
+							echo '
937 1001
 					<span class="smalltext">(', $context['warning_status'], ')</span>';
1002
+			}
938 1003
 
939 1004
 			echo '
940 1005
 					</dd>
@@ -949,10 +1014,12 @@  discard block
 block discarded – undo
949 1014
 
950 1015
 			// If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves.
951 1016
 			if (!empty($context['activate_message']))
952
-				echo '
1017
+			{
1018
+							echo '
953 1019
 					<dt class="clear">
954 1020
 						<span class="alert">', $context['activate_message'], '</span>&nbsp;(<a href="' . $context['activate_url'] . '"', ($context['activate_type'] == 4 ? ' onclick="return confirm(\'' . $txt['profileConfirm'] . '\');"' : ''), '>', $context['activate_link_text'], '</a>)
955 1021
 					</dt>';
1022
+			}
956 1023
 
957 1024
 			// If the current member is banned, show a message and possibly a link to the ban.
958 1025
 			if (!empty($context['member']['bans']))
@@ -966,9 +1033,11 @@  discard block
 block discarded – undo
966 1033
 						<strong>', $txt['user_banned_by_following'], ':</strong>';
967 1034
 
968 1035
 				foreach ($context['member']['bans'] as $ban)
969
-					echo '
1036
+				{
1037
+									echo '
970 1038
 						<br />
971 1039
 						<span class="smalltext">', $ban['explanation'], '</span>';
1040
+				}
972 1041
 
973 1042
 				echo '
974 1043
 					</dd>';
@@ -1124,11 +1193,12 @@  discard block
 block discarded – undo
1124 1193
 		}
1125 1194
 	}
1126 1195
 	// No data for this member
1127
-	else
1128
-		echo '
1196
+	else {
1197
+			echo '
1129 1198
 		<div class="infobox">
1130 1199
 			', $txt['profile_attachments_no'], '
1131 1200
 		</div>';
1201
+	}
1132 1202
 
1133 1203
 	// All done
1134 1204
 	echo '
@@ -1163,20 +1233,23 @@  discard block
 block discarded – undo
1163 1233
 			</tr>';
1164 1234
 
1165 1235
 		foreach ($context['posts'] as $post)
1166
-			echo '
1236
+		{
1237
+					echo '
1167 1238
 			<tr>
1168 1239
 				<td class="recentpost">', $post['body'], '</td>
1169 1240
 				<td class="recentboard">', $post['board']['link'], '</td>
1170 1241
 				<td class="recentsubject">', $post['link'], '</td>
1171 1242
 				<td class="recenttime">', $post['time'], '</td>
1172 1243
 			</tr>';
1244
+		}
1173 1245
 	}
1174 1246
 	// No data for this member
1175
-	else
1176
-		echo '
1247
+	else {
1248
+			echo '
1177 1249
 			<tr>
1178 1250
 				<td class="norecent">', (isset($context['loadaverage']) ? $txt['profile_loadavg'] : $txt['profile_posts_no']), '</td>
1179 1251
 			</tr>';
1252
+	}
1180 1253
 
1181 1254
 	// All done
1182 1255
 	echo '
@@ -1211,19 +1284,22 @@  discard block
 block discarded – undo
1211 1284
 			</tr>';
1212 1285
 
1213 1286
 		foreach ($context['topics'] as $post)
1214
-			echo '
1287
+		{
1288
+					echo '
1215 1289
 			<tr>
1216 1290
 				<td class="recenttopic">', $post['link'], '</td>
1217 1291
 				<td class="recentboard">', $post['board']['link'], '</td>
1218 1292
 				<td class="recenttime">', $post['time'], '</td>
1219 1293
 			</tr>';
1294
+		}
1220 1295
 	}
1221 1296
 	// No data for this member
1222
-	else
1223
-		echo '
1297
+	else {
1298
+			echo '
1224 1299
 			<tr>
1225 1300
 				<td class="norecent">', $txt['profile_topics_no'], '</td>
1226 1301
 			</tr>';
1302
+	}
1227 1303
 
1228 1304
 	// All done
1229 1305
 	echo '
Please login to merge, or discard this patch.
themes/default/Reminder.template.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,13 +123,15 @@  discard block
 block discarded – undo
123 123
 					</dd>';
124 124
 
125 125
 	if (!empty($modSettings['enableOTP']))
126
-		echo '
126
+	{
127
+			echo '
127 128
 					<dt>
128 129
 						<label for="otp">', $txt['disable_otp'], ':</label>
129 130
 					</dt>
130 131
 					<dd>
131 132
 						<input id="otp" type="checkbox"  name="otp" />
132 133
 					</dd>';
134
+	}
133 135
 
134 136
 	echo '
135 137
 				</dl>
@@ -182,7 +184,8 @@  discard block
 block discarded – undo
182 184
 					</dd>';
183 185
 
184 186
 	if ($context['account_type'] === 'password')
185
-		echo '
187
+	{
188
+			echo '
186 189
 					<dt>
187 190
 						<label for="elk_autov_pwmain">', $txt['choose_pass'], ':</label>
188 191
  					</dt>
@@ -201,6 +204,7 @@  discard block
 block discarded – undo
201 204
 							<i id="elk_autov_pwverify_img" class="icon i-check" alt="*"></i>
202 205
 						</span>
203 206
 					</dd>';
207
+	}
204 208
 
205 209
 	echo '
206 210
 				</dl>
@@ -215,7 +219,8 @@  discard block
 block discarded – undo
215 219
 	</form>';
216 220
 
217 221
 	if ($context['account_type'] === 'password')
218
-		echo '
222
+	{
223
+			echo '
219 224
 <script>
220 225
 	var regTextStrings = {
221 226
 		"password_short": "', $txt['registration_password_short'], '",
@@ -227,4 +232,5 @@  discard block
 block discarded – undo
227 232
 
228 233
 	var verificationHandle = new elkRegister("creator", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings);
229 234
 </script>';
230
-}
231 235
\ No newline at end of file
236
+	}
237
+	}
232 238
\ No newline at end of file
Please login to merge, or discard this patch.
themes/default/BoardIndex.template.php 1 patch
Braces   +39 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@  discard block
 block discarded – undo
36 36
 	{
37 37
 		// If there are no parent boards we can see, avoid showing an empty category (unless its collapsed).
38 38
 		if (empty($category['boards']) && !$category['is_collapsed'])
39
-			continue;
39
+		{
40
+					continue;
41
+		}
40 42
 
41 43
 		// @todo - Invent nifty class name for boardindex header bars.
42 44
 		echo '
@@ -45,8 +47,10 @@  discard block
 block discarded – undo
45 47
 
46 48
 		// If this category even can collapse, show a link to collapse it.
47 49
 		if ($category['can_collapse'])
48
-			echo '
50
+		{
51
+					echo '
49 52
 			<a class="chevricon i-chevron-', $category['is_collapsed'] ? 'down' : 'up', '" href="', $category['collapse_href'], '" title="', $category['is_collapsed'] ? $txt['show'] : $txt['hide'], '"></a>';
53
+		}
50 54
 
51 55
 		// The "category link" is only a link for logged in members. Guests just get the name.
52 56
 		echo '
@@ -56,7 +60,9 @@  discard block
 block discarded – undo
56 60
 
57 61
 		// Assuming the category hasn't been collapsed...
58 62
 		if (!$category['is_collapsed'])
59
-			template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards');
63
+		{
64
+					template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards');
65
+		}
60 66
 
61 67
 		echo '
62 68
 		</section>';
@@ -99,12 +105,16 @@  discard block
 block discarded – undo
99 105
 
100 106
 	// Show the mark all as read button?
101 107
 	if ($settings['show_mark_read'] && !$context['user']['is_guest'] && !empty($context['categories']))
102
-		echo '
108
+	{
109
+			echo '
103 110
 			', template_button_strip($context['mark_read_button'], 'right');
111
+	}
104 112
 
105 113
 	if ($context['user']['is_logged'])
106
-		echo '
114
+	{
115
+			echo '
107 116
 			<p title="', $txt['new_posts'], '"><i class="icon i-board-new"></i>', $txt['new_posts'], '</p>';
117
+	}
108 118
 
109 119
 	echo '
110 120
 			<p title="', $txt['old_posts'], '"><i class="icon i-board-off"></i>', $txt['old_posts'], '</p>
@@ -252,8 +262,10 @@  discard block
 block discarded – undo
252 262
 
253 263
 	// Holidays like "Christmas", "Hanukkah", and "We Love [Unknown] Day" :P.
254 264
 	if (!empty($context['calendar_holidays']))
255
-		echo '
265
+	{
266
+			echo '
256 267
 				<p class="inline holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</p>';
268
+	}
257 269
 
258 270
 	// People's birthdays. Like mine. And yours, I guess. Kidding.
259 271
 	if (!empty($context['calendar_birthdays']))
@@ -264,8 +276,10 @@  discard block
 block discarded – undo
264 276
 
265 277
 		// 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?)
266 278
 		foreach ($context['calendar_birthdays'] as $member)
267
-			echo '
279
+		{
280
+					echo '
268 281
 					<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
282
+		}
269 283
 
270 284
 		echo '
271 285
 				</p>';
@@ -281,8 +295,10 @@  discard block
 block discarded – undo
281 295
 		// Each event in calendar_events should have:
282 296
 		// title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
283 297
 		foreach ($context['calendar_events'] as $event)
284
-			echo '
298
+		{
299
+					echo '
285 300
 					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '" class="icon i-modify"></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
301
+		}
286 302
 
287 303
 		echo '
288 304
 				</p>';
@@ -328,16 +344,24 @@  discard block
 block discarded – undo
328 344
 	// Handle hidden users and buddies.
329 345
 	$bracketList = array();
330 346
 	if ($context['show_buddies'])
331
-		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
347
+	{
348
+			$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
349
+	}
332 350
 
333 351
 	if (!empty($context['num_spiders']))
334
-		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
352
+	{
353
+			$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
354
+	}
335 355
 
336 356
 	if (!empty($context['num_users_hidden']))
337
-		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
357
+	{
358
+			$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
359
+	}
338 360
 
339 361
 	if (!empty($bracketList))
340
-		echo ' (' . implode(', ', $bracketList) . ')';
362
+	{
363
+			echo ' (' . implode(', ', $bracketList) . ')';
364
+	}
341 365
 
342 366
 	echo $context['show_who'] ? '</a>' : '', '
343 367
 				</h3>';
@@ -350,8 +374,10 @@  discard block
 block discarded – undo
350 374
 
351 375
 		// Showing membergroups?
352 376
 		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
353
-			echo '
377
+		{
378
+					echo '
354 379
 				<p class="inline membergroups">[' . implode(',&nbsp;', $context['membergroups']) . ']</p>';
380
+		}
355 381
 	}
356 382
 	echo '
357 383
 			</li>';
Please login to merge, or discard this patch.
themes/default/MoveTopic.template.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,8 +95,10 @@
 block discarded – undo
95 95
 			</div>';
96 96
 
97 97
 	if ($context['back_to_topic'])
98
-		echo '
98
+	{
99
+			echo '
99 100
 			<input type="hidden" name="goback" value="1" />';
101
+	}
100 102
 
101 103
 	echo '
102 104
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Please login to merge, or discard this patch.
themes/default/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,6 +2,9 @@
 block discarded – undo
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4 4
 if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
5
+{
5 6
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
7
-	exit;
8 7
\ No newline at end of file
8
+}
9
+else {
10
+	exit;
11
+}
Please login to merge, or discard this patch.
themes/default/Who.template.php 1 patch
Braces   +30 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,8 +32,10 @@  discard block
 block discarded – undo
32 32
 				<select name="show_top" id="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">';
33 33
 
34 34
 	foreach ($context['show_methods'] as $value => $label)
35
-		$extra .= '
35
+	{
36
+			$extra .= '
36 37
 					<option value="' . $value . '" ' . ($value == $context['show_by'] ? ' selected="selected"' : '') . '>' . $label . '</option>';
38
+	}
37 39
 
38 40
 	$extra .= '
39 41
 				</select>
@@ -76,8 +78,10 @@  discard block
 block discarded – undo
76 78
 							</span>';
77 79
 
78 80
 		if (!empty($member['ip']))
79
-			echo '
81
+		{
82
+					echo '
80 83
 							<a class="track_ip" href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=history;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>';
84
+		}
81 85
 
82 86
 		echo '
83 87
 						</div>
@@ -91,10 +95,12 @@  discard block
 block discarded – undo
91 95
 
92 96
 	// No members?
93 97
 	if (empty($context['members']))
94
-		echo '
98
+	{
99
+			echo '
95 100
 				<div class="well centertext">
96 101
 					', $txt['who_no_online_' . ($context['show_by'] == 'guests' || $context['show_by'] == 'spiders' ? $context['show_by'] : 'members')], '
97 102
 				</div>';
103
+	}
98 104
 
99 105
 	echo '
100 106
 			</div>';
@@ -112,8 +118,10 @@  discard block
 block discarded – undo
112 118
 				<select name="show" id="show" onchange="document.forms.whoFilter.submit();">';
113 119
 
114 120
 	foreach ($context['show_methods'] as $value => $label)
115
-		$extra .= '
121
+	{
122
+			$extra .= '
116 123
 					<option value="' . $value . '" ' . ($value == $context['show_by'] ? ' selected="selected"' : '') . '>' . $label . '</option>';
124
+	}
117 125
 
118 126
 	$extra .= '
119 127
 				</select>
@@ -144,14 +152,18 @@  discard block
 block discarded – undo
144 152
 	foreach ($context['credits'] as $section)
145 153
 	{
146 154
 		if (isset($section['pretext']))
147
-			echo '
155
+		{
156
+					echo '
148 157
 		<div class="content">
149 158
 			', $section['pretext'], '
150 159
 		</div>';
160
+		}
151 161
 
152 162
 		if (isset($section['title']))
153
-			echo '
163
+		{
164
+					echo '
154 165
 			<h2 class="category_header">', $section['title'], '</h2>';
166
+		}
155 167
 
156 168
 		echo '
157 169
 		<div class="content">
@@ -160,15 +172,19 @@  discard block
 block discarded – undo
160 172
 		foreach ($section['groups'] as $group)
161 173
 		{
162 174
 			if (isset($group['title']))
163
-				echo '
175
+			{
176
+							echo '
164 177
 				<dt>
165 178
 					<strong>', $group['title'], '</strong>
166 179
 				</dt>
167 180
 				<dd>';
181
+			}
168 182
 
169 183
 			// Try to make this read nicely.
170 184
 			if (count($group['members']) <= 2)
171
-				echo implode(' ' . $txt['credits_and'] . ' ', $group['members']);
185
+			{
186
+							echo implode(' ' . $txt['credits_and'] . ' ', $group['members']);
187
+			}
172 188
 			else
173 189
 			{
174 190
 				$last_peep = array_pop($group['members']);
@@ -183,8 +199,10 @@  discard block
 block discarded – undo
183 199
 			</dl>';
184 200
 
185 201
 		if (isset($section['posttext']))
186
-			echo '
202
+		{
203
+					echo '
187 204
 			<p><em>', $section['posttext'], '</em></p>';
205
+		}
188 206
 
189 207
 		echo '
190 208
 		</div>';
@@ -198,13 +216,15 @@  discard block
 block discarded – undo
198 216
 		<div class="content">';
199 217
 
200 218
 		foreach ($context['credits_software_graphics'] as $section => $credits)
201
-			echo '
219
+		{
220
+					echo '
202 221
 			<dl>
203 222
 				<dt>
204 223
 					<strong>', $txt['credits_' . $section], '</strong>
205 224
 				</dt>
206 225
 				<dd>', implode('</dd><dd>', $credits), '</dd>
207 226
 			</dl>';
227
+		}
208 228
 
209 229
 		echo '
210 230
 		</div>';
Please login to merge, or discard this patch.
themes/default/Printpage.template.php 1 patch
Braces   +18 added lines, -8 removed lines patch added patch discarded remove patch
@@ -109,11 +109,14 @@  discard block
 block discarded – undo
109 109
 
110 110
 	// Which option is set, text or text&images
111 111
 	if (!empty($context['viewing_attach']))
112
-		echo '
112
+	{
113
+			echo '
113 114
 			<a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a> | <strong><a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a></strong>';
114
-	else
115
-		echo '
115
+	}
116
+	else {
117
+			echo '
116 118
 			<strong><a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a></strong> | <a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a>';
119
+	}
117 120
 
118 121
 	echo '
119 122
 		</div>
@@ -137,10 +140,12 @@  discard block
 block discarded – undo
137 140
 
138 141
 		$print_options = 1;
139 142
 		foreach ($context['poll']['options'] as $option)
140
-			echo '
143
+		{
144
+					echo '
141 145
 					<div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $print_options++, ': <strong>', $option['option'], '</strong>
142 146
 						', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', '
143 147
 					</div>';
148
+		}
144 149
 
145 150
 		echo '
146 151
 			</div>';
@@ -171,8 +176,10 @@  discard block
 block discarded – undo
171 176
 				<hr />';
172 177
 
173 178
 			foreach ($context['printattach'][$post['id_msg']] as $attach)
174
-				echo '
179
+			{
180
+							echo '
175 181
 					<img style="width:' . $attach['width'] . 'px; height:' . $attach['height'] . 'px;" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="" />';
182
+			}
176 183
 		}
177 184
 
178 185
 		echo '
@@ -193,11 +200,14 @@  discard block
 block discarded – undo
193 200
 
194 201
 	// Show the text / image links
195 202
 	if (!empty($context['viewing_attach']))
196
-		echo '
203
+	{
204
+			echo '
197 205
 			<a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a> | <strong><a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a></strong>';
198
-	else
199
-		echo '
206
+	}
207
+	else {
208
+			echo '
200 209
 			<strong><a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a></strong> | <a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a>';
210
+	}
201 211
 
202 212
 	echo '
203 213
 		</div>
Please login to merge, or discard this patch.
themes/default/ManageCalendar.template.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,8 +42,10 @@  discard block
 block discarded – undo
42 42
 
43 43
 	// Show a list of all the years we allow...
44 44
 	for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++)
45
-		echo '
45
+	{
46
+			echo '
46 47
 							<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
48
+	}
47 49
 
48 50
 	echo '
49 51
 						</select>
@@ -52,8 +54,10 @@  discard block
 block discarded – undo
52 54
 
53 55
 	// There are 12 months per year - ensure that they all get listed.
54 56
 	for ($month = 1; $month <= 12; $month++)
55
-		echo '
57
+	{
58
+			echo '
56 59
 							<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
60
+	}
57 61
 
58 62
 	echo '
59 63
 						</select>
@@ -62,8 +66,10 @@  discard block
 block discarded – undo
62 66
 
63 67
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
64 68
 	for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
65
-		echo '
69
+	{
70
+			echo '
66 71
 							<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
72
+	}
67 73
 
68 74
 	echo '
69 75
 						</select>
@@ -73,13 +79,16 @@  discard block
 block discarded – undo
73 79
 				<div class="submitbutton">';
74 80
 
75 81
 	if ($context['is_new'])
76
-		echo '
82
+	{
83
+			echo '
77 84
 						<input type="submit" value="', $txt['holidays_button_add'], '" />';
78
-	else
79
-		echo '
85
+	}
86
+	else {
87
+			echo '
80 88
 						<input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" />
81 89
 						<input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" />
82 90
 						<input type="hidden" name="holiday" value="', $context['holiday']['id'], '" />';
91
+	}
83 92
 
84 93
 	echo '
85 94
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Please login to merge, or discard this patch.