Completed
Pull Request — release-2.1 (#3931)
by Fran
07:05
created
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">
@@ -68,9 +69,10 @@  discard block
 block discarded – undo
68 69
 							<option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>';
69 70
 
70 71
 	// Put each group into the box.
71
-	foreach ($context['groups'] as $id => $name)
72
-		echo '
72
+	foreach ($context['groups'] as $id => $name) {
73
+			echo '
73 74
 							<option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>';
75
+	}
74 76
 
75 77
 	echo '
76 78
 						</select>
@@ -81,9 +83,10 @@  discard block
 block discarded – undo
81 83
 					<dd>';
82 84
 
83 85
 	// Put a checkbox in for each group
84
-	foreach ($context['groups'] as $id => $name)
85
-		echo '
86
+	foreach ($context['groups'] as $id => $name) {
87
+			echo '
86 88
 						<label for="addgroup_', $id, '"><input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', ' class="input_check">&nbsp;<span class="smalltext">', $name, '</span></label><br>';
89
+	}
87 90
 
88 91
 	echo '
89 92
 					</dd>
@@ -135,8 +138,8 @@  discard block
 block discarded – undo
135 138
 					<fieldset>';
136 139
 
137 140
 	//!! Removed until implemented
138
-	if (!empty($sdflsdhglsdjgs))
139
-		echo '
141
+	if (!empty($sdflsdhglsdjgs)) {
142
+			echo '
140 143
 						<dl class="settings">
141 144
 							<dt>
142 145
 								<label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span>
@@ -145,6 +148,7 @@  discard block
 block discarded – undo
145 148
 								<input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', ' class="input_check">
146 149
 							</dd>
147 150
 						</dl>';
151
+	}
148 152
 
149 153
 	echo '
150 154
 						<div class="information">
@@ -245,8 +249,8 @@  discard block
 block discarded – undo
245 249
 				<dl class="settings">';
246 250
 
247 251
 	// Do we need a username?
248
-	if ($context['action_type'] == 'add')
249
-		echo '
252
+	if ($context['action_type'] == 'add') {
253
+			echo '
250 254
 
251 255
 					<dt>
252 256
 						<strong>', $txt['paid_username'], ':</strong><br>
@@ -255,6 +259,7 @@  discard block
 block discarded – undo
255 259
 					<dd>
256 260
 						<input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text">
257 261
 					</dd>';
262
+	}
258 263
 
259 264
 	echo '
260 265
 					<dt>
@@ -272,9 +277,10 @@  discard block
 block discarded – undo
272 277
 					<select name="year" id="year" onchange="generateDays();">';
273 278
 
274 279
 	// Show a list of all the years we allow...
275
-	for ($year = 2005; $year <= 2030; $year++)
276
-		echo '
280
+	for ($year = 2005; $year <= 2030; $year++) {
281
+			echo '
277 282
 						<option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>';
283
+	}
278 284
 
279 285
 	echo '
280 286
 					</select>&nbsp;
@@ -282,9 +288,10 @@  discard block
 block discarded – undo
282 288
 					<select name="month" id="month" onchange="generateDays();">';
283 289
 
284 290
 	// There are 12 months per year - ensure that they all get listed.
285
-	for ($month = 1; $month <= 12; $month++)
286
-		echo '
291
+	for ($month = 1; $month <= 12; $month++) {
292
+			echo '
287 293
 						<option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
294
+	}
288 295
 
289 296
 	echo '
290 297
 					</select>&nbsp;
@@ -292,9 +299,10 @@  discard block
 block discarded – undo
292 299
 					<select name="day" id="day">';
293 300
 
294 301
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
295
-	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++)
296
-		echo '
302
+	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) {
303
+			echo '
297 304
 						<option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>';
305
+	}
298 306
 
299 307
 	echo '
300 308
 					</select>
@@ -306,9 +314,10 @@  discard block
 block discarded – undo
306 314
 					<select name="yearend" id="yearend" onchange="generateDays(\'end\');">';
307 315
 
308 316
 	// Show a list of all the years we allow...
309
-	for ($year = 2005; $year <= 2030; $year++)
310
-		echo '
317
+	for ($year = 2005; $year <= 2030; $year++) {
318
+			echo '
311 319
 						<option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>';
320
+	}
312 321
 
313 322
 	echo '
314 323
 					</select>&nbsp;
@@ -316,9 +325,10 @@  discard block
 block discarded – undo
316 325
 					<select name="monthend" id="monthend" onchange="generateDays(\'end\');">';
317 326
 
318 327
 	// There are 12 months per year - ensure that they all get listed.
319
-	for ($month = 1; $month <= 12; $month++)
320
-		echo '
328
+	for ($month = 1; $month <= 12; $month++) {
329
+			echo '
321 330
 						<option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
331
+	}
322 332
 
323 333
 	echo '
324 334
 					</select>&nbsp;
@@ -326,9 +336,10 @@  discard block
 block discarded – undo
326 336
 					<select name="dayend" id="dayend">';
327 337
 
328 338
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
329
-	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++)
330
-		echo '
339
+	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) {
340
+			echo '
331 341
 						<option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>';
342
+	}
332 343
 
333 344
 	echo '
334 345
 					</select>
@@ -410,8 +421,7 @@  discard block
 block discarded – undo
410 421
 			<div class="information">
411 422
 				', $txt['paid_subs_none'], '
412 423
 			</div>';
413
-	}
414
-	else
424
+	} else
415 425
 	{
416 426
 		echo '
417 427
 			<div class="information">
@@ -423,8 +433,9 @@  discard block
 block discarded – undo
423 433
 		{
424 434
 
425 435
 			// Ignore the inactive ones...
426
-			if (empty($subscription['active']))
427
-				continue;
436
+			if (empty($subscription['active'])) {
437
+							continue;
438
+			}
428 439
 
429 440
 			echo '
430 441
 			<div class="cat_bar">
@@ -434,9 +445,10 @@  discard block
 block discarded – undo
434 445
 				<p><strong>', $subscription['name'], '</strong></p>
435 446
 				<p class="smalltext">', $subscription['desc'], '</p>';
436 447
 
437
-			if (!$subscription['flexible'])
438
-				echo '
448
+			if (!$subscription['flexible']) {
449
+							echo '
439 450
 					<div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>';
451
+			}
440 452
 
441 453
 			if ($context['user']['is_owner'])
442 454
 			{
@@ -449,24 +461,25 @@  discard block
 block discarded – undo
449 461
 					<select name="cur[', $subscription['id'], ']">';
450 462
 
451 463
 					// Print out the costs for this one.
452
-					foreach ($subscription['costs'] as $duration => $value)
453
-						echo '
464
+					foreach ($subscription['costs'] as $duration => $value) {
465
+											echo '
454 466
 						<option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>';
467
+					}
455 468
 
456 469
 					echo '
457 470
 					</select>';
458
-				}
459
-				else
460
-					echo '
471
+				} else {
472
+									echo '
461 473
 					', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']);
474
+				}
462 475
 
463 476
 				echo '
464 477
 					<hr>
465 478
 					<input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit">';
466
-			}
467
-			else
468
-				echo '
479
+			} else {
480
+							echo '
469 481
 					<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>';
482
+			}
470 483
 
471 484
 			echo '
472 485
 			</div>';
@@ -493,19 +506,20 @@  discard block
 block discarded – undo
493 506
 			</thead>
494 507
 			<tbody>';
495 508
 
496
-	if (empty($context['current']))
497
-		echo '
509
+	if (empty($context['current'])) {
510
+			echo '
498 511
 				<tr class="windowbg">
499 512
 					<td colspan="4">
500 513
 						', $txt['paid_none_yet'], '
501 514
 					</td>
502 515
 				</tr>';
516
+	}
503 517
 
504 518
 	foreach ($context['current'] as $sub)
505 519
 	{
506 520
 
507
-		if (!$sub['hide'])
508
-			echo '
521
+		if (!$sub['hide']) {
522
+					echo '
509 523
 				<tr class="windowbg">
510 524
 					<td>
511 525
 						', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), '
@@ -517,6 +531,7 @@  discard block
 block discarded – undo
517 531
 						', $sub['end'], '
518 532
 					</td>
519 533
 				</tr>';
534
+		}
520 535
 	}
521 536
 	echo '
522 537
 			</tbody>
@@ -567,15 +582,17 @@  discard block
 block discarded – undo
567 582
 			', $gateway['desc'], '<br>
568 583
 				<form action="', $gateway['form'], '" method="post">';
569 584
 
