Passed
Pull Request — master (#3805)
by
unknown
17:20
created
themes/default/Post.template.php 1 patch
Braces   +93 added lines, -32 removed lines patch added patch discarded remove patch
@@ -35,15 +35,19 @@  discard block
 block discarded – undo
35 35
 
36 36
 	// When using Go Back due to fatal_error, allow the form to be re-submitted with changes.
37 37
 	if (isBrowser('is_firefox'))
38
-		echo '
38
+	{
39
+			echo '
39 40
 			window.addEventListener("pageshow", reActivate, false);';
41
+	}
40 42
 
41 43
 	// Start with message icons - and any missing from this theme.
42 44
 	echo '
43 45
 			var icon_urls = {';
44 46
 	foreach ($context['icons'] as $icon)
45
-		echo '
47
+	{
48
+			echo '
46 49
 				\'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ',';
50
+	}
47 51
 	echo '
48 52
 			};';
49 53
 
@@ -76,7 +80,9 @@  discard block
 block discarded – undo
76 80
 	// If an error occurred, explain what happened.
77 81
 	template_show_error('post_error');
78 82
 	if (!empty($context['attachment_error_keys']))
79
-		template_attachment_errors();
83
+	{
84
+			template_attachment_errors();
85
+	}
80 86
 
81 87
 	// If this won't be approved let them know!
82 88
 	// @todo why not use the template_show_error above?
@@ -97,10 +103,12 @@  discard block
 block discarded – undo
97 103
 						</p>';
98 104
 
99 105
 	if (!empty($context['drafts_autosave']))
100
-		echo '
106
+	{
107
+			echo '
101 108
 						<div id="draft_section" class="successbox', isset($context['draft_saved']) ? '"' : ' hide"', '>
102 109
 							', sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), '
103 110
 						</div>';
111
+	}
104 112
 
105 113
 	// The post header... important stuff
106 114
 	echo '
@@ -118,13 +126,15 @@  discard block
 block discarded – undo
118 126
 							</dd>';
119 127
 
120 128
 		if (empty($modSettings['guest_post_no_email']))
121
-			echo '
129
+		{
130
+					echo '
122 131
 							<dt>
123 132
 								<label for="email"', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</label>
124 133
 							</dt>
125 134
 							<dd>
126 135
 								<input type="email" id="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required="required" />
127 136
 							</dd>';
137
+		}
128 138
 	}
129 139
 
130 140
 	// Now show the subject box for this post.
@@ -143,8 +153,10 @@  discard block
 block discarded – undo
143 153
 
144 154
 	// Loop through each message icon allowed, adding it to the drop down list.
145 155
 	foreach ($context['icons'] as $icon)
146
-		echo '
156
+	{
157
+			echo '
147 158
 									<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';
159
+	}
148 160
 
149 161
 	echo '
150 162
 								</select>
@@ -152,12 +164,14 @@  discard block
 block discarded – undo
152 164
 							</dd>';
153 165
 
154 166
 	if (!empty($context['show_boards_dropdown']))
155
-		echo '
167
+	{
168
+			echo '
156 169
 							<dt class="clear_left">
157 170
 								<label for="post_in_board">', $txt['post_in_board'], '</label>:
158 171
 							</dt>
159 172
 							<dd>', template_select_boards('post_in_board'), '
160 173
 							</dd>';
174
+	}
161 175
 
162 176
 	echo '
163 177
 						</dl>';
@@ -199,8 +213,10 @@  discard block
 block discarded – undo
199 213
 
200 214
 	// Show a list of all the years we allow...
201 215
 	for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++)
202
-		echo '
216
+	{
217
+			echo '
203 218
 										<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
219
+	}
204 220
 
205 221
 	echo '
206 222
 									</select>
@@ -209,8 +225,10 @@  discard block
 block discarded – undo
209 225
 
210 226
 	// There are 12 months per year - ensure that they all get listed.
211 227
 	for ($month = 1; $month <= 12; $month++)
212
-		echo '
228
+	{
229
+			echo '
213 230
 										<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
231
+	}
214 232
 
215 233
 	echo '
216 234
 									</select>
@@ -219,8 +237,10 @@  discard block
 block discarded – undo
219 237
 
220 238
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
221 239
 	for ($day = 1; $day <= $context['event']['last_day']; $day++)
222
-		echo '
240
+	{
241
+			echo '
223 242
 										<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
243
+	}
224 244
 
225 245
 	echo '
226 246
 									</select>
@@ -240,8 +260,10 @@  discard block
 block discarded – undo
240 260
 										<select id="span" name="span">';
241 261
 
242 262
 			for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
243
-				echo '
263
+			{
264
+							echo '
244 265
 											<option value="', $days, '"', $days == $context['event']['span'] ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
266
+			}
245 267
 
246 268
 			echo '
247 269
 										</select>
@@ -262,8 +284,10 @@  discard block
 block discarded – undo
262 284
 	}
263 285
 
264 286
 	if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
265
-		echo '
287
+	{
288
+			echo '
266 289
 								<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';
290
+	}
267 291
 
268 292
 	echo '
269 293
 							</fieldset>
@@ -288,8 +312,10 @@  discard block
 block discarded – undo
288 312
 							<div id="mentioned" class="hide">';
289 313
 
290 314
 		foreach ($context['member_ids'] as $id)
291
-			echo '
315
+		{
316
+					echo '
292 317
 								<input type="hidden" name="uid[]" value="', $id, '" />';
318
+		}
293 319
 
294 320
 		echo '
295 321
 							</div>';
@@ -302,13 +328,17 @@  discard block
 block discarded – undo
302 328
 
303 329
 	// Option to delete an event if user is editing one.
304 330
 	if (!empty($context['make_event']) && !$context['event']['new'])
305
-		echo '
331
+	{
332
+			echo '
306 333
 							<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['event_delete_confirm'], '\');" />';
334
+	}
307 335
 
308 336
 	// Option to add a poll (javascript if enabled, otherwise preview with poll)
309 337
 	if (empty($context['make_poll']) && $context['can_add_poll'])
310
-		echo '
338
+	{
339
+			echo '
311 340
 							<input type="submit" name="poll" aria-label="', $txt['add_poll'], '" value="', $txt['add_poll'], '" onclick="return loadAddNewPoll(this, ', empty($context['current_board']) ? '0' : $context['current_board'], ', \'postmodify\');" />';
341
+	}
312 342
 
313 343
 	echo '
314 344
 						</div>';
@@ -323,18 +353,22 @@  discard block
 block discarded – undo
323 353
 
324 354
 	// If the admin has enabled the hiding of the additional options - show a link and image for it.
325 355
 	if (!empty($settings['additional_options_collapsible']))
326
-		echo '
356
+	{
357
+			echo '
327 358
 					<h3 id="postAdditionalOptionsHeader" class="category_header panel_toggle">
328 359
 							<i id="postMoreExpand" class="chevricon i-chevron-', empty($context['minmax_preferences']['post']) ? 'up' : 'down', ' hide" title="', $txt['hide'], '"></i>
329 360
 						<a href="#" id="postMoreExpandLink">', !empty($context['attachments']) && $context['attachments']['can']['post'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a>
330 361
 					</h3>';
362
+	}
331 363
 
332 364
 	echo '
333 365
 					<div id="', empty($settings['additional_options_collapsible']) ? 'postAdditionalOptionsNC"' : 'postAdditionalOptions"', empty($settings['additional_options_collapsible']) || empty($context['minmax_preferences']['post']) ? '' : ' class="hide"', '>';
334 366
 
335 367
 	// Is the user allowed to post or if this post already has attachments on it give them the boxes.
336 368
 	if (!empty($context['attachments']) && ($context['attachments']['can']['post'] || !empty($context['attachments']['current'])))
337
-		$context['attachments']['template']();
369
+	{
370
+			$context['attachments']['template']();
371
+	}
338 372
 
339 373
 	// Display the check boxes for all the standard options - if they are available to the user!
340 374
 	echo '
@@ -387,7 +421,8 @@  discard block
 block discarded – undo
387 421
 
388 422
 		// Show more boxes if they aren't approaching that limit.
389 423
 		if ($context['attachments']['num_allowed'] > 1)
390
-			echo '
424
+		{
425
+					echo '
391 426
 								<script>
392 427
 									var allowed_attachments = ', $context['attachments']['num_allowed'], ',
393 428
 										current_attachment = 1,
@@ -397,18 +432,24 @@  discard block
 block discarded – undo
397 432
 								</script>
398 433
 							</dd>
399 434
 							<dd class="smalltext drop_attachments_no_js" id="moreAttachments"><a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')</a></dd>';
400
-		else
401
-			echo '
435
+		}
436
+		else {
437
+					echo '
402 438
 							</dd>';
439
+		}
403 440
 	}
404 441
 
405 442
 	foreach ($context['attachments']['current'] as $attachment)
406 443
 	{
407 444
 		$label = $attachment['name'];
408 445
 		if (empty($attachment['approved']))
409
-			$label .= ' (' . $txt['awaiting_approval'] . ')';
446
+		{
447
+					$label .= ' (' . $txt['awaiting_approval'] . ')';
448
+		}
410 449
 		if (!empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']))
411
-			$label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0));
450
+		{
451
+					$label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0));
452
+		}
412 453
 
413 454
 		echo '
414 455
 							<dd class="smalltext">
@@ -423,20 +464,28 @@  discard block
 block discarded – undo
423 464
 
424 465
 	// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.
425 466
 	if (!empty($context['attachments']['allowed_extensions']))
426
-		echo '
467
+	{
468
+			echo '
427 469
 								<p id="types">', $txt['allowed_types'], ': ', $context['attachments']['allowed_extensions'], '</p>';
470
+	}
428 471
 
429 472
 	if (!empty($context['attachments']['restrictions']))
