Completed
Push — release-2.1 ( b61572...c939ca )
by Mathias
15s
created
Themes/default/ManageAttachments.template.php 1 patch
Braces   +20 added lines, -14 removed lines patch added patch discarded remove patch
@@ -122,9 +122,10 @@  discard block
 block discarded – undo
122 122
 		<h3 class="catbg">', $txt['attachment_transfer'], '</h3>
123 123
 	</div>';
124 124
 
125
-	if (!empty($context['results']))
126
-		echo '
125
+	if (!empty($context['results'])) {
126
+			echo '
127 127
 	<div class="noticebox">', $context['results'], '</div>';
128
+	}
128 129
 
129 130
 	echo '
130 131
 	<div class="windowbg2 noup">
@@ -136,9 +137,10 @@  discard block
 block discarded – undo
136 137
 					<select name="from">
137 138
 						<option value="0">', $txt['attachment_transfer_select'], '</option>';
138 139
 
139
-	foreach ($context['attach_dirs'] as $id => $dir)
140
-		echo '
140
+	foreach ($context['attach_dirs'] as $id => $dir) {
141
+			echo '
141 142
 						<option value="', $id, '">', $dir, '</option>';
143
+	}
142 144
 
143 145
 	echo '
144 146
 					</select>
@@ -149,13 +151,14 @@  discard block
 block discarded – undo
149 151
 						<option value="0">', $txt['attachment_transfer_auto_select'], '</option>
150 152
 						<option value="-1">', $txt['attachment_transfer_forum_root'], '</option>';
151 153
 
152
-	if (!empty($context['base_dirs']))
153
-		foreach ($context['base_dirs'] as $id => $dir)
154
+	if (!empty($context['base_dirs'])) {
155
+			foreach ($context['base_dirs'] as $id => $dir)
154 156
 			echo '
155 157
 						<option value="', $id, '">', $dir, '</option>';
156
-	else
157
-			echo '
158
+	} else {
159
+				echo '
158 160
 						<option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>';
161
+	}
159 162
 
160 163
 	echo '
161 164
 					</select>
@@ -165,18 +168,20 @@  discard block
 block discarded – undo
165 168
 					<select name="to">
166 169
 						<option value="0">', $txt['attachment_transfer_select'], '</option>';
167 170
 
168
-	foreach ($context['attach_dirs'] as $id => $dir)
169
-		echo '
171
+	foreach ($context['attach_dirs'] as $id => $dir) {
172
+			echo '
170 173
 						<option value="', $id, '">', $dir, '</option>';
174
+	}
171 175
 
172 176
 	echo '
173 177
 					</select>
174 178
 				</dd>';
175 179
 
176
-	if (!empty($modSettings['attachmentDirFileLimit']))
177
-		echo '
180
+	if (!empty($modSettings['attachmentDirFileLimit'])) {
181
+			echo '
178 182
 				<dt>', $txt['attachment_transfer_empty'], '</dt>
179 183
 				<dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>';
184
+	}
180 185
 
181 186
 	echo '
182 187
 			</dl>
@@ -253,10 +258,11 @@  discard block
 block discarded – undo
253 258
 		// Loop through each error reporting the status
254 259
 		foreach ($context['repair_errors'] as $error => $number)
255 260
 		{
256
-			if (!empty($number))
257
-				echo '
261
+			if (!empty($number)) {
262
+							echo '
258 263
 				<input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '">
259 264
 				<label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>';
265
+			}
260 266
 		}
261 267
 
262 268
 		echo '
Please login to merge, or discard this patch.
Themes/default/ManagePaid.template.php 1 patch
Braces   +61 added lines, -44 removed lines patch added patch discarded remove patch
@@ -24,11 +24,12 @@  discard block
 block discarded – undo
24 24
 				<h3 class="catbg">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h3>
25 25
 			</div>';
26 26
 
27
-	if (!empty($context['disable_groups']))
28
-		echo '
27
+	if (!empty($context['disable_groups'])) {
28
+			echo '
29 29
 			<div class="information">
30 30
 				<span class="alert">', $txt['paid_mod_edit_note'], '</span>
31 31
 			</div>';
32
+	}
32 33
 
33 34
 	echo '
34 35
 			<div class="windowbg2">
@@ -69,9 +70,10 @@  discard block
 block discarded – undo
69 70
 							<option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>';
70 71
 
71 72
 	// Put each group into the box.
72
-	foreach ($context['groups'] as $id => $name)
73
-		echo '
73
+	foreach ($context['groups'] as $id => $name) {
74
+			echo '
74 75
 							<option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>';
76
+	}
75 77
 
76 78
 	echo '
77 79
 						</select>
@@ -83,11 +85,12 @@  discard block
 block discarded – undo
83 85
 					<dd>';
84 86
 
85 87
 	// Put a checkbox in for each group
86
-	foreach ($context['groups'] as $id => $name)
87
-		echo '
88
+	foreach ($context['groups'] as $id => $name) {
89
+			echo '
88 90
 						<label for="addgroup_', $id, '">
89 91
 							<input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', '>&nbsp;<span class="smalltext">', $name, '</span>
90 92
 						</label><br>';
93
+	}
91 94
 
92 95
 	echo '
93 96
 					</dd>
@@ -141,8 +144,8 @@  discard block
 block discarded – undo
141 144
 					<fieldset>';
142 145
 
143 146
 	//!! Removed until implemented
144
-	if (!empty($sdflsdhglsdjgs))
145
-		echo '
147
+	if (!empty($sdflsdhglsdjgs)) {
148
+			echo '
146 149
 						<dl class="settings">
147 150
 							<dt>
148 151
 								<label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span>
@@ -151,6 +154,7 @@  discard block
 block discarded – undo
151 154
 								<input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', '>
152 155
 							</dd>
153 156
 						</dl>';
157
+	}
154 158
 
155 159
 	echo '
156 160
 						<div class="information">
@@ -251,8 +255,8 @@  discard block
 block discarded – undo
251 255
 				<dl class="settings">';
252 256
 
253 257
 	// Do we need a username?
254
-	if ($context['action_type'] == 'add')
255
-		echo '
258
+	if ($context['action_type'] == 'add') {
259
+			echo '
256 260
 					<dt>
257 261
 						<strong>', $txt['paid_username'], ':</strong><br>
258 262
 						<span class="smalltext">', $txt['one_username'], '</span>
@@ -260,6 +264,7 @@  discard block
 block discarded – undo
260 264
 					<dd>
261 265
 						<input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30">
262 266
 					</dd>';
267
+	}
263 268
 
264 269
 	echo '
265 270
 					<dt>
@@ -277,9 +282,10 @@  discard block
 block discarded – undo
277 282
 					<select name="year" id="year" onchange="generateDays();">';
278 283
 
279 284
 	// Show a list of all the years we allow...
280
-	for ($year = 2005; $year <= 2030; $year++)
281
-		echo '
285
+	for ($year = 2005; $year <= 2030; $year++) {
286
+			echo '
282 287
 						<option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>';
288
+	}
283 289
 
284 290
 	echo '
285 291
 					</select>&nbsp;
@@ -287,9 +293,10 @@  discard block
 block discarded – undo
287 293
 					<select name="month" id="month" onchange="generateDays();">';
288 294
 
289 295
 	// There are 12 months per year - ensure that they all get listed.
290
-	for ($month = 1; $month <= 12; $month++)
291
-		echo '
296
+	for ($month = 1; $month <= 12; $month++) {
297
+			echo '
292 298
 						<option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
299
+	}
293 300
 
294 301
 	echo '
295 302
 					</select>&nbsp;
@@ -297,9 +304,10 @@  discard block
 block discarded – undo
297 304
 					<select name="day" id="day">';
298 305
 
299 306
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
300
-	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++)
301
-		echo '
307
+	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) {
308
+			echo '
302 309
 						<option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>';
310
+	}
303 311
 
304 312
 	echo '
305 313
 					</select>
@@ -311,9 +319,10 @@  discard block
 block discarded – undo
311 319
 					<select name="yearend" id="yearend" onchange="generateDays(\'end\');">';
312 320
 
313 321
 	// Show a list of all the years we allow...
314
-	for ($year = 2005; $year <= 2030; $year++)
315
-		echo '
322
+	for ($year = 2005; $year <= 2030; $year++) {
323
+			echo '
316 324
 						<option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>';
325
+	}
317 326
 
318 327
 	echo '
319 328
 					</select>&nbsp;
@@ -321,9 +330,10 @@  discard block
 block discarded – undo
321 330
 					<select name="monthend" id="monthend" onchange="generateDays(\'end\');">';
322 331
 
323 332
 	// There are 12 months per year - ensure that they all get listed.
324
-	for ($month = 1; $month <= 12; $month++)
325
-		echo '
333
+	for ($month = 1; $month <= 12; $month++) {
334
+			echo '
326 335
 						<option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
336
+	}
327 337
 
328 338
 	echo '
329 339
 					</select>&nbsp;
@@ -331,9 +341,10 @@  discard block
 block discarded – undo
331 341
 					<select name="dayend" id="dayend">';
332 342
 
333 343
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
334
-	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++)
335
-		echo '
344
+	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) {
345
+			echo '
336 346
 						<option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>';
347
+	}
337 348
 
338 349
 	echo '
339 350
 					</select>
@@ -415,8 +426,7 @@  discard block
 block discarded – undo
415 426
 			<div class="information">
416 427
 				', $txt['paid_subs_none'], '
417 428
 			</div>';