570
-		if (!empty($gateway['javascript']))
571
-			echo '
585
+		if (!empty($gateway['javascript'])) {
586
+					echo '
572 587
 					<script>
573 588
 						', $gateway['javascript'], '
574 589
 					</script>';
590
+		}
575 591
 
576
-		foreach ($gateway['hidden'] as $name => $value)
577
-			echo '
592
+		foreach ($gateway['hidden'] as $name => $value) {
593
+					echo '
578 594
 					<input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">';
595
+		}
579 596
 
580 597
 		echo '
581 598
 					<br><input type="submit" value="', $gateway['submit'], '" class="button_submit">
Please login to merge, or discard this patch.
Themes/default/Post.template.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
 		foreach ($context['posting_fields'] as $pf)
140 140
 			echo '
141 141
 						<dt>
142
-							', $pf['dt'] ,'
142
+							', $pf['dt'], '
143 143
 						</dt>
144 144
 						<dd>
145
-							', $pf['dd'] ,'
145
+							', $pf['dd'], '
146 146
 						</dd>';
147 147
 
148 148
 
@@ -459,13 +459,13 @@  discard block
 block discarded – undo
459 459
 									<p class="message" data-dz-message></p>
460 460
 									<p class="attached_BBC">
461 461
 										<input type="text" name="attachBBC" value="" readonly>
462
-										<a class="button_submit insertBBC">', $txt['attached_insertBBC'] ,'</a>
462
+										<a class="button_submit insertBBC">', $txt['attached_insertBBC'], '</a>
463 463
 									</p>
464 464
 									<p class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></p>
465 465
 								</div>
466 466
 								<div class="attach-ui">
467
-									<a data-dz-remove class="button_submit delete">', $txt['modify_cancel'] ,'</a>
468
-									<a class="button_submit start">', $txt['upload'] ,'</a>
467
+									<a data-dz-remove class="button_submit delete">', $txt['modify_cancel'], '</a>
468
+									<a class="button_submit start">', $txt['upload'], '</a>
469 469
 								</div>
470 470
 							</div>
471 471
 						</div>
@@ -482,10 +482,10 @@  discard block
 block discarded – undo
482 482
 							</dt>
483 483
 							<dd class="smalltext fallback">
484 484
 								<div id="attachUpload" class="descbox">
485
-									<h5>', $txt['attach_drop_zone'] ,'</h5>
486
-									<a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a>
487
-									<a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a>
488
-									<a class="button_submit fileinput-button">', $txt['attach_add'] ,'</a>
485
+									<h5>', $txt['attach_drop_zone'], '</h5>
486
+									<a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a>
487
+									<a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a>
488
+									<a class="button_submit fileinput-button">', $txt['attach_add'], '</a>
489 489
 									<div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
490 490
 									<div class="fallback">
491 491
 										<input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="input_file fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 	// Option to delete an event if user is editing one.
593 593
 	if ($context['make_event'] && !$context['event']['new'])
594 594
 		echo '
595
-						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button_submit you_sure">';
595
+						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button_submit you_sure">';
596 596
 
597 597
 	echo '
598 598
 					</span>
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 			});';
847 847
 
848 848
 	echo '
849
-			var oEditorID = "', $context['post_box_name'] ,'";
849
+			var oEditorID = "', $context['post_box_name'], '";
850 850
 			var oEditorObject = oEditorHandle_', $context['post_box_name'], ';
851 851
 		</script>';
852 852
 
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
 			{
879 879
 				echo '
880 880
 					<ul class="quickbuttons" id="msg_', $post['id'], '_quote">
881
-						<li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'] ,'</a></li>
881
+						<li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'], '</a></li>
882 882
 						<li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li>
883 883
 					</ul>';
884 884
 			}
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 	<head>
966 966
 		<meta charset="', $context['character_set'], '">
967 967
 		<title>', $txt['spell_check'], '</title>
968
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
968
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
969 969
 		<style>
970 970
 			body, td
971 971
 			{
@@ -998,8 +998,8 @@  discard block
 block discarded – undo
998 998
 			var spell_formname = window.opener.spell_formname;
999 999
 			var spell_fieldname = window.opener.spell_fieldname;
1000 1000
 		</script>
1001
-		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script>
1002
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
1001
+		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script>
1002
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
1003 1003
 		<script>
1004 1004
 			', $context['spell_js'], '
1005 1005
 		</script>
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 	<head>
1042 1042
 		<meta charset="', $context['character_set'], '">
1043 1043
 		<title>', $txt['retrieving_quote'], '</title>
1044
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
1044
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
1045 1045
 	</head>
1046 1046
 	<body>
1047 1047
 		', $txt['retrieving_quote'], '
Please login to merge, or discard this patch.
Braces   +98 added lines, -67 removed lines patch added patch discarded remove patch
@@ -22,22 +22,24 @@  discard block
 block discarded – undo
22 22
 		<script>';
23 23
 
24 24
 	// When using Go Back due to fatal_error, allow the form to be re-submitted with changes.
25
-	if (isBrowser('is_firefox'))
26
-		echo '
25
+	if (isBrowser('is_firefox')) {
26
+			echo '
27 27
 			window.addEventListener("pageshow", reActivate, false);';
28
+	}
28 29
 
29 30
 	// Start with message icons - and any missing from this theme.
30 31
 	echo '
31 32
 			var icon_urls = {';
32
-	foreach ($context['icons'] as $icon)
33
-		echo '
33
+	foreach ($context['icons'] as $icon) {
34
+			echo '
34 35
 				\'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ',';
36
+	}
35 37
 	echo '
36 38
 			};';
37 39
 
38 40
 	// If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations.
39
-	if ($context['make_poll'])
40
-		echo '
41
+	if ($context['make_poll']) {
42
+			echo '
41 43
 			var pollOptionNum = 0, pollTabIndex;
42 44
 			var pollOptionId = ', $context['last_choice_id'], ';
43 45
 			function addPollOption()
@@ -56,11 +58,13 @@  discard block
 block discarded – undo
56 58
 
57 59
 				setOuterHTML(document.getElementById(\'pollMoreOptions\'), ', JavaScriptEscape('<dt><label for="options-'), ' + pollOptionId + ', JavaScriptEscape('">' . $txt['option'] . ' '), ' + pollOptionNum + ', JavaScriptEscape('</label>:</dt><dd><input type="text" name="options['), ' + pollOptionId + ', JavaScriptEscape(']" id="options-'), ' + pollOptionId + ', JavaScriptEscape('" value="" size="80" maxlength="255" tabindex="'), ' + pollTabIndex + ', JavaScriptEscape('" class="input_text"></dd><p id="pollMoreOptions"></p>'), ');
58 60
 			}';
61
+	}
59 62
 
60 63
 	// If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here.
61
-	if ($context['make_event'])
62
-		echo '
64
+	if ($context['make_event']) {
65
+			echo '
63 66
 			var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];';
67
+	}
64 68
 
65 69
 	// End of the javascript, start the form and display the link tree.
66 70
 	echo '
@@ -80,9 +84,10 @@  discard block
 block discarded – undo
80 84
 				</div>
81 85
 			</div><br>';
82 86
 
83
-	if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
84
-		echo '
87
+	if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) {
88
+			echo '
85 89
 			<input type="hidden" name="eventid" value="', $context['event']['id'], '">';
90
+	}
86 91
 
87 92
 	// Start the main table.
88 93
 	echo '
@@ -117,26 +122,28 @@  discard block
 block discarded – undo
117 122
 	}
118 123
 
119 124
 	// If it's locked, show a message to warn the replier.
120
-	if (!empty($context['locked']))
121
-	echo '
125
+	if (!empty($context['locked'])) {
126
+		echo '
122 127
 					<p class="errorbox">
123 128
 						', $txt['topic_locked_no_reply'], '
124 129
 					</p>';
130
+	}
125 131
 
126
-	if (!empty($modSettings['drafts_post_enabled']))
127
-		echo '
132
+	if (!empty($modSettings['drafts_post_enabled'])) {
133
+			echo '
128 134
 					<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
129 135
 						sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), '
130 136
 						', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
131 137
 					</div>';
138
+	}
132 139
 
133 140
 	// The post header... important stuff
134 141
 	echo '
135 142
 					<dl id="post_header">';
136 143
 
137 144
 	// Custom posting fields.
138
-	if (!empty($context['posting_fields']) && is_array($context['posting_fields']))
139
-		foreach ($context['posting_fields'] as $pf)
145
+	if (!empty($context['posting_fields']) && is_array($context['posting_fields'])) {
146
+			foreach ($context['posting_fields'] as $pf)
140 147
 			echo '
141 148
 						<dt>
142 149
 							', $pf['dt'] ,'
@@ -144,6 +151,7 @@  discard block
 block discarded – undo
144 151
 						<dd>
145 152
 							', $pf['dd'] ,'
146 153
 						</dd>';
154
+	}
147 155
 