430
-		echo '
473
+	{
474
+			echo '
431 475
 								<p id="restrictions">', $txt['attach_restrictions'], ' ', implode(', ', $context['attachments']['restrictions']), '</p>';
476
+	}
432 477
 
433 478
 	if ($context['attachments']['num_allowed'] == 0)
434
-		echo '
479
+	{
480
+			echo '
435 481
 								<p class="infobox">', $txt['attach_limit_nag'], '</p>';
482
+	}
436 483
 
437 484
 	if (!$context['attachments']['can']['post_unapproved'])
438
-		echo '
485
+	{
486
+			echo '
439 487
 								<p class="warningbox">', $txt['attachment_requires_approval'], '</p>';
488
+	}
440 489
 
441 490
 	echo '
442 491
 							</dd>
@@ -537,9 +586,11 @@  discard block
 block discarded – undo
537 586
 							</dd>';
538 587
 
539 588
 	foreach ($context['drafts'] as $draft)
540
-		echo '
589
+	{
590
+			echo '
541 591
 							<dt>', $draft['link'], '</dt>
542 592
 							<dd>', $draft['poster_time'], '</dd>';
593
+	}
543 594
 
544 595
 	echo '
545 596
 						</dl>
@@ -600,7 +651,9 @@  discard block
 block discarded – undo
600 651
 		{
601 652
 			$ignoring = false;
602 653
 			if (!empty($post['is_ignored']))
603
-				$ignored_posts[] = $ignoring = $post['id'];
654
+			{
655
+							$ignored_posts[] = $ignoring = $post['id'];
656
+			}
604 657
 
605 658
 			echo '
606 659
 			<div class="content forumposts">
@@ -611,20 +664,24 @@  discard block
 block discarded – undo
611 664
 						</h5>';
612 665
 
613 666
 			if ($context['can_quote'])
614
-				echo '
667
+			{
668
+							echo '
615 669
 						<ul class="quickbuttons" id="msg_', $post['id'], '_quote">
616 670
 							<li class="listlevel1"><a href="#postmodify" onmousedown="return insertQuoteFast(', $post['id'], ');" class="linklevel1 quote_button">', $txt['bbc_quote'], '</a></li>
617 671
 						</ul>';
672
+			}
618 673
 
619 674
 			echo '
620 675
 					</div>';
621 676
 
622 677
 			if ($ignoring)
623
-				echo '
678
+			{
679
+							echo '
624 680
 					<div id="msg_', $post['id'], '_ignored_prompt">
625 681
 						', $txt['ignoring_user'], '
626 682
 						<a href="#" id="msg_', $post['id'], '_ignored_link" class="hide">', $txt['show_ignore_user_post'], '</a>
627 683
 					</div>';
684
+			}
628 685
 
629 686
 			echo '
630 687
 					<div class="inner" id="msg_', $post['id'], '_body">', $post['body'], '</div>
@@ -706,8 +763,10 @@  discard block
 block discarded – undo
706 763
 
707 764
 	// If we are starting a new topic starting from another one, here is the place to remember some details
708 765
 	if (!empty($context['original_post']))
709
-		echo '
766
+	{
767
+			echo '
710 768
 			<input type="hidden" name="followup" value="' . $context['original_post'] . '" />';
769
+	}
711 770
 
712 771
 	echo '
713 772
 			<input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '" />
@@ -737,7 +796,8 @@  discard block
 block discarded – undo
737 796
 
738 797
 	// Code for showing and hiding additional options.
739 798
 	if (!empty($settings['additional_options_collapsible']))
740
-		addInlineJavascript('
799
+	{
800
+			addInlineJavascript('
741 801
 			var oSwapAdditionalOptions = new elk_Toggle({
742 802
 				bToggleEnabled: true,
743 803
 				bCurrentlyCollapsed: ' . (empty($context['minmax_preferences']['post']) ? 'false' : 'true') . ',
@@ -774,6 +834,7 @@  discard block
 block discarded – undo
774 834
 					sAdditionalVars: \';minmax_key=post\'
775 835
 				},
776 836
 			});', true);
837
+	}
777 838
 
778 839
 	template_topic_replies_below();
779 840
 }
Please login to merge, or discard this patch.
themes/default/Login.template.php 1 patch
Braces   +36 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,13 +30,17 @@  discard block
 block discarded – undo
30 30
 
31 31
 	// Did they make a mistake last time?
32 32
 	if (!empty($context['login_errors']))
33
-		echo '
33
+	{
34
+			echo '
34 35
 					<p class="errorbox">', implode('<br />', $context['login_errors']), '</p>';
36
+	}
35 37
 
36 38
 	// Or perhaps there's some special description for this time?
37 39
 	if (isset($context['description']))
38
-		echo '
40
+	{
41
+			echo '
39 42
 					<p class="description">', $context['description'], '</p>';
43
+	}
40 44
 
41 45
 	// Now just get the basic information - username, password, etc.
42 46
 	echo '
@@ -55,14 +59,17 @@  discard block
 block discarded – undo
55 59
 						</dd>';
56 60
 
57 61
 	if (!empty($modSettings['enableOTP']))
58
-		echo '
62
+	{
63
+			echo '
59 64
 						<dt>', $txt['otp_token'], '</dt>
60 65
 						<dd>
61 66
 							<input type="password" name="otp_token" id="otp_token" value="', $context['default_password'], '" size="30" class="input_password" placeholder="', $txt['otp_token'], '" />
62 67
 						</dd>';
68
+	}
63 69
 
64 70
 	if (!empty($modSettings['enableOpenID']))
65
-		echo '
71
+	{
72
+			echo '
66 73
 					</dl>
67 74
 					<p><strong>&mdash;', $txt['or'], '&mdash;</strong></p>
68 75
 					<dl>
@@ -74,6 +81,7 @@  discard block
 block discarded – undo
74 81
 						</dd>
75 82
 					</dl>
76 83
 					<hr />';
84
+	}
77 85
 
78 86
 	echo '
79 87
 					<dl>
@@ -92,13 +100,15 @@  discard block
 block discarded – undo
92 100
 
93 101
 	// If they have deleted their account, give them a chance to change their mind.
94 102
 	if (isset($context['login_show_undelete']))
95
-		echo '
103
+	{
104
+			echo '
96 105
 						<dt class="alert">
97 106
 							<label for="undelete">', $txt['undelete_account'], ':</label>
98 107
 						</dt>
99 108
 						<dd>
100 109
 							<input type="checkbox" name="undelete" id="undelete" />
101 110
 						</dd>';
111
+	}
102 112
 
103 113
 	echo '
104 114
 					</dl>
@@ -140,9 +150,12 @@  discard block
 block discarded – undo
140 150
 				', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br />';
141 151
 
142 152
 	if ($context['can_register'])
143
-		echo sprintf($txt['login_below_or_register'], $scripturl . '?action=register', $context['forum_name_html_safe']);
144
-	else
145
-		echo $txt['login_below'];
153
+	{
154
+			echo sprintf($txt['login_below_or_register'], $scripturl . '?action=register', $context['forum_name_html_safe']);
155
+	}
156
+	else {
157
+			echo $txt['login_below'];
158
+	}
146 159
 
147 160
 	// And now the login information.
148 161
 	echo '
@@ -166,14 +179,17 @@  discard block
 block discarded – undo
166 179
 					</dd>';
167 180
 
168 181
 	if (!empty($modSettings['enableOTP']))
169
-		echo '
182
+	{
183
+			echo '
170 184
 						<dt>', $txt['otp_token'], '</dt>
171 185
 						<dd>
172 186
 							<input type="password" name="otp_token" id="otp_token" value="', $context['default_password'], '" size="30" class="input_password" placeholder="', $txt['otp_token'], '" />
173 187
 						</dd>';
188
+	}
174 189
 
175 190
 	if (!empty($modSettings['enableOpenID']))
176
-		echo '
191
+	{
192
+			echo '
177 193
 				</dl>
178 194
 				<p><strong>&mdash;', $txt['or'], '&mdash;</strong></p>
179 195
 				<dl>
@@ -186,6 +202,7 @@  discard block
 block discarded – undo
186 202
 				</dl>
187 203
 				<hr />
188 204
 				<dl>';
205
+	}
189 206
 
190 207
 	echo '
191 208
 					<dt>
@@ -289,8 +306,10 @@  discard block
 block discarded – undo
289 306
 		<div class="well centertext">';
290 307
 
291 308
 	if (!empty($context['incorrect_password']))
292
-		echo '
309
+	{
310
+			echo '
293 311
 			<div class="errorbox">', $txt['admin_incorrect_password'], '</div>';
312
+	}
294 313
 
295 314
 	echo '
296 315
 			<label for="', $context['sessionCheckType'], '_pass">', $txt['password'], ':</label>
@@ -332,13 +351,15 @@  discard block
 block discarded – undo
332 351
 
333 352
 	// You didn't even have an ID?
334 353
 	if (empty($context['member_id']))
335
-		echo '
354
+	{
355
+			echo '
336 356
 					<dt>
337 357
 						<label for="user">', $txt['invalid_activation_username'], ':</label>
338 358
 					</dt>
339 359
 					<dd>
340 360
 						<input type="text" name="user" id="user" size="30" class="input_text" />
341 361
 					</dd>';
362
+	}
342 363
 
343 364
 	echo '
344 365
 					<dt>
@@ -391,7 +412,8 @@  discard block
 block discarded – undo
391 412
 					</dd>';
392 413
 
393 414
 	if ($context['can_activate'])
394
-		echo '
415
+	{
416
+			echo '
395 417
 					<dt>
396 418
 						<label for="code">', $txt['invalid_activation_retry'], ':</label>
397 419
 						<p>', $txt['invalid_activation_known'], '</p>
@@ -399,6 +421,7 @@  discard block
 block discarded – undo
399 421
 					<dd>
400 422
 						<input type="text" name="code" id="code" size="30" class="input_text" />
401 423
 					</dd>';
424
+	}
402 425
 
403 426
 	echo '
404 427
 				</dl>
Please login to merge, or discard this patch.
themes/default/scripts/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/PersonalMessage.template.php 1 patch
Braces   +208 added lines, -78 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 
42 42
 	// Show the capacity bar, if available. @todo - This needs work.
43 43
 	if (!empty($context['limit_bar']))
44
-		echo '
44
+	{
45
+			echo '
45 46
 						<h2 class="category_header">
46 47
 							<span class="floatleft">', $txt['pm_capacity'], ':</span>
47 48
 							<span class="floatleft capacity_bar">
@@ -49,18 +50,23 @@  discard block
 block discarded – undo
49 50
 							</span>
50 51
 							<span class="floatright', $context['limit_bar']['percent'] > 90 ? ' alert' : '', '">', $context['limit_bar']['text'], '</span>
51 52
 						</h2>';
53
+	}
52 54
 
53 55
 	// Message sent? Show a small indication.
54 56
 	if (isset($context['pm_sent']))
55
-		echo '
57
+	{
58
+			echo '
56 59
 						<div class="successbox">
57 60
 							', $txt['pm_sent'], '
58 61
 						</div>';
62
+	}
59 63
 
60 64
 	if (!empty($context['pm_form_url']))
61
-		echo '
65
+	{
66
+			echo '
62 67
 						<form action="', $context['pm_form_url'], '" method="post" accept-charset="UTF-8" name="pmFolder">';
63
-}
68
+	}
69
+	}
64 70
 