418
-	}
419
-	else
429
+	} else
420 430
 	{
421 431
 		echo '
422 432
 			<div class="information">
@@ -428,8 +438,9 @@  discard block
 block discarded – undo
428 438
 		{
429 439
 
430 440
 			// Ignore the inactive ones...
431
-			if (empty($subscription['active']))
432
-				continue;
441
+			if (empty($subscription['active'])) {
442
+							continue;
443
+			}
433 444
 
434 445
 			echo '
435 446
 			<div class="cat_bar">
@@ -439,9 +450,10 @@  discard block
 block discarded – undo
439 450
 				<p><strong>', $subscription['name'], '</strong></p>
440 451
 				<p class="smalltext">', $subscription['desc'], '</p>';
441 452
 
442
-			if (!$subscription['flexible'])
443
-				echo '
453
+			if (!$subscription['flexible']) {
454
+							echo '
444 455
 				<div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>';
456
+			}
445 457
 
446 458
 			if ($context['user']['is_owner'])
447 459
 			{
@@ -454,24 +466,25 @@  discard block
 block discarded – undo
454 466
 				<select name="cur[', $subscription['id'], ']">';
455 467
 
456 468
 					// Print out the costs for this one.
457
-					foreach ($subscription['costs'] as $duration => $value)
458
-						echo '
469
+					foreach ($subscription['costs'] as $duration => $value) {
470
+											echo '
459 471
 					<option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>';
472
+					}
460 473
 
461 474
 					echo '
462 475
 				</select>';
463
-				}
464
-				else
465
-					echo '
476
+				} else {
477
+									echo '
466 478
 				', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']);
479
+				}
467 480
 
468 481
 				echo '
469 482
 				<hr>
470 483
 				<input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button">';
471
-			}
472
-			else
473
-				echo '
484
+			} else {
485
+							echo '
474 486
 				<a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>';
487
+			}
475 488
 
476 489
 			echo '
477 490
 			</div><!-- .windowbg -->';
@@ -498,19 +511,20 @@  discard block
 block discarded – undo
498 511
 			</thead>
499 512
 			<tbody>';
500 513
 
501
-	if (empty($context['current']))
502
-		echo '
514
+	if (empty($context['current'])) {
515
+			echo '
503 516
 				<tr class="windowbg">
504 517
 					<td colspan="4">
505 518
 						', $txt['paid_none_yet'], '
506 519
 					</td>
507 520
 				</tr>';
521
+	}
508 522
 
509 523
 	foreach ($context['current'] as $sub)
510 524
 	{
511 525
 
512
-		if (!$sub['hide'])
513
-			echo '
526
+		if (!$sub['hide']) {
527
+					echo '
514 528
 				<tr class="windowbg">
515 529
 					<td>
516 530
 						', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), '
@@ -521,6 +535,7 @@  discard block
 block discarded – undo
521 535
 					<td>', $sub['start'], '</td>
522 536
 					<td>', $sub['end'], '</td>
523 537
 				</tr>';
538
+		}
524 539
 	}
525 540
 	echo '
526 541
 			</tbody>
@@ -571,15 +586,17 @@  discard block
 block discarded – undo
571 586
 			', $gateway['desc'], '<br>
572 587
 			<form action="', $gateway['form'], '" method="post">';
573 588
 
574
-		if (!empty($gateway['javascript']))
575
-			echo '
589
+		if (!empty($gateway['javascript'])) {
590
+					echo '
576 591
 				<script>
577 592
 					', $gateway['javascript'], '
578 593
 				</script>';
594
+		}
579 595
 
580
-		foreach ($gateway['hidden'] as $name => $value)
581
-			echo '
596
+		foreach ($gateway['hidden'] as $name => $value) {
597
+					echo '
582 598
 				<input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">';
599
+		}
583 600
 
584 601
 		echo '
585 602
 				<br>
Please login to merge, or discard this patch.
Themes/default/Display.template.php 1 patch
Braces   +221 added lines, -151 removed lines patch added patch discarded remove patch
@@ -53,11 +53,13 @@  discard block
 block discarded – undo
53 53
 			<p>';
54 54
 
55 55
 		// Show just numbers...?
56
-		if ($settings['display_who_viewing'] == 1)
57
-			echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
56
+		if ($settings['display_who_viewing'] == 1) {
57
+					echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
58
+		}
58 59
 		// Or show the actual people viewing the topic?
59
-		else
60
-			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'] . ')');
60
+		else {
61
+					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'] . ')');
62
+		}
61 63
 
62 64
 		// Now show how many guests are here too.
63 65
 		echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
@@ -95,10 +97,11 @@  discard block
 block discarded – undo
95 97
 						<dt class="', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
96 98
 						<dd class="statsbar', $option['voted_this'] ? ' voted' : '', '">';
97 99
 
98
-				if ($context['allow_results_view'])
99
-					echo '
100
+				if ($context['allow_results_view']) {
101
+									echo '
100 102
 							', $option['bar_ndt'], '
101 103
 							<span class="percentage">', $option['votes'], ' (', $option['percent'], '%)</span>';
104
+				}
102 105
 
103 106
 				echo '
104 107
 						</dd>';
@@ -107,9 +110,10 @@  discard block
 block discarded – undo
107 110
 			echo '
108 111
 					</dl>';
109 112
 
110
-			if ($context['allow_results_view'])
111
-				echo '
113
+			if ($context['allow_results_view']) {
114
+							echo '
112 115
 					<p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
116
+			}
113 117
 		}
114 118
 		// They are allowed to vote! Go to it!
115 119
 		else
@@ -118,17 +122,19 @@  discard block
 block discarded – undo
118 122
 					<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
119 123
 
120 124
 			// Show a warning if they are allowed more than one option.
121
-			if ($context['poll']['allowed_warning'])
122
-				echo '
125
+			if ($context['poll']['allowed_warning']) {
126
+							echo '
123 127
 						<p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
128
+			}
124 129
 
125 130
 			echo '
126 131
 						<ul class="options">';
127 132
 
128 133
 			// Show each option with its button - a radio likely.
129
-			foreach ($context['poll']['options'] as $option)
130
-				echo '
134
+			foreach ($context['poll']['options'] as $option) {
135
+							echo '
131 136
 							<li>', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
137
+			}
132 138
 
133 139
 			echo '
134 140
 						</ul>
@@ -140,9 +146,10 @@  discard block
 block discarded – undo
140 146
 		}
141 147
 
142 148
 		// Is the clock ticking?
143
-		if (!empty($context['poll']['expire_time']))
144
-			echo '
149
+		if (!empty($context['poll']['expire_time'])) {
150
+					echo '
145 151
 					<p><strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '</p>';
152
+		}
146 153
 
147 154
 		echo '
148 155
 				</div><!-- #poll_options -->
@@ -172,11 +179,13 @@  discard block
 block discarded – undo
172 179
 				<li>
173 180
 					<strong class="event_title"><a href="', $scripturl, '?action=calendar;event=', $event['id'], '">', $event['title'], '</a></strong>';
174 181
 
175
-			if ($event['can_edit'])
176
-				echo ' <a href="' . $event['modify_href'] . '"><span class="generic_icons calendar_modify" title="', $txt['calendar_edit'], '"></span></a>';
182
+			if ($event['can_edit']) {
183
+							echo ' <a href="' . $event['modify_href'] . '"><span class="generic_icons calendar_modify" title="', $txt['calendar_edit'], '"></span></a>';
184
+			}
177 185
 
178
-			if ($event['can_export'])
179
-				echo ' <a href="' . $event['export_href'] . '"><span class="generic_icons calendar_export" title="', $txt['calendar_export'], '"></span></a>';
186
+			if ($event['can_export']) {
187
+							echo ' <a href="' . $event['export_href'] . '"><span class="generic_icons calendar_export" title="', $txt['calendar_export'], '"></span></a>';
188
+			}
180 189
 
181 190
 			echo '
182 191
 					<br>';
@@ -184,14 +193,14 @@  discard block
 block discarded – undo
184 193
 			if (!empty($event['allday']))
185 194
 			{
186 195
 				echo '<time datetime="' . $event['start_iso_gmdate'] . '">', trim($event['start_date_local']), '</time>', ($event['start_date'] != $event['end_date']) ? ' &ndash; <time datetime="' . $event['end_iso_gmdate'] . '">' . trim($event['end_date_local']) . '</time>' : '';
187
-			}
188
-			else
196
+			} else
189 197
 			{
190 198
 				// Display event info relative to user's local timezone
191 199
 				echo '<time datetime="' . $event['start_iso_gmdate'] . '">', trim($event['start_date_local']), ', ', trim($event['start_time_local']), '</time> &ndash; <time datetime="' . $event['end_iso_gmdate'] . '">';
192 200
 
193
-				if ($event['start_date_local'] != $event['end_date_local'])
194
-					echo trim($event['end_date_local']) . ', ';
201
+				if ($event['start_date_local'] != $event['end_date_local']) {
202
+									echo trim($event['end_date_local']) . ', ';
203
+				}
195 204
 
196 205
 				echo trim($event['end_time_local']);
197 206
 
@@ -200,24 +209,28 @@  discard block
 block discarded – undo
200 209
 				{
201 210
 					echo '</time> (<time datetime="' . $event['start_iso_gmdate'] . '">';
202 211
 
203
-					if ($event['start_date_orig'] != $event['start_date_local'] || $event['end_date_orig'] != $event['end_date_local'] || $event['start_date_orig'] != $event['end_date_orig'])
204
-						echo trim($event['start_date_orig']), ', ';
212
+					if ($event['start_date_orig'] != $event['start_date_local'] || $event['end_date_orig'] != $event['end_date_local'] || $event['start_date_orig'] != $event['end_date_orig']) {
213
+											echo trim($event['start_date_orig']), ', ';
214
+					}
205 215
 
206 216
 					echo trim($event['start_time_orig']), '</time> &ndash; <time datetime="' . $event['end_iso_gmdate'] . '">';
207 217
 
208
-					if ($event['start_date_orig'] != $event['end_date_orig'])
209
-						echo trim($event['end_date_orig']) . ', ';
218
+					if ($event['start_date_orig'] != $event['end_date_orig']) {
219
+											echo trim($event['end_date_orig']) . ', ';
220
+					}
210 221
 
211 222
 					echo trim($event['end_time_orig']), ' ', $event['tz_abbrev'], '</time>)';
212 223
 				}
213 224
 				// Event is scheduled in the user's own timezone? Let 'em know, just to avoid confusion
214
-				else
215
-					echo ' ', $event['tz_abbrev'], '</time>';
225
+				else {
226
+									echo ' ', $event['tz_abbrev'], '</time>';
227
+				}
216 228
 			}