148 156
 
149 157
 	// Guests have to put in their name and email...
@@ -157,14 +165,15 @@  discard block
 block discarded – undo
157 165
 							<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text">
158 166
 						</dd>';
159 167
 
160
-		if (empty($modSettings['guest_post_no_email']))
161
-			echo '
168
+		if (empty($modSettings['guest_post_no_email'])) {
169
+					echo '
162 170
 						<dt>
163 171
 							<span', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</span>
164 172
 						</dt>
165 173
 						<dd>
166 174
 							<input type="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required>
167 175
 						</dd>';
176
+		}
168 177
 	}
169 178
 
170 179
 	// Now show the subject box for this post.
@@ -182,9 +191,10 @@  discard block
 block discarded – undo
182 191
 							<select name="icon" id="icon" onchange="showimage()">';
183 192
 
184 193
 	// Loop through each message icon allowed, adding it to the drop down list.
185
-	foreach ($context['icons'] as $icon)
186
-		echo '
194
+	foreach ($context['icons'] as $icon) {
195
+			echo '
187 196
 								<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected' : '', '>', $icon['name'], '</option>';
197
+	}
188 198
 
189 199
 	echo '
190 200
 							</select>
@@ -219,9 +229,10 @@  discard block
 block discarded – undo
219 229
 				{
220 230
 					echo '
221 231
 										<optgroup label="', $category['name'], '">';
222
-					foreach ($category['boards'] as $board)
223
-						echo '
232
+					foreach ($category['boards'] as $board) {
233
+											echo '
224 234
 											<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
235
+					}
225 236
 					echo '
226 237
 										</optgroup>';
227 238
 				}
@@ -257,9 +268,10 @@  discard block
 block discarded – undo
257 268
 									<span class="label">', $txt['calendar_timezone'], '</span>
258 269
 									<select name="tz" id="tz"', !empty($context['event']['allday']) ? ' disabled' : '', '>';
259 270
 
260
-			foreach ($context['all_timezones'] as $tz => $tzname)
261
-				echo '
271
+			foreach ($context['all_timezones'] as $tz => $tzname) {
272
+							echo '
262 273
 										<option value="', $tz, '"', $tz == $context['event']['tz'] ? ' selected' : '', '>', $tzname, '</option>';
274
+			}
263 275
 
264 276
 			echo '
265 277
 									</select>
@@ -325,14 +337,15 @@  discard block
 block discarded – undo
325 337
 									<input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', ' class="input_check">
326 338
 								</dd>';
327 339
 
328
-		if ($context['poll_options']['guest_vote_enabled'])
329
-			echo '
340
+		if ($context['poll_options']['guest_vote_enabled']) {
341
+					echo '
330 342
 								<dt>
331 343
 									<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
332 344
 								</dt>
333 345
 								<dd>
334 346
 									<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll_options']['guest_vote']) ? ' checked' : '', ' class="input_check">
335 347
 								</dd>';
348
+		}
336 349
 
337 350
 		echo '
338 351
 								<dt>
@@ -353,8 +366,8 @@  discard block
 block discarded – undo
353 366
 					', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message');
354 367
 
355 368
 	// If we're editing and displaying edit details, show a box where they can say why
356
-	if (isset($context['editing']) && $modSettings['show_modify'])
357
-		echo '
369
+	if (isset($context['editing']) && $modSettings['show_modify']) {
370
+			echo '
358 371
 					<dl>
359 372
 						<dt class="clear">
360 373
 							<span id="caption_edit_reason">', $txt['reason_for_edit'], ':</span>
@@ -363,20 +376,23 @@  discard block
 block discarded – undo
363 376
 							<input type="text" name="modify_reason"', isset($context['last_modified_reason']) ? ' value="' . $context['last_modified_reason'] . '"' : '', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text">
364 377
 						</dd>
365 378
 					</dl>';
379
+	}
366 380
 
367 381
 	// If this message has been edited in the past - display when it was.
368
-	if (isset($context['last_modified']))
369
-		echo '
382
+	if (isset($context['last_modified'])) {
383
+			echo '
370 384
 					<div class="padding smalltext">
371 385
 						', $context['last_modified_text'], '
372 386
 					</div>';
387
+	}
373 388
 
374 389
 	// If the admin has enabled the hiding of the additional options - show a link and image for it.
375
-	if (!empty($modSettings['additional_options_collapsable']))
376
-		echo '
390
+	if (!empty($modSettings['additional_options_collapsable'])) {
391
+			echo '
377 392
 					<div id="postAdditionalOptionsHeader">
378 393
 						<strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
379 394
 					</div>';
395
+	}
380 396
 
381 397
 	echo '
382 398
 					<div id="postAdditionalOptions">';
@@ -408,19 +424,21 @@  discard block
 block discarded – undo
408 424
 								<input type="hidden" name="attach_del[]" value="0">
409 425
 								', $txt['uncheck_unwatchd_attach'], ':
410 426
 							</dd>';
411
-		foreach ($context['current_attachments'] as $attachment)
412
-			echo '
427
+		foreach ($context['current_attachments'] as $attachment) {
428
+					echo '
413 429
 							<dd class="smalltext">
414 430
 								<label for="attachment_', $attachment['attachID'], '"><input type="checkbox" id="attachment_', $attachment['attachID'], '" name="attach_del[]" value="', $attachment['attachID'], '"', empty($attachment['unchecked']) ? ' checked' : '', ' class="input_check"> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''),
415 431
 								!empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']) ? sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1028) / 1028), 0)) : '', '</label>
416 432
 							</dd>';
433
+		}
417 434
 
418 435
 		echo '
419 436
 						</dl>';
420 437
 
421
-		if (!empty($context['files_in_session_warning']))
422
-			echo '
438
+		if (!empty($context['files_in_session_warning'])) {
439
+					echo '
423 440
 						<div class="smalltext">', $context['files_in_session_warning'], '</div>';
441
+		}
424 442
 	}
425 443
 
426 444
 	// Is the user allowed to post any additional ones? If so give them the boxes to do it!
@@ -473,8 +491,8 @@  discard block
 block discarded – undo
473 491
 								', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1028 . '">');
474 492
 
475 493
 		// Show more boxes if they aren't approaching that limit.
476
-		if ($context['num_allowed_attachments'] > 1)
477
-			echo '
494
+		if ($context['num_allowed_attachments'] > 1) {
495
+					echo '
478 496
 										<script>
479 497
 											var allowed_attachments = ', $context['num_allowed_attachments'], ';
480 498
 											var current_attachment = 1;
@@ -495,9 +513,10 @@  discard block
 block discarded – undo
495 513
 									</div>
496 514
 								</div>
497 515
 							</dd>';
498
-		else
499
-			echo '
516
+		} else {
517
+					echo '
500 518
 							</dd>';
519
+		}
501 520
 
502 521
 		// Add any template changes for an alternative upload system here.
503 522
 		call_integration_hook('integrate_upload_template');
@@ -506,21 +525,25 @@  discard block
 block discarded – undo
506 525
 							<dd class="smalltext">';
507 526
 
508 527
 		// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.
509
-		if (!empty($modSettings['attachmentCheckExtensions']))
510
-			echo '
528
+		if (!empty($modSettings['attachmentCheckExtensions'])) {
529
+					echo '
511 530
 								', $txt['allowed_types'], ': ', $context['allowed_extensions'], '<br>';
531
+		}
512 532
 
513
-		if (!empty($context['attachment_restrictions']))
514
-			echo '
533
+		if (!empty($context['attachment_restrictions'])) {
534
+					echo '
515 535
 								', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '<br>';
536
+		}
516 537
 
517
-		if ($context['num_allowed_attachments'] == 0)
518
-			echo '
538
+		if ($context['num_allowed_attachments'] == 0) {
539
+					echo '
519 540
 								', $txt['attach_limit_nag'], '<br>';
541
+		}
520 542
 
521
-		if (!$context['can_post_attachment_unapproved'])
522
-			echo '
543
+		if (!$context['can_post_attachment_unapproved']) {
544
+					echo '
523 545
 								<span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br>';
546
+		}
524 547
 
525 548
 		echo '
526 549
 							</dd>
@@ -543,10 +566,11 @@  discard block
 block discarded – undo
543 566
 							<dt><strong>', $txt['subject'], '</strong></dt>
544 567
 							<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
545 568
 