65 71
 /**
66 72
  * The end of the index bar, for personal messages page.
@@ -108,8 +114,10 @@  discard block
 block discarded – undo
108 114
 
109 115
 			// Showing the sidebar posting area?
110 116
 			if (empty($options['hide_poster_area']))
111
-				echo '
117
+			{
118
+							echo '
112 119
 							<ul class="poster">', template_build_poster_div($message), '</ul>';
120
+			}
113 121
 
114 122
 			echo '
115 123
 							<div class="postarea', empty($options['hide_poster_area']) ? '' : '2', '">
@@ -125,24 +133,32 @@  discard block
 block discarded – undo
125 133
 
126 134
 			// People it was sent directly to....
127 135
 			if (!empty($message['recipients']['to']))
128
-				echo
136
+			{
137
+							echo
129 138
 										implode(', ', $message['recipients']['to']);
139
+			}
130 140
 			// Otherwise, we're just going to say "some people"...
131 141
 			elseif ($context['folder'] != 'sent')
132
-				echo
142
+			{
143
+							echo
133 144
 										'(', $txt['pm_undisclosed_recipients'], ')';
145
+			}
134 146
 
135 147
 			echo '
136 148
 										<strong> ', $txt['on'], ': </strong>', $message['time'];
137 149
 
138 150
 			// If we're in the sent items folder, show who it was sent to besides the "To:" people.
139 151
 			if (!empty($message['recipients']['bcc']))
140
-				echo '
152
+			{
153
+							echo '
141 154
 										<br /><strong> ', $txt['pm_bcc'], ': </strong>', implode(', ', $message['recipients']['bcc']);
155
+			}
142 156
 
143 157
 			if (!empty($message['is_replied_to']))
144
-				echo '
158
+			{
159
+							echo '
145 160
 										<br />', $txt['pm_is_replied_to'];
161
+			}
146 162
 
147 163
 			echo '
148 164
 									</h5>
@@ -158,10 +174,12 @@  discard block
 block discarded – undo
158 174
 
159 175
 			// Showing all then give a remove item checkbox
160 176
 			if (empty($context['display_mode']))
161
-				echo '
177
+			{
178
+							echo '
162 179
 									<li class="listlevel1 quickmod_check">
163 180
 										<input type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;" />
164 181
 									</li>';
182
+			}
165 183
 
166 184
 			// Maybe there is something...more :P (this is the more button)
167 185
 			if (!empty($context['additional_pm_drop_buttons']))
@@ -172,10 +190,12 @@  discard block
 block discarded – undo
172 190
 										<ul class="menulevel2">';
173 191
 
174 192
 				foreach ($context['additional_pm_drop_buttons'] as $key => $button)
175
-					echo '
193
+				{
194
+									echo '
176 195
 											<li class="listlevel2">
177 196
 												<a href="' . $button['href'] . '" class="linklevel2 ', $key, '">' . $button['text'] . '</a>
178 197
 											</li>';
198
+				}
179 199
 
180 200
 				echo '
181 201
 										</ul>
@@ -196,9 +216,11 @@  discard block
 block discarded – undo
196 216
 				{
197 217
 					// Is there than more than one recipient you can reply to?
198 218
 					if ($message['number_recipients'] > 1)
199
-						echo '
219
+					{
220
+											echo '
200 221
 									<li class="listlevel1">
201 222
 										<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all" class="linklevel1 reply_all_button">', $txt['reply_to_all'], '</a></li>';
223
+					}
202 224
 
203 225
 					echo '
204 226
 									<li class="listlevel1">
@@ -209,21 +231,24 @@  discard block
 block discarded – undo
209 231
 									</li>';
210 232
 				}
211 233
 				// This is for "forwarding" - even if the member is gone.
212
-				else
213
-					echo '
234
+				else {
235
+									echo '
214 236
 									<li class="listlevel1">
215 237
 										<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote" class="linklevel1 quote_button">', $txt['reply_quote'], '</a>
216 238
 									</li>';
239
+				}
217 240
 			}
218 241
 
219 242
 			// Anything else added by mods for example?
220 243
 			if (!empty($context['additional_quick_pm_buttons']))
221 244
 			{
222 245
 				foreach ($context['additional_quick_pm_buttons'] as $key => $button)
223
-					echo '
246
+				{
247
+									echo '
224 248
 									<li class="listlevel1">
225 249
 										<a href="' . $button['href'] . '" class="linklevel1 ', $key, '">' . $button['text'] . '</a>
226 250
 									</li>';
251
+				}
227 252
 			}
228 253
 
229 254
 			echo '
@@ -252,8 +277,10 @@  discard block
 block discarded – undo
252 277
 						foreach ($context['labels'] as $label)
253 278
 						{
254 279
 							if (!isset($message['labels'][$label['id']]))
255
-								echo '
280
+							{
281
+															echo '
256 282
 										<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
283
+							}
257 284
 						}
258 285
 					}
259 286
 
@@ -264,8 +291,10 @@  discard block
 block discarded – undo
264 291
 										<option value="" disabled="disabled">', $txt['pm_msg_label_remove'], ':</option>';
265 292
 
266 293
 						foreach ($message['labels'] as $label)
267
-							echo '
294
+						{
295
+													echo '
268 296
 										<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
297
+						}
269 298
 					}
270 299
 
271 300
 					echo '
@@ -287,7 +316,9 @@  discard block
 block discarded – undo
287 316
 				foreach ($message['member']['custom_fields'] as $custom)
288 317
 				{
289 318
 					if ($custom['placement'] != 2 || empty($custom['value']))
290
-						continue;
319
+					{
320
+											continue;
321
+					}
291 322
 
292 323
 					if (!$shown)
293 324
 					{
@@ -302,15 +333,19 @@  discard block
 block discarded – undo
302 333
 				}
303 334
 
304 335
 				if ($shown)
305
-					echo '
336
+				{
337
+									echo '
306 338
 									</ul>
307 339
 								</div>';
340
+				}
308 341
 			}
309 342
 
310 343
 			// Show the member's signature?
311 344
 			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
312
-				echo '
345
+			{
346
+							echo '
313 347
 								<div class="signature">', $message['member']['signature'], '</div>';
348
+			}
314 349
 
315 350
 			echo '
316 351
 							</div>
@@ -331,10 +366,13 @@  discard block
 block discarded – undo
331 366
 
332 367
 	// Show a few buttons if we are in conversation mode and outputting the first message.
333 368
 	if ($context['display_mode'] == 2)
334
-		template_pagesection('conversation_buttons', 'right', array('page_index' => false));
335
-	else
336
-		template_pagesection();
337
-}
369
+	{
370
+			template_pagesection('conversation_buttons', 'right', array('page_index' => false));
371
+	}
372
+	else {
373
+			template_pagesection();
374
+	}
375
+	}
338 376
 
339 377
 /**
340 378
  * Used to display items below the page, like page navigation
@@ -344,11 +382,15 @@  discard block
 block discarded – undo
344 382
 	global $context, $txt;
345 383
 
346 384
 	if (empty($context['display_mode']))
347
-		template_pagesection(false, '', array('extra' => '<input type="submit" name="del_selected" value="' . $txt['quickmod_delete_selected'] . '" style="font-weight: normal;" onclick="if (!confirm(\'' . $txt['delete_selected_confirm'] . '\')) return false;" class="right_submit" />'));
385
+	{
386
+			template_pagesection(false, '', array('extra' => '<input type="submit" name="del_selected" value="' . $txt['quickmod_delete_selected'] . '" style="font-weight: normal;" onclick="if (!confirm(\'' . $txt['delete_selected_confirm'] . '\')) return false;" class="right_submit" />'));
387
+	}
348 388
 	// Show a few buttons if we are in conversation mode and outputting the first message.
349 389
 	elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons']))
350
-		template_pagesection('conversation_buttons', 'right', array('page_index' => false));
351
-}
390
+	{
391
+			template_pagesection('conversation_buttons', 'right', array('page_index' => false));
392
+	}
393
+	}
352 394
 
353 395
 /**
354 396
  * Just list all the personal message subjects - to make templates easier.
@@ -377,8 +419,10 @@  discard block
 block discarded – undo
377 419
 
378 420
 	// Individual messages = button list!
379 421
 	if ($context['display_mode'] == 1)
380
-		template_subject_list();
381
-}
422
+	{
423
+			template_subject_list();
424
+	}
425
+	}
382 426
 
383 427
 /**
384 428
  * Template layer to show the PM subject listing
@@ -419,10 +463,12 @@  discard block
 block discarded – undo
419 463
 						<tbody>';
420 464
 
421 465
 	if (!$context['show_delete'])
422
-		echo '
466
+	{
467
+			echo '
423 468
 							<tr class="standard_row">
424 469
 								<td colspan="5">', $txt['pm_alert_none'], '</td>
425 470
 							</tr>';
471
+	}
426 472
 
427 473
 	// Use the query callback to get the subject list
428 474
 	while ($message = $context['get_pmessage']('subject'))
@@ -490,8 +536,10 @@  discard block
 block discarded – undo
490 536
 			foreach ($context['labels'] as $label)
491 537
 			{
492 538
 				if ($label['id'] != $context['current_label_id'])
493
-					$extra .= '
539
+				{
540
+									$extra .= '
494 541
 								<option value="add_' . $label['id'] . '">&#10148;&nbsp;' . $label['name'] . '</option>';
542
+				}
495 543
 			}
496 544
 
497 545
 			$extra .= '
@@ -534,8 +582,10 @@  discard block
 block discarded – undo
534 582
 
535 583
 	// Any search errors we need to let them know about
536 584
 	if (!empty($context['search_errors']))
537
-		echo '
585
+	{
586
+			echo '
538 587
 		<p class="errorbox">', implode('<br />', $context['search_errors']['messages']), '</p>';
588
+	}
539 589
 
540 590
 	// Start with showing the basic search input box
541 591
 	echo '
@@ -619,11 +669,13 @@  discard block
 block discarded – undo
619 669
 				<ul id="searchLabelsExpand">';
620 670
 
621 671
 		foreach ($context['search_labels'] as $label)
622
-			echo '
672
+		{
673
+					echo '
623 674
 					<li>
624 675
 						<label for="searchlabel_', $label['id'], '"><input type="checkbox" id="searchlabel_', $label['id'], '" name="searchlabel[', $label['id'], ']" value="', $label['id'], '" ', $label['checked'] ? 'checked="checked"' : '', ' />
625 676
 						', $label['name'], '</label>
626 677
 					</li>';
678
+		}
627 679
 
628 680
 		echo '
629 681
 				</ul>
@@ -723,14 +775,18 @@  discard block
 block discarded – undo
723 775
 
724 776
 	// Was anything even found?
725 777
 	if (!empty($context['personal_messages']))
726
-		template_pagesection();
727
-	else
728
-		echo '
778
+	{
779
+			template_pagesection();
780
+	}
781
+	else {
782
+			echo '
729 783
 			<div class="well">', $txt['find_no_results'], '</div>';
784
+	}
730 785
 
731 786
 	// Showing complete results?
732 787
 	if (empty($context['search_params']['show_complete']))
733
-		echo '
788
+	{
789
+			echo '
734 790
 			<table class="table_grid">
735 791
 				<thead>
736 792
 					<tr class="table_head">
@@ -740,9 +796,11 @@  discard block
 block discarded – undo
740 796
 					</tr>
741 797
 				</thead>
742 798
 				<tbody>';
743
-	else
744
-		echo '
799
+	}
800
+	else {
801
+			echo '
745 802
 			<ul class="forumposts topic_listing search_results_posts">';
803
+	}
746 804
 
747 805
 	// Print each message out...
748 806
 	foreach ($context['personal_messages'] as $message)
@@ -759,10 +817,14 @@  discard block
 block discarded – undo
759 817
 			// Show the recipients.
760 818
 			// @todo This doesn't deal with the sent item searching quite right for bcc.
761 819
 			if (!empty($message['recipients']['to']))
762
-				echo implode(', ', $message['recipients']['to']);
820
+			{
821
+							echo implode(', ', $message['recipients']['to']);
822
+			}
763 823
 			// Otherwise, we're just going to say "some people"...
764 824
 			elseif ($context['folder'] !== 'sent')
765
-				echo '(', $txt['pm_undisclosed_recipients'], ')';
825
+			{
826
+							echo '(', $txt['pm_undisclosed_recipients'], ')';
827
+			}
766 828
 
767 829
 			echo '
768 830
 						</span>
@@ -778,13 +840,16 @@  discard block
 block discarded – undo
778 840
 
779 841
 				// You can only reply if they are not a guest...
780 842
 				if (!$message['member']['is_guest'])
781
-					echo '
843
+				{
844
+									echo '
782 845
 						<li class="listlevel1"><a class="linklevel1 reply_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
783 846
 						<li class="listlevel1"><a class="linklevel1 quote_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $txt['quote'], '</a></li>';
847
+				}
784 848
 				// This is for "forwarding" - even if the member is gone.
785
-				else
786
-					echo '
849
+				else {
850
+									echo '
787 851
 						<li class="listlevel1"><a class="linklevel1 quote_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $txt['quote'], '</a></li>';
852
+				}
788 853
 				echo '
789 854
 					</ul>';
790 855
 			}
@@ -806,16 +871,21 @@  discard block
 block discarded – undo
806 871
 	}
807 872
 
808 873
 	if (!empty($context['search_params']['show_complete']))
809
-		echo '
874
+	{
875
+			echo '
810 876
 			</ul>';
811
-	else
812
-		echo '
877
+	}
878
+	else {
879
+			echo '
813 880
 				</tbody>
814 881
 			</table>';
882
+	}
815 883
 
816 884
 	// If we have results show a page index
817 885
 	if (!empty($context['personal_messages']))
818
-		template_pagesection();
886
+	{
887
+			template_pagesection();
888
+	}
819 889
 
820 890
 	echo '
821 891
 		</div>';
@@ -838,14 +908,18 @@  discard block
 block discarded – undo
838 908
 				<div class="content">';
839 909
 
840 910
 		if (!empty($context['send_log']['sent']))
841
-			foreach ($context['send_log']['sent'] as $log_entry)
911
+		{
912
+					foreach ($context['send_log']['sent'] as $log_entry)
842 913
 				echo '
843 914
 					<span class="error">', $log_entry, '</span><br />';
915
+		}
844 916
 
845 917
 		if (!empty($context['send_log']['failed']))
846
-			foreach ($context['send_log']['failed'] as $log_entry)
918
+		{
919
+					foreach ($context['send_log']['failed'] as $log_entry)
847 920
 				echo '
848 921
 					<span class="error">', $log_entry, '</span><br />';
922
+		}
849 923
 
850 924
 		echo '
851 925
 				</div>
@@ -878,10 +952,12 @@  discard block
 block discarded – undo
878 952
 	template_show_error('post_error');
879 953
 
880 954
 	if (!empty($modSettings['drafts_pm_enabled']))
881
-		echo '
955
+	{
956
+			echo '
882 957
 				<div id="draft_section" class="successbox', isset($context['draft_saved']) ? '"' : ' hide"', '>',
883 958
 					sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), '
884 959
 				</div>';
960
+	}
885 961
 
886 962
 	echo '
887 963
 				<dl id="post_header">';
@@ -934,11 +1010,13 @@  discard block
 block discarded – undo
934 1010
 
935 1011
 	// Require an image to be typed to save spamming?
936 1012
 	if (!empty($context['require_verification']))
937
-		template_verification_controls($context['visual_verification_id'], '
1013
+	{
1014
+			template_verification_controls($context['visual_verification_id'], '
938 1015
 				<div class="post_verification">
939 1016
 					<strong>' . $txt['pm_visual_verification_label'] . ':</strong>
940 1017
 					', '
941 1018
 				</div>');
1019
+	}
942 1020
 
943 1021
 	// Send, Preview, spellchecker buttons.
944 1022
 	echo '
@@ -966,9 +1044,11 @@  discard block
 block discarded – undo
966 1044
 						<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
967 1045
 
968 1046
 		foreach ($context['drafts'] as $draft)
969
-			echo '
1047
+		{
1048
+					echo '
970 1049
 						<dt>', $draft['link'], '</dt>
971 1050
 						<dd>', $draft['poster_time'], '</dd>';
1051
+		}
972 1052
 
973 1053
 		echo '
974 1054
 					</dl>
@@ -991,7 +1071,8 @@  discard block
 block discarded – undo
991 1071
 
992 1072
 	// Code for showing and hiding drafts
993 1073
 	if (!empty($context['drafts']))
994
-		addInlineJavascript('
1074
+	{
1075
+			addInlineJavascript('
995 1076
 		var oSwapDraftOptions = new elk_Toggle({
996 1077
 			bToggleEnabled: true,
997 1078
 			bCurrentlyCollapsed: ' . (empty($context['minmax_preferences']['pmdraft']) ? 'false' : 'true') . ',
@@ -1022,10 +1103,12 @@  discard block
 block discarded – undo
1022 1103
 				sAdditionalVars: \';minmax_key=pmdraft\'
1023 1104
 			},
1024 1105
 		});', true);
1106
+	}
1025 1107
 
1026 1108
 	// Show the message you're replying to.
1027 1109
 	if ($context['reply'])
1028
-		echo '
1110
+	{
1111
+			echo '
1029 1112
 
1030 1113
 	<div class="forumposts">
1031 1114
 		<h2 class="category_header">', $txt['subject'], ': ', $context['quoted_message']['subject'], '</h2>
@@ -1038,6 +1121,7 @@  discard block
 block discarded – undo
1038 1121
 			', $context['quoted_message']['body'], '
1039 1122
 		</div>
1040 1123
 	</div>';
1124
+	}
1041 1125
 
1042 1126
 	echo '
1043 1127
 		<script>
@@ -1050,22 +1134,26 @@  discard block
 block discarded – undo
1050 1134
 				aToRecipients: [';
1051 1135
 
1052 1136
 	foreach ($context['recipients']['to'] as $i => $member)
1053
-		echo '
1137
+	{
1138
+			echo '
1054 1139
 					{
1055 1140
 						sItemId: ', JavaScriptEscape($member['id']), ',
1056 1141
 						sItemName: ', JavaScriptEscape($member['name']), '
1057 1142
 					}', $i == count($context['recipients']['to']) - 1 ? '' : ',';
1143
+	}
1058 1144
 
1059 1145
 	echo '
1060 1146
 				],
1061 1147
 				aBccRecipients: [';
1062 1148
 
1063 1149
 	foreach ($context['recipients']['bcc'] as $i => $member)
1064
-		echo '
1150
+	{
1151
+			echo '
1065 1152
 					{
1066 1153
 						sItemId: ', JavaScriptEscape($member['id']), ',
1067 1154
 						sItemName: ', JavaScriptEscape($member['name']), '
1068 1155
 					}', $i == count($context['recipients']['bcc']) - 1 ? '' : ',';
1156
+	}
1069 1157
 
1070 1158
 	echo '
1071 1159
 				],
@@ -1141,8 +1229,10 @@  discard block
 block discarded – undo
1141 1229
 				<th style="width: 4%;">';
1142 1230
 
1143 1231
 	if (count($context['labels']) > 2)
1144
-		echo '
1232
+	{
1233
+			echo '
1145 1234
 					<input type="checkbox" onclick="invertAll(this, this.form);" />';
1235
+	}
1146 1236
 
1147 1237
 	echo '
1148 1238
 				</th>
@@ -1151,16 +1241,20 @@  discard block
 block discarded – undo
1151 1241
 		<tbody>';
1152 1242
 
1153 1243
 	if (count($context['labels']) < 2)
1154
-		echo '
1244
+	{
1245
+			echo '
1155 1246
 			<tr>
1156 1247
 				<td colspan="2" class="centertext">', $txt['pm_labels_no_exist'], '</td>
1157 1248
 			</tr>';
1249
+	}
1158 1250
 	else
1159 1251
 	{
1160 1252
 		foreach ($context['labels'] as $label)
1161 1253
 		{
1162 1254
 			if ($label['id'] == -1)
1163
-				continue;
1255
+			{
1256
+							continue;
1257
+			}
1164 1258
 
1165 1259
 			echo '
1166 1260
 			<tr>
@@ -1179,11 +1273,13 @@  discard block
 block discarded – undo
1179 1273
 		</table>';
1180 1274
 
1181 1275
 	if (!count($context['labels']) < 2)
1182
-		echo '
1276
+	{
1277
+			echo '
1183 1278
 		<div class="submitbutton">
1184 1279
 			<input type="submit" name="save" value="', $txt['save'], '" />
1185 1280
 			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" onclick="return confirm(\'', $txt['pm_labels_delete'], '\');" />
1186 1281
 		</div>';
1282
+	}
1187 1283
 
1188 1284
 	echo '
1189 1285
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -1278,8 +1374,10 @@  discard block
 block discarded – undo
1278 1374
 				<th style="width: 4%;">';
1279 1375
 
1280 1376
 	if (!empty($context['rules']))
1281
-		echo '
1377
+	{
1378
+			echo '
1282 1379
 					<input type="checkbox" onclick="invertAll(this, this.form);" />';
1380
+	}
1283 1381
 
1284 1382
 	echo '
1285 1383
 				</th>
@@ -1288,12 +1386,14 @@  discard block
 block discarded – undo
1288 1386
 		<tbody>';
1289 1387
 
1290 1388
 	if (empty($context['rules']))
1291
-		echo '
1389
+	{
1390
+			echo '
1292 1391
 			<tr>
1293 1392
 				<td colspan="2" class="centertext">
1294 1393
 					', $txt['pm_rules_none'], '
1295 1394
 				</td>
1296 1395
 			</tr>';
1396
+	}
1297 1397
 
1298 1398
 	foreach ($context['rules'] as $rule)
1299 1399
 	{
@@ -1315,13 +1415,17 @@  discard block
 block discarded – undo
1315 1415
 			<a class="linkbutton" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>';
1316 1416
 
1317 1417
 	if (!empty($context['rules']))
1318
-		echo '
1418
+	{
1419
+			echo '
1319 1420
 			<a class="linkbutton" href="', $scripturl, '?action=pm;sa=manrules;apply;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['pm_js_apply_rules_confirm'], '\');">', $txt['pm_apply_rules'], '</a>';
1421
+	}
1320 1422
 
1321 1423
 	if (!empty($context['rules']))
1322
-		echo '
1424
+	{
1425
+			echo '
1323 1426
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
1324 1427
 			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" onclick="return confirm(\'', $txt['pm_js_delete_rule_confirm'], '\');" />';
1428
+	}
1325 1429
 
1326 1430
 	echo '
1327 1431
 		</div>
@@ -1356,19 +1460,25 @@  discard block
 block discarded – undo
1356 1460
 	foreach ($context['rule']['criteria'] as $k => $criteria)
1357 1461
 	{
1358 1462
 		if (!$isFirst && $criteria['t'] == '')
1359
-			echo '
1463
+		{
1464
+					echo '
1360 1465
 				<div id="removeonjs1">';
1466
+		}
1361 1467
 		elseif (!$isFirst)
1362
-			echo '
1468
+		{
1469
+					echo '
1363 1470
 				<br />';
1471
+		}
1364 1472
 
1365 1473
 		echo '
1366 1474
 					<select class="criteria" name="ruletype[', $k, ']" id="ruletype', $k, '" data-optnum="', $k, '">
1367 1475
 						<option value="">', $txt['pm_rule_criteria_pick'], ':</option>';
1368 1476
 
1369 1477
 		foreach ($context['known_rules'] as $rule)
1370
-			echo '
1478
+		{
1479
+					echo '
1371 1480
 						<option value="', $rule, '" ', $criteria['t'] == $rule ? 'selected="selected"' : '', '>', $txt['pm_rule_' . $rule], '</option>';
1481
+		}
1372 1482
 
1373 1483
 		echo '
1374 1484
 					</select>
@@ -1380,8 +1490,10 @@  discard block
 block discarded – undo
1380 1490
 							<option value="">', $txt['pm_rule_sel_group'], '</option>';
1381 1491
 
1382 1492
 		foreach ($context['groups'] as $id => $group)
1383
-			echo '
1493
+		{
1494
+					echo '
1384 1495
 							<option value="', $id, '" ', $criteria['t'] == 'gid' && $criteria['v'] == $id ? 'selected="selected"' : '', '>', $group, '</option>';
1496
+		}
1385 1497
 
1386 1498
 		echo '
1387 1499
 						</select>
@@ -1389,10 +1501,14 @@  discard block
 block discarded – undo
1389 1501
 
1390 1502
 		// If this is the dummy we add a means to hide for non js users.
1391 1503
 		if ($isFirst)
1392
-			$isFirst = false;
1504
+		{
1505
+					$isFirst = false;
1506
+		}
1393 1507
 		elseif ($criteria['t'] == '')
1394
-			echo '
1508
+		{
1509
+					echo '
1395 1510
 				</div>';
1511
+		}
1396 1512
 	}
1397 1513
 
1398 1514
 	echo '
@@ -1417,11 +1533,15 @@  discard block
 block discarded – undo
1417 1533
 	foreach ($context['rule']['actions'] as $k => $action)
1418 1534
 	{
1419 1535
 		if (!$isFirst && $action['t'] == '')
1420
-			echo '
1536
+		{
1537
+					echo '
1421 1538
 				<div id="removeonjs2">';
1539
+		}
1422 1540
 		elseif (!$isFirst)
1423
-			echo '
1541
+		{
1542
+					echo '
1424 1543
 				<br />';
1544
+		}
1425 1545
 
1426 1546
 		echo '
1427 1547
 					<select name="acttype[', $k, ']" id="acttype', $k, '" data-actnum="', $k, '">
@@ -1434,19 +1554,25 @@  discard block
 block discarded – undo
1434 1554
 							<option value="">', $txt['pm_rule_sel_label'], '</option>';
1435 1555
 
1436 1556
 		foreach ($context['labels'] as $label)
1437
-			if ($label['id'] != -1)
1557
+		{
1558
+					if ($label['id'] != -1)
1438 1559
 				echo '
1439 1560
 							<option value="', ($label['id'] + 1), '" ', $action['t'] == 'lab' && $action['v'] == $label['id'] ? 'selected="selected"' : '', '>', $label['name'], '</option>';
1561
+		}
1440 1562
 
1441 1563
 		echo '
1442 1564
 						</select>
1443 1565
 					</span>';
1444 1566
 
1445 1567
 		if ($isFirst)
1446
-			$isFirst = false;
1568
+		{
1569
+					$isFirst = false;
1570
+		}
1447 1571
 		elseif ($action['t'] == '')
1448
-			echo '
1572
+		{
1573
+					echo '
1449 1574
 				</div>';
1575
+		}
1450 1576
 	}
1451 1577
 
1452 1578
 	echo '
@@ -1471,9 +1597,11 @@  discard block
 block discarded – undo
1471 1597
 
1472 1598
 	// If this isn't a new rule and we have JS enabled remove the JS compatibility stuff.
1473 1599
 	if ($context['rid'])
1474
-		echo '
1600
+	{
1601
+			echo '
1475 1602
 			document.getElementById("removeonjs1").className = "hide";
1476 1603
 			document.getElementById("removeonjs2").className = "hide";';
1604
+	}
1477 1605
 
1478 1606
 	echo '
1479 1607
 			document.getElementById("addonjs1").style.display = "";
@@ -1498,10 +1626,12 @@  discard block
 block discarded – undo
1498 1626
 
1499 1627
 	// No drafts? Just show an informative message.
1500 1628
 	if (empty($context['drafts']))
1501
-		echo '
1629
+	{
1630
+			echo '
1502 1631
 		<div class="information centertext">
1503 1632
 			', $txt['draft_none'], '
1504 1633
 		</div>';
1634
+	}
1505 1635
 	else
1506 1636
 	{
1507 1637
 		// For every draft to be displayed, give it its own div, and show the important details of the draft.
Please login to merge, or discard this patch.
themes/default/GenericList.template.php 1 patch
Braces   +56 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,17 +27,22 @@  discard block
 block discarded – undo
27 27
 	$cur_list = &$context[$list_id];
28 28
 
29 29
 	if (isset($cur_list['form']))
30
-		echo '
30
+	{
31
+			echo '
31 32
 	<form class="generic_list_wrapper" action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="UTF-8">
32 33
 		<div class="generic_list">';
33
-	else
34
-		echo '
34
+	}
35
+	else {
36
+			echo '
35 37
 		<div id="wrapper_', $list_id, '" class="generic_list_wrapper">';
38
+	}
36 39
 
37 40
 	// Show the title of the table (if any), with an icon (if defined)
38 41
 	if (!empty($cur_list['title']))
39
-		echo '
42
+	{
43
+			echo '
40 44
 			<h2 class="category_header', !empty($cur_list['icon']) ? ' hdicon cat_img_' . $cur_list['icon'] : '', '">', $cur_list['title'], '</h2>';
45
+	}
41 46
 
42 47
 	// Show any data right after the title
43 48
 	if (isset($cur_list['additional_rows']['after_title']))
@@ -53,7 +58,9 @@  discard block
 block discarded – undo
53 58
 
54 59
 	// Show some data above this list
55 60
 	if (isset($cur_list['additional_rows']['top_of_list']))
56
-		template_additional_rows('top_of_list', $cur_list);
61
+	{
62
+			template_additional_rows('top_of_list', $cur_list);
63
+	}
57 64
 
58 65
 	$close_div = false;
59 66
 	if (isset($cur_list['additional_rows']['above_column_headers']))
@@ -67,8 +74,10 @@  discard block
 block discarded – undo
67 74
 	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
68 75
 	{
69 76
 		if (!$close_div)
70
-			echo '
77
+		{
78
+					echo '
71 79
 			<div class="flow_auto">';
80
+		}
72 81
 
73 82
 		$close_div = true;
74 83
 
@@ -79,8 +88,10 @@  discard block
 block discarded – undo
79 88
 	if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
80 89
 	{
81 90
 		if (!$close_div)
82
-			echo '
91
+		{
92
+					echo '
83 93
 			<div class="flow_auto">';
94
+		}
84 95
 
85 96
 		echo '
86 97
 				<div class="floatleft">', template_pagesection(false, '', array('page_index_markup' => $cur_list['page_index'])), '
@@ -89,8 +100,10 @@  discard block
 block discarded – undo
89 100
 	}
90 101
 
91 102
 	if ($close_div)
92
-		echo '
103
+	{
104
+			echo '
93 105
 			</div>';
106
+	}
94 107
 
95 108
 	// Start of the main table
96 109
 	echo '
@@ -110,9 +123,13 @@  discard block
 block discarded – undo
110 123
 		{
111 124
 			$i++;
112 125
 			if ($i === 1)
113
-				$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
126
+			{
127
+							$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
128
+			}
114 129
 			elseif ($i === $header_count)
115
-				$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
130
+			{
131
+							$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
132
+			}
116 133
 
117 134
 			$sort_title = $col_header['sort_image'] === 'up' ? $txt['sort_desc'] : $txt['sort_asc'];
118 135
 
@@ -130,12 +147,14 @@  discard block
 block discarded – undo
130 147
 
131 148
 	// Show a nice message informing there are no items in this list.
132 149
 	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label']))
133
-		echo '
150
+	{
151
+			echo '
134 152
 				<tr>
135 153
 					<td colspan="', $cur_list['num_columns'], '">
136 154
 						<div class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</div>
137 155
 					</td>
138 156
 				</tr>';
157
+	}
139 158
 
140 159
 	// Show the list rows.
141 160
 	elseif (!empty($cur_list['rows']))
@@ -146,8 +165,10 @@  discard block
 block discarded – undo
146 165
 				<tr class="standard_row ', $row['class'], '" id="list_', $list_id, '_', str_replace(' ', '_', $id), '">';
147 166
 
148 167
 			foreach ($row['data'] as $row_data)
149
-				echo '
168
+			{
169
+							echo '
150 170
 					<td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>';
171
+			}
151 172
 
152 173
 			echo '
153 174
 				</tr>';
@@ -166,40 +187,51 @@  discard block
 block discarded – undo
166 187
 	{
167 188
 		// Show the page index (if this list doesn't intend to show all items).
168 189
 		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
169
-			echo '
190
+		{
191
+					echo '
170 192
 				<div class="floatleft">',
171 193
 			template_pagesection(false, '', array('page_index_markup' => $cur_list['page_index'])), '
172 194
 				</div>';
195
+		}
173 196
 
174 197
 		if (isset($cur_list['additional_rows']['below_table_data']))
175
-			template_additional_rows('below_table_data', $cur_list);
198
+		{
199
+					template_additional_rows('below_table_data', $cur_list);
200
+		}
176 201
 	}
177 202
 
178 203
 	// Tabs at the bottom.  Usually bottom aligned.
179 204
 	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
180
-		template_create_list_menu($cur_list['list_menu']);
205
+	{
206
+			template_create_list_menu($cur_list['list_menu']);
207
+	}
181 208
 
182 209
 	echo '
183 210
 			</div>';
184 211
 
185 212
 	// Last chance to show more data, like buttons and links
186 213
 	if (isset($cur_list['additional_rows']['bottom_of_list']))
187
-		template_additional_rows('bottom_of_list', $cur_list);
214
+	{
215
+			template_additional_rows('bottom_of_list', $cur_list);
216
+	}
188 217
 
189 218
 	if (isset($cur_list['form']))
190 219
 	{
191 220
 		foreach ($cur_list['form']['hidden_fields'] as $name => $value)
192
-			echo '
221
+		{
222
+					echo '
193 223
 			<input type="hidden" name="', $name, '" value="', $value, '" />';
224
+		}
194 225
 
195 226
 		echo '
196 227
 		</div>
197 228
 	</form>';
198 229
 	}
199
-	else
200
-		echo '
230
+	else {
231
+			echo '
201 232
 		</div>';
202
-}
233
+	}
234
+	}
203 235
 
204 236
 /**
205 237
  * Generic template used to show additional rows of data (above/below)
@@ -212,9 +244,11 @@  discard block
 block discarded – undo
212 244
 function template_additional_rows($row_position, $cur_list)
213 245
 {
214 246
 	foreach ($cur_list['additional_rows'][$row_position] as $row)
215
-		echo '
247
+	{
248
+			echo '
216 249
 				<div class="additional_row ', $row_position, empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>';
217
-}
250
+	}
251
+	}
218 252
 
219 253
 /**
220 254
  * Used this if you want your generic lists to have navigation menus.
Please login to merge, or discard this patch.
themes/default/Reports.template.php 1 patch
Braces   +36 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,8 +37,10 @@  discard block
 block discarded – undo
37 37
 					</dt>';
38 38
 
39 39
 		if (isset($type['description']))
40
-			echo '
40
+		{
41
+					echo '
41 42
 					<dd>', $type['description'], '</dd>';
43
+		}
42 44
 	}
43 45
 
44 46
 	echo '
@@ -65,7 +67,9 @@  discard block
 block discarded – undo
65 67
 		<div id="report_buttons">';
66 68
 
67 69
 	if (!empty($context['report_buttons']))
68
-		template_button_strip($context['report_buttons'], 'right');
70
+	{
71
+			template_button_strip($context['report_buttons'], 'right');
72
+	}
69 73
 
70 74
 	echo '
71 75
 		</div>
@@ -78,24 +82,29 @@  discard block
 block discarded – undo
78 82
 		<table class="table_grid report_results">';
79 83
 
80 84
 		if (!empty($table['title']))
81
-			echo '
85
+		{
86
+					echo '
82 87
 			<thead>
83 88
 				<tr class="table_head">
84 89
 					<th scope="col" colspan="', $table['column_count'], '">', $table['title'], '</th>
85 90
 				</tr>
86 91
 			</thead>
87 92
 			<tbody>';
93
+		}
88 94
 
89 95
 		// Now do each row!
90 96
 		$row_number = 0;
91 97
 		foreach ($table['data'] as $row)
92 98
 		{
93 99
 			if ($row_number == 0 && !empty($table['shading']['top']))
94
-				echo '
100
+			{
101
+							echo '
95 102
 				<tr class="table_caption">';
96
-			else
97
-				echo '
103
+			}
104
+			else {
105
+							echo '
98 106
 				<tr class="', !empty($row[0]['separator']) ? 'category_header' : '', '">';
107
+			}
99 108
 
100 109
 			// Now do each column.
101 110
 			$column_number = 0;
@@ -114,15 +123,18 @@  discard block
 block discarded – undo
114 123
 
115 124
 				// Shaded?
116 125
 				if ($column_number == 0 && !empty($table['shading']['left']))
117
-					echo '
126
+				{
127
+									echo '
118 128
 					<td class="table_caption ', $table['align']['shaded'], 'text" style="', $table['width']['shaded'] != 'auto' ? 'width:' . $table['width']['shaded'] . 'px;"' : '"', '>
119 129
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
120 130
 					</td>';
121
-				else
122
-					echo '
131
+				}
132
+				else {
133
+									echo '
123 134
 					<td class="', $table['align']['normal'], 'text" style="', $table['width']['normal'] != 'auto' ? 'width:' . $table['width']['normal'] . 'px' : '', !empty($data['style']) ? ';' . $data['style'] . '"' : '"', '>
124 135
 						', $data['v'], '
125 136
 					</td>';
137
+				}
126 138
 
127 139
 				$column_number++;
128 140
 			}
@@ -176,23 +188,28 @@  discard block
 block discarded – undo
176 188
 			<table class="table_grid">';
177 189
 
178 190
 		if (!empty($table['title']))
179
-			echo '
191
+		{
192
+					echo '
180 193
 				<tr class="table_head">
181 194
 					<td colspan="', $table['column_count'], '">
182 195
 						', $table['title'], '
183 196
 					</td>
184 197
 				</tr>';
198
+		}
185 199
 
186 200
 		// Now do each row!
187 201
 		$row_number = 0;
188 202
 		foreach ($table['data'] as $row)
189 203
 		{
190 204
 			if ($row_number == 0 && !empty($table['shading']['top']))
191
-				echo '
205
+			{
206
+							echo '
192 207
 				<tr class="secondary_header">';
193
-			else
194
-				echo '
208
+			}
209
+			else {
210
+							echo '
195 211
 				<tr>';
212
+			}
196 213
 
197 214
 			// Now do each column!!
198 215
 			$column_number = 0;
@@ -210,15 +227,18 @@  discard block
 block discarded – undo
210 227
 
211 228
 				// Shaded?
212 229
 				if ($column_number == 0 && !empty($table['shading']['left']))
213
-					echo '
230
+				{
231
+									echo '
214 232
 					<td class="secondary_header ', $table['align']['shaded'], 'text" style="', $table['width']['shaded'] != 'auto' ? 'width:' . $table['width']['shaded'] . 'px"' : '"', '>
215 233
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
216 234
 					</td>';
217
-				else
218
-					echo '
235
+				}
236
+				else {
237
+									echo '
219 238
 					<td class="', $table['align']['normal'], 'text" style="', $table['width']['normal'] != 'auto' ? 'width:' . $table['width']['normal'] . 'px' : '', !empty($data['style']) ? ';' . $data['style'] . '"' : '"', '>
220 239
 						', $data['v'], '
221 240
 					</td>';
241
+				}
222 242
 
223 243
 				$column_number++;
224 244
 			}
Please login to merge, or discard this patch.
themes/default/Theme.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -316,7 +316,9 @@  discard block
 block discarded – undo
316 316
 		if (!empty($this->js_vars) && !$do_deferred)
317 317
 		{
318 318
 			foreach ($this->js_vars as $var => $value)
319
-				$js_vars[] = $var . ' = ' . $value;
319
+			{
320
+							$js_vars[] = $var . ' = ' . $value;
321
+			}
320 322
 
321 323
 			// Newlines and tabs are here to make it look nice in the page source view, stripped if minimized though
322 324
 			$this->js_inline['standard'][] = 'var ' . implode(",\n\t\t\t", $js_vars) . ';';
@@ -383,14 +385,18 @@  discard block
 block discarded – undo
383 385
 				}
384 386
 
385 387
 				foreach ($combiner->getSpares() as $id => $file)
386
-					echo '
388
+				{
389
+									echo '
387 390
 	<link rel="stylesheet" href="', $file['filename'], '" id="', $id, '" />';
391
+				}
388 392
 			}
389 393
 			else
390 394
 			{
391 395
 				foreach ($this->css_files as $id => $file)
392
-					echo '
396
+				{
397
+									echo '
393 398
 	<link rel="stylesheet" href="', $file['filename'], '" id="', $id, '" />';
399
+				}
394 400
 			}
395 401
 		}
396 402
 	}
@@ -766,7 +772,9 @@  discard block
 block discarded – undo
766 772
 		// Since it's nice to have avatars all of the same size, and in some cases the size detection may fail,
767 773
 		// let's add the css in any case
768 774
 		if (!isset($context['html_headers']))
769
-			$context['html_headers'] = '';
775
+		{
776
+					$context['html_headers'] = '';
777
+		}
770 778
 
771 779
 		if (!empty($modSettings['avatar_max_width']) || !empty($modSettings['avatar_max_height']))
772 780
 		{
@@ -1097,7 +1105,9 @@  discard block
 block discarded – undo
1097 1105
 
1098 1106
 			// Load each template...
1099 1107
 			foreach ($templates as $template)
1100
-				$this->templates->load($template);
1108
+			{
1109
+							$this->templates->load($template);
1110
+			}
1101 1111
 
1102 1112
 			// ...and attempt to load their associated language files.
1103 1113
 			$required_files = implode('+', array_merge($templates, array('Addons')));
Please login to merge, or discard this patch.
themes/default/VerificationControls.template.php 1 patch
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,13 +29,17 @@  discard block
 block discarded – undo
29 29
 	$i = 0;
30 30
 
31 31
 	if ($verify_context['render'])
32
-		echo $before;
32
+	{
33
+			echo $before;
34
+	}
33 35
 
34 36
 	// Loop through each item to show them.
35 37
 	foreach ($verify_context['test'] as $key => $verification)
36 38
 	{
37 39
 		if (empty($verification['values']) || empty($verification['template']))
38
-			continue;
40
+		{
41
+					continue;
42
+		}
39 43
 
40 44
 		echo '
41 45
 			<div id="verification_control_', $i, '" class="verification_control">';
@@ -49,8 +53,10 @@  discard block
 block discarded – undo
49 53
 	}
50 54
 
51 55
 	if ($verify_context['render'])
52
-		echo $after;
53
-}
56
+	{
57
+			echo $after;
58
+	}
59
+	}
54 60
 
55 61
 /**
56 62
  * Used to show a verification question
@@ -63,12 +69,14 @@  discard block
 block discarded – undo
63 69
 	global $context;
64 70
 
65 71
 	foreach ($verify_context as $question)
66
-		echo '
72
+	{
73
+			echo '
67 74
 				<div class="verificationquestion">
68 75
 					<label for="', $verify_id, '_vv[q][', $question['id'], ']">', $question['q'], ':</label>
69 76
 					<input type="text" id="', $verify_id, '_vv[q][', $question['id'], ']" name="', $verify_id, '_vv[q][', $question['id'], ']" size="30" value="', $question['a'], '" ', $question['is_error'] ? ' class="border_error"' : '', ' tabindex="', $context['tabindex']++, '" class="input_text" />
70 77
 				</div>';
71
-}
78
+	}
79
+	}
72 80
 
73 81
 /**
74 82
  * Used to show one of those easy for robot, hard for human captcha's
Please login to merge, or discard this patch.
themes/default/ManageBoards.template.php 1 patch
Braces   +102 added lines, -36 removed lines patch added patch discarded remove patch
@@ -26,17 +26,21 @@  discard block
 block discarded – undo
26 26
 		<h2 class="category_header">', $txt['boardsEdit'], '</h2>';
27 27
 
28 28
 	if (!empty($context['move_board']))
29
-		echo '
29
+	{
30
+			echo '
30 31
 		<div class="information">
31 32
 			<p>', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', '</p>
32 33
 		</div>';
34
+	}
33 35
 
34 36
 	// No categories so show a label.
35 37
 	if (empty($context['categories']))
36
-		echo '
38
+	{
39
+			echo '
37 40
 		<div class="content centertext">
38 41
 			', $txt['mboards_no_cats'], '
39 42
 		</div>';
43
+	}
40 44
 
41 45
 	// Loop through every category, listing the boards in each as we go.
42 46
 	$sortables = array();
@@ -58,37 +62,47 @@  discard block
 block discarded – undo
58 62
 				<ul class="nolist">';
59 63
 
60 64
 		if (!empty($category['move_link']))
61
-			echo '
65
+		{
66
+					echo '
62 67
 					<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $category['move_link']['label'], '" /></a></li>';
68
+		}
63 69
 
64 70
 		$first = true;
65 71
 		$depth = 0;
66 72
 
67 73
 		// If there is nothing in a category, add a drop zone
68 74
 		if (empty($category['boards']))
69
-			echo '
75
+		{
76
+					echo '
70 77
 					<li id="cbp_' . $category['id'] . ',-1,"></li>';
78
+		}
71 79
 
72 80
 		// List through every board in the category, printing its name and link to modify the board.
73 81
 		foreach ($category['boards'] as $board)
74 82
 		{
75 83
 			// Going in a level deeper (sub-board)
76 84
 			if ($board['child_level'] > $depth)
77
-				echo '
85
+			{
86
+							echo '
78 87
 						<ul class="nolist">';
88
+			}
79 89
 			// Backing up a level to a childs parent
80 90
 			elseif ($board['child_level'] < $depth)
81 91
 			{
82 92
 				for ($i = $board['child_level']; $i < $depth; $i++)
83
-					echo
93
+				{
94
+									echo
84 95
 					'
85 96
 							</li>
86 97
 						</ul>';
98
+				}
87 99
 			}
88 100
 			// Base node parent but not the first one
89 101
 			elseif ($board['child_level'] == 0 && !$first)
90
-				echo '
102
+			{
103
+							echo '
91 104
 					</li>';
105
+			}
92 106
 
93 107
 			echo '
94 108
 					<li id="cbp_' . $category['id'] . ',' . $board['id'] . '"', (!empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? 'class="recycle_board"' : ''), ' style="', $board['move'] ? ';color: red;' : '', '">
@@ -103,8 +117,10 @@  discard block
 block discarded – undo
103 117
 					<li style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">';
104 118
 
105 119
 				foreach ($board['move_links'] as $link)
106
-					echo '
120
+				{
121
+									echo '
107 122
 						<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><img src="', $settings['images_url'], '/board_select_spot', $link['child_level'] > 0 ? '_child' : '', '.png" alt="', $link['label'], '" style="padding: 0px; margin: 0px;" /></a>';
123
+				}
108 124
 
109 125
 				echo '
110 126
 					</li>';
@@ -120,10 +136,12 @@  discard block
 block discarded – undo
120 136
 			if ($depth > 0)
121 137
 			{
122 138
 				for ($i = $depth; $i > 0; $i--)
123
-					echo
139
+				{
140
+									echo
124 141
 					'
125 142
 							</li>
126 143
 						</ul>';
144
+				}
127 145
 			}
128 146
 
129 147
 			echo '
@@ -195,8 +213,10 @@  discard block
 block discarded – undo
195 213
 
196 214
 		// Print every existing category into a select box.
197 215
 		foreach ($context['category_order'] as $order)
198
-			echo '
216
+		{
217
+					echo '
199 218
 							<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
219
+		}
200 220
 
201 221
 		echo '
202 222
 						</select>
@@ -226,24 +246,31 @@  discard block
 block discarded – undo
226 246
 				<div class="submitbutton">';
227 247
 
228 248
 	if (isset($context['category']['is_new']))
229
-		echo '
249
+	{
250
+			echo '
230 251
 						<input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" />';
231
-	else
232
-		echo '
252
+	}
253
+	else {
254
+			echo '
233 255
 						<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" />
234 256
 						<input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" />';
257
+	}
235 258
 
236 259
 	echo '
237 260
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
238 261
 
239 262
 	if (!empty($context['token_check']))
240
-		echo '
263
+	{
264
+			echo '
241 265
 						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
266
+	}
242 267
 
243 268
 	// If this category is empty we don't bother with the next confirmation screen.
244 269
 	if ($context['category']['is_empty'])
245
-		echo '
270
+	{
271
+			echo '
246 272
 						<input type="hidden" name="empty" value="1" />';
273
+	}
247 274
 
248 275
 	echo '
249 276
 					</div>
@@ -270,8 +297,10 @@  discard block
 block discarded – undo
270 297
 				<ul>';
271 298
 
272 299
 	foreach ($context['category']['children'] as $child)
273
-		echo '
300
+	{
301
+			echo '
274 302
 					<li>', $child, '</li>';
303
+	}
275 304
 
276 305
 	echo '
277 306
 					</ul>
@@ -284,9 +313,11 @@  discard block
 block discarded – undo
284 313
 					<select name="cat_to" ', count($context['category_order']) == 1 ? 'disabled="disabled"' : '', '>';
285 314
 
286 315
 	foreach ($context['category_order'] as $cat)
287
-		if ($cat['id'] != 0)
316
+	{
317
+			if ($cat['id'] != 0)
288 318
 			echo '
289 319
 							<option value="', $cat['id'], '">', $cat['true_name'], '</option>';
320
+	}
290 321
 
291 322
 	echo '
292 323
 					</select>
@@ -299,8 +330,10 @@  discard block
 block discarded – undo
299 330
 				</div>';
300 331
 
301 332
 	if (!empty($context['token_check']))
302
-		echo '
333
+	{
334
+			echo '
303 335
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
336
+	}
304 337
 
305 338
 	echo '
306 339
 			</div>
@@ -336,8 +369,10 @@  discard block
 block discarded – undo
336 369
 						<select id="new_cat" name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">';
337 370
 
338 371
 	foreach ($context['categories'] as $category)
339
-		echo '
372
+	{
373
+			echo '
340 374
 							<option', $category['selected'] ? ' selected="selected"' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
375
+	}
341 376
 
342 377
 	echo '
343 378
 						</select>
@@ -367,8 +402,10 @@  discard block
 block discarded – undo
367 402
 								', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '';
368 403
 
369 404
 		foreach ($context['board_order'] as $order)
370
-			echo '
405
+		{
406
+					echo '
371 407
 							<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
408
+		}
372 409
 
373 410
 		echo '
374 411
 						</select>
@@ -399,12 +436,16 @@  discard block
 block discarded – undo
399 436
 						<select id="profile" name="profile">';
400 437
 
401 438
 	if (isset($context['board']['is_new']))
402
-		echo '
439
+	{
440
+			echo '
403 441
 							<option value="-1">[', $txt['permission_profile_inherit'], ']</option>';
442
+	}
404 443
 
405 444
 	foreach ($context['profiles'] as $id => $profile)
406
-		echo '
445
+	{
446
+			echo '
407 447
 								<option value="', $id, '" ', $id == $context['board']['profile'] ? 'selected="selected"' : '', '>', $profile['name'], '</option>';
448
+	}
408 449
 
409 450
 	echo '
410 451
 						</select>
@@ -522,7 +563,8 @@  discard block
 block discarded – undo
522 563
 		});', true);
523 564
 
524 565
 	if (empty($context['board']['is_recycle']) && empty($context['board']['topics']))
525
-		echo '
566
+	{
567
+			echo '
526 568
 				<dl class="settings">
527 569
 					<dt>
528 570
 						<label for="redirect_enable">', $txt['mboards_redirect'], ':</label><br />
@@ -532,17 +574,22 @@  discard block
 block discarded – undo
532 574
 						<input type="checkbox" id="redirect_enable" name="redirect_enable"', $context['board']['redirect'] != '' ? ' checked="checked"' : '', ' onclick="refreshOptions();" />
533 575
 					</dd>
534 576
 				</dl>';
577
+	}
535 578
 
536 579
 	if (!empty($context['board']['is_recycle']))
537
-		echo '
580
+	{
581
+			echo '
538 582
 				<div class="infobox">', $txt['mboards_redirect_disabled_recycle'], '<br />', $txt['mboards_recycle_disabled_delete'], '</div>';
583
+	}
539 584
 
540 585
 	if (empty($context['board']['is_recycle']) && !empty($context['board']['topics']))
541
-		echo '
586
+	{
587
+			echo '
542 588
 				<div class="infobox">
543 589
 					<strong>', $txt['mboards_redirect'], '</strong><br />
544 590
 					', $txt['mboards_redirect_disabled'], '
545 591
 				</div>';
592
+	}
546 593
 
547 594
 	if (!$context['board']['topics'] && empty($context['board']['is_recycle']))
548 595
 	{
@@ -560,7 +607,8 @@  discard block
 block discarded – undo
560 607
 				</div>';
561 608
 
562 609
 		if ($context['board']['redirect'])
563
-			echo '
610
+		{
611
+					echo '
564 612
 				<div id="reset_redirect_div">
565 613
 					<dl class="settings">
566 614
 						<dt>
@@ -573,6 +621,7 @@  discard block
 block discarded – undo
573 621
 						</dd>
574 622
 					</dl>
575 623
 				</div>';
624
+		}
576 625
 	}
577 626
 
578 627
 	echo '
@@ -601,8 +650,10 @@  discard block
 block discarded – undo
601 650
 								<option value="0"', $context['board']['theme'] == 0 ? ' selected="selected"' : '', '>', $txt['mboards_theme_default'], '</option>';
602 651
 
603 652
 	foreach ($context['themes'] as $theme)
604
-		echo '
653
+	{
654
+			echo '
605 655
 								<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
656
+	}
606 657
 
607 658
 	echo '
608 659
 							</select>
@@ -629,20 +680,27 @@  discard block
 block discarded – undo
629 680
 
630 681
 	// If this board has no children don't bother with the next confirmation screen.
631 682
 	if ($context['board']['no_children'])
632
-		echo '
683
+	{
684
+			echo '
633 685
 					<input type="hidden" name="no_children" value="1" />';
686
+	}
634 687
 
635 688
 	if (isset($context['board']['is_new']))
636
-		echo '
689
+	{
690
+			echo '
637 691
 					<input type="hidden" name="cur_cat" value="', $context['board']['category'], '" />
638 692
 					<input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" />';
639
-	else
640
-		echo '
693
+	}
694
+	else {
695
+			echo '
641 696
 					<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" />';
697
+	}
642 698
 
643 699
 	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle']))
644
-		echo '
700
+	{
701
+			echo '
645 702
 					<input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" onclick="return confirm(\'', $txt['boardConfirm'], '\');" />';
703
+	}
646 704
 
647 705
 	echo '
648 706
 				</div>
@@ -666,11 +724,13 @@  discard block
 block discarded – undo
666 724
 			aListItems: [';
667 725
 
668 726
 	foreach ($context['board']['moderators'] as $id_member => $member_name)
669
-		$js .= '
727
+	{
728
+			$js .= '
670 729
 					{
671 730
 						sItemId: ' . JavaScriptEscape($id_member) . ',
672 731
 						sItemName: ' . JavaScriptEscape($member_name) . '
673 732
 					}' . ($id_member == $context['board']['last_moderator_id'] ? '' : ',');
733
+	}
674 734
 
675 735
 	$js .= '
676 736
 			]
@@ -698,8 +758,10 @@  discard block
 block discarded – undo
698 758
 			document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";';
699 759
 
700 760
 		if ($context['board']['redirect'])
701
-			echo '
761
+		{
762
+					echo '
702 763
 			document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";';
764
+		}
703 765
 	}
704 766
 
705 767
 	echo '
@@ -727,8 +789,10 @@  discard block
 block discarded – undo
727 789
 					<ul>';
728 790
 
729 791
 	foreach ($context['children'] as $child)
730
-		echo '
792
+	{
793
+			echo '
731 794
 						<li>', $child['node']['name'], '</li>';
795
+	}
732 796
 
733 797
 	echo '
734 798
 					</ul>
@@ -741,9 +805,11 @@  discard block
 block discarded – undo
741 805
 					<select name="board_to" ', empty($context['can_move_children']) ? 'disabled="disabled"' : '', '>';
742 806
 
743 807
 	foreach ($context['board_order'] as $board)
744
-		if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
808
+	{
809
+			if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
745 810
 			echo '
746 811
 						<option value="', $board['id'], '">', $board['name'], '</option>';
812
+	}
747 813
 
748 814
 	echo '
749 815
 					</select>
Please login to merge, or discard this patch.