217 229
 
218
-			if (!empty($event['location']))
219
-				echo '
230
+			if (!empty($event['location'])) {
231
+							echo '
220 232
 					<br>', $event['location'];
233
+			}
221 234
 
222 235
 			echo '
223 236
 				</li>';
@@ -256,8 +269,9 @@  discard block
 block discarded – undo
256 269
 	$context['removableMessageIDs'] = array();
257 270
 
258 271
 	// Get all the messages...
259
-	while ($message = $context['get_message']())
260
-		template_single_post($message);
272
+	while ($message = $context['get_message']()) {
273
+			template_single_post($message);
274
+	}
261 275
 
262 276
 	echo '
263 277
 			</form>
@@ -295,8 +309,9 @@  discard block
 block discarded – undo
295 309
 		<div id="display_jump_to">&nbsp;</div>';
296 310
 
297 311
 	// Show quickreply
298
-	if ($context['can_reply'])
299
-	template_quickreply();
312
+	if ($context['can_reply']) {
313
+		template_quickreply();
314
+	}
300 315
 
301 316
 	// User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device.
302 317
 	echo '
@@ -311,8 +326,8 @@  discard block
 block discarded – undo
311 326
 		</div>';
312 327
 
313 328
 	// Show the moderation button & pop only if user can moderate
314
-	if ($context['can_moderate_forum'] || $context['user']['is_mod'])
315
-		echo '
329
+	if ($context['can_moderate_forum'] || $context['user']['is_mod']) {
330
+			echo '
316 331
 		<div id="mobile_moderation" class="popup_container">
317 332
 			<div class="popup_window description">
318 333
 				<div class="popup_heading">
@@ -324,6 +339,7 @@  discard block
 block discarded – undo
324 339
 				</div>
325 340
 			</div>
326 341
 		</div>';
342
+	}
327 343
 
328 344
 		echo '
329 345
 		<script>';
@@ -447,9 +463,10 @@  discard block
 block discarded – undo
447 463
 				});
448 464
 			}';
449 465
 
450
-	if (!empty($context['ignoredMsgs']))
451
-		echo '
466
+	if (!empty($context['ignoredMsgs'])) {
467
+			echo '
452 468
 			ignore_toggles([', implode(', ', $context['ignoredMsgs']), '], ', JavaScriptEscape($txt['show_ignore_user_post']), ');';
469
+	}
453 470
 
454 471
 	echo '
455 472
 		</script>';
@@ -466,8 +483,9 @@  discard block
 block discarded – undo
466 483
 
467 484
 	$ignoring = false;
468 485
 
469
-	if ($message['can_remove'])
470
-		$context['removableMessageIDs'][] = $message['id'];
486
+	if ($message['can_remove']) {
487
+			$context['removableMessageIDs'][] = $message['id'];
488
+	}
471 489
 
472 490
 	// Are we ignoring this message?
473 491
 	if (!empty($message['is_ignored']))
@@ -494,9 +512,10 @@  discard block
 block discarded – undo
494 512
 							<div class="custom_fields_above_member">
495 513
 								<ul class="nolist">';
496 514
 
497
-		foreach ($message['custom_fields']['above_member'] as $custom)
498
-			echo '
515
+		foreach ($message['custom_fields']['above_member'] as $custom) {
516
+					echo '
499 517
 									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
518
+		}
500 519
 
501 520
 		echo '
502 521
 								</ul>
@@ -507,9 +526,10 @@  discard block
 block discarded – undo
507 526
 							<h4>';
508 527
 
509 528
 	// Show online and offline buttons?
510
-	if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
511
-		echo '
529
+	if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) {
530
+			echo '
512 531
 								', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>', $context['can_send_pm'] ? '</a>' : '';
532
+	}
513 533
 
514 534
 
515 535
 	// Show a link to the member's profile.
@@ -522,51 +542,59 @@  discard block
 block discarded – undo
522 542
 
523 543
 
524 544
 	// Show the user's avatar.
525
-	if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
526
-		echo '
545
+	if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) {
546
+			echo '
527 547
 								<li class="avatar">
528 548
 									<a href="', $message['member']['href'], '">', $message['member']['avatar']['image'], '</a>
529 549
 								</li>';
550
+	}
530 551
 
531 552
 	// Are there any custom fields below the avatar?
532
-	if (!empty($message['custom_fields']['below_avatar']))
533
-		foreach ($message['custom_fields']['below_avatar'] as $custom)
553
+	if (!empty($message['custom_fields']['below_avatar'])) {
554
+			foreach ($message['custom_fields']['below_avatar'] as $custom)
534 555
 			echo '
535 556
 								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
557
+	}
536 558
 
537 559
 	// Show the post group icons, but not for guests.
538
-	if (!$message['member']['is_guest'])
539
-		echo '
560
+	if (!$message['member']['is_guest']) {
561
+			echo '
540 562
 								<li class="icons">', $message['member']['group_icons'], '</li>';
563
+	}
541 564
 
542 565
 	// Show the member's primary group (like 'Administrator') if they have one.
543
-	if (!empty($message['member']['group']))
544
-		echo '
566
+	if (!empty($message['member']['group'])) {
567
+			echo '
545 568
 								<li class="membergroup">', $message['member']['group'], '</li>';
569
+	}
546 570
 
547 571
 	// Show the member's custom title, if they have one.
548
-	if (!empty($message['member']['title']))
549
-		echo '
572
+	if (!empty($message['member']['title'])) {
573
+			echo '
550 574
 								<li class="title">', $message['member']['title'], '</li>';
575
+	}
551 576
 
552 577
 	// Don't show these things for guests.
553 578
 	if (!$message['member']['is_guest'])
554 579
 	{
555 580
 
556 581
 		// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
557
-		if ((empty($modSettings['hide_post_group']) || empty($message['member']['group'])) && !empty($message['member']['post_group']))
558
-			echo '
582
+		if ((empty($modSettings['hide_post_group']) || empty($message['member']['group'])) && !empty($message['member']['post_group'])) {
583
+					echo '
559 584
 								<li class="postgroup">', $message['member']['post_group'], '</li>';
585
+		}
560 586
 
561 587
 		// Show how many posts they have made.
562
-		if (!isset($context['disabled_fields']['posts']))
563
-			echo '
588
+		if (!isset($context['disabled_fields']['posts'])) {
589
+					echo '
564 590
 								<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
591
+		}
565 592
 
566 593
 		// Show their personal text?
567
-		if (!empty($modSettings['show_blurb']) && !empty($message['member']['blurb']))
568
-			echo '
594
+		if (!empty($modSettings['show_blurb']) && !empty($message['member']['blurb'])) {
595
+					echo '
569 596
 								<li class="blurb">', $message['member']['blurb'], '</li>';
597
+		}
570 598
 
571 599
 		// Any custom fields to show as icons?
572 600
 		if (!empty($message['custom_fields']['icons']))
@@ -575,9 +603,10 @@  discard block
 block discarded – undo
575 603
 								<li class="im_icons">
576 604
 									<ol>';
577 605
 
578
-			foreach ($message['custom_fields']['icons'] as $custom)
579
-				echo '
606
+			foreach ($message['custom_fields']['icons'] as $custom) {
607
+							echo '
580 608
 										<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
609
+			}
581 610
 
582 611
 			echo '
583 612
 									</ol>
@@ -592,19 +621,22 @@  discard block
 block discarded – undo
592 621
 									<ol class="profile_icons">';
593 622
 
594 623
 			// Don't show an icon if they haven't specified a website.
595
-			if (!empty($message['member']['website']['url']) && !isset($context['disabled_fields']['website']))
596
-				echo '
624
+			if (!empty($message['member']['website']['url']) && !isset($context['disabled_fields']['website'])) {
625
+							echo '
597 626
 										<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank">', ($settings['use_image_buttons'] ? '<span class="generic_icons www centericon" title="' . $message['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>';
627
+			}
598 628
 
599 629
 			// Since we know this person isn't a guest, you *can* message them.
600
-			if ($context['can_send_pm'])
601
-				echo '
630
+			if ($context['can_send_pm']) {
631
+							echo '
602 632
 										<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<span class="generic_icons im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . ' centericon" title="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '"></span> ' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
633
+			}
603 634
 
604 635
 			// Show the email if necessary
605
-			if (!empty($message['member']['email']) && $message['member']['show_email'])
606
-				echo '
636
+			if (!empty($message['member']['email']) && $message['member']['show_email']) {
637
+							echo '
607 638
 										<li class="email"><a href="mailto:' . $message['member']['email'] . '" rel="nofollow">', ($settings['use_image_buttons'] ? '<span class="generic_icons mail centericon" title="' . $txt['email'] . '"></span>' : $txt['email']), '</a></li>';
639
+			}
608 640
 
609 641
 				echo '
610 642
 									</ol>
@@ -612,48 +644,56 @@  discard block
 block discarded – undo
612 644
 		}
613 645
 
614 646
 		// Any custom fields for standard placement?
615
-		if (!empty($message['custom_fields']['standard']))
616
-			foreach ($message['custom_fields']['standard'] as $custom)
647
+		if (!empty($message['custom_fields']['standard'])) {
648
+					foreach ($message['custom_fields']['standard'] as $custom)
617 649
 				echo '
618 650
 								<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
651
+		}
619 652
 
620 653
 	}
621 654
 	// Otherwise, show the guest's email.
622
-	elseif (!empty($message['member']['email']) && $message['member']['show_email'])
623
-		echo '
655
+	elseif (!empty($message['member']['email']) && $message['member']['show_email']) {
656
+			echo '
624 657
 								<li class="email"><a href="mailto:' . $message['member']['email'] . '" rel="nofollow">', ($settings['use_image_buttons'] ? '<span class="generic_icons mail centericon" title="' . $txt['email'] . '"></span>' : $txt['email']), '</a></li>';
658
+	}
625 659
 