546
-		foreach ($context['drafts'] as $draft)
547
-			echo '
569
+		foreach ($context['drafts'] as $draft) {
570
+					echo '
548 571
 							<dt>', $draft['link'], '</dt>
549 572
 							<dd>', $draft['poster_time'], '</dd>';
573
+		}
550 574
 		echo '
551 575
 						</dl>
552 576
 					</div>';
@@ -571,9 +595,10 @@  discard block
 block discarded – undo
571 595
 						', template_control_richedit_buttons($context['post_box_name']);
572 596
 
573 597
 	// Option to delete an event if user is editing one.
574
-	if ($context['make_event'] && !$context['event']['new'])
575
-		echo '
598
+	if ($context['make_event'] && !$context['event']['new']) {
599
+			echo '
576 600
 						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button_submit you_sure">';
601
+	}
577 602
 
578 603
 	echo '
579 604
 					</span>
@@ -582,9 +607,10 @@  discard block
 block discarded – undo
582 607
 			<br class="clear">';
583 608
 
584 609
 	// Assuming this isn't a new topic pass across the last message id.
585
-	if (isset($context['topic_last_message']))
586
-		echo '
610
+	if (isset($context['topic_last_message'])) {
611
+			echo '
587 612
 			<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">';
613
+	}
588 614
 
589 615
 	echo '
590 616
 			<input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '">
@@ -726,9 +752,10 @@  discard block
 block discarded – undo
726 752
 
727 753
 						newPostsHTML += \'<div class="windowbg\' + (++reply_counter % 2 == 0 ? \'2\' : \'\') + \'"><div id="msg\' + newPosts[i].getAttribute("id") + \'"><div class="floatleft"><h5>', $txt['posted_by'], ': \' + newPosts[i].getElementsByTagName("poster")[0].firstChild.nodeValue + \'</h5><span class="smalltext">&#171;&nbsp;<strong>', $txt['on'], ':</strong> \' + newPosts[i].getElementsByTagName("time")[0].firstChild.nodeValue + \'&nbsp;&#187;</span> <span class="new_posts" id="image_new_\' + newPosts[i].getAttribute("id") + \'">', $txt['new'], '</span></div>\';';
728 754
 
729
-	if ($context['can_quote'])
730
-		echo '
755
+	if ($context['can_quote']) {
756
+			echo '
731 757
 						newPostsHTML += \'<ul class="quickbuttons" id="msg_\' + newPosts[i].getAttribute("id") + \'_quote"><li><a href="#postmodify" onclick="return insertQuoteFast(\\\'\' + newPosts[i].getAttribute("id") + \'\\\');" class="quote_button"><span>', $txt['quote'], '</span><\' + \'/a></li></ul>\';';
758
+	}
732 759
 
733 760
 	echo '
734 761
 						newPostsHTML += \'<br class="clear">\';
@@ -771,8 +798,8 @@  discard block
 block discarded – undo
771 798
 			}';
772 799
 
773 800
 	// Code for showing and hiding additional options.
774
-	if (!empty($modSettings['additional_options_collapsable']))
775
-		echo '
801
+	if (!empty($modSettings['additional_options_collapsable'])) {
802
+			echo '
776 803
 			var oSwapAdditionalOptions = new smc_Toggle({
777 804
 				bToggleEnabled: true,
778 805
 				bCurrentlyCollapsed: ', $context['show_additional_options'] ? 'false' : 'true', ',
@@ -800,10 +827,11 @@  discard block
 block discarded – undo
800 827
 					}
801 828
 				]
802 829
 			});';
830
+	}
803 831
 
804 832
 	// Code for showing and hiding drafts
805
-	if (!empty($context['drafts']))
806
-		echo '
833
+	if (!empty($context['drafts'])) {
834
+			echo '
807 835
 			var oSwapDraftOptions = new smc_Toggle({
808 836
 				bToggleEnabled: true,
809 837
 				bCurrentlyCollapsed: true,
@@ -825,6 +853,7 @@  discard block
 block discarded – undo
825 853
 					}
826 854
 				]
827 855
 			});';
856
+	}
828 857
 
829 858
 	echo '
830 859
 			var oEditorID = "', $context['post_box_name'] ,'";
@@ -845,8 +874,9 @@  discard block
 block discarded – undo
845 874
 		foreach ($context['previous_posts'] as $post)
846 875
 		{
847 876
 			$ignoring = false;
848
-			if (!empty($post['is_ignored']))
849
-				$ignored_posts[] = $ignoring = $post['id'];
877
+			if (!empty($post['is_ignored'])) {
878
+							$ignored_posts[] = $ignoring = $post['id'];
879
+			}
850 880
 
851 881
 			echo '
852 882
 			<div class="windowbg">
@@ -1029,10 +1059,10 @@  discard block
 block discarded – undo
1029 1059
 		<div id="temporary_posting_area" style="display: none;"></div>
1030 1060
 		<script>';
1031 1061
 
1032
-	if ($context['close_window'])
1033
-		echo '
1062
+	if ($context['close_window']) {
1063
+			echo '
1034 1064
 			window.close();';
1035
-	else
1065
+	} else
1036 1066
 	{
1037 1067
 		// Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;).
1038 1068
 		echo '
@@ -1086,11 +1116,12 @@  discard block
 block discarded – undo
1086 1116
 				</p>
1087 1117
 				<ul>';
1088 1118
 
1089
-	foreach ($context['groups'] as $group)
1090
-		echo '
1119
+	foreach ($context['groups'] as $group) {
1120
+			echo '
1091 1121
 					<li>
1092 1122
 						<label for="who_', $group['id'], '"><input type="checkbox" name="who[', $group['id'], ']" id="who_', $group['id'], '" value="', $group['id'], '" checked class="input_check"> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em>
1093 1123
 					</li>';
1124
+	}
1094 1125
 
1095 1126
 	echo '
1096 1127
 					<li>
Please login to merge, or discard this patch.
Themes/default/ManageSmileys.template.php 1 patch
Braces   +55 added lines, -41 removed lines patch added patch discarded remove patch
@@ -65,18 +65,19 @@  discard block
 block discarded – undo
65 65
 					</dt>
66 66
 					<dd>
67 67
 						', $modSettings['smileys_url'], '/';
68
-		if ($context['current_set']['id'] == 'default')
69
-			echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">';
70
-		elseif (empty($context['smiley_set_dirs']))
71
-			echo '
68
+		if ($context['current_set']['id'] == 'default') {
69
+					echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">';
70
+		} elseif (empty($context['smiley_set_dirs'])) {
71
+					echo '
72 72
 						<input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text"> ';
73
-		else
73
+		} else
74 74
 		{
75 75
 			echo '
76 76
 						<select name="smiley_sets_path" id="smiley_sets_path">';
77
-			foreach ($context['smiley_set_dirs'] as $smiley_set_dir)
78
-				echo '
77
+			foreach ($context['smiley_set_dirs'] as $smiley_set_dir) {
78
+							echo '
79 79
 							<option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>';
80
+			}
80 81
 			echo '
81 82
 						</select> ';
82 83
 		}
@@ -91,14 +92,15 @@  discard block
 block discarded – undo
91 92
 					</dd>';
92 93
 
93 94
 		// If this is a new smiley set they have the option to import smileys already in the directory.
94
-		if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable']))
95
-			echo '
95
+		if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) {
96
+					echo '
96 97
 					<dt>
97 98
 						<strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong>
98 99
 					</dt>
99 100
 					<dd>
100 101
 						<input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" class="input_check">
101 102
 					</dd>';
103
+		}
102 104
 
103 105
 		echo '
104 106
 				</dl>
@@ -132,9 +134,10 @@  discard block
 block discarded – undo
132 134
 					<dd>
133 135
 						<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">';
134 136
 
135
-		foreach ($context['smiley_sets'] as $smiley_set)
136
-			echo '
137
+		foreach ($context['smiley_sets'] as $smiley_set) {
138
+					echo '
137 139
 						<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
140
+		}
138 141
 
139 142
 		echo '
140 143
 						</select>)
@@ -149,16 +152,17 @@  discard block
 block discarded – undo
149 152
 						<strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong>
150 153
 					</dt>
151 154
 					<dd>';
152
-			if (empty($context['filenames']))
153
-				echo '
155
+			if (empty($context['filenames'])) {
156
+							echo '
154 157
 						<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" class="input_text">';
155
-			else
158
+			} else
156 159
 			{
157 160
 				echo '
158 161
 						<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">';
159
-				foreach ($context['filenames'] as $filename)
160
-					echo '
162
+				foreach ($context['filenames'] as $filename) {
163
+									echo '
161 164
 							<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
165
+				}
162 166
 				echo '
163 167
 						</select>';
164 168
 			}
@@ -227,9 +231,10 @@  discard block
 block discarded – undo