626 660
 	// Show the IP to this user for this post - because you can moderate?
627
-	if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
628
-		echo '
661
+	if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) {
662
+			echo '
629 663
 								<li class="poster_ip"><a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);" class="help">(?)</a></li>';
664
+	}
630 665
 
631 666
 	// Or, should we show it because this is you?
632
-	elseif ($message['can_see_ip'])
633
-		echo '
667
+	elseif ($message['can_see_ip']) {
668
+			echo '
634 669
 								<li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $message['member']['ip'], '</a></li>';
670
+	}
635 671
 
636 672
 	// Okay, are you at least logged in? Then we can show something about why IPs are logged...
637
-	elseif (!$context['user']['is_guest'])
638
-		echo '
673
+	elseif (!$context['user']['is_guest']) {
674
+			echo '
639 675
 								<li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $txt['logged'], '</a></li>';
676
+	}
640 677
 
641 678
 	// Otherwise, you see NOTHING!
642
-	else
643
-		echo '
679
+	else {
680
+			echo '
644 681
 								<li class="poster_ip">', $txt['logged'], '</li>';
682
+	}
645 683
 
646 684
 	// Are we showing the warning status?
647 685
 	// Don't show these things for guests.
648
-	if (!$message['member']['is_guest'] && $message['member']['can_see_warning'])
649
-		echo '
686
+	if (!$message['member']['is_guest'] && $message['member']['can_see_warning']) {
687
+			echo '
650 688
 								<li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<span class="generic_icons warning_', $message['member']['warning_status'], '"></span> ', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
689
+	}
651 690
 
652 691
 	// Are there any custom fields to show at the bottom of the poster info?
653
-	if (!empty($message['custom_fields']['bottom_poster']))
654
-		foreach ($message['custom_fields']['bottom_poster'] as $custom)
692
+	if (!empty($message['custom_fields']['bottom_poster'])) {
693
+			foreach ($message['custom_fields']['bottom_poster'] as $custom)
655 694
 			echo '
656 695
 								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
696
+	}
657 697
 
658 698
 	// Poster info ends.
659 699
 	echo '
@@ -682,9 +722,10 @@  discard block
 block discarded – undo
682 722
 	echo '
683 723
 									<span class="smalltext modified floatright', !empty($modSettings['show_modify']) && !empty($message['modified']['name']) ? ' mvisible' : '','" id="modified_', $message['id'], '">';
684 724
 
685
-	if (!empty($modSettings['show_modify']) && !empty($message['modified']['name']))
686
-		echo
725
+	if (!empty($modSettings['show_modify']) && !empty($message['modified']['name'])) {
726
+			echo
687 727
 										$message['modified']['last_edit_text'];
728
+	}
688 729
 
689 730
 	echo '
690 731
 									</span>
@@ -693,22 +734,24 @@  discard block
 block discarded – undo
693 734
 							</div><!-- .keyinfo -->';
694 735
 
695 736
 	// Ignoring this user? Hide the post.
696
-	if ($ignoring)
697
-		echo '
737
+	if ($ignoring) {
738
+			echo '
698 739
 							<div id="msg_', $message['id'], '_ignored_prompt">
699 740
 								', $txt['ignoring_user'], '
700 741
 								<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
701 742
 							</div>';
743
+	}
702 744
 
703 745
 	// Show the post itself, finally!
704 746
 	echo '
705 747
 							<div class="post">';
706 748
 
707
-	if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
708
-		echo '
749
+	if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']) {
750
+			echo '
709 751
 								<div class="approve_post">
710 752
 									', $txt['post_awaiting_approval'], '
711 753
 								</div>';
754
+	}
712 755
 	echo '
713 756
 								<div class="inner" data-msgid="', $message['id'], '" id="msg_', $message['id'], '"', $ignoring ? ' style="display:none;"' : '', '>
714 757
 									', $message['body'], '
@@ -727,9 +770,9 @@  discard block
 block discarded – undo
727 770
 		foreach ($message['attachment'] as $attachment)
728 771
 		{
729 772
 			// Do we want this attachment to not be showed here?
730
-			if (!empty($modSettings['dont_show_attach_under_post']) && !empty($context['show_attach_under_post'][$attachment['id']]))
731
-				continue;
732
-			elseif (!$div_output)
773
+			if (!empty($modSettings['dont_show_attach_under_post']) && !empty($context['show_attach_under_post'][$attachment['id']])) {
774
+							continue;
775
+			} elseif (!$div_output)
733 776
 			{
734 777
 				$div_output = true;
735 778
 
@@ -745,9 +788,10 @@  discard block
 block discarded – undo
745 788
 								<fieldset>
746 789
 									<legend>', $txt['attach_awaiting_approve'];
747 790
 
748
-				if ($context['can_approve'])
749
-					echo '
791
+				if ($context['can_approve']) {
792
+									echo '
750 793
 										&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
794
+				}
751 795
 
752 796
 				echo '
753 797
 									</legend>';
@@ -761,12 +805,13 @@  discard block
 block discarded – undo
761 805
 				echo '
762 806
 										<div class="attachments_top">';
763 807
 
764
-				if ($attachment['thumbnail']['has_thumb'])
765
-					echo '
808
+				if ($attachment['thumbnail']['has_thumb']) {
809
+									echo '
766 810
 											<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" class="atc_img"></a>';
767
-				else
768
-					echo '
811
+				} else {
812
+									echo '
769 813
 											<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" class="atc_img">';
814
+				}
770 815
 
771 816
 				echo '
772 817
 										</div><!-- .attachments_top -->';
@@ -776,9 +821,10 @@  discard block
 block discarded – undo
776 821
 										<div class="attachments_bot">
777 822
 											<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.png" class="centericon" alt="*">&nbsp;' . $attachment['name'] . '</a> ';
778 823
 
779
-			if (!$attachment['is_approved'] && $context['can_approve'])
780
-				echo '
824
+			if (!$attachment['is_approved'] && $context['can_approve']) {
825
+							echo '
781 826
 											[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
827
+			}
782 828
 			echo '
783 829
 											<br>', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . '<br>' . sprintf($txt['attach_viewed'], $attachment['downloads']) : '<br>' . sprintf($txt['attach_downloaded'], $attachment['downloads'])), '
784 830
 										</div><!-- .attachments_bot -->';
@@ -787,35 +833,40 @@  discard block
 block discarded – undo
787 833
 									</div><!-- .attached -->';
788 834
 
789 835
 			// Next attachment line ?
790
-			if (++$i % $attachments_per_line === 0)
791
-				echo '
836
+			if (++$i % $attachments_per_line === 0) {
837
+							echo '
792 838
 									<br>';
839
+			}
793 840
 		}
794 841
 
795 842
 		// If we had unapproved attachments clean up.
796
-		if ($last_approved_state == 0)
797
-			echo '
843
+		if ($last_approved_state == 0) {
844
+					echo '
798 845
 								</fieldset>';
846
+		}
799 847
 
800 848
 		// Only do this if we output a div above - otherwise it'll break things
801
-		if ($div_output)
802
-			echo '
849
+		if ($div_output) {
850
+					echo '
803 851
 							</div><!-- #msg_[id]_footer -->';
852
+		}
804 853
 	}
805 854
 
806 855
 	// And stuff below the attachments.
807
-	if ($context['can_report_moderator'] || !empty($modSettings['enable_likes']) || $message['can_approve'] || $message['can_unapprove'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'] || $context['can_quote'])
808
-		echo '
856
+	if ($context['can_report_moderator'] || !empty($modSettings['enable_likes']) || $message['can_approve'] || $message['can_unapprove'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'] || $context['can_quote']) {
857
+			echo '
809 858
 							<div class="under_message">';
859
+	}
810 860
 
811 861
 	// Maybe they want to report this post to the moderator(s)?
812
-	if ($context['can_report_moderator'])
813
-		echo '
862
+	if ($context['can_report_moderator']) {
863
+			echo '
814 864
 								<ul class="floatright smalltext">
815 865
 									<li class="report_link">
816 866
 										<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a>
817 867
 									</li>
818 868
 								</ul>';
869
+	}
819 870
 
820 871
 	// What about likes?
821 872
 	if (!empty($modSettings['enable_likes']))
@@ -862,78 +913,91 @@  discard block
 block discarded – undo
862 913
 								<ul class="quickbuttons">';
863 914
 
864 915
 		// Can they quote? if so they can select and quote as well!
865
-		if ($context['can_quote'])
866
-			echo '
916
+		if ($context['can_quote']) {
917
+					echo '
867 918
 									<li><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'], ');"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>
868 919
 									<li style="display:none;" id="quoteSelected_', $message['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'], '</a></li>';
920
+		}
869 921
 
870 922
 		// Can the user modify the contents of this post? Show the modify inline image.
871
-		if ($message['can_modify'])
872
-			echo '
923
+		if ($message['can_modify']) {
924
+					echo '
873 925
 									<li class="quick_edit"><a title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\', \'', !empty($modSettings['toggle_subject']), '\')"><span class="generic_icons quick_edit_button"></span>', $txt['quick_edit'], '</a></li>';
926
+		}
874 927
 
875
-		if ($message['can_approve'] || $message['can_unapprove'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
876
-			echo '
928
+		if ($message['can_approve'] || $message['can_unapprove'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) {
929
+					echo '
877 930
 									<li class="post_options">', $txt['post_options'];
931
+		}
878 932
 
879 933
 		echo '
880 934
 										<ul>';
881 935
 
882 936
 		// Can the user modify the contents of this post?
883
-		if ($message['can_modify'])
884
-			echo '
937
+		if ($message['can_modify']) {
938
+					echo '
885 939
 											<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '"><span class="generic_icons modify_button"></span>', $txt['modify'], '</a></li>';
940
+		}
886 941
 
887 942
 		// How about... even... remove it entirely?!
888
-		if ($context['can_delete'] && ($context['topic_first_message'] == $message['id']))
889
-			echo '
943
+		if ($context['can_delete'] && ($context['topic_first_message'] == $message['id'])) {
944
+					echo '
890 945
 											<li><a href="', $scripturl, '?action=removetopic2;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['are_sure_remove_topic'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove_topic'], '</a></li>';
891
-		elseif ($message['can_remove'] && ($context['topic_first_message'] != $message['id']))
892
-			echo '
946
+		} elseif ($message['can_remove'] && ($context['topic_first_message'] != $message['id'])) {
947
+					echo '
893 948
 											<li><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message_question'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
949
+		}
894 950
 
895 951
 		// What about splitting it off the rest of the topic?
896
-		if ($context['can_split'] && !empty($context['real_num_replies']))
897
-			echo '
952
+		if ($context['can_split'] && !empty($context['real_num_replies'])) {
953
+					echo '
898 954
 											<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '"><span class="generic_icons split_button"></span>', $txt['split'], '</a></li>';
955
+		}
899 956
 
900 957
 		// Can we issue a warning because of this post? Remember, we can't give guests warnings.
901
-		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
902
-			echo '
958
+		if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest']) {
959
+					echo '
903 960
 											<li><a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><span class="generic_icons warn_button"></span>', $txt['issue_warning'], '</a></li>';
961
+		}
904 962
 
905 963
 		// Can we restore topics?
906
-		if ($context['can_restore_msg'])
907
-			echo '
964
+		if ($context['can_restore_msg']) {
965
+					echo '
908 966
 											<li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons restore_button"></span>', $txt['restore_message'], '</a></li>';
967
+		}
909 968
 
910 969
 		// Maybe we can approve it, maybe we should?
911
-		if ($message['can_approve'])
912
-			echo '
970
+		if ($message['can_approve']) {
971
+					echo '
913 972
 											<li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons approve_button"></span>', $txt['approve'], '</a></li>';
973
+		}
914 974
 
915 975
 		// Maybe we can unapprove it?
916
-		if ($message['can_unapprove'])
917
-			echo '
976
+		if ($message['can_unapprove']) {
977
+					echo '
918 978
 											<li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons unapprove_button"></span>', $txt['unapprove'], '</a></li>';
979
+		}
919 980
 
920 981
 		echo '
921 982
 										</ul>
922 983
 									</li>';
923 984
 
924 985
 		// Show a checkbox for quick moderation?
925
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
926
-			echo '
986
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) {
987
+					echo '
927 988
 									<li style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
989
+		}
928 990
 
929
-		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
930
-			echo '
991
+		if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) {
992
+					echo '
931 993
 								</ul><!-- .quickbuttons -->';
994
+		}
932 995
 	}
933 996
 
934
-	if ($context['can_report_moderator'] || !empty($modSettings['enable_likes']) || $message['can_approve'] || $message['can_unapprove'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'] || $context['can_quote'])
935
-		echo '
997
+	if ($context['can_report_moderator'] || !empty($modSettings['enable_likes']) || $message['can_approve'] || $message['can_unapprove'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'] || $context['can_quote']) {
998
+			echo '
936 999
 							</div><!-- .under_message -->';
1000
+	}
937 1001
 
938 1002
 	echo '
939 1003
 						</div><!-- .postarea -->
@@ -946,9 +1010,10 @@  discard block
 block discarded – undo
946 1010
 							<div class="custom_fields_above_signature">
947 1011
 								<ul class="nolist">';
948 1012
 
949
-		foreach ($message['custom_fields']['above_signature'] as $custom)
950
-			echo '
1013
+		foreach ($message['custom_fields']['above_signature'] as $custom) {
1014
+					echo '
951 1015
 									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
1016
+		}
952 1017
 
953 1018
 		echo '
954 1019
 								</ul>
@@ -956,11 +1021,12 @@  discard block
 block discarded – undo
956 1021
 	}
957 1022
 
958 1023
 	// Show the member's signature?
959
-	if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
960
-		echo '
1024
+	if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) {
1025
+			echo '
961 1026
 							<div class="signature" id="msg_', $message['id'], '_signature"', $ignoring ? ' style="display:none;"' : '', '>
962 1027
 								', $message['member']['signature'], '
963 1028
 							</div>';
1029
+	}
964 1030
 
965 1031
 
966 1032
 	// Are there any custom profile fields for below the signature?
@@ -970,9 +1036,10 @@  discard block
 block discarded – undo
970 1036
 							<div class="custom_fields_below_signature">
971 1037
 								<ul class="nolist">';
972 1038
 
973
-		foreach ($message['custom_fields']['below_signature'] as $custom)
974
-			echo '
1039
+		foreach ($message['custom_fields']['below_signature'] as $custom) {
1040
+					echo '
975 1041
 									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
1042
+		}
976 1043
 
977 1044
 		echo '
978 1045
 								</ul>
@@ -1022,8 +1089,8 @@  discard block
 block discarded – undo
1022 1089
 						<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '">';
1023 1090
 
1024 1091
 	// Guests just need more.
1025
-	if ($context['user']['is_guest'])
1026
-		echo '
1092
+	if ($context['user']['is_guest']) {
1093
+			echo '
1027 1094
 						<dl id="post_header">
1028 1095
 							<dt>
1029 1096
 								', $txt['name'], ':
@@ -1038,6 +1105,7 @@  discard block
 block discarded – undo
1038 1105
 								<input type="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" required>
1039 1106
 							</dd>
1040 1107
 						</dl>';
1108
+	}
1041 1109
 
1042 1110
 	echo '
1043 1111
 						', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
@@ -1085,8 +1153,8 @@  discard block
 block discarded – undo
1085 1153
 		<br class="clear">';
1086 1154
 
1087 1155
 	// draft autosave available and the user has it enabled?
1088
-	if (!empty($context['drafts_autosave']))
1089
-		echo '
1156
+	if (!empty($context['drafts_autosave'])) {
1157
+			echo '
1090 1158
 		<script>
1091 1159
 			var oDraftAutoSave = new smf_DraftAutoSave({
1092 1160
 				sSelf: \'oDraftAutoSave\',
@@ -1098,12 +1166,14 @@  discard block
 block discarded – undo
1098 1166
 				iFreq: ', (empty($modSettings['masterAutoSaveDraftsDelay']) ? 60000 : $modSettings['masterAutoSaveDraftsDelay'] * 1000), '
1099 1167
 			});
1100 1168
 		</script>';
1169
+	}
1101 1170
 
1102
-	if ($context['show_spellchecking'])
1103
-		echo '
1171
+	if ($context['show_spellchecking']) {
1172
+			echo '
1104 1173
 		<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow">
1105 1174
 			<input type="hidden" name="spellstring" value="">
1106 1175
 		</form>';
1176
+	}
1107 1177
 
1108 1178
 	echo '
1109 1179
 		<script>
Please login to merge, or discard this patch.
Themes/default/ManageNews.template.php 1 patch
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,9 +18,10 @@  discard block
 block discarded – undo
18 18
 	global $context, $txt, $scripturl;
19 19
 
20 20
 	// Are we done sending the newsletter?
21
-	if (!empty($context['newsletter_sent']))
22
-		echo '
21
+	if (!empty($context['newsletter_sent'])) {
22
+			echo '
23 23
 	<div class="infobox">', $txt['admin_news_newsletter_' . $context['newsletter_sent']], '</div>';
24
+	}
24 25
 
25 26
 	echo '
26 27
 	<div id="admincenter">
@@ -39,9 +40,10 @@  discard block
 block discarded – undo
39 40
 					</dt>
40 41
 					<dd>';
41 42
 
42
-	foreach ($context['groups'] as $group)
43
-		echo '
43
+	foreach ($context['groups'] as $group) {
44
+			echo '
44 45
 						<label for="groups_', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
46
+	}
45 47
 
46 48
 	echo '
47 49
 						<br>
@@ -82,9 +84,10 @@  discard block
 block discarded – undo
82 84
 						</dt>
83 85
 						<dd>';
84 86
 
85
-	foreach ($context['groups'] as $group)
86
-		echo '
87
+	foreach ($context['groups'] as $group) {
88
+			echo '
87 89
 							<label for="exclude_groups_', $group['id'], '"><input type="checkbox" name="exclude_groups[', $group['id'], ']" id="exclude_groups_', $group['id'], '" value="', $group['id'], '"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em><br>';
90
+	}
88 91
 
89 92
 	echo '
90 93
 							<br>
@@ -230,9 +233,10 @@  discard block
 block discarded – undo
230 233
 				<div id="bbcBox_message"></div>';
231 234
 
232 235
 	// What about smileys?
233
-	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
234
-		echo '
236
+	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) {
237
+			echo '
235 238
 				<div id="smileyBox_message"></div>';
239
+	}
236 240
 
237 241
 	// Show BBC buttons, smileys and textbox.
238 242
 	echo '
@@ -253,9 +257,10 @@  discard block
 block discarded – undo
253 257
 			<input type="hidden" name="email_force" value="', $context['email_force'], '">
254 258
 			<input type="hidden" name="total_emails" value="', $context['total_emails'], '">';
255 259
 
256
-	foreach ($context['recipients'] as $key => $values)
257
-		echo '
260
+	foreach ($context['recipients'] as $key => $values) {
261
+			echo '
258 262
 			<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
263
+	}
259 264
 
260 265
 	echo '
261 266
 			<script>';
@@ -411,9 +416,10 @@  discard block
 block discarded – undo
411 416
 				<input type="hidden" name="parse_html" value="', $context['parse_html'], '">';
412 417
 
413 418
 	// All the things we must remember!
414
-	foreach ($context['recipients'] as $key => $values)
415
-		echo '
419
+	foreach ($context['recipients'] as $key => $values) {
420
+			echo '
416 421
 				<input type="hidden" name="', $key, '" value="', implode(($key == 'emails' ? ';' : ','), $values), '">';
422
+	}
417 423
 
418 424
 	echo '
419 425
 			</div><!-- .windowbg -->
@@ -446,9 +452,10 @@  discard block
 block discarded – undo
446 452
 {
447 453
 	global $context, $txt;
448 454
 
449
-	if (!empty($context['saved_successful']))
450
-		echo '
455
+	if (!empty($context['saved_successful'])) {
456
+			echo '
451 457
 			<div class="infobox">', $txt['settings_saved'], '</div>';
458
+	}
452 459
 
453 460
 	template_show_list('news_lists');
454 461
 }
Please login to merge, or discard this patch.
Themes/default/Stats.template.php 1 patch
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -44,10 +44,11 @@  discard block
 block discarded – undo
44 44
 				<dt>', $txt['users_online_today'], ':</dt>
45 45
 				<dd>', $context['online_today'], '</dd>';
46 46
 
47
-	if (!empty($modSettings['hitStats']))
48
-		echo '
47
+	if (!empty($modSettings['hitStats'])) {
48
+			echo '
49 49
 				<dt>', $txt['num_hits'], ':</dt>
50 50
 				<dd>', $context['num_hits'], '</dd>';
51
+	}
51 52
 
52 53
 	echo '
53 54
 			</dl>
@@ -71,17 +72,19 @@  discard block
 block discarded – undo
71 72
 				<dt>', $txt['gender_stats'], ':</dt>
72 73
 				<dd>';
73 74
 
74
-		foreach ($context['gender'] as $g => $n)
75
-			echo $g, ': ', $n, '<br>';
75
+		foreach ($context['gender'] as $g => $n) {
76
+					echo $g, ': ', $n, '<br>';
77
+		}
76 78
 
77 79
 		echo '
78 80
 				</dd>';
79 81
 	}
80 82
 
81
-	if (!empty($modSettings['hitStats']))
82
-		echo '
83
+	if (!empty($modSettings['hitStats'])) {
84
+			echo '
83 85
 				<dt>', $txt['average_hits'], ':</dt>
84 86
 				<dd>', $context['average_hits'], '</dd>';
87
+	}
85 88
 
86 89
 	echo '
87 90
 			</dl>';
@@ -105,14 +108,15 @@  discard block
 block discarded – undo
105 108
 					</dt>
106 109
 					<dd class="statsbar">';
107 110
 
108
-			if (!empty($item['percent']))
109
-				echo '
111
+			if (!empty($item['percent'])) {
112
+							echo '
110 113
 						<div class="bar" style="width: ', $item['percent'], '%;">
111 114
 							<span class="righttext">', $item['num'], '</span>
112 115
 						</div>';
113
-			else
114
-				echo '
116
+			} else {
117
+							echo '
115 118
 						<div class="bar empty"><span class="righttext">', $item['num'], '</span></div>';
119
+			}
116 120
 
117 121
 			echo '
118 122
 					</dd>';
@@ -144,9 +148,10 @@  discard block
 block discarded – undo
144 148
 					<th>', $txt['stats_new_members'], '</th>
145 149
 					<th>', $txt['most_online'], '</th>';
146 150
 
147
-		if (!empty($modSettings['hitStats']))
148
-			echo '
151
+		if (!empty($modSettings['hitStats'])) {
152
+					echo '
149 153
 					<th>', $txt['page_views'], '</th>';
154
+		}
150 155
 
151 156
 		echo '
152 157
 				</tr>
@@ -165,9 +170,10 @@  discard block
 block discarded – undo
165 170
 					<th>', $year['new_members'], '</th>
166 171
 					<th>', $year['most_members_online'], '</th>';
167 172
 
168
-			if (!empty($modSettings['hitStats']))
169
-				echo '
173
+			if (!empty($modSettings['hitStats'])) {
174
+							echo '
170 175
 					<th>', $year['hits'], '</th>';
176
+			}
171 177
 
172 178
 			echo '
173 179
 				</tr>';
@@ -184,9 +190,10 @@  discard block
 block discarded – undo
184 190
 					<th>', $month['new_members'], '</th>
185 191
 					<th>', $month['most_members_online'], '</th>';
186 192
 
187
-				if (!empty($modSettings['hitStats']))
188
-					echo '
193
+				if (!empty($modSettings['hitStats'])) {
194
+									echo '
189 195
 					<th>', $month['hits'], '</th>';
196
+				}
190 197
 
191 198
 				echo '
192 199
 				</tr>';
@@ -203,9 +210,10 @@  discard block
 block discarded – undo
203 210
 					<td>', $day['new_members'], '</td>
204 211
 					<td>', $day['most_members_online'], '</td>';
205 212
 
206
-						if (!empty($modSettings['hitStats']))
207
-							echo '
213
+						if (!empty($modSettings['hitStats'])) {
214
+													echo '
208 215
 					<td>', $day['hits'], '</td>';
216
+						}
209 217
 
210 218
 						echo '
211 219
 				</tr>';
Please login to merge, or discard this patch.
Themes/default/ModerationCenter.template.php 1 patch
Braces   +56 added lines, -39 removed lines patch added patch discarded remove patch
@@ -55,18 +55,20 @@  discard block
 block discarded – undo
55 55
 			<div class="modbox">
56 56
 				<ul>';
57 57
 
58
-		foreach ($context['group_requests'] as $request)
59
-			echo '
58
+		foreach ($context['group_requests'] as $request) {
59
+					echo '
60 60
 					<li class="smalltext">
61 61
 						<a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], '
62 62
 					</li>';
63
+		}
63 64
 