227 231
 						<dd>
228 232
 							', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">';
229 233
 
230
-		foreach ($context['smiley_sets'] as $smiley_set)
231
-			echo '
234
+		foreach ($context['smiley_sets'] as $smiley_set) {
235
+					echo '
232 236
 							<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
237
+		}
233 238
 
234 239
 		echo '
235 240
 							</select>
@@ -238,16 +243,17 @@  discard block
 block discarded – undo
238 243
 							<strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong>
239 244
 						</dt>
240 245
 						<dd>';
241
-	if (empty($context['filenames']))
242
-		echo '
246
+	if (empty($context['filenames'])) {
247
+			echo '
243 248
 							<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text">';
244
-	else
249
+	} else
245 250
 	{
246 251
 		echo '
247 252
 								<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">';
248
-		foreach ($context['filenames'] as $filename)
249
-			echo '
253
+		foreach ($context['filenames'] as $filename) {
254
+					echo '
250 255
 								<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
256
+		}
251 257
 		echo '
252 258
 							</select>';
253 259
 	}
@@ -275,14 +281,15 @@  discard block
 block discarded – undo
275 281
 				</fieldset>
276 282
 
277 283
 				<dl id="uploadMore" style="display: none;" class="settings">';
278
-	foreach ($context['smiley_sets'] as $smiley_set)
279
-		echo '
284
+	foreach ($context['smiley_sets'] as $smiley_set) {
285
+			echo '
280 286
 					<dt>
281 287
 						', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ':
282 288
 					</dt>
283 289
 					<dd>
284 290
 						<input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file">
285 291
 					</dd>';
292
+	}
286 293
 	echo '
287 294
 				</dl>
288 295
 			</div>
@@ -351,24 +358,27 @@  discard block
 block discarded – undo
351 358
 				<strong>', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...</strong><br>';
352 359
 		foreach ($location['rows'] as $row)
353 360
 		{
354
-			if (!empty($context['move_smiley']))
355
-				echo '
361
+			if (!empty($context['move_smiley'])) {
362
+							echo '
356 363
 					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
364
+			}
357 365
 
358 366
 			foreach ($row as $smiley)
359 367
 			{
360
-				if (empty($context['move_smiley']))
361
-					echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>';
362
-				else
363
-					echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
368
+				if (empty($context['move_smiley'])) {
369
+									echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>';
370
+				} else {
371
+									echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
372
+				}
364 373
 			}
365 374
 
366 375
 			echo '
367 376
 				<br>';
368 377
 		}
369
-		if (!empty($context['move_smiley']))
370
-			echo '
378
+		if (!empty($context['move_smiley'])) {
379
+					echo '
371 380
 				<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
381
+		}
372 382
 		echo '
373 383
 			</div>
374 384
 		<input type="hidden" name="reorder" value="1">
@@ -404,14 +414,15 @@  discard block
 block discarded – undo
404 414
 			</div>
405 415
 			<div class="windowbg2">
406 416
 				<dl class="settings">';
407
-	if (!$context['new_icon'])
408
-		echo '
417
+	if (!$context['new_icon']) {
418
+			echo '
409 419
 					<dt>
410 420
 						<strong>', $txt['smiley_preview'], ': </strong>
411 421
 					</dt>
412 422
 					<dd>
413 423
 						<img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '">
414 424
 					</dd>';
425
+	}
415 426
 	echo '
416 427
 					<dt>
417 428
 						<strong><label for="icon_filename">', $txt['smileys_filename'], '</label>: </strong><br><span class="smalltext">', $txt['icons_filename_all_png'], '</span>
@@ -436,9 +447,10 @@  discard block
 block discarded – undo
436 447
 	{
437 448
 		echo '
438 449
 							<optgroup label="', $category['name'], '">';
439
-		foreach ($category['boards'] as $board)
440
-			echo '
450
+		foreach ($category['boards'] as $board) {
451
+					echo '
441 452
 								<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
453
+		}
442 454
 		echo '
443 455
 							</optgroup>';
444 456
 	}
@@ -453,19 +465,21 @@  discard block
 block discarded – undo
453 465
 							<option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>';
454 466
 
455 467
 	// Print the list of all the icons it can be put after...
456
-	foreach ($context['icons'] as $id => $data)
457
-		if (empty($context['icon']['id']) || $id != $context['icon']['id'])
468
+	foreach ($context['icons'] as $id => $data) {
469
+			if (empty($context['icon']['id']) || $id != $context['icon']['id'])
458 470
 			echo '
459 471
 							<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
472
+	}
460 473
 
461 474
 	echo '
462 475
 						</select>
463 476
 					</dd>
464 477
 				</dl>';
465 478
 
466
-	if (!$context['new_icon'])
467
-		echo '
479
+	if (!$context['new_icon']) {
480
+			echo '
468 481
 				<input type="hidden" name="icon" value="', $context['icon']['id'], '">';
482
+	}
469 483
 
470 484
 	echo '
471 485
 				<input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button_submit">
Please login to merge, or discard this patch.
Themes/default/Memberlist.template.php 1 patch
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,9 +26,10 @@  discard block
 block discarded – undo
26 26
 		<div class="cat_bar">
27 27
 			<h3 class="catbg">
28 28
 				<span class="floatleft">', $txt['members_list'], '</span>';
29
-		if (!isset($context['old_search']))
30
-				echo '
29
+		if (!isset($context['old_search'])) {
30
+						echo '
31 31
 				<span class="floatright">', $context['letter_links'], '</span>';
32
+		}
32 33
 		echo '
33 34
 			</h3>
34 35
 		</div>';
@@ -43,19 +44,22 @@  discard block
 block discarded – undo
43 44
 	foreach ($context['columns'] as $key => $column)
44 45
 	{
45 46
 		// @TODO maybe find something nicer?
46
-		if ($key == 'email_address' && !$context['can_send_email'])
47
-			continue;
47
+		if ($key == 'email_address' && !$context['can_send_email']) {
48
+					continue;
49
+		}
48 50
 
49 51
 		// This is a selected column, so underline it or some such.
50
-		if ($column['selected'])
51
-			echo '
52
+		if ($column['selected']) {
53
+					echo '
52 54
 					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', ' selected" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '>
53 55
 						<a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . '</a><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></th>';
56
+		}
54 57
 		// This is just some column... show the link and be done with it.
55
-		else
56
-			echo '
58
+		else {
59
+					echo '
57 60
 					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
58 61
 						', $column['link'], '</th>';
62
+		}
59 63
 	}
60 64
 	echo '
61 65
 				</tr>
@@ -74,9 +78,10 @@  discard block
 block discarded – undo
74 78
 					</td>
75 79
 					<td class="lefttext">', $member['link'], '</td>';
76 80
 
77
-		if (!isset($context['disabled_fields']['website']))
78
-			echo '
81
+		if (!isset($context['disabled_fields']['website'])) {
82
+					echo '
79 83
 					<td class="centertext website_url">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><span class="generic_icons www" title="' . $member['website']['title'] . '"></span></a>' : '', '</td>';
84
+		}
80 85
 
81 86
 		// Group and date.
82 87
 		echo '
@@ -89,11 +94,12 @@  discard block
 block discarded – undo
89 94
 					<td class="centertext" style="white-space: nowrap; width: 15px">', $member['posts'], '</td>
90 95
 					<td class="centertext statsbar" style="width: 120px">';
91 96
 
92
-			if (!empty($member['post_percent']))
93
-				echo '
97
+			if (!empty($member['post_percent'])) {
98
+							echo '
94 99
 						<div class="bar" style="width: ', $member['post_percent'] + 4, 'px;">
95 100
 							<div style="width: ', $member['post_percent'], 'px;"></div>
96 101
 						</div>';
102
+			}
97 103
 
98 104
 			echo '
99 105
 					</td>';
@@ -102,9 +108,10 @@  discard block
 block discarded – undo
102 108
 		// Show custom fields marked to be shown here
103 109
 		if (!empty($context['custom_profile_fields']['columns']))
104 110
 		{
105
-			foreach ($context['custom_profile_fields']['columns'] as $key => $column)
106
-				echo '
111
+			foreach ($context['custom_profile_fields']['columns'] as $key => $column) {
112
+							echo '
107 113
 					<td class="righttext">', $member['options'][$key], '</td>';
114
+			}
108 115
 		}
109 116
 
110 117
 		echo '
@@ -112,11 +119,12 @@  discard block
 block discarded – undo
112 119
 		}
113 120
 	}
114 121
 	// No members?
115
-	else
116
-		echo '
122
+	else {
123
+			echo '
117 124
 				<tr>
118 125
 					<td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td>
119 126
 				</tr>';
127
+	}
120 128
 
121 129
 				echo '
122 130
 			</tbody>
@@ -129,9 +137,10 @@  discard block
 block discarded – undo
129 137
 			<div class="pagelinks floatleft">', $context['page_index'], '</div>';
130 138
 
131 139
 	// If it is displaying the result of a search show a "search again" link to edit their criteria.
132
-	if (isset($context['old_search']))
133
-		echo '
140
+	if (isset($context['old_search'])) {
141
+			echo '
134 142
 			<a class="button_link" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>';
143
+	}
135 144
 	echo '
136 145
 		</div>
137 146
 	</div>';
Please login to merge, or discard this patch.
Themes/default/ReportToMod.template.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,16 +62,17 @@
 block discarded – undo
62 62
 					<div id="error_box" class="errorbox">
63 63
 						<ul id="error_list">';
64 64
 
65
-		foreach ($context['post_errors'] as $key => $error)
66
-			echo '
65
+		foreach ($context['post_errors'] as $key => $error) {
66
+					echo '
67 67
 							<li id="error_', $key, '" class="error">', $error, '</li>';
68
+		}
68 69
 
69 70
 		echo '
70 71
 						</ul>';
71
-	}
72
-	else
73
-		echo '
72
+	} else {
73
+			echo '
74 74
 						<div style="display:none" id="error_box" class="errorbox">';
75
+	}
75 76
 
76 77
 	echo '
77 78
 					</div>';
Please login to merge, or discard this patch.
Themes/default/ManageBoards.template.php 1 patch
Braces   +90 added lines, -62 removed lines patch added patch discarded remove patch
@@ -25,18 +25,20 @@  discard block
 block discarded – undo
25 25
 		</div>
26 26
 		<div class="windowbg2 noup">';
27 27
 
28
-	if (!empty($context['move_board']))
29
-		echo '
28
+	if (!empty($context['move_board'])) {
29
+			echo '
30 30
 		<div class="noticebox">
31 31
 			', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', '
32 32
 		</div>';
33
+	}
33 34
 
34 35
 	// No categories so show a label.
35
-	if (empty($context['categories']))
36
-		echo '
36
+	if (empty($context['categories'])) {
37
+			echo '
37 38
 		<div class="windowbg centertext">
38 39
 			', $txt['mboards_no_cats'], '
39 40
 		</div>';
41
+	}
40 42
 
41 43
 	// Loop through every category, listing the boards in each as we go.
42 44
 	foreach ($context['categories'] as $category)
@@ -54,9 +56,10 @@  discard block
 block discarded – undo
54 56
 		<form action="', $scripturl, '?action=admin;area=manageboards;sa=newboard;cat=', $category['id'], '" method="post" accept-charset="', $context['character_set'], '">
55 57
 				<ul id="category_', $category['id'], '" class="nolist">';
56 58
 
57
-		if (!empty($category['move_link']))
58
-			echo '
59
+		if (!empty($category['move_link'])) {
60
+					echo '
59 61
 					<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="generic_icons select_above"></span></a></li>';
62
+		}
60 63
 
61 64
 		$recycle_board = '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" title="' . $txt['recycle_board'] . '"></a>';
62 65
 		$redirect_board = '<img src="' . $settings['images_url'] . '/new_redirect.png" alt="' . $txt['redirect_board_desc'] . '" title="' . $txt['redirect_board_desc'] . '">';
@@ -81,9 +84,10 @@  discard block
 block discarded – undo
81 84
 				echo '
82 85
 					<li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">';
83 86
 
84
-				foreach ($board['move_links'] as $link)
85
-					echo '
87
+				foreach ($board['move_links'] as $link) {
88
+									echo '
86 89
 						<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>';
90
+				}
87 91
 
88 92
 				echo '
89 93
 					</li>';
@@ -132,9 +136,10 @@  discard block
 block discarded – undo
132 136
 						<select name="cat_order">';
133 137
 
134 138
 		// Print every existing category into a select box.
135
-		foreach ($context['category_order'] as $order)
136
-			echo '
139
+		foreach ($context['category_order'] as $order) {
140
+					echo '
137 141
 							<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
142
+		}
138 143
 		echo '
139 144
 						</select>
140 145
 					</dd>';
@@ -168,21 +173,23 @@  discard block
 block discarded – undo
168 173
 	echo '
169 174
 				</dl>';
170 175
 
171
-	if (isset($context['category']['is_new']))
172
-		echo '
176
+	if (isset($context['category']['is_new'])) {
177
+			echo '
173 178
 					<input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">';
174
-	else
175
-		echo '
179
+	} else {
180
+			echo '
176 181
 					<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">
177 182
 					<input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button_submit you_sure">';
183
+	}
178 184
 	echo '
179 185
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
180 186
 					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">';
181 187
 
182 188
 	// If this category is empty we don't bother with the next confirmation screen.
183
-	if ($context['category']['is_empty'])
184
-		echo '
189
+	if ($context['category']['is_empty']) {
190
+			echo '
185 191
 					<input type="hidden" name="empty" value="1">';
192
+	}
186 193
 
187 194
 	echo '
188 195
 			</div>
@@ -209,9 +216,10 @@  discard block
 block discarded – undo
209 216
 				<p>', $txt['mboards_delete_cat_contains'], ':</p>
210 217
 				<ul>';
211 218
 
212
-	foreach ($context['category']['children'] as $child)
213
-		echo '
219
+	foreach ($context['category']['children'] as $child) {
220
+			echo '
214 221
 					<li>', $child, '</li>';
222
+	}
215 223
 
216 224
 	echo '
217 225
 				</ul>
@@ -225,10 +233,11 @@  discard block
 block discarded – undo
225 233
 					<label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>:
226 234
 					<select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>';
227 235
 
228
-	foreach ($context['category_order'] as $cat)
229
-		if ($cat['id'] != 0)
236
+	foreach ($context['category_order'] as $cat) {
237
+			if ($cat['id'] != 0)
230 238
 			echo '
231 239
 						<option value="', $cat['id'], '">', $cat['true_name'], '</option>';
240
+	}
232 241
 
233 242
 	echo '
234 243
 					</select>
@@ -272,9 +281,10 @@  discard block
 block discarded – undo
272 281
 					</dt>
273 282
 					<dd>
274 283
 						<select 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 == \'\';}">';
275
-		foreach ($context['categories'] as $category)
276
-			echo '
284
+		foreach ($context['categories'] as $category) {
285
+					echo '
277 286
 							<option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
287
+		}
278 288
 		echo '
279 289
 						</select>
280 290
 					</dd>';
@@ -301,9 +311,10 @@  discard block
 block discarded – undo
301 311
 	echo '
302 312
 						<select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '>
303 313
 							', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '';
304
-	foreach ($context['board_order'] as $order)
305
-		echo '
314
+	foreach ($context['board_order'] as $order) {
315
+			echo '
306 316
 							<option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
317
+	}
307 318
 	echo '
308 319
 						</select>
309 320
 					</dd>';
@@ -332,13 +343,15 @@  discard block
 block discarded – undo
332 343
 					<dd>
333 344
 						<select name="profile">';
334 345
 
335
-	if (isset($context['board']['is_new']))
336
-		echo '
346
+	if (isset($context['board']['is_new'])) {
347
+			echo '
337 348
 							<option value="-1">[', $txt['permission_profile_inherit'], ']</option>';
349
+	}
338 350
 
339
-	foreach ($context['profiles'] as $id => $profile)
340
-		echo '
351
+	foreach ($context['profiles'] as $id => $profile) {
352
+			echo '
341 353
 							<option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>';
354
+	}
342 355
 
343 356
 	echo '
344 357
 						</select>
@@ -351,8 +364,8 @@  discard block
 block discarded – undo
351 364
 					</dt>
352 365
 					<dd>';
353 366
 
354
-	if (!empty($modSettings['deny_boards_access']))
355
-		echo '
367
+	if (!empty($modSettings['deny_boards_access'])) {
368
+			echo '
356 369
 						<table>
357 370
 							<tr>
358 371
 								<td></td>
@@ -360,10 +373,11 @@  discard block
 block discarded – undo
360 373
 								<th>', $txt['permissions_option_off'], '</th>
361 374
 								<th>', $txt['permissions_option_deny'], '</th>
362 375
 							</tr>';
376
+	}
363 377
 
364 378
 	// List all the membergroups so the user can choose who may access this board.
365
-	foreach ($context['groups'] as $group)
366
-		if (empty($modSettings['deny_boards_access']))
379
+	foreach ($context['groups'] as $group) {
380
+			if (empty($modSettings['deny_boards_access']))
367 381
 			echo '
368 382
 						<label for="groups_', $group['id'], '">
369 383
 							<input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), ' class="input_check">