64 65
 		// Don't have any watched users right now?
65
-		if (empty($context['group_requests']))
66
-			echo '
66
+		if (empty($context['group_requests'])) {
67
+					echo '
67 68
 					<li>
68 69
 						<strong class="smalltext">', $txt['mc_group_requests_none'], '</strong>
69 70
 					</li>';
71
+		}
70 72
 
71 73
 		echo '
72 74
 				</ul>
@@ -124,18 +126,20 @@  discard block
 block discarded – undo
124 126
 			<div class="modbox">
125 127
 				<ul>';
126 128
 
127
-		foreach ($context['watched_users'] as $user)
128
-			echo '
129
+		foreach ($context['watched_users'] as $user) {
130
+					echo '
129 131
 					<li>
130 132
 						<span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span>
131 133
 					</li>';
134
+		}
132 135
 
133 136
 		// Don't have any watched users right now?
134
-		if (empty($context['watched_users']))
135
-			echo '
137
+		if (empty($context['watched_users'])) {
138
+					echo '
136 139
 					<li>
137 140
 						<strong class="smalltext">', $txt['mc_watched_users_none'], '</strong>
138 141
 					</li>';
142
+		}
139 143
 
140 144
 		echo '
141 145
 				</ul>
@@ -193,18 +197,20 @@  discard block
 block discarded – undo
193 197
 			<div class="modbox">
194 198
 				<ul>';
195 199
 
196
-		foreach ($context['reported_posts'] as $post)
197
-			echo '
200
+		foreach ($context['reported_posts'] as $post) {
201
+					echo '
198 202
 					<li>
199 203
 						<span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span>
200 204
 					</li>';
205
+		}
201 206
 
202 207
 		// Don't have any watched users right now?
203
-		if (empty($context['reported_posts']))
204
-			echo '
208
+		if (empty($context['reported_posts'])) {
209
+					echo '
205 210
 					<li>
206 211
 						<strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong>
207 212
 					</li>';
213
+		}
208 214
 
209 215
 		echo '
210 216
 				</ul>
@@ -262,18 +268,20 @@  discard block
 block discarded – undo
262 268
 			<div class="modbox">
263 269
 				<ul>';
264 270
 
265
-		foreach ($context['reported_users'] as $user)
266
-			echo '
271
+		foreach ($context['reported_users'] as $user) {
272
+					echo '
267 273
 					<li>
268 274
 						<span class="smalltext">', $user['user']['link'], '</span>
269 275
 					</li>';
276
+		}
270 277
 
271 278
 		// Don't have any watched users right now?
272
-		if (empty($context['reported_users']))
273
-			echo '
279
+		if (empty($context['reported_users'])) {
280
+					echo '
274 281
 					<li>
275 282
 						<strong class="smalltext">', $txt['mc_reported_users_none'], '</strong>
276 283
 					</li>';
284
+		}
277 285
 
278 286
 		echo '
279 287
 				</ul>
@@ -344,11 +352,12 @@  discard block
 block discarded – undo
344 352
 						<ul class="moderation_notes">';
345 353
 
346 354
 		// Cycle through the notes.
347
-		foreach ($context['notes'] as $note)
348
-			echo '
355
+		foreach ($context['notes'] as $note) {
356
+					echo '
349 357
 							<li class="smalltext">
350 358
 								', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '
351 359
 							</li>';
360
+		}
352 361
 
353 362
 		echo '
354 363
 						</ul>
@@ -390,18 +399,19 @@  discard block
 block discarded – undo
390 399
 	$remove_button = create_button('delete', 'remove_message', 'remove');
391 400
 
392 401
 	// No posts?
393
-	if (empty($context['unapproved_items']))
394
-		echo '
402
+	if (empty($context['unapproved_items'])) {
403
+			echo '
395 404
 			<div class="windowbg2">
396 405
 				<p class="centertext">
397 406
 					', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '
398 407
 				</p>
399 408
 			</div>';
400
-	else
401
-		echo '
409
+	} else {
410
+			echo '
402 411
 			<div class="pagesection floatleft">
403 412
 				', $context['page_index'], '
404 413
 			</div>';
414
+	}
405 415
 
406 416
 	foreach ($context['unapproved_items'] as $item)
407 417
 	{
@@ -420,14 +430,16 @@  discard block
 block discarded – undo
420 430
 				<span class="floatright">
421 431
 					<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>';
422 432
 
423
-		if ($item['can_delete'])
424
-			echo '
433
+		if ($item['can_delete']) {
434
+					echo '
425 435
 					', $context['menu_separator'], '
426 436
 					<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>';
437
+		}
427 438
 
428
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
429
-			echo '
439
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
440
+					echo '
430 441
 					<input type="checkbox" name="item[]" value="', $item['id'], '" checked> ';
442
+		}
431 443
 