@@ -371,8 +385,9 @@  discard block
 block discarded – undo
371 385
 								', $group['name'], '
372 386
 							</span>
373 387
 						</label><br>';
374
-		else
375
-			echo '
388
+	}
389
+		else {
390
+					echo '
376 391
 							<tr>
377 392
 								<td>
378 393
 									<label for="groups_', $group['id'], '_a">
@@ -392,16 +407,17 @@  discard block
 block discarded – undo
392 407
 								</td>
393 408
 								<td></td>
394 409
 							</tr>';
410
+		}
395 411
 
396
-	if (empty($modSettings['deny_boards_access']))
397
-		echo '
412
+	if (empty($modSettings['deny_boards_access'])) {
413
+			echo '
398 414
 						<span class="select_all_box">
399 415
 							<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[\');">
400 416
 						</span>
401 417
 						<br><br>
402 418
 					</dd>';
403
-	else
404
-		echo '
419
+	} else {
420
+			echo '
405 421
 							<tr class="select_all_box">
406 422
 								<td>
407 423
 								</td>
@@ -420,6 +436,7 @@  discard block
 block discarded – undo
420 436
 							</tr>
421 437
 						</table>
422 438
 					</dd>';
439
+	}
423 440
 
424 441
 	// Options to choose moderators, specify as announcement board and choose whether to count posts here.
425 442
 	echo '
@@ -474,8 +491,8 @@  discard block
 block discarded – undo
474 491
 					</dl>
475 492
 				</div>';
476 493
 
477
-		if ($context['board']['redirect'])
478
-			echo '
494
+		if ($context['board']['redirect']) {
495
+					echo '
479 496
 				<div id="reset_redirect_div">
480 497
 					<dl class="settings">
481 498
 						<dt>
@@ -488,6 +505,7 @@  discard block
 block discarded – undo
488 505
 						</dd>
489 506
 					</dl>
490 507
 				</div>';
508
+		}
491 509
 	}
492 510
 
493 511
 	echo '
@@ -515,9 +533,10 @@  discard block
 block discarded – undo
515 533
 							<select name="boardtheme" id="boardtheme" onchange="refreshOptions();">
516 534
 								<option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>';
517 535
 
518
-	foreach ($context['themes'] as $theme)
519
-		echo '
536
+	foreach ($context['themes'] as $theme) {
537
+			echo '
520 538
 									<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>';
539
+	}
521 540
 
522 541
 	echo '
523 542
 							</select>
@@ -536,9 +555,10 @@  discard block
 block discarded – undo
536 555
 					</dl>
537 556
 				</div>';
538 557
 
539
-	if (!empty($context['board']['is_recycle']))
540
-		echo '
558
+	if (!empty($context['board']['is_recycle'])) {
559
+			echo '
541 560
 				<div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>';
561
+	}
542 562
 
543 563
 	echo '
544 564
 				<input type="hidden" name="rid" value="', $context['redirect_location'], '">
@@ -546,21 +566,24 @@  discard block
 block discarded – undo
546 566
 				<input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">';
547 567
 
548 568
 	// If this board has no children don't bother with the next confirmation screen.
549
-	if ($context['board']['no_children'])
550
-		echo '
569
+	if ($context['board']['no_children']) {
570
+			echo '
551 571
 				<input type="hidden" name="no_children" value="1">';
572
+	}
552 573
 
553
-	if (isset($context['board']['is_new']))
554
-		echo '
574
+	if (isset($context['board']['is_new'])) {
575
+			echo '
555 576
 				<input type="hidden" name="cur_cat" value="', $context['board']['category'], '">
556 577
 				<input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">';
557
-	else
558
-		echo '
578
+	} else {
579
+			echo '
559 580
 				<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">';
581
+	}
560 582
 
561
-	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle']))
562
-		echo '
583
+	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) {
584
+			echo '
563 585
 				<input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button_submit you_sure">';
586
+	}
564 587
 	echo '
565 588
 			</div>
566 589
 		</form>
@@ -581,12 +604,13 @@  discard block
 block discarded – undo
581 604
 		sItemListContainerId: \'moderator_container\',
582 605
 		aListItems: [';
583 606
 
584
-	foreach ($context['board']['moderators'] as $id_member => $member_name)
585
-		echo '
607
+	foreach ($context['board']['moderators'] as $id_member => $member_name) {
608
+			echo '
586 609
 					{
587 610
 						sItemId: ', JavaScriptEscape($id_member), ',
588 611
 						sItemName: ', JavaScriptEscape($member_name), '
589 612
 					}', $id_member == $context['board']['last_moderator_id'] ? '' : ',';
613
+	}
590 614
 
591 615
 	echo '
592 616
 		]
@@ -606,12 +630,13 @@  discard block
 block discarded – undo
606 630
 		sItemListContainerId: \'moderator_group_container\',
607 631
 		aListItems: [';
608 632
 
609
-	foreach ($context['board']['moderator_groups'] as $id_group => $group_name)
610
-		echo '
633
+	foreach ($context['board']['moderator_groups'] as $id_group => $group_name) {
634
+			echo '
611 635
 					{
612 636
 						sItemId: ', JavaScriptEscape($id_group), ',
613 637
 						sItemName: ', JavaScriptEscape($group_name), '
614 638
 					}', $id_group == $context['board']['last_moderator_group_id'] ? '' : ',';
639
+	}
615 640
 
616 641
 		echo '
617 642
 			]
@@ -637,9 +662,10 @@  discard block
 block discarded – undo
637 662
 		echo '
638 663
 			document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";';
639 664
 
640
-		if ($context['board']['redirect'])
641
-			echo '
665
+		if ($context['board']['redirect']) {
666
+					echo '
642 667
 			document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";';
668
+		}
643 669
 	}
644 670
 
645 671
 	echo '
@@ -668,9 +694,10 @@  discard block
 block discarded – undo
668 694
 				<p>', $txt['mboards_delete_board_contains'], '</p>
669 695
 					<ul>';
670 696
 
671
-	foreach ($context['children'] as $child)
672
-		echo '
697
+	foreach ($context['children'] as $child) {
698
+			echo '
673 699
 						<li>', $child['node']['name'], '</li>';
700
+	}
674 701
 
675 702
 	echo '
676 703
 					</ul>
@@ -684,10 +711,11 @@  discard block
 block discarded – undo
684 711
 					<label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>:
685 712
 					<select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>';
686 713
 
687
-	foreach ($context['board_order'] as $board)
688
-		if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
714
+	foreach ($context['board_order'] as $board) {
715
+			if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
689 716
 			echo '
690 717
 						<option value="', $board['id'], '">', $board['name'], '</option>';
718
+	}
691 719
 
692 720
 	echo '
693 721
 					</select>
Please login to merge, or discard this patch.
Themes/default/Help.template.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 		<meta charset="', $context['character_set'], '">
25 25
 		<meta name="robots" content="noindex">
26 26
 		<title>', $context['page_title'], '</title>
27
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
28
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
27
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
28
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
29 29
 	</head>
30 30
 	<body id="help_popup">
31 31
 		<div class="windowbg description">
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 		<title>', $txt['find_members'], '</title>
51 51
 		<meta charset="', $context['character_set'], '">
52 52
 		<meta name="robots" content="noindex">
53
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
54
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
53
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
54
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
55 55
 		<script>
56 56
 			var membersAdded = [];
57 57
 			function addMember(name)
Please login to merge, or discard this patch.
Braces   +15 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,9 +86,10 @@  discard block
 block discarded – undo
86 86
 					<span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>';
87 87
 
88 88
 	// Only offer to search for buddies if we have some!
89
-	if (!empty($context['show_buddies']))
90
-		echo '
89
+	if (!empty($context['show_buddies'])) {
90
+			echo '
91 91
 					<span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>';
92
+	}
92 93
 
93 94
 	echo '
94 95
 					<div class="padding righttext">
@@ -103,10 +104,10 @@  discard block
 block discarded – undo
103 104
 					<h3 class="catbg">', $txt['find_results'], '</h3>
104 105
 				</div>';
105 106
 