432 444
 		echo '
433 445
 				</span>
@@ -437,8 +449,8 @@  discard block
 block discarded – undo
437 449
 	echo '
438 450
 			<div class="pagesection">';
439 451
 
440
-	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
441
-		echo '
452
+	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
453
+			echo '
442 454
 				<div class="floatright">
443 455
 					<select name="do" onchange="if (this.value != 0 &amp;&amp; confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();">
444 456
 						<option value="0">', $txt['with_selected'], ':</option>
@@ -450,12 +462,14 @@  discard block
 block discarded – undo
450 462
 						<input type="submit" name="mc_go" value="', $txt['go'], '" class="button">
451 463
 					</noscript>
452 464
 				</div>';
465
+	}
453 466
 
454
-	if (!empty($context['unapproved_items']))
455
-		echo '
467
+	if (!empty($context['unapproved_items'])) {
468
+			echo '
456 469
 				<div class="floatleft">
457 470
 					<div class="pagelinks">', $context['page_index'], '</div>
458 471
 				</div>';
472
+	}
459 473
 
460 474
 	echo '
461 475
 			</div><!-- .pagesection -->
@@ -475,8 +489,9 @@  discard block
 block discarded – undo
475 489
 	global $scripturl, $context, $txt, $delete_button;
476 490
 
477 491
 	// We'll have a delete please bob.
478
-	if (empty($delete_button))
479
-		$delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"');
492
+	if (empty($delete_button)) {
493
+			$delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"');
494
+	}
480 495
 
481 496
 	$output_html = '
482 497
 					<div>
@@ -485,10 +500,11 @@  discard block
 block discarded – undo
485 500
 						</div>
486 501
 						<div class="floatright">';
487 502
 
488
-	if ($post['can_delete'])
489
-		$output_html .= '
503
+	if ($post['can_delete']) {
504
+			$output_html .= '
490 505
 							<a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a>
491 506
 							<input type="checkbox" name="delete[]" value="' . $post['id'] . '">';
507
+	}
492 508
 
493 509
 	$output_html .= '
494 510
 						</div>
@@ -531,12 +547,12 @@  discard block
 block discarded – undo
531 547
 				<input type="submit" name="save" value="', $txt['save'], '" class="button">
532 548
 			</div>
533 549
 		</form>';
534
-	}
535
-	else
536
-		echo '
550
+	} else {
551
+			echo '
537 552
 		<div class="windowbg">
538 553
 			<div class="centertext">', $txt['mc_no_settings'], '</div>
539 554
 		</div>';
555
+	}
540 556
 
541 557
 	echo '
542 558
 	</div><!-- #modcenter -->';
@@ -632,13 +648,14 @@  discard block
 block discarded – undo
632 648
 					</dd>
633 649
 				</dl>';
634 650
 
635
-	if ($context['template_data']['can_edit_personal'])
636
-		echo '
651
+	if ($context['template_data']['can_edit_personal']) {
652
+			echo '
637 653
 				<input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', '>
638 654
 					<label for="make_personal">
639 655
 						<strong>', $txt['mc_warning_template_personal'], '</strong>
640 656
 					</label><br>
641 657
 					<span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span><br>';
658
+	}
642 659
 
643 660
 	echo '
644 661
 				<hr>
Please login to merge, or discard this patch.
Themes/default/ManageCalendar.template.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,9 +40,10 @@  discard block
 block discarded – undo
40 40
 							<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>';
41 41
 
42 42
 	// Show a list of all the years we allow...
43
-	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
44
-		echo '
43
+	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
44
+			echo '
45 45
 							<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>';
46
+	}
46 47
 
47 48
 	echo '
48 49
 						</select>&nbsp;
@@ -50,9 +51,10 @@  discard block
 block discarded – undo
50 51
 						<select name="month" id="month" onchange="generateDays();">';
51 52
 
52 53
 	// There are 12 months per year - ensure that they all get listed.
53
-	for ($month = 1; $month <= 12; $month++)
54
-		echo '
54
+	for ($month = 1; $month <= 12; $month++) {
55
+			echo '
55 56
 							<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
57
+	}
56 58
 
57 59
 	echo '
58 60
 						</select>&nbsp;
@@ -60,23 +62,25 @@  discard block
 block discarded – undo
60 62
 						<select name="day" id="day" onchange="generateDays();">';
61 63
 
62 64
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
63
-	for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
64
-		echo '
65
+	for ($day = 1; $day <= $context['holiday']['last_day']; $day++) {
66
+			echo '
65 67
 							<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>';
68
+	}
66 69
 
67 70
 	echo '
68 71
 						</select>
69 72
 					</dd>
70 73
 				</dl>';
71 74
 
72
-	if ($context['is_new'])
73
-		echo '
75
+	if ($context['is_new']) {
76
+			echo '
74 77
 				<input type="submit" value="', $txt['holidays_button_add'], '" class="button">';
75
-	else
76
-		echo '
78
+	} else {
79
+			echo '
77 80
 				<input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button">
78 81
 				<input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button">
79 82
 				<input type="hidden" name="holiday" value="', $context['holiday']['id'], '">';
83
+	}
80 84
 	echo '
81 85
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
82 86
 			</div><!-- .windowbg2 -->
Please login to merge, or discard this patch.
Themes/default/ReportedContent.template.php 1 patch
Braces   +54 added lines, -36 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
 		// Prepare the comments...
56 56
 		$comments = array();
57 57
 
58
-		foreach ($report['comments'] as $comment)
59
-			$comments[$comment['member']['id']] = $comment['member']['link'];
58
+		foreach ($report['comments'] as $comment) {
59
+					$comments[$comment['member']['id']] = $comment['member']['link'];
60
+		}
60 61
 
61 62
 		echo '
62 63
 				', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), '
@@ -72,18 +73,21 @@  discard block
 block discarded – undo
72 73
 				<li><a href="', $scripturl, '?action=moderate;area=reportedposts;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>';
73 74
 
74 75
 		// Delete message button.
75
-		if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])))
76
-			echo '
76
+		if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) {
77
+					echo '
77 78
 				<li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'], '.0;msg=', $report['topic']['id_msg'], ';modcenter;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['mc_reportedp_delete_confirm'], '" class="you_sure">', $delete_button, '</a></li>';
79
+		}
78 80
 
79 81
 		// Ban this user button.
80
-		if (!$report['closed'] && !empty($context['report_manage_bans']))
81
-			echo '
82
+		if (!$report['closed'] && !empty($context['report_manage_bans'])) {
83
+					echo '
82 84
 				<li><a href="', $scripturl, '?action=admin;area=ban;sa=add', (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']), ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>';
85
+		}
83 86
 
84
-		if (!$context['view_closed'])
85
-			echo '
87
+		if (!$context['view_closed']) {
88
+					echo '
86 89
 				<li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>';
90
+		}
87 91
 
88 92
 			echo '
89 93
 			</ul>
@@ -91,18 +95,20 @@  discard block
 block discarded – undo
91 95
 	}
92 96
 
93 97
 	// Were none found?
94
-	if (empty($context['reports']))
95
-		echo '
98
+	if (empty($context['reports'])) {
99
+			echo '
96 100
 		<div class="windowbg2">
97 101
 			<p class="centertext">', $txt['mc_reportedp_none_found'], '</p>
98 102
 		</div>';
103
+	}
99 104
 
100 105
 	echo '
101 106
 		<div class="pagesection">';
102 107
 	
103
-	if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many'])
104
-		echo '
108
+	if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) {
109
+			echo '
105 110
 			<div class="pagelinks floatleft">' . $context['page_index'] . '</div>';
111
+	}
106 112
 
107 113
 	echo '
108 114
 			<div class="floatright">', !$context['view_closed'] ? '
@@ -133,18 +139,20 @@  discard block
 block discarded – undo
133 139
 			<div class="modbox">
134 140
 				<ul>';
135 141
 
136
-	foreach ($context['reported_posts'] as $report)
137
-		echo '
142
+	foreach ($context['reported_posts'] as $report) {
143
+			echo '
138 144
 					<li class="smalltext">
139 145
 						<a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], '
140 146
 					</li>';
147
+	}
141 148
 
142 149
 	// Don't have any watched users right now?
143
-	if (empty($context['reported_posts']))
144
-		echo '
150
+	if (empty($context['reported_posts'])) {
151
+			echo '
145 152
 					<li>
146 153
 						<strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong>
147 154
 					</li>';
155
+	}
148 156
 
149 157
 	echo '
150 158
 				</ul>
@@ -234,14 +242,15 @@  discard block
 block discarded – undo
234 242
 				<h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3>
235 243
 			</div>';
236 244
 
237
-	foreach ($context['report']['comments'] as $comment)
238
-		echo '
245
+	foreach ($context['report']['comments'] as $comment) {
246
+			echo '
239 247
 			<div class="windowbg">
240 248
 				<p class="smalltext">
241 249
 					', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '
242 250
 				</p>
243 251
 				<p>', $comment['message'], '</p>
244 252
 			</div>';
253
+	}
245 254
 
246 255
 	echo '
247 256
 			<br>
@@ -250,11 +259,12 @@  discard block
 block discarded – undo
250 259
 			</div>
251 260
 			<div>';
252 261
 
253
-	if (empty($context['report']['mod_comments']))
254
-		echo '
262
+	if (empty($context['report']['mod_comments'])) {
263
+			echo '
255 264
 				<div class="information">
256 265
 					<p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p>
257 266
 				</div>';
267
+	}
258 268
 
259 269
 	foreach ($context['report']['mod_comments'] as $comment)