106
-	if (empty($context['results']))
107
-		echo '
107
+	if (empty($context['results'])) {
108
+			echo '
108 109
 				<p class="error">', $txt['find_no_results'], '</p>';
109
-	else
110
+	} else
110 111
 	{
111 112
 		echo '
112 113
 				<ul class="padding">';
@@ -135,11 +136,12 @@  discard block
 block discarded – undo
135 136
 			<input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '">
136 137
 		</form>';
137 138
 
138
-	if (empty($context['results']))
139
-		echo '
139
+	if (empty($context['results'])) {
140
+			echo '
140 141
 		<script>
141 142
 			document.getElementById("search").focus();
142 143
 		</script>';
144
+	}
143 145
 
144 146
 	echo '
145 147
 	</body>
@@ -183,8 +185,8 @@  discard block
 block discarded – undo
183 185
 {
184 186
 	global $txt, $context, $modSettings;
185 187
 
186
-	if (!empty($modSettings['requireAgreement']))
187
-		echo '
188
+	if (!empty($modSettings['requireAgreement'])) {
189
+			echo '
188 190
 			<div class="cat_bar">
189 191
 				<h3 class="catbg">
190 192
 					', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], '
@@ -193,11 +195,12 @@  discard block
 block discarded – undo
193 195
 			<div class="roundframe">
194 196
 				', $context['agreement'], '
195 197
 			</div>';
196
-	else
197
-		echo '
198
+	} else {
199
+			echo '
198 200
 			<div class="noticebox">
199 201
 				', $txt['agreement_disabled'], '
200 202
 			</div>';
201
-}
203
+	}
204
+	}
202 205
 
203 206
 ?>
204 207
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/ManageMaintenance.template.php 1 patch
Braces   +36 added lines, -25 removed lines patch added patch discarded remove patch
@@ -18,11 +18,12 @@  discard block
 block discarded – undo
18 18
 	global $context, $txt, $scripturl, $modSettings;
19 19
 
20 20
 	// If maintenance has finished tell the user.
21
-	if (!empty($context['maintenance_finished']))
22
-		echo '
21
+	if (!empty($context['maintenance_finished'])) {
22
+			echo '
23 23
 			<div class="infobox">
24 24
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
25 25
 			</div>';
26
+	}
26 27
 
27 28
 	echo '
28 29
 	<div id="manage_maintenance">
@@ -107,11 +108,12 @@  discard block
 block discarded – undo
107 108
 	<div id="manage_maintenance">';
108 109
 
109 110
 	// If maintenance has finished tell the user.
110
-	if (!empty($context['maintenance_finished']))
111
-		echo '
111
+	if (!empty($context['maintenance_finished'])) {
112
+			echo '
112 113
 			<div class="infobox">
113 114
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
114 115
 			</div>';
116
+	}
115 117
 
116 118
 	echo '
117 119
 		<div class="cat_bar">
@@ -238,11 +240,12 @@  discard block
 block discarded – undo
238 240
 	<div id="manage_maintenance">';
239 241
 
240 242
 	// If maintenance has finished tell the user.
241
-	if (!empty($context['maintenance_finished']))
242
-	echo '
243
+	if (!empty($context['maintenance_finished'])) {
244
+		echo '
243 245
 		<div class="infobox">
244 246
 			', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
245 247
 		</div>';
248
+	}
246 249
 
247 250
 	echo '
248 251
 		<div class="cat_bar">
@@ -300,9 +303,10 @@  discard block
 block discarded – undo
300 303
 				<p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="membersIcon"></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p>
301 304
 				<div style="display: none; padding: 3px" id="membersPanel">';
302 305
 
303
-	foreach ($context['membergroups'] as $group)
304
-		echo '
306
+	foreach ($context['membergroups'] as $group) {
307
+			echo '
305 308
 					<label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked class="input_check"> ', $group['name'], '</label><br>';
309
+	}
306 310
 
307 311
 	echo '
308 312
 				</div>
@@ -346,11 +350,12 @@  discard block
 block discarded – undo
346 350
 	global $scripturl, $txt, $context, $settings, $modSettings;
347 351
 
348 352
 	// If maintenance has finished tell the user.
349
-	if (!empty($context['maintenance_finished']))
350
-		echo '
353
+	if (!empty($context['maintenance_finished'])) {
354
+			echo '
351 355
 			<div class="infobox">
352 356
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
353 357
 			</div>';
358
+	}
354 359
 
355 360
 	// Bit of javascript for showing which boards to prune in an otherwise hidden list.
356 361
 	echo '
@@ -418,19 +423,21 @@  discard block
 block discarded – undo
418 423
 								<ul>';
419 424
 
420 425
 		// Display a checkbox with every board.
421
-		foreach ($category['boards'] as $board)
422
-			echo '
426
+		foreach ($category['boards'] as $board) {
427
+					echo '
423 428
 									<li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"><label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked class="input_check">', $board['name'], '</label></li>';
429
+		}
424 430
 
425 431
 		echo '
426 432
 								</ul>
427 433
 							</fieldset>';
428 434
 
429 435
 		// Increase $i, and check if we're at the middle yet.
430
-		if (++$i == $middle)
431
-			echo '
436
+		if (++$i == $middle) {
437
+					echo '
432 438
 						</div>
433 439
 						<div class="floatright" style="width: 49%;">';
440
+		}
434 441
 	}
435 442
 
436 443
 	echo '
@@ -469,9 +476,10 @@  discard block
 block discarded – undo
469 476
 		echo '
470 477
 					<optgroup label="', $category['name'], '">';
471 478
 
472
-		foreach ($category['boards'] as $board)
473
-			echo '
479
+		foreach ($category['boards'] as $board) {
480
+					echo '
474 481
 						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
482
+		}
475 483
 
476 484
 		echo '
477 485
 					</optgroup>';
@@ -489,9 +497,10 @@  discard block
 block discarded – undo
489 497
 		echo '
490 498
 					<optgroup label="', $category['name'], '">';
491 499
 
492
-		foreach ($category['boards'] as $board)
493
-			echo '
500
+		foreach ($category['boards'] as $board) {
501
+					echo '
494 502
 						<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
503
+		}
495 504
 
496 505
 		echo '
497 506
 					</optgroup>';
@@ -531,9 +540,10 @@  discard block
 block discarded – undo
531 540
 				', $txt['database_optimize_attempt'], '<br>';
532 541
 
533 542
 	// List each table being optimized...
534
-	foreach ($context['optimized_tables'] as $table)
535
-		echo '
543
+	foreach ($context['optimized_tables'] as $table) {
544
+			echo '
536 545
 				', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>';
546
+	}
537 547
 
538 548
 	// How did we go?
539 549
 	echo '
@@ -590,13 +600,14 @@  discard block
 block discarded – undo
590 600
 				', implode('</li><li>', $context['exceeding_messages']), '
591 601
 				</li>
592 602
 			</ul>';
593
-		if (!empty($context['exceeding_messages_morethan']))
594
-			echo '
603
+		if (!empty($context['exceeding_messages_morethan'])) {
604
+					echo '
595 605
 			<p>', $context['exceeding_messages_morethan'], '</p>';
596
-	}
597
-	else
598
-		echo '
606
+		}
607
+	} else {
608
+			echo '
599 609
 			<p class="infobox">', $txt['convert_to_text'], '</p>';
610
+	}
600 611
 
601 612
 	echo '
602 613
 			<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '">
Please login to merge, or discard this patch.
Themes/default/SplitTopics.template.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 				</div>
102 102
 				<ul id="messages_not_selected" class="split_messages smalltext">';
103 103
 
104
-	foreach ($context['not_selected']['messages'] as $message)
105
-		echo '
104
+	foreach ($context['not_selected']['messages'] as $message) {
105
+			echo '
106 106
 					<li class="windowbg" id="not_selected_', $message['id'], '">
107 107
 						<div class="message_header">
108 108
 							<a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="-&gt;"></span></a>
@@ -111,6 +111,7 @@  discard block
 block discarded – undo
111 111
 						</div>
112 112
 						<div class="post">', $message['body'], '</div>
113 113
 					</li>';
114
+	}
114 115
 
115 116
 	echo '
116 117
 					<li class="dummy">
@@ -130,8 +131,8 @@  discard block
 block discarded – undo
130 131
 				</div>
131 132
 				<ul id="messages_selected" class="split_messages smalltext">';
132 133
 
133
-	if (!empty($context['selected']['messages']))
134
-		foreach ($context['selected']['messages'] as $message)
134
+	if (!empty($context['selected']['messages'])) {
135
+			foreach ($context['selected']['messages'] as $message)
135 136
 			echo '
136 137
 					<li class="windowbg" id="selected_', $message['id'], '">
137 138
 						<div class="message_header">
@@ -141,6 +142,7 @@  discard block
 block discarded – undo
141 142
 						</div>
142 143
 						<div class="post">', $message['body'], '</div>
143 144
 					</li>';
145
+	}
144 146
 
145 147
 	echo '
146 148
 					<li class="dummy">
Please login to merge, or discard this patch.