260 270
 	{
@@ -346,18 +356,20 @@  discard block
 block discarded – undo
346 356
 			<div class="modbox">
347 357
 				<ul>';
348 358
 
349
-	foreach ($context['reported_members'] as $report)
350
-		echo '
359
+	foreach ($context['reported_members'] as $report) {
360
+			echo '
351 361
 					<li class="smalltext">
352 362
 						<a href="', $report['report_href'], '">', $report['user_name'], '</a>
353 363
 					</li>';
364
+	}
354 365
 
355 366
 	// Don't have any reported members right now?
356
-	if (empty($context['reported_members']))
357
-		echo '
367
+	if (empty($context['reported_members'])) {
368
+			echo '
358 369
 					<li>
359 370
 						<strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong>
360 371
 					</li>';
372
+	}
361 373
 
362 374
 	echo '
363 375
 				</ul>
@@ -443,8 +455,9 @@  discard block
 block discarded – undo
443 455
 
444 456
 		// Prepare the comments...
445 457
 		$comments = array();
446
-		foreach ($report['comments'] as $comment)
447
-			$comments[$comment['member']['id']] = $comment['member']['link'];
458
+		foreach ($report['comments'] as $comment) {
459
+					$comments[$comment['member']['id']] = $comment['member']['link'];
460
+		}
448 461
 
449 462
 		echo '
450 463
 				', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), '
@@ -456,13 +469,15 @@  discard block
 block discarded – undo
456 469
 				<li><a href="', $scripturl, '?action=moderate;area=reportedmembers;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>';
457 470
 
458 471
 		// Ban this user button.
459
-		if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id']))
460
-			echo '
472
+		if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) {
473
+					echo '
461 474
 				<li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['user']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>';
475
+		}
462 476
 
463
-		if (!$context['view_closed'])
464
-			echo '
477
+		if (!$context['view_closed']) {
478
+					echo '
465 479
 				<li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>';
480
+		}
466 481
 
467 482
 			echo '
468 483
 			</ul>
@@ -470,11 +485,12 @@  discard block
 block discarded – undo
470 485
 	}
471 486
 
472 487
 	// Were none found?
473
-	if (empty($context['reports']))
474
-		echo '
488
+	if (empty($context['reports'])) {
489
+			echo '
475 490
 		<div class="windowbg2">
476 491
 			<p class="centertext">', $txt['mc_reportedp_none_found'], '</p>
477 492
 		</div>';
493
+	}
478 494
 
479 495
 	echo '
480 496
 		<div class="pagesection">
@@ -534,14 +550,15 @@  discard block
 block discarded – undo
534 550
 				<h3 class="catbg">', $txt['mc_memberreport_whoreported_title'], '</h3>
535 551
 			</div>';
536 552
 
537
-	foreach ($context['report']['comments'] as $comment)
538
-		echo '
553
+	foreach ($context['report']['comments'] as $comment) {
554
+			echo '
539 555
 			<div class="windowbg">
540 556
 				<p class="smalltext">
541 557
 					', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '
542 558
 				</p>
543 559
 				<p>', $comment['message'], '</p>
544 560
 			</div>';
561
+	}
545 562
 
546 563
 	echo '
547 564
 			<br>
@@ -550,11 +567,12 @@  discard block
 block discarded – undo
550 567
 			</div>
551 568
 			<div>';
552 569
 
553
-	if (empty($context['report']['mod_comments']))
554
-		echo '
570
+	if (empty($context['report']['mod_comments'])) {
571
+			echo '
555 572
 				<div class="information">
556 573
 					<p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p>
557 574
 				</div>';
575
+	}
558 576
 
559 577
 	foreach ($context['report']['mod_comments'] as $comment)
560 578
 	{
Please login to merge, or discard this patch.
Themes/default/MoveTopic.template.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	// Stick our "create a redirection topic" template in here...
64 64
 	template_redirect_options('move');
65 65
 
66
-    echo '
66
+	echo '
67 67
 					<input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
68 68
 				</div><!-- .move_topic -->
69 69
 			</div><!-- .windowbg -->';
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function template_redirect_options($type)
88 88
 {
89
-    global $txt, $context, $modSettings;
89
+	global $txt, $context, $modSettings;
90 90
 
91
-    echo '
91
+	echo '
92 92
 					<label for="postRedirect">
93 93
 						<input type="checkbox" name="postRedirect" id="postRedirect"', $context['is_approved'] ? ' checked' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt[$type . '_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';"> ', $txt['post_redirection'], '.
94 94
 					</label>
Please login to merge, or discard this patch.
Braces   +25 added lines, -20 removed lines patch added patch discarded remove patch
@@ -37,9 +37,10 @@  discard block
 block discarded – undo
37 37
 		echo '
38 38
 								<optgroup label="', $category['name'], '">';
39 39
 
40
-		foreach ($category['boards'] as $board)
41
-			echo '
40
+		foreach ($category['boards'] as $board) {
41
+					echo '
42 42
 									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=&gt; ' : '', $board['name'], '</option>';
43
+		}
43 44
 		echo '
44 45
 								</optgroup>';
45 46
 	}
@@ -68,9 +69,10 @@  discard block
 block discarded – undo
68 69
 				</div><!-- .move_topic -->
69 70
 			</div><!-- .windowbg -->';
70 71
 
71
-	if ($context['back_to_topic'])
72
-		echo '
72
+	if ($context['back_to_topic']) {
73
+			echo '
73 74
 			<input type="hidden" name="goback" value="1">';
75
+	}
74 76
 
75 77
 	echo '
76 78
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -123,8 +125,7 @@  discard block
 block discarded – undo
123 125
 									<option value="86400">', $txt['two_months'], '</option>
124 126
 								</select>
125 127
 							</dd>';
126
-	}
127
-	else
128
+	} else
128 129
 	{
129 130
 		echo '
130 131
 							<input type="hidden" name="redirect_expires" value="0">';
@@ -221,9 +222,9 @@  discard block
 block discarded – undo
221 222
 						<input type="submit" value="', $txt['go'], '" class="button">
222 223
 					</form>';
223 224
 
225
+	} else {
226
+			echo $txt['target_below'];
224 227
 	}
225
-	else
226
-		echo $txt['target_below'];
227 228
 
228 229
 	echo '		</h4>
229 230
 			</div><!-- .title_bar -->';
@@ -241,12 +242,13 @@  discard block
 block discarded – undo
241 242
 
242 243
 		$merge_button = create_button('merge', 'merge', '');
243 244
 
244
-		foreach ($context['topics'] as $topic)
245
-			echo '
245
+		foreach ($context['topics'] as $topic) {
246
+					echo '
246 247
 						<li>
247 248
 							<a href="', $scripturl, '?action=mergetopics;sa=options;board=', $context['current_board'], '.0;from=', $context['origin_topic'], ';to=', $topic['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $merge_button, '</a>&nbsp;
248 249
 							<a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank">', $topic['subject'], '</a> ', $txt['started_by'], ' ', $topic['poster']['link'], '
249 250
 						</li>';
251
+		}
250 252
 
251 253
 		echo '
252 254
 					</ul>
@@ -255,8 +257,7 @@  discard block
 block discarded – undo
255 257
 				<div class="pagesection">
256 258
 					', $context['page_index'], '
257 259
 				</div>';
258
-	}
259
-	else
260
+	} else
260 261
 	{
261 262
 		// Just a nice "There aren't any topics" message
262 263
 		echo '
@@ -311,8 +312,8 @@  discard block
 block discarded – undo
311 312
 				</thead>
312 313
 				<tbody>';
313 314
 
314
-	foreach ($context['topics'] as $topic)
315
-		echo '
315
+	foreach ($context['topics'] as $topic) {
316
+			echo '
316 317
 					<tr class="windowbg">
317 318
 						<td>
318 319
 							<input type="checkbox" name="topics[]" value="' . $topic['id'] . '" checked>
@@ -332,6 +333,7 @@  discard block
 block discarded – undo
332 333
 							<input type="checkbox" name="notifications[]" value="' . $topic['id'] . '" checked>
333 334
 						</td>
334 335
 					</tr>';
336
+	}
335 337
 	echo '
336 338
 				</tbody>
337 339
 			</table>
@@ -341,9 +343,10 @@  discard block
 block discarded – undo
341 343
 					<legend>', $txt['merge_select_subject'], '</legend>
342 344
 					<select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">';
343 345
 
344
-	foreach ($context['topics'] as $topic)
345
-		echo '
346
+	foreach ($context['topics'] as $topic) {
347
+			echo '
346 348
 						<option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>';
349
+	}
347 350
 	echo '
348 351
 						<option value="0">', $txt['merge_custom_subject'], ':</option>
349 352
 					</select>
@@ -362,11 +365,12 @@  discard block
 block discarded – undo
362 365
 					<legend>', $txt['merge_select_target_board'], '</legend>
363 366
 					<ul>';
364 367
 
365
-		foreach ($context['boards'] as $board)
366
-			echo '
368
+		foreach ($context['boards'] as $board) {
369
+					echo '
367 370
 						<li>
368 371
 							<input type="radio" name="board" value="' . $board['id'] . '"' . ($board['selected'] ? ' checked' : '') . '> ' . $board['name'] . '
369 372
 						</li>';
373
+		}
370 374
 		echo '
371 375
 					</ul>
372 376
 				</fieldset>';
@@ -378,11 +382,12 @@  discard block
 block discarded – undo
378 382
 					<legend>' . $txt['merge_select_poll'] . '</legend>
379 383
 					<ul>';
380 384
 
381
-		foreach ($context['polls'] as $poll)
382
-			echo '
385
+		foreach ($context['polls'] as $poll) {
386
+					echo '
383 387
 						<li>
384 388
 							<input type="radio" name="poll" value="' . $poll['id'] . '"' . ($poll['selected'] ? ' checked' : '') . '> ' . $poll['question'] . ' (' . $txt['topic'] . ': <a href="' . $scripturl . '?topic=' . $poll['topic']['id'] . '.0" target="_blank">' . $poll['topic']['subject'] . '</a>)
385 389
 						</li>';
390
+		}
386 391
 		echo '
387 392
 						<li>
388 393
 							<input type="radio" name="poll" value="-1"> (' . $txt['merge_no_poll'] . ')
Please login to merge, or discard this patch.