Passed
Push — patch_1-1-9 ( d927f0...e2616d )
by Spuds
01:06 queued 27s
created
themes/default/Maintenance.template.php 1 patch
Braces   +33 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,10 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
 	// If maintenance has finished tell the user.
31 31
 	if (!empty($context['maintenance_finished']))
32
-		echo '
32
+	{
33
+			echo '
33 34
 			<div class="successbox">
34 35
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
35 36
 			</div>';
37
+	}
36 38
 
37 39
 	echo '
38 40
 	<div id="manage_maintenance">
@@ -55,10 +57,12 @@  discard block
 block discarded – undo
55 57
 				<p>', $txt['maintain_backup_info'], '</p>';
56 58
 
57 59
 	if ($context['safe_mode_enable'])
58
-		echo '
60
+	{
61
+			echo '
59 62
 			<div class="errorbox">', $txt['safe_mode_enabled'], '</div>';
60
-	else
61
-		echo '
63
+	}
64
+	else {
65
+			echo '
62 66
 				<div class="', $context['suggested_method'] == 'use_external_tool' || $context['use_maintenance'] != 0 ? 'errorbox' : 'infobox', '">
63 67
 					', $txt[$context['suggested_method']], $context['use_maintenance'] != 0 ? '
64 68
 					<br />
@@ -69,6 +73,7 @@  discard block
 block discarded – undo
69 73
 					<label for="data"><input type="checkbox" name="data" id="data" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked &amp;&amp; !document.getElementById(\'data\').checked;" checked="checked" /> ', $txt['maintain_backup_data'], '</label><br />
70 74
 					<label for="compress"><input type="checkbox" name="compress" id="compress" value="gzip"', $context['suggested_method'] == 'zipped_file' ? ' checked="checked"' : '', ' /> ', $txt['maintain_backup_gz'], '</label>
71 75
 					</p>';
76
+	}
72 77
 
73 78
 	if (empty($context['skip_security']))
74 79
 	{
@@ -90,7 +95,8 @@  discard block
 block discarded – undo
90 95
 
91 96
 	// Show an option to convert the body column of the post table to MEDIUMTEXT or TEXT
92 97
 	if (isset($context['convert_to']))
93
-		echo '
98
+	{
99
+			echo '
94 100
 		<h2 class="category_header">', $txt[$context['convert_to'] . '_title'], '</h2>
95 101
 		<div class="content">
96 102
 			<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="UTF-8">
@@ -103,6 +109,7 @@  discard block
 block discarded – undo
103 109
 				</div>
104 110
 			</form>
105 111
 		</div>';
112
+	}
106 113
 
107 114
 	echo '
108 115
 	</div>';
@@ -121,10 +128,12 @@  discard block
 block discarded – undo
121 128
 
122 129
 	// If maintenance has finished tell the user.
123 130
 	if (!empty($context['maintenance_finished']))
124
-		echo '
131
+	{
132
+			echo '
125 133
 			<div class="successbox">
126 134
 				', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
127 135
 			</div>';
136
+	}
128 137
 
129 138
 	foreach ($context['routine_actions'] as $action)
130 139
 	{
@@ -137,9 +146,11 @@  discard block
 block discarded – undo
137 146
 					<input type="submit" value="', $action['submit'], '" />';
138 147
 
139 148
 		if (!empty($action['hidden']))
140
-			foreach ($action['hidden'] as $name => $val)
149
+		{
150
+					foreach ($action['hidden'] as $name => $val)
141 151
 				echo '
142 152
 						<input type="hidden" name="', $context[$name], '" value="', $context[$val], '" />';
153
+		}
143 154
 
144 155
 		echo '
145 156
 				</div>
@@ -233,8 +244,10 @@  discard block
 block discarded – undo
233 244
 				<legend data-collapsed="true">', $txt['maintain_members_all'], '</legend>';
234 245
 
235 246
 	foreach ($context['membergroups'] as $group)
236
-		echo '
247
+	{
248
+			echo '
237 249
 				<label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked="checked" /> ', $group['name'], '</label><br />';
250
+	}
238 251
 
239 252
 	echo '
240 253
 			</fieldset>
@@ -300,9 +313,11 @@  discard block
 block discarded – undo
300 313
 				<input type="submit" value="', $maintenace['submit'], '" ', !empty($maintenace['confirm']) ? 'onclick="return confirm(\'' . $maintenace['confirm'] . '\');"' : '', ' />';
301 314
 
302 315
 		if (!empty($maintenace['hidden']))
303
-			foreach ($maintenace['hidden'] as $name => $val)
316
+		{
317
+					foreach ($maintenace['hidden'] as $name => $val)
304 318
 				echo '
305 319
 				<input type="hidden" name="', $context[$name], '" value="', $context[$val], '" />';
320
+		}
306 321
 
307 322
 		echo '
308 323
 			</div>
@@ -378,8 +393,10 @@  discard block
 block discarded – undo
378 393
 
379 394
 	// List each table being optimized...
380 395
 	foreach ($context['optimized_tables'] as $table)
381
-		echo '
396
+	{
397
+			echo '
382 398
 				', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br />';
399
+	}
383 400
 
384 401
 	// How did we go?
385 402
 	echo '
@@ -418,12 +435,15 @@  discard block
 block discarded – undo
418 435
 			</ul>';
419 436
 
420 437
 		if (!empty($context['exceeding_messages_morethan']))
421
-			echo '
438
+		{
439
+					echo '
422 440
 			<p>', $context['exceeding_messages_morethan'], '</p>';
441
+		}
423 442
 	}
424
-	else
425
-		echo '
443
+	else {
444
+			echo '
426 445
 			<p class="successbox">', $txt['convert_to_text'], '</p>';
446
+	}
427 447
 
428 448
 	echo '
429 449
 			<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="UTF-8">
Please login to merge, or discard this patch.
themes/default/ManageMembergroups.template.php 1 patch
Braces   +83 added lines, -32 removed lines patch added patch discarded remove patch
@@ -59,9 +59,11 @@  discard block
 block discarded – undo
59 59
 							<label for="group_type_private">', $txt['membergroups_group_type_private'], '</label><br />';
60 60
 
61 61
 		if ($context['allow_protected'])
62
-			echo '
62
+		{
63
+					echo '
63 64
 							<input type="radio" name="group_type" id="group_type_protected" value="1" onclick="swapPostGroup(0);" />
64 65
 							<label for="group_type_protected">', $txt['membergroups_group_type_protected'], '</label><br />';
66
+		}
65 67
 
66 68
 		echo '
67 69
 							<input type="radio" name="group_type" id="group_type_request" value="2" onclick="swapPostGroup(0);" />
@@ -77,13 +79,15 @@  discard block
 block discarded – undo
77 79
 	}
78 80
 
79 81
 	if ($context['post_group'] || $context['undefined_group'])
80
-		echo '
82
+	{
83
+			echo '
81 84
 					<dt id="min_posts_text">
82 85
 						<label for="min_posts_input">', $txt['membergroups_min_posts'], ':</label>
83 86
 					</dt>
84 87
 					<dd>
85 88
 						<input type="text" name="min_posts" id="min_posts_input" size="5" class="input_text" />
86 89
 					</dd>';
90
+	}
87 91
 
88 92
 	if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups']))
89 93
 	{
@@ -102,8 +106,10 @@  discard block
 block discarded – undo
102 106
 								<option value="0" selected="selected">', $txt['membergroups_members'], '</option>';
103 107
 
104 108
 		foreach ($context['groups'] as $group)
105
-			echo '
109
+		{
110
+					echo '
106 111
 								<option value="', $group['id'], '">', $group['name'], '</option>';
112
+		}
107 113
 
108 114
 		echo '
109 115
 							</select>
@@ -115,8 +121,10 @@  discard block
 block discarded – undo
115 121
 								<option value="0" selected="selected">', $txt['membergroups_members'], '</option>';
116 122
 
117 123
 		foreach ($context['groups'] as $group)
118
-			echo '
124
+		{
125
+					echo '
119 126
 								<option value="', $group['id'], '">', $group['name'], '</option>';
127
+		}
120 128
 
121 129
 		echo '
122 130
 							</select>
@@ -195,13 +203,15 @@  discard block
 block discarded – undo
195 203
 					</dd>';
196 204
 
197 205
 	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
198
-		echo '
206
+	{
207
+			echo '
199 208
 					<dt id="group_desc_text">
200 209
 						<label for="group_desc_input">', $txt['membergroups_edit_desc'], ':</label>
201 210
 					</dt>
202 211
 					<dd>
203 212
 						<textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea>
204 213
 					</dd>';
214
+	}
205 215
 
206 216
 	// Group type...
207 217
 	if ($context['group']['allow_post_group'])
@@ -218,9 +228,11 @@  discard block
 block discarded – undo
218 228
 							<label for="group_type_private">', $txt['membergroups_group_type_private'], '</label><br />';
219 229
 
220 230
 		if ($context['group']['allow_protected'])
221
-			echo '
231
+		{
232
+					echo '
222 233
 							<input type="radio" name="group_type" id="group_type_protected" value="1" ', $context['group']['type'] == 1 ? 'checked="checked"' : '', ' onclick="swapPostGroup(0);" />
223 234
 							<label for="group_type_protected">', $txt['membergroups_group_type_protected'], '</label><br />';
235
+		}
224 236
 
225 237
 
226 238
 		echo '
@@ -235,7 +247,8 @@  discard block
 block discarded – undo
235 247
 	}
236 248
 
237 249
 	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
238
-		echo '
250
+	{
251
+			echo '
239 252
 					<dt id="group_moderators_text">
240 253
 						<label for="group_moderators">', $txt['moderators'], ':</label>
241 254
 					</dt>
@@ -253,6 +266,7 @@  discard block
 block discarded – undo
253 266
 							<option value="2" ', $context['group']['hidden'] == 2 ? 'selected="selected"' : '', '>', $txt['membergroups_edit_hidden_all'], '</option>
254 267
 						</select>
255 268
 					</dd>';
269
+	}
256 270
 
257 271
 	// Can they inherit permissions?
258 272
 	if ($context['group']['id'] > 1 && $context['group']['id'] != 3)
@@ -270,8 +284,10 @@  discard block
 block discarded – undo
270 284
 
271 285
 		// For all the inheritable groups show an option.
272 286
 		foreach ($context['inheritable_groups'] as $id => $group)
273
-			echo '
287
+		{
288
+					echo '
274 289
 							<option value="', $id, '" ', $context['group']['inherited_from'] == $id ? 'selected="selected"' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>';
290
+		}
275 291
 
276 292
 		echo '
277 293
 						</select>
@@ -280,23 +296,27 @@  discard block
 block discarded – undo
280 296
 	}
281 297
 
282 298
 	if ($context['group']['allow_post_group'])
283
-		echo '
299
+	{
300
+			echo '
284 301
 					<dt id="min_posts_text">
285 302
 						<label for="min_posts_input">', $txt['membergroups_min_posts'], ':</label>
286 303
 					</dt>
287 304
 					<dd>
288 305
 						<input type="text" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6" class="input_text" />
289 306
 					</dd>';
307
+	}
290 308
 
291 309
 	// Hide the online color for our local moderators group.
292 310
 	if ($context['group']['id'] != 3)
293
-		echo '
311
+	{
312
+			echo '
294 313
 					<dt>
295 314
 						<label for="online_color_input">', $txt['membergroups_online_color'], ':</label>
296 315
 					</dt>
297 316
 					<dd>
298 317
 						<input type="text" name="online_color" id="online_color_input" value="', $context['group']['color'], '" size="20" class="input_text" />
299 318
 					</dd>';
319
+	}
300 320
 	echo '
301 321
 					<dt>
302 322
 						<label for="icon_count_input">', $txt['membergroups_icon_count'], ':</label>
@@ -391,11 +411,13 @@  discard block
 block discarded – undo
391 411
 			aListItems: [';
392 412
 
393 413
 		foreach ($context['group']['moderators'] as $id_member => $member_name)
394
-			$js .= '
414
+		{
415
+					$js .= '
395 416
 						{
396 417
 							sItemId: ' . JavaScriptEscape($id_member) . ',
397 418
 							sItemName: ' . JavaScriptEscape($member_name) . '
398 419
 						}' . $id_member == $context['group']['last_moderator_id'] ? '' : ',';
420
+		}
399 421
 
400 422
 		$js .= '
401 423
 			]
@@ -406,8 +428,10 @@  discard block
 block discarded – undo
406 428
 
407 429
 	// If post based is selected, disable moderation selection, visability, group description and enable post count,
408 430
 	if ($context['group']['allow_post_group'])
409
-		addInlineJavascript('swapPostGroup(' . ($context['group']['is_post_group'] ? 'true' : 'false') . ');', true);
410
-}
431
+	{
432
+			addInlineJavascript('swapPostGroup(' . ($context['group']['is_post_group'] ? 'true' : 'false') . ');', true);
433
+	}
434
+	}
411 435
 
412 436
 /**
413 437
  * Template to edit the boards and groups access to them
@@ -431,18 +455,22 @@  discard block
 block discarded – undo
431 455
 	foreach ($context['categories'] as $category)
432 456
 	{
433 457
 		if (empty($deny))
434
-			echo '
458
+		{
459
+					echo '
435 460
 									<li class="category">
436 461
 										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'', $form_id, '\', \'boardaccess\'); return false;"><strong>', $category['name'], '</strong></a>
437 462
 									<ul>';
438
-		else
439
-			echo '
463
+		}
464
+		else {
465
+					echo '
440 466
 									<li class="category">
441 467
 										<strong>', $category['name'], '</strong>
442 468
 										<ul id="boards_list_', $category['id'], '">';
469
+		}
443 470
 
444 471
 		if (!empty($deny))
445
-			echo '
472
+		{
473
+					echo '
446 474
 										<li class="board select_category">
447 475
 											', $txt['all_boards_in_cat'], ':
448 476
 											<span class="floatright">
@@ -457,17 +485,20 @@  discard block
 block discarded – undo
457 485
 												</label>
458 486
 											</span>
459 487
 										</li>';
488
+		}
460 489
 
461 490
 		foreach ($category['boards'] as $board)
462 491
 		{
463 492
 			if (empty($deny))
464
-				echo '
493
+			{
494
+							echo '
465 495
 										<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
466 496
 											<input id="brd', $board['id'], '"  name="boardaccess[', $board['id'], ']" type="checkbox" value="allow" ', $board['allow'] ? ' checked="checked"' : '', ' />
467 497
 											<label for="brd', $board['id'], '">', $board['name'], '</label>
468 498
 										</li>';
469
-			else
470
-				echo '
499
+			}
500
+			else {
501
+							echo '
471 502
 										<li class="board">
472 503
 											<span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span>
473 504
 											<span class="floatright">
@@ -482,6 +513,7 @@  discard block
 block discarded – undo
482 513
 												</label>
483 514
 											</span>
484 515
 										</li>';
516
+			}
485 517
 		}
486 518
 
487 519
 		echo '
@@ -493,14 +525,16 @@  discard block
 block discarded – undo
493 525
 							</ul>';
494 526
 
495 527
 	if (empty($deny))
496
-		echo '
528
+	{
529
+			echo '
497 530
 								<br />
498 531
 								<div class="select_all_box">
499 532
 									<input id="checkall_check" type="checkbox" onclick="invertAll(this, this.form, \'boardaccess\');" />
500 533
 									<label for="checkall_check"><em>', $txt['check_all'], '</em></label>
501 534
 								</div>';
502
-	else
503
-		echo '
535
+	}
536
+	else {
537
+			echo '
504 538
 								<div class="select_all_box">
505 539
 									', $txt['all'], ':
506 540
 									<span class="floatright">
@@ -515,6 +549,7 @@  discard block
 block discarded – undo
515 549
 										</label>
516 550
 									</span>
517 551
 								</div>';
552
+	}
518 553
 
519 554
 	// select_all_box is hidden and it's made available only if js is enabled
520 555
 	echo '
@@ -550,13 +585,15 @@  discard block
 block discarded – undo
550 585
 
551 586
 	// Any description to show?
552 587
 	if (!empty($context['group']['description']))
553
-		echo '
588
+	{
589
+			echo '
554 590
 					<dt>
555 591
 						<label>' . $txt['membergroups_members_description'] . ':</label>
556 592
 					</dt>
557 593
 					<dd>
558 594
 						', $context['group']['description'], '
559 595
 					</dd>';
596
+	}
560 597
 
561 598
 	echo '
562 599
 					<dt>
@@ -571,7 +608,9 @@  discard block
 block discarded – undo
571 608
 	{
572 609
 		$moderators = array();
573 610
 		foreach ($context['group']['moderators'] as $moderator)
574
-			$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
611
+		{
612
+					$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
613
+		}
575 614
 
576 615
 		echo '
577 616
 					<dt>
@@ -593,8 +632,10 @@  discard block
 block discarded – undo
593 632
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <i class="icon icon-small i-sort-alpha-' . $context['sort_direction'] . '"></i>' : '', '</a></th>';
594 633
 
595 634
 	if ($context['can_send_email'])
596
-		echo '
635
+	{
636
+			echo '
597 637
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <i class="icon icon-small i-sort-alpha-' . $context['sort_direction'] . '"></i>' : '', '</a></th>';
638
+	}
598 639
 
599 640
 	echo '
600 641
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<i class="icon icon-small i-sort-numeric-' . $context['sort_direction'] . '"></i>' : '', '</a></th>
@@ -602,8 +643,10 @@  discard block
 block discarded – undo
602 643
 						<th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <i class="icon icon-small i-sort-numeric-' . $context['sort_direction'] . '"></i>' : '', '</a></th>';
603 644
 
604 645
 	if (!empty($context['group']['assignable']))
605
-		echo '
646
+	{
647
+			echo '
606 648
 						<th style="width: 4%;"><input type="checkbox" onclick="invertAll(this, this.form);" /></th>';
649
+	}
607 650
 
608 651
 	echo '
609 652
 					</tr>
@@ -611,10 +654,12 @@  discard block
 block discarded – undo
611 654
 				<tbody>';
612 655
 
613 656
 	if (empty($context['members']))
614
-		echo '
657
+	{
658
+			echo '
615 659
 					<tr>
616 660
 						<td colspan="6" class="centertext">', $txt['membergroups_members_no_members'], '</td>
617 661
 					</tr>';
662
+	}
618 663
 
619 664
 	foreach ($context['members'] as $member)
620 665
 	{
@@ -634,10 +679,12 @@  discard block
 block discarded – undo
634 679
 						<td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>';
635 680
 
636 681
 		if (!empty($context['group']['assignable']))
637
-			echo '
682
+		{
683
+					echo '
638 684
 						<td class="centertext" style="width: 4%;">
639 685
 							<input type="checkbox" name="rem[]" value="', $member['id'], '" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/>
640 686
 						</td>';
687
+		}
641 688
 
642 689
 		echo '
643 690
 					</tr>';
@@ -678,7 +725,8 @@  discard block
 block discarded – undo
678 725
 	</div>';
679 726
 
680 727
 	if (!empty($context['group']['assignable']))
681
-		addInlineJavascript('
728
+	{
729
+			addInlineJavascript('
682 730
 		var oAddMemberSuggest = new smc_AutoSuggest({
683 731
 			sSelf: \'oAddMemberSuggest\',
684 732
 			sSessionId: elk_session_id,
@@ -692,7 +740,8 @@  discard block
 block discarded – undo
692 740
 			bItemList: true,
693 741
 			sItemListContainerId: \'toAddItemContainer\'
694 742
 		});', true);
695
-}
743
+	}
744
+	}
696 745
 
697 746
 /**
698 747
  * Allow the moderator to enter a reason to each user being rejected.
@@ -711,7 +760,8 @@  discard block
 block discarded – undo
711 760
 
712 761
 	// Loop through and print out a reason box for each...
713 762
 	foreach ($context['group_requests'] as $request)
714
-		echo '
763
+	{
764
+			echo '
715 765
 					<dt>
716 766
 						<label for="groupreason">', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</label>
717 767
 					</dt>
@@ -719,6 +769,7 @@  discard block
 block discarded – undo
719 769
 						<input type="hidden" name="groupr[]" value="', $request['id'], '" />
720 770
 						<textarea id="groupreason" name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea>
721 771
 					</dd>';
772
+	}
722 773
 
723 774
 	echo '
724 775
 				</dl>
Please login to merge, or discard this patch.
themes/default/Profile.template.php 1 patch
Braces   +38 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,18 +30,22 @@  discard block
 block discarded – undo
30 30
 
31 31
 	// Prevent browssers from auto completing fields when viewing/editing other members profiles
32 32
 	if (!$context['user']['is_owner'])
33
-		addInlineJavascript('disableAutoComplete();', true);
33
+	{
34
+			addInlineJavascript('disableAutoComplete();', true);
35
+	}
34 36
 
35 37
 	// If an error occurred while trying to save previously, give the user a clue!
36 38
 	template_error_message();
37 39
 
38 40
 	// If the profile was update successfully, let the user know this.
39 41
 	if (!empty($context['profile_updated']))
40
-		echo '
42
+	{
43
+			echo '
41 44
 					<div class="successbox">
42 45
 						', $context['profile_updated'], '
43 46
 					</div>';
44
-}
47
+	}
48
+	}
45 49
 
46 50
 /**
47 51
  * Template for showing all the drafts of the user.
@@ -51,7 +55,9 @@  discard block
 block discarded – undo
51 55
 	global $context, $settings, $txt, $scripturl;
52 56
 
53 57
 	if (!empty($context['drafts']))
54
-		template_pagesection();
58
+	{
59
+			template_pagesection();
60
+	}
55 61
 
56 62
 	echo '
57 63
 		<div id="recentposts" class="profile_center">
@@ -65,10 +71,12 @@  discard block
 block discarded – undo
65 71
 
66 72
 	// No drafts? Just show an informative message.
67 73
 	if (empty($context['drafts']))
68
-		echo '
74
+	{
75
+			echo '
69 76
 			<div class="information centertext">
70 77
 				', $txt['draft_none'], '
71 78
 			</div>';
79
+	}
72 80
 	else
73 81
 	{
74 82
 		// For every draft to be displayed show the important details.
@@ -77,10 +85,14 @@  discard block
 block discarded – undo
77 85
 			$draft['title'] = '<strong>' . $draft['board']['link'] . ' / ' . $draft['topic']['link'] . '</strong>&nbsp;&nbsp;';
78 86
 
79 87
 			if (!empty($draft['sticky']))
80
-				$draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="' . $txt['sticky_topic'] . '" title="' . $txt['sticky_topic'] . '" />';
88
+			{
89
+							$draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_sticky.png" alt="' . $txt['sticky_topic'] . '" title="' . $txt['sticky_topic'] . '" />';
90
+			}
81 91
 
82 92
 			if (!empty($draft['locked']))
83
-				$draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="' . $txt['locked_topic'] . '" title="' . $txt['locked_topic'] . '" />';
93
+			{
94
+							$draft['title'] .= '<img src="' . $settings['images_url'] . '/icons/quick_lock.png" alt="' . $txt['locked_topic'] . '" title="' . $txt['locked_topic'] . '" />';
95
+			}
84 96
 
85 97
 			$draft['date'] = '&#171; <strong>' . $txt['draft_saved_on'] . ':</strong> ' . ($draft['age'] > 0 ? sprintf($txt['draft_days_ago'], $draft['age']) : $draft['time']) . (!empty($draft['remaining']) ? ', ' . sprintf($txt['draft_retain'], $draft['remaining']) : '') . ' &#187;';
86 98
 			$draft['class'] = 'content';
@@ -114,7 +126,8 @@  discard block
 block discarded – undo
114 126
 
115 127
 	// Only show the password box if it's actually needed.
116 128
 	if ($context['require_password'])
117
-		echo '
129
+	{
130
+			echo '
118 131
 					<dl class="clear">
119 132
 						<dt>
120 133
 							<span', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], '</label>: </span><br />
@@ -124,21 +137,27 @@  discard block
 block discarded – undo
124 137
 							<input type="password" id="oldpasswrd" name="oldpasswrd" size="20" class="input_password" placeholder="', $txt['current_password'], '" />
125 138
 						</dd>
126 139
 					</dl>';
140
+	}
127 141
 
128 142
 	echo '
129 143
 					<div class="submitbutton">';
130 144
 
131 145
 	if (!empty($context['token_check']))
132
-		echo '
146
+	{
147
+			echo '
133 148
 						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
149
+	}
134 150
 
135 151
 	// The button shouldn't say "Change profile" unless we're changing the profile...
136 152
 	if (!empty($context['submit_button_text']))
137
-		echo '
153
+	{
154
+			echo '
138 155
 						<input type="submit" name="save" value="', $context['submit_button_text'], '" />';
139
-	else
140
-		echo '
156
+	}
157
+	else {
158
+			echo '
141 159
 						<input type="submit" name="save" value="', $txt['change_profile'], '" />';
160
+	}
142 161
 
143 162
 	echo '
144 163
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -165,8 +184,10 @@  discard block
 block discarded – undo
165 184
 
166 185
 		// Cycle through each error and display an error message.
167 186
 		foreach ($context['post_errors'] as $error)
168
-			echo '
187
+		{
188
+					echo '
169 189
 				<li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>';
190
+		}
170 191
 
171 192
 		echo '
172 193
 			</ul>';
@@ -196,6 +217,8 @@  discard block
 block discarded – undo
196 217
 	// Work out the starting color.
197 218
 	$context['current_color'] = $context['colors'][0];
198 219
 	foreach ($context['colors'] as $limit => $color)
199
-		if ($context['member']['warning'] >= $limit)
220
+	{
221
+			if ($context['member']['warning'] >= $limit)
200 222
 			$context['current_color'] = $color;
201
-}
223
+	}
224
+	}
Please login to merge, or discard this patch.
themes/default/ManageSearch.template.php 1 patch
Braces   +30 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,12 +29,14 @@  discard block
 block discarded – undo
29 29
 			</h2>';
30 30
 
31 31
 	if (!empty($modSettings['search_index']) && (stripos($modSettings['search_index'], 'sphinx') === 0))
32
-		echo '
32
+	{
33
+			echo '
33 34
 			<div class="content">
34 35
 				<div class="infobox">',
35 36
 					$txt['search_weights_sphinx'], '
36 37
 				</div>
37 38
 			</div>';
39
+	}
38 40
 
39 41
 	echo '
40 42
 			<div class="content">
@@ -134,7 +136,8 @@  discard block
 block discarded – undo
134 136
 
135 137
 			';
136 138
 	if (!empty($context['table_info']))
137
-		echo '
139
+	{
140
+			echo '
138 141
 					<dt>
139 142
 						<label>', $txt['search_method_messages_table_space'], ':</label>
140 143
 					</dt>
@@ -147,6 +150,7 @@  discard block
 block discarded – undo
147 150
 					<dd>
148 151
 						', $context['table_info']['index_length'], '
149 152
 					</dd>';
153
+	}
150 154
 
151 155
 	echo '
152 156
 				</dl>
@@ -171,15 +175,20 @@  discard block
 block discarded – undo
171 175
 							<p>';
172 176
 
173 177
 		if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext']))
174
-			echo '
178
+		{
179
+					echo '
175 180
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>';
181
+		}
176 182
 		elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext']))
177
-			echo '
183
+		{
184
+					echo '
178 185
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create'];
179
-		else
180
-			echo '
186
+		}
187
+		else {
188
+					echo '
181 189
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a><br />
182 190
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length'];
191
+		}
183 192
 
184 193
 		echo '
185 194
 							</p>
@@ -195,16 +204,21 @@  discard block
 block discarded – undo
195 204
 							<p>';
196 205
 
197 206
 	if ($context['custom_index'])
198
-		echo '
207
+	{
208
+			echo '
199 209
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a><br />
200 210
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
211
+	}
201 212
 	elseif ($context['partial_custom_index'])
202
-		echo '
213
+	{
214
+			echo '
203 215
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a> <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a><br />
204 216
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
205
-	else
206
-		echo '
217
+	}
218
+	else {
219
+			echo '
207 220
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' <a class="linkbutton" href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>';
221
+	}
208 222
 
209 223
 	echo '
210 224
 							</p>
@@ -214,7 +228,9 @@  discard block
 block discarded – undo
214 228
 	foreach ($context['search_apis'] as $api)
215 229
 	{
216 230
 		if (empty($api['label']) || $api['has_template'])
217
-			continue;
231
+		{
232
+					continue;
233
+		}
218 234
 
219 235
 		echo '
220 236
 						<dt>
@@ -223,10 +239,12 @@  discard block
 block discarded – undo
223 239
 						</dt>';
224 240
 
225 241
 		if ($api['desc'])
226
-			echo '
242
+		{
243
+					echo '
227 244
 						<dd>
228 245
 							<p>', $api['desc'], '</p>
229 246
 						</dd>';
247
+		}
230 248
 	}
231 249
 
232 250
 	echo '
Please login to merge, or discard this patch.
themes/default/Post.template.php 1 patch
Braces   +93 added lines, -32 removed lines patch added patch discarded remove patch
@@ -35,15 +35,19 @@  discard block
 block discarded – undo
35 35
 
36 36
 	// When using Go Back due to fatal_error, allow the form to be re-submitted with changes.
37 37
 	if (isBrowser('is_firefox'))
38
-		echo '
38
+	{
39
+			echo '
39 40
 			window.addEventListener("pageshow", reActivate, false);';
41
+	}
40 42
 
41 43
 	// Start with message icons - and any missing from this theme.
42 44
 	echo '
43 45
 			var icon_urls = {';
44 46
 	foreach ($context['icons'] as $icon)
45
-		echo '
47
+	{
48
+			echo '
46 49
 				\'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ',';
50
+	}
47 51
 	echo '
48 52
 			};';
49 53
 
@@ -76,7 +80,9 @@  discard block
 block discarded – undo
76 80
 	// If an error occurred, explain what happened.
77 81
 	template_show_error('post_error');
78 82
 	if (!empty($context['attachment_error_keys']))
79
-		template_attachment_errors();
83
+	{
84
+			template_attachment_errors();
85
+	}
80 86
 
81 87
 	// If this won't be approved let them know!
82 88
 	// @todo why not use the template_show_error above?
@@ -97,10 +103,12 @@  discard block
 block discarded – undo
97 103
 						</p>';
98 104
 
99 105
 	if (!empty($context['drafts_autosave']))
100
-		echo '
106
+	{
107
+			echo '
101 108
 						<div id="draft_section" class="successbox', isset($context['draft_saved']) ? '"' : ' hide"', '>
102 109
 							', sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), '
103 110
 						</div>';
111
+	}
104 112
 
105 113
 	// The post header... important stuff
106 114
 	echo '
@@ -118,13 +126,15 @@  discard block
 block discarded – undo
118 126
 							</dd>';
119 127
 
120 128
 		if (empty($modSettings['guest_post_no_email']))
121
-			echo '
129
+		{
130
+					echo '
122 131
 							<dt>
123 132
 								<label for="email"', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</label>
124 133
 							</dt>
125 134
 							<dd>
126 135
 								<input type="email" id="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required="required" />
127 136
 							</dd>';
137
+		}
128 138
 	}
129 139
 
130 140
 	// Now show the subject box for this post.
@@ -143,8 +153,10 @@  discard block
 block discarded – undo
143 153
 
144 154
 	// Loop through each message icon allowed, adding it to the drop down list.
145 155
 	foreach ($context['icons'] as $icon)
146
-		echo '
156
+	{
157
+			echo '
147 158
 									<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';
159
+	}
148 160
 
149 161
 	echo '
150 162
 								</select>
@@ -152,12 +164,14 @@  discard block
 block discarded – undo
152 164
 							</dd>';
153 165
 
154 166
 	if (!empty($context['show_boards_dropdown']))
155
-		echo '
167
+	{
168
+			echo '
156 169
 							<dt class="clear_left">
157 170
 								<label for="post_in_board">', $txt['post_in_board'], '</label>:
158 171
 							</dt>
159 172
 							<dd>', template_select_boards('post_in_board'), '
160 173
 							</dd>';
174
+	}
161 175
 
162 176
 	echo '
163 177
 						</dl>';
@@ -199,8 +213,10 @@  discard block
 block discarded – undo
199 213
 
200 214
 	// Show a list of all the years we allow...
201 215
 	for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++)
202
-		echo '
216
+	{
217
+			echo '
203 218
 										<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
219
+	}
204 220
 
205 221
 	echo '
206 222
 									</select>
@@ -209,8 +225,10 @@  discard block
 block discarded – undo
209 225
 
210 226
 	// There are 12 months per year - ensure that they all get listed.
211 227
 	for ($month = 1; $month <= 12; $month++)
212
-		echo '
228
+	{
229
+			echo '
213 230
 										<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
231
+	}
214 232
 
215 233
 	echo '
216 234
 									</select>
@@ -219,8 +237,10 @@  discard block
 block discarded – undo
219 237
 
220 238
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
221 239
 	for ($day = 1; $day <= $context['event']['last_day']; $day++)
222
-		echo '
240
+	{
241
+			echo '
223 242
 										<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
243
+	}
224 244
 
225 245
 	echo '
226 246
 									</select>
@@ -240,8 +260,10 @@  discard block
 block discarded – undo
240 260
 										<select id="span" name="span">';
241 261
 
242 262
 			for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
243
-				echo '
263
+			{
264
+							echo '
244 265
 											<option value="', $days, '"', $days == $context['event']['span'] ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
266
+			}
245 267
 
246 268
 			echo '
247 269
 										</select>
@@ -262,8 +284,10 @@  discard block
 block discarded – undo
262 284
 	}
263 285
 
264 286
 	if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
265
-		echo '
287
+	{
288
+			echo '
266 289
 								<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';
290
+	}
267 291
 
268 292
 	echo '
269 293
 							</fieldset>
@@ -288,8 +312,10 @@  discard block
 block discarded – undo
288 312
 							<div id="mentioned" class="hide">';
289 313
 
290 314
 		foreach ($context['member_ids'] as $id)
291
-			echo '
315
+		{
316
+					echo '
292 317
 								<input type="hidden" name="uid[]" value="', $id, '" />';
318
+		}
293 319
 
294 320
 		echo '
295 321
 							</div>';
@@ -302,13 +328,17 @@  discard block
 block discarded – undo
302 328
 
303 329
 	// Option to delete an event if user is editing one.
304 330
 	if (!empty($context['make_event']) && !$context['event']['new'])
305
-		echo '
331
+	{
332
+			echo '
306 333
 							<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['event_delete_confirm'], '\');" />';
334
+	}
307 335
 
308 336
 	// Option to add a poll (javascript if enabled, otherwise preview with poll)
309 337
 	if (empty($context['make_poll']) && $context['can_add_poll'])
310
-		echo '
338
+	{
339
+			echo '
311 340
 							<input type="submit" name="poll" aria-label="', $txt['add_poll'], '" value="', $txt['add_poll'], '" onclick="return loadAddNewPoll(this, ', empty($context['current_board']) ? '0' : $context['current_board'], ', \'postmodify\');" />';
341
+	}
312 342
 
313 343
 	echo '
314 344
 						</div>';
@@ -323,18 +353,22 @@  discard block
 block discarded – undo
323 353
 
324 354
 	// If the admin has enabled the hiding of the additional options - show a link and image for it.
325 355
 	if (!empty($settings['additional_options_collapsible']))
326
-		echo '
356
+	{
357
+			echo '
327 358
 					<h3 id="postAdditionalOptionsHeader" class="category_header panel_toggle">
328 359
 							<i id="postMoreExpand" class="chevricon i-chevron-', empty($context['minmax_preferences']['post']) ? 'up' : 'down', ' hide" title="', $txt['hide'], '"></i>
329 360
 						<a href="#" id="postMoreExpandLink">', !empty($context['attachments']) && $context['attachments']['can']['post'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a>
330 361
 					</h3>';
362
+	}
331 363
 
332 364
 	echo '
333 365
 					<div id="', empty($settings['additional_options_collapsible']) ? 'postAdditionalOptionsNC"' : 'postAdditionalOptions"', empty($settings['additional_options_collapsible']) || empty($context['minmax_preferences']['post']) ? '' : ' class="hide"', '>';
334 366
 
335 367
 	// Is the user allowed to post or if this post already has attachments on it give them the boxes.
336 368
 	if (!empty($context['attachments']) && ($context['attachments']['can']['post'] || !empty($context['attachments']['current'])))
337
-		$context['attachments']['template']();
369
+	{
370
+			$context['attachments']['template']();
371
+	}
338 372
 
339 373
 	// Display the check boxes for all the standard options - if they are available to the user!
340 374
 	echo '
@@ -387,7 +421,8 @@  discard block
 block discarded – undo
387 421
 
388 422
 		// Show more boxes if they aren't approaching that limit.
389 423
 		if ($context['attachments']['num_allowed'] > 1)
390
-			echo '
424
+		{
425
+					echo '
391 426
 								<script>
392 427
 									var allowed_attachments = ', $context['attachments']['num_allowed'], ',
393 428
 										current_attachment = 1,
@@ -397,18 +432,24 @@  discard block
 block discarded – undo
397 432
 								</script>
398 433
 							</dd>
399 434
 							<dd class="smalltext drop_attachments_no_js" id="moreAttachments"><a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')</a></dd>';
400
-		else
401
-			echo '
435
+		}
436
+		else {
437
+					echo '
402 438
 							</dd>';
439
+		}
403 440
 	}
404 441
 
405 442
 	foreach ($context['attachments']['current'] as $attachment)
406 443
 	{
407 444
 		$label = $attachment['name'];
408 445
 		if (empty($attachment['approved']))
409
-			$label .= ' (' . $txt['awaiting_approval'] . ')';
446
+		{
447
+					$label .= ' (' . $txt['awaiting_approval'] . ')';
448
+		}
410 449
 		if (!empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']))
411
-			$label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0));
450
+		{
451
+					$label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0));
452
+		}
412 453
 
413 454
 		echo '
414 455
 							<dd class="smalltext">
@@ -423,20 +464,28 @@  discard block
 block discarded – undo
423 464
 
424 465
 	// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.
425 466
 	if (!empty($context['attachments']['allowed_extensions']))
426
-		echo '
467
+	{
468
+			echo '
427 469
 								<p id="types">', $txt['allowed_types'], ': ', $context['attachments']['allowed_extensions'], '</p>';
470
+	}
428 471
 
429 472
 	if (!empty($context['attachments']['restrictions']))
430
-		echo '
473
+	{
474
+			echo '
431 475
 								<p id="restrictions">', $txt['attach_restrictions'], ' ', implode(', ', $context['attachments']['restrictions']), '</p>';
476
+	}
432 477
 
433 478
 	if ($context['attachments']['num_allowed'] == 0)
434
-		echo '
479
+	{
480
+			echo '
435 481
 								<p class="infobox">', $txt['attach_limit_nag'], '</p>';
482
+	}
436 483
 
437 484
 	if (!$context['attachments']['can']['post_unapproved'])
438
-		echo '
485
+	{
486
+			echo '
439 487
 								<p class="warningbox">', $txt['attachment_requires_approval'], '</p>';
488
+	}
440 489
 
441 490
 	echo '
442 491
 							</dd>
@@ -537,9 +586,11 @@  discard block
 block discarded – undo
537 586
 							</dd>';
538 587
 
539 588
 	foreach ($context['drafts'] as $draft)
540
-		echo '
589
+	{
590
+			echo '
541 591
 							<dt>', $draft['link'], '</dt>
542 592
 							<dd>', $draft['poster_time'], '</dd>';
593
+	}
543 594
 
544 595
 	echo '
545 596
 						</dl>
@@ -600,7 +651,9 @@  discard block
 block discarded – undo
600 651
 		{
601 652
 			$ignoring = false;
602 653
 			if (!empty($post['is_ignored']))
603
-				$ignored_posts[] = $ignoring = $post['id'];
654
+			{
655
+							$ignored_posts[] = $ignoring = $post['id'];
656
+			}
604 657
 
605 658
 			echo '
606 659
 			<div class="content forumposts">
@@ -611,20 +664,24 @@  discard block
 block discarded – undo
611 664
 						</h5>';
612 665
 
613 666
 			if ($context['can_quote'])
614
-				echo '
667
+			{
668
+							echo '
615 669
 						<ul class="quickbuttons" id="msg_', $post['id'], '_quote">
616 670
 							<li class="listlevel1"><a href="#postmodify" onmousedown="return insertQuoteFast(', $post['id'], ');" class="linklevel1 quote_button">', $txt['bbc_quote'], '</a></li>
617 671
 						</ul>';
672
+			}
618 673
 
619 674
 			echo '
620 675
 					</div>';
621 676
 
622 677
 			if ($ignoring)
623
-				echo '
678
+			{
679
+							echo '
624 680
 					<div id="msg_', $post['id'], '_ignored_prompt">
625 681
 						', $txt['ignoring_user'], '
626 682
 						<a href="#" id="msg_', $post['id'], '_ignored_link" class="hide">', $txt['show_ignore_user_post'], '</a>
627 683
 					</div>';
684
+			}
628 685
 
629 686
 			echo '
630 687
 					<div class="inner" id="msg_', $post['id'], '_body">', $post['body'], '</div>
@@ -706,8 +763,10 @@  discard block
 block discarded – undo
706 763
 
707 764
 	// If we are starting a new topic starting from another one, here is the place to remember some details
708 765
 	if (!empty($context['original_post']))
709
-		echo '
766
+	{
767
+			echo '
710 768
 			<input type="hidden" name="followup" value="' . $context['original_post'] . '" />';
769
+	}
711 770
 
712 771
 	echo '
713 772
 			<input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '" />
@@ -737,7 +796,8 @@  discard block
 block discarded – undo
737 796
 
738 797
 	// Code for showing and hiding additional options.
739 798
 	if (!empty($settings['additional_options_collapsible']))
740
-		addInlineJavascript('
799
+	{
800
+			addInlineJavascript('
741 801
 			var oSwapAdditionalOptions = new elk_Toggle({
742 802
 				bToggleEnabled: true,
743 803
 				bCurrentlyCollapsed: ' . (empty($context['minmax_preferences']['post']) ? 'false' : 'true') . ',
@@ -774,6 +834,7 @@  discard block
 block discarded – undo
774 834
 					sAdditionalVars: \';minmax_key=post\'
775 835
 				},
776 836
 			});', true);
837
+	}
777 838
 
778 839
 	template_topic_replies_below();
779 840
 }
Please login to merge, or discard this patch.
themes/default/Login.template.php 1 patch
Braces   +36 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,13 +30,17 @@  discard block
 block discarded – undo
30 30
 
31 31
 	// Did they make a mistake last time?
32 32
 	if (!empty($context['login_errors']))
33
-		echo '
33
+	{
34
+			echo '
34 35
 					<p class="errorbox">', implode('<br />', $context['login_errors']), '</p>';
36
+	}
35 37
 
36 38
 	// Or perhaps there's some special description for this time?
37 39
 	if (isset($context['description']))
38
-		echo '
40
+	{
41
+			echo '
39 42
 					<p class="description">', $context['description'], '</p>';
43
+	}
40 44
 
41 45
 	// Now just get the basic information - username, password, etc.
42 46
 	echo '
@@ -55,14 +59,17 @@  discard block
 block discarded – undo
55 59
 						</dd>';
56 60
 
57 61
 	if (!empty($modSettings['enableOTP']))
58
-		echo '
62
+	{
63
+			echo '
59 64
 						<dt>', $txt['otp_token'], '</dt>
60 65
 						<dd>
61 66
 							<input type="password" name="otp_token" id="otp_token" value="', $context['default_password'], '" size="30" class="input_password" placeholder="', $txt['otp_token'], '" />
62 67
 						</dd>';
68
+	}
63 69
 
64 70
 	if (!empty($modSettings['enableOpenID']))
65
-		echo '
71
+	{
72
+			echo '
66 73
 					</dl>
67 74
 					<p><strong>&mdash;', $txt['or'], '&mdash;</strong></p>
68 75
 					<dl>
@@ -74,6 +81,7 @@  discard block
 block discarded – undo
74 81
 						</dd>
75 82
 					</dl>
76 83
 					<hr />';
84
+	}
77 85
 
78 86
 	echo '
79 87
 					<dl>
@@ -92,13 +100,15 @@  discard block
 block discarded – undo
92 100
 
93 101
 	// If they have deleted their account, give them a chance to change their mind.
94 102
 	if (isset($context['login_show_undelete']))
95
-		echo '
103
+	{
104
+			echo '
96 105
 						<dt class="alert">
97 106
 							<label for="undelete">', $txt['undelete_account'], ':</label>
98 107
 						</dt>
99 108
 						<dd>
100 109
 							<input type="checkbox" name="undelete" id="undelete" />
101 110
 						</dd>';
111
+	}
102 112
 
103 113
 	echo '
104 114
 					</dl>
@@ -140,9 +150,12 @@  discard block
 block discarded – undo
140 150
 				', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br />';
141 151
 
142 152
 	if ($context['can_register'])
143
-		echo sprintf($txt['login_below_or_register'], $scripturl . '?action=register', $context['forum_name_html_safe']);
144
-	else
145
-		echo $txt['login_below'];
153
+	{
154
+			echo sprintf($txt['login_below_or_register'], $scripturl . '?action=register', $context['forum_name_html_safe']);
155
+	}
156
+	else {
157
+			echo $txt['login_below'];
158
+	}
146 159
 
147 160
 	// And now the login information.
148 161
 	echo '
@@ -166,14 +179,17 @@  discard block
 block discarded – undo
166 179
 					</dd>';
167 180
 
168 181
 	if (!empty($modSettings['enableOTP']))
169
-		echo '
182
+	{
183
+			echo '
170 184
 						<dt>', $txt['otp_token'], '</dt>
171 185
 						<dd>
172 186
 							<input type="password" name="otp_token" id="otp_token" value="', $context['default_password'], '" size="30" class="input_password" placeholder="', $txt['otp_token'], '" />
173 187
 						</dd>';
188
+	}
174 189
 
175 190
 	if (!empty($modSettings['enableOpenID']))
176
-		echo '
191
+	{
192
+			echo '
177 193
 				</dl>
178 194
 				<p><strong>&mdash;', $txt['or'], '&mdash;</strong></p>
179 195
 				<dl>
@@ -186,6 +202,7 @@  discard block
 block discarded – undo
186 202
 				</dl>
187 203
 				<hr />
188 204
 				<dl>';
205
+	}
189 206
 
190 207
 	echo '
191 208
 					<dt>
@@ -289,8 +306,10 @@  discard block
 block discarded – undo
289 306
 		<div class="well centertext">';
290 307
 
291 308
 	if (!empty($context['incorrect_password']))
292
-		echo '
309
+	{
310
+			echo '
293 311
 			<div class="errorbox">', $txt['admin_incorrect_password'], '</div>';
312
+	}
294 313
 
295 314
 	echo '
296 315
 			<label for="', $context['sessionCheckType'], '_pass">', $txt['password'], ':</label>
@@ -332,13 +351,15 @@  discard block
 block discarded – undo
332 351
 
333 352
 	// You didn't even have an ID?
334 353
 	if (empty($context['member_id']))
335
-		echo '
354
+	{
355
+			echo '
336 356
 					<dt>
337 357
 						<label for="user">', $txt['invalid_activation_username'], ':</label>
338 358
 					</dt>
339 359
 					<dd>
340 360
 						<input type="text" name="user" id="user" size="30" class="input_text" />
341 361
 					</dd>';
362
+	}
342 363
 
343 364
 	echo '
344 365
 					<dt>
@@ -391,7 +412,8 @@  discard block
 block discarded – undo
391 412
 					</dd>';
392 413
 
393 414
 	if ($context['can_activate'])
394
-		echo '
415
+	{
416
+			echo '
395 417
 					<dt>
396 418
 						<label for="code">', $txt['invalid_activation_retry'], ':</label>
397 419
 						<p>', $txt['invalid_activation_known'], '</p>
@@ -399,6 +421,7 @@  discard block
 block discarded – undo
399 421
 					<dd>
400 422
 						<input type="text" name="code" id="code" size="30" class="input_text" />
401 423
 					</dd>';
424
+	}
402 425
 
403 426
 	echo '
404 427
 				</dl>
Please login to merge, or discard this patch.
themes/default/scripts/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,6 +2,9 @@
 block discarded – undo
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4 4
 if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
5
+{
5 6
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
7
-	exit;
8 7
\ No newline at end of file
8
+}
9
+else {
10
+	exit;
11
+}
Please login to merge, or discard this patch.
themes/default/PersonalMessage.template.php 1 patch
Braces   +208 added lines, -78 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 
42 42
 	// Show the capacity bar, if available. @todo - This needs work.
43 43
 	if (!empty($context['limit_bar']))
44
-		echo '
44
+	{
45
+			echo '
45 46
 						<h2 class="category_header">
46 47
 							<span class="floatleft">', $txt['pm_capacity'], ':</span>
47 48
 							<span class="floatleft capacity_bar">
@@ -49,18 +50,23 @@  discard block
 block discarded – undo
49 50
 							</span>
50 51
 							<span class="floatright', $context['limit_bar']['percent'] > 90 ? ' alert' : '', '">', $context['limit_bar']['text'], '</span>
51 52
 						</h2>';
53
+	}
52 54
 
53 55
 	// Message sent? Show a small indication.
54 56
 	if (isset($context['pm_sent']))
55
-		echo '
57
+	{
58
+			echo '
56 59
 						<div class="successbox">
57 60
 							', $txt['pm_sent'], '
58 61
 						</div>';
62
+	}
59 63
 
60 64
 	if (!empty($context['pm_form_url']))
61
-		echo '
65
+	{
66
+			echo '
62 67
 						<form action="', $context['pm_form_url'], '" method="post" accept-charset="UTF-8" name="pmFolder">';
63
-}
68
+	}
69
+	}
64 70
 
65 71
 /**
66 72
  * The end of the index bar, for personal messages page.
@@ -108,8 +114,10 @@  discard block
 block discarded – undo
108 114
 
109 115
 			// Showing the sidebar posting area?
110 116
 			if (empty($options['hide_poster_area']))
111
-				echo '
117
+			{
118
+							echo '
112 119
 							<ul class="poster">', template_build_poster_div($message), '</ul>';
120
+			}
113 121
 
114 122
 			echo '
115 123
 							<div class="postarea', empty($options['hide_poster_area']) ? '' : '2', '">
@@ -125,24 +133,32 @@  discard block
 block discarded – undo
125 133
 
126 134
 			// People it was sent directly to....
127 135
 			if (!empty($message['recipients']['to']))
128
-				echo
136
+			{
137
+							echo
129 138
 										implode(', ', $message['recipients']['to']);
139
+			}
130 140
 			// Otherwise, we're just going to say "some people"...
131 141
 			elseif ($context['folder'] != 'sent')
132
-				echo
142
+			{
143
+							echo
133 144
 										'(', $txt['pm_undisclosed_recipients'], ')';
145
+			}
134 146
 
135 147
 			echo '
136 148
 										<strong> ', $txt['on'], ': </strong>', $message['time'];
137 149
 
138 150
 			// If we're in the sent items folder, show who it was sent to besides the "To:" people.
139 151
 			if (!empty($message['recipients']['bcc']))
140
-				echo '
152
+			{
153
+							echo '
141 154
 										<br /><strong> ', $txt['pm_bcc'], ': </strong>', implode(', ', $message['recipients']['bcc']);
155
+			}
142 156
 
143 157
 			if (!empty($message['is_replied_to']))
144
-				echo '
158
+			{
159
+							echo '
145 160
 										<br />', $txt['pm_is_replied_to'];
161
+			}
146 162
 
147 163
 			echo '
148 164
 									</h5>
@@ -158,10 +174,12 @@  discard block
 block discarded – undo
158 174
 
159 175
 			// Showing all then give a remove item checkbox
160 176
 			if (empty($context['display_mode']))
161
-				echo '
177
+			{
178
+							echo '
162 179
 									<li class="listlevel1 quickmod_check">
163 180
 										<input type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;" />
164 181
 									</li>';
182
+			}
165 183
 
166 184
 			// Maybe there is something...more :P (this is the more button)
167 185
 			if (!empty($context['additional_pm_drop_buttons']))
@@ -172,10 +190,12 @@  discard block
 block discarded – undo
172 190
 										<ul class="menulevel2">';
173 191
 
174 192
 				foreach ($context['additional_pm_drop_buttons'] as $key => $button)
175
-					echo '
193
+				{
194
+									echo '
176 195
 											<li class="listlevel2">
177 196
 												<a href="' . $button['href'] . '" class="linklevel2 ', $key, '">' . $button['text'] . '</a>
178 197
 											</li>';
198
+				}
179 199
 
180 200
 				echo '
181 201
 										</ul>
@@ -196,9 +216,11 @@  discard block
 block discarded – undo
196 216
 				{
197 217
 					// Is there than more than one recipient you can reply to?
198 218
 					if ($message['number_recipients'] > 1)
199
-						echo '
219
+					{
220
+											echo '
200 221
 									<li class="listlevel1">
201 222
 										<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all" class="linklevel1 reply_all_button">', $txt['reply_to_all'], '</a></li>';
223
+					}
202 224
 
203 225
 					echo '
204 226
 									<li class="listlevel1">
@@ -209,21 +231,24 @@  discard block
 block discarded – undo
209 231
 									</li>';
210 232
 				}
211 233
 				// This is for "forwarding" - even if the member is gone.
212
-				else
213
-					echo '
234
+				else {
235
+									echo '
214 236
 									<li class="listlevel1">
215 237
 										<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote" class="linklevel1 quote_button">', $txt['reply_quote'], '</a>
216 238
 									</li>';
239
+				}
217 240
 			}
218 241
 
219 242
 			// Anything else added by mods for example?
220 243
 			if (!empty($context['additional_quick_pm_buttons']))
221 244
 			{
222 245
 				foreach ($context['additional_quick_pm_buttons'] as $key => $button)
223
-					echo '
246
+				{
247
+									echo '
224 248
 									<li class="listlevel1">
225 249
 										<a href="' . $button['href'] . '" class="linklevel1 ', $key, '">' . $button['text'] . '</a>
226 250
 									</li>';
251
+				}
227 252
 			}
228 253
 
229 254
 			echo '
@@ -252,8 +277,10 @@  discard block
 block discarded – undo
252 277
 						foreach ($context['labels'] as $label)
253 278
 						{
254 279
 							if (!isset($message['labels'][$label['id']]))
255
-								echo '
280
+							{
281
+															echo '
256 282
 										<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
283
+							}
257 284
 						}
258 285
 					}
259 286
 
@@ -264,8 +291,10 @@  discard block
 block discarded – undo
264 291
 										<option value="" disabled="disabled">', $txt['pm_msg_label_remove'], ':</option>';
265 292
 
266 293
 						foreach ($message['labels'] as $label)
267
-							echo '
294
+						{
295
+													echo '
268 296
 										<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
297
+						}
269 298
 					}
270 299
 
271 300
 					echo '
@@ -287,7 +316,9 @@  discard block
 block discarded – undo
287 316
 				foreach ($message['member']['custom_fields'] as $custom)
288 317
 				{
289 318
 					if ($custom['placement'] != 2 || empty($custom['value']))
290
-						continue;
319
+					{
320
+											continue;
321
+					}
291 322
 
292 323
 					if (!$shown)
293 324
 					{
@@ -302,15 +333,19 @@  discard block
 block discarded – undo
302 333
 				}
303 334
 
304 335
 				if ($shown)
305
-					echo '
336
+				{
337
+									echo '
306 338
 									</ul>
307 339
 								</div>';
340
+				}
308 341
 			}
309 342
 
310 343
 			// Show the member's signature?
311 344
 			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
312
-				echo '
345
+			{
346
+							echo '
313 347
 								<div class="signature">', $message['member']['signature'], '</div>';
348
+			}
314 349
 
315 350
 			echo '
316 351
 							</div>
@@ -331,10 +366,13 @@  discard block
 block discarded – undo
331 366
 
332 367
 	// Show a few buttons if we are in conversation mode and outputting the first message.
333 368
 	if ($context['display_mode'] == 2)
334
-		template_pagesection('conversation_buttons', 'right', array('page_index' => false));
335
-	else
336
-		template_pagesection();
337
-}
369
+	{
370
+			template_pagesection('conversation_buttons', 'right', array('page_index' => false));
371
+	}
372
+	else {
373
+			template_pagesection();
374
+	}
375
+	}
338 376
 
339 377
 /**
340 378
  * Used to display items below the page, like page navigation
@@ -344,11 +382,15 @@  discard block
 block discarded – undo
344 382
 	global $context, $txt;
345 383
 
346 384
 	if (empty($context['display_mode']))
347
-		template_pagesection(false, '', array('extra' => '<input type="submit" name="del_selected" value="' . $txt['quickmod_delete_selected'] . '" style="font-weight: normal;" onclick="if (!confirm(\'' . $txt['delete_selected_confirm'] . '\')) return false;" class="right_submit" />'));
385
+	{
386
+			template_pagesection(false, '', array('extra' => '<input type="submit" name="del_selected" value="' . $txt['quickmod_delete_selected'] . '" style="font-weight: normal;" onclick="if (!confirm(\'' . $txt['delete_selected_confirm'] . '\')) return false;" class="right_submit" />'));
387
+	}
348 388
 	// Show a few buttons if we are in conversation mode and outputting the first message.
349 389
 	elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons']))
350
-		template_pagesection('conversation_buttons', 'right', array('page_index' => false));
351
-}
390
+	{
391
+			template_pagesection('conversation_buttons', 'right', array('page_index' => false));
392
+	}
393
+	}
352 394
 
353 395
 /**
354 396
  * Just list all the personal message subjects - to make templates easier.
@@ -377,8 +419,10 @@  discard block
 block discarded – undo
377 419
 
378 420
 	// Individual messages = button list!
379 421
 	if ($context['display_mode'] == 1)
380
-		template_subject_list();
381
-}
422
+	{
423
+			template_subject_list();
424
+	}
425
+	}
382 426
 
383 427
 /**
384 428
  * Template layer to show the PM subject listing
@@ -419,10 +463,12 @@  discard block
 block discarded – undo
419 463
 						<tbody>';
420 464
 
421 465
 	if (!$context['show_delete'])
422
-		echo '
466
+	{
467
+			echo '
423 468
 							<tr class="standard_row">
424 469
 								<td colspan="5">', $txt['pm_alert_none'], '</td>
425 470
 							</tr>';
471
+	}
426 472
 
427 473
 	// Use the query callback to get the subject list
428 474
 	while ($message = $context['get_pmessage']('subject'))
@@ -490,8 +536,10 @@  discard block
 block discarded – undo
490 536
 			foreach ($context['labels'] as $label)
491 537
 			{
492 538
 				if ($label['id'] != $context['current_label_id'])
493
-					$extra .= '
539
+				{
540
+									$extra .= '
494 541
 								<option value="add_' . $label['id'] . '">&#10148;&nbsp;' . $label['name'] . '</option>';
542
+				}
495 543
 			}
496 544
 
497 545
 			$extra .= '
@@ -534,8 +582,10 @@  discard block
 block discarded – undo
534 582
 
535 583
 	// Any search errors we need to let them know about
536 584
 	if (!empty($context['search_errors']))
537
-		echo '
585
+	{
586
+			echo '
538 587
 		<p class="errorbox">', implode('<br />', $context['search_errors']['messages']), '</p>';
588
+	}
539 589
 
540 590
 	// Start with showing the basic search input box
541 591
 	echo '
@@ -619,11 +669,13 @@  discard block
 block discarded – undo
619 669
 				<ul id="searchLabelsExpand">';
620 670
 
621 671
 		foreach ($context['search_labels'] as $label)
622
-			echo '
672
+		{
673
+					echo '
623 674
 					<li>
624 675
 						<label for="searchlabel_', $label['id'], '"><input type="checkbox" id="searchlabel_', $label['id'], '" name="searchlabel[', $label['id'], ']" value="', $label['id'], '" ', $label['checked'] ? 'checked="checked"' : '', ' />
625 676
 						', $label['name'], '</label>
626 677
 					</li>';
678
+		}
627 679
 
628 680
 		echo '
629 681
 				</ul>
@@ -723,14 +775,18 @@  discard block
 block discarded – undo
723 775
 
724 776
 	// Was anything even found?
725 777
 	if (!empty($context['personal_messages']))
726
-		template_pagesection();
727
-	else
728
-		echo '
778
+	{
779
+			template_pagesection();
780
+	}
781
+	else {
782
+			echo '
729 783
 			<div class="well">', $txt['find_no_results'], '</div>';
784
+	}
730 785
 
731 786
 	// Showing complete results?
732 787
 	if (empty($context['search_params']['show_complete']))
733
-		echo '
788
+	{
789
+			echo '
734 790
 			<table class="table_grid">
735 791
 				<thead>
736 792
 					<tr class="table_head">
@@ -740,9 +796,11 @@  discard block
 block discarded – undo
740 796
 					</tr>
741 797
 				</thead>
742 798
 				<tbody>';
743
-	else
744
-		echo '
799
+	}
800
+	else {
801
+			echo '
745 802
 			<ul class="forumposts topic_listing search_results_posts">';
803
+	}
746 804
 
747 805
 	// Print each message out...
748 806
 	foreach ($context['personal_messages'] as $message)
@@ -759,10 +817,14 @@  discard block
 block discarded – undo
759 817
 			// Show the recipients.
760 818
 			// @todo This doesn't deal with the sent item searching quite right for bcc.
761 819
 			if (!empty($message['recipients']['to']))
762
-				echo implode(', ', $message['recipients']['to']);
820
+			{
821
+							echo implode(', ', $message['recipients']['to']);
822
+			}
763 823
 			// Otherwise, we're just going to say "some people"...
764 824
 			elseif ($context['folder'] !== 'sent')
765
-				echo '(', $txt['pm_undisclosed_recipients'], ')';
825
+			{
826
+							echo '(', $txt['pm_undisclosed_recipients'], ')';
827
+			}
766 828
 
767 829
 			echo '
768 830
 						</span>
@@ -778,13 +840,16 @@  discard block
 block discarded – undo
778 840
 
779 841
 				// You can only reply if they are not a guest...
780 842
 				if (!$message['member']['is_guest'])
781
-					echo '
843
+				{
844
+									echo '
782 845
 						<li class="listlevel1"><a class="linklevel1 reply_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
783 846
 						<li class="listlevel1"><a class="linklevel1 quote_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $txt['quote'], '</a></li>';
847
+				}
784 848
 				// This is for "forwarding" - even if the member is gone.
785
-				else
786
-					echo '
849
+				else {
850
+									echo '
787 851
 						<li class="listlevel1"><a class="linklevel1 quote_button" href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $txt['quote'], '</a></li>';
852
+				}
788 853
 				echo '
789 854
 					</ul>';
790 855
 			}
@@ -806,16 +871,21 @@  discard block
 block discarded – undo
806 871
 	}
807 872
 
808 873
 	if (!empty($context['search_params']['show_complete']))
809
-		echo '
874
+	{
875
+			echo '
810 876
 			</ul>';
811
-	else
812
-		echo '
877
+	}
878
+	else {
879
+			echo '
813 880
 				</tbody>
814 881
 			</table>';
882
+	}
815 883
 
816 884
 	// If we have results show a page index
817 885
 	if (!empty($context['personal_messages']))
818
-		template_pagesection();
886
+	{
887
+			template_pagesection();
888
+	}
819 889
 
820 890
 	echo '
821 891
 		</div>';
@@ -838,14 +908,18 @@  discard block
 block discarded – undo
838 908
 				<div class="content">';
839 909
 
840 910
 		if (!empty($context['send_log']['sent']))
841
-			foreach ($context['send_log']['sent'] as $log_entry)
911
+		{
912
+					foreach ($context['send_log']['sent'] as $log_entry)
842 913
 				echo '
843 914
 					<span class="error">', $log_entry, '</span><br />';
915
+		}
844 916
 
845 917
 		if (!empty($context['send_log']['failed']))
846
-			foreach ($context['send_log']['failed'] as $log_entry)
918
+		{
919
+					foreach ($context['send_log']['failed'] as $log_entry)
847 920
 				echo '
848 921
 					<span class="error">', $log_entry, '</span><br />';
922
+		}
849 923
 
850 924
 		echo '
851 925
 				</div>
@@ -878,10 +952,12 @@  discard block
 block discarded – undo
878 952
 	template_show_error('post_error');
879 953
 
880 954
 	if (!empty($modSettings['drafts_pm_enabled']))
881
-		echo '
955
+	{
956
+			echo '
882 957
 				<div id="draft_section" class="successbox', isset($context['draft_saved']) ? '"' : ' hide"', '>',
883 958
 					sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), '
884 959
 				</div>';
960
+	}
885 961
 
886 962
 	echo '
887 963
 				<dl id="post_header">';
@@ -934,11 +1010,13 @@  discard block
 block discarded – undo
934 1010
 
935 1011
 	// Require an image to be typed to save spamming?
936 1012
 	if (!empty($context['require_verification']))
937
-		template_verification_controls($context['visual_verification_id'], '
1013
+	{
1014
+			template_verification_controls($context['visual_verification_id'], '
938 1015
 				<div class="post_verification">
939 1016
 					<strong>' . $txt['pm_visual_verification_label'] . ':</strong>
940 1017
 					', '
941 1018
 				</div>');
1019
+	}
942 1020
 
943 1021
 	// Send, Preview, spellchecker buttons.
944 1022
 	echo '
@@ -966,9 +1044,11 @@  discard block
 block discarded – undo
966 1044
 						<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
967 1045
 
968 1046
 		foreach ($context['drafts'] as $draft)
969
-			echo '
1047
+		{
1048
+					echo '
970 1049
 						<dt>', $draft['link'], '</dt>
971 1050
 						<dd>', $draft['poster_time'], '</dd>';
1051
+		}
972 1052
 
973 1053
 		echo '
974 1054
 					</dl>
@@ -991,7 +1071,8 @@  discard block
 block discarded – undo
991 1071
 
992 1072
 	// Code for showing and hiding drafts
993 1073
 	if (!empty($context['drafts']))
994
-		addInlineJavascript('
1074
+	{
1075
+			addInlineJavascript('
995 1076
 		var oSwapDraftOptions = new elk_Toggle({
996 1077
 			bToggleEnabled: true,
997 1078
 			bCurrentlyCollapsed: ' . (empty($context['minmax_preferences']['pmdraft']) ? 'false' : 'true') . ',
@@ -1022,10 +1103,12 @@  discard block
 block discarded – undo
1022 1103
 				sAdditionalVars: \';minmax_key=pmdraft\'
1023 1104
 			},
1024 1105
 		});', true);
1106
+	}
1025 1107
 
1026 1108
 	// Show the message you're replying to.
1027 1109
 	if ($context['reply'])
1028
-		echo '
1110
+	{
1111
+			echo '
1029 1112
 
1030 1113
 	<div class="forumposts">
1031 1114
 		<h2 class="category_header">', $txt['subject'], ': ', $context['quoted_message']['subject'], '</h2>
@@ -1038,6 +1121,7 @@  discard block
 block discarded – undo
1038 1121
 			', $context['quoted_message']['body'], '
1039 1122
 		</div>
1040 1123
 	</div>';
1124
+	}
1041 1125
 
1042 1126
 	echo '
1043 1127
 		<script>
@@ -1050,22 +1134,26 @@  discard block
 block discarded – undo
1050 1134
 				aToRecipients: [';
1051 1135
 
1052 1136
 	foreach ($context['recipients']['to'] as $i => $member)
1053
-		echo '
1137
+	{
1138
+			echo '
1054 1139
 					{
1055 1140
 						sItemId: ', JavaScriptEscape($member['id']), ',
1056 1141
 						sItemName: ', JavaScriptEscape($member['name']), '
1057 1142
 					}', $i == count($context['recipients']['to']) - 1 ? '' : ',';
1143
+	}
1058 1144
 
1059 1145
 	echo '
1060 1146
 				],
1061 1147
 				aBccRecipients: [';
1062 1148
 
1063 1149
 	foreach ($context['recipients']['bcc'] as $i => $member)
1064
-		echo '
1150
+	{
1151
+			echo '
1065 1152
 					{
1066 1153
 						sItemId: ', JavaScriptEscape($member['id']), ',
1067 1154
 						sItemName: ', JavaScriptEscape($member['name']), '
1068 1155
 					}', $i == count($context['recipients']['bcc']) - 1 ? '' : ',';
1156
+	}
1069 1157
 
1070 1158
 	echo '
1071 1159
 				],
@@ -1141,8 +1229,10 @@  discard block
 block discarded – undo
1141 1229
 				<th style="width: 4%;">';
1142 1230
 
1143 1231
 	if (count($context['labels']) > 2)
1144
-		echo '
1232
+	{
1233
+			echo '
1145 1234
 					<input type="checkbox" onclick="invertAll(this, this.form);" />';
1235
+	}
1146 1236
 
1147 1237
 	echo '
1148 1238
 				</th>
@@ -1151,16 +1241,20 @@  discard block
 block discarded – undo
1151 1241
 		<tbody>';
1152 1242
 
1153 1243
 	if (count($context['labels']) < 2)
1154
-		echo '
1244
+	{
1245
+			echo '
1155 1246
 			<tr>
1156 1247
 				<td colspan="2" class="centertext">', $txt['pm_labels_no_exist'], '</td>
1157 1248
 			</tr>';
1249
+	}
1158 1250
 	else
1159 1251
 	{
1160 1252
 		foreach ($context['labels'] as $label)
1161 1253
 		{
1162 1254
 			if ($label['id'] == -1)
1163
-				continue;
1255
+			{
1256
+							continue;
1257
+			}
1164 1258
 
1165 1259
 			echo '
1166 1260
 			<tr>
@@ -1179,11 +1273,13 @@  discard block
 block discarded – undo
1179 1273
 		</table>';
1180 1274
 
1181 1275
 	if (!count($context['labels']) < 2)
1182
-		echo '
1276
+	{
1277
+			echo '
1183 1278
 		<div class="submitbutton">
1184 1279
 			<input type="submit" name="save" value="', $txt['save'], '" />
1185 1280
 			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" onclick="return confirm(\'', $txt['pm_labels_delete'], '\');" />
1186 1281
 		</div>';
1282
+	}
1187 1283
 
1188 1284
 	echo '
1189 1285
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -1278,8 +1374,10 @@  discard block
 block discarded – undo
1278 1374
 				<th style="width: 4%;">';
1279 1375
 
1280 1376
 	if (!empty($context['rules']))
1281
-		echo '
1377
+	{
1378
+			echo '
1282 1379
 					<input type="checkbox" onclick="invertAll(this, this.form);" />';
1380
+	}
1283 1381
 
1284 1382
 	echo '
1285 1383
 				</th>
@@ -1288,12 +1386,14 @@  discard block
 block discarded – undo
1288 1386
 		<tbody>';
1289 1387
 
1290 1388
 	if (empty($context['rules']))
1291
-		echo '
1389
+	{
1390
+			echo '
1292 1391
 			<tr>
1293 1392
 				<td colspan="2" class="centertext">
1294 1393
 					', $txt['pm_rules_none'], '
1295 1394
 				</td>
1296 1395
 			</tr>';
1396
+	}
1297 1397
 
1298 1398
 	foreach ($context['rules'] as $rule)
1299 1399
 	{
@@ -1315,13 +1415,17 @@  discard block
 block discarded – undo
1315 1415
 			<a class="linkbutton" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>';
1316 1416
 
1317 1417
 	if (!empty($context['rules']))
1318
-		echo '
1418
+	{
1419
+			echo '
1319 1420
 			<a class="linkbutton" href="', $scripturl, '?action=pm;sa=manrules;apply;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['pm_js_apply_rules_confirm'], '\');">', $txt['pm_apply_rules'], '</a>';
1421
+	}
1320 1422
 
1321 1423
 	if (!empty($context['rules']))
1322
-		echo '
1424
+	{
1425
+			echo '
1323 1426
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
1324 1427
 			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" onclick="return confirm(\'', $txt['pm_js_delete_rule_confirm'], '\');" />';
1428
+	}
1325 1429
 
1326 1430
 	echo '
1327 1431
 		</div>
@@ -1356,19 +1460,25 @@  discard block
 block discarded – undo
1356 1460
 	foreach ($context['rule']['criteria'] as $k => $criteria)
1357 1461
 	{
1358 1462
 		if (!$isFirst && $criteria['t'] == '')
1359
-			echo '
1463
+		{
1464
+					echo '
1360 1465
 				<div id="removeonjs1">';
1466
+		}
1361 1467
 		elseif (!$isFirst)
1362
-			echo '
1468
+		{
1469
+					echo '
1363 1470
 				<br />';
1471
+		}
1364 1472
 
1365 1473
 		echo '
1366 1474
 					<select class="criteria" name="ruletype[', $k, ']" id="ruletype', $k, '" data-optnum="', $k, '">
1367 1475
 						<option value="">', $txt['pm_rule_criteria_pick'], ':</option>';
1368 1476
 
1369 1477
 		foreach ($context['known_rules'] as $rule)
1370
-			echo '
1478
+		{
1479
+					echo '
1371 1480
 						<option value="', $rule, '" ', $criteria['t'] == $rule ? 'selected="selected"' : '', '>', $txt['pm_rule_' . $rule], '</option>';
1481
+		}
1372 1482
 
1373 1483
 		echo '
1374 1484
 					</select>
@@ -1380,8 +1490,10 @@  discard block
 block discarded – undo
1380 1490
 							<option value="">', $txt['pm_rule_sel_group'], '</option>';
1381 1491
 
1382 1492
 		foreach ($context['groups'] as $id => $group)
1383
-			echo '
1493
+		{
1494
+					echo '
1384 1495
 							<option value="', $id, '" ', $criteria['t'] == 'gid' && $criteria['v'] == $id ? 'selected="selected"' : '', '>', $group, '</option>';
1496
+		}
1385 1497
 
1386 1498
 		echo '
1387 1499
 						</select>
@@ -1389,10 +1501,14 @@  discard block
 block discarded – undo
1389 1501
 
1390 1502
 		// If this is the dummy we add a means to hide for non js users.
1391 1503
 		if ($isFirst)
1392
-			$isFirst = false;
1504
+		{
1505
+					$isFirst = false;
1506
+		}
1393 1507
 		elseif ($criteria['t'] == '')
1394
-			echo '
1508
+		{
1509
+					echo '
1395 1510
 				</div>';
1511
+		}
1396 1512
 	}
1397 1513
 
1398 1514
 	echo '
@@ -1417,11 +1533,15 @@  discard block
 block discarded – undo
1417 1533
 	foreach ($context['rule']['actions'] as $k => $action)
1418 1534
 	{
1419 1535
 		if (!$isFirst && $action['t'] == '')
1420
-			echo '
1536
+		{
1537
+					echo '
1421 1538
 				<div id="removeonjs2">';
1539
+		}
1422 1540
 		elseif (!$isFirst)
1423
-			echo '
1541
+		{
1542
+					echo '
1424 1543
 				<br />';
1544
+		}
1425 1545
 
1426 1546
 		echo '
1427 1547
 					<select name="acttype[', $k, ']" id="acttype', $k, '" data-actnum="', $k, '">
@@ -1434,19 +1554,25 @@  discard block
 block discarded – undo
1434 1554
 							<option value="">', $txt['pm_rule_sel_label'], '</option>';
1435 1555
 
1436 1556
 		foreach ($context['labels'] as $label)
1437
-			if ($label['id'] != -1)
1557
+		{
1558
+					if ($label['id'] != -1)
1438 1559
 				echo '
1439 1560
 							<option value="', ($label['id'] + 1), '" ', $action['t'] == 'lab' && $action['v'] == $label['id'] ? 'selected="selected"' : '', '>', $label['name'], '</option>';
1561
+		}
1440 1562
 
1441 1563
 		echo '
1442 1564
 						</select>
1443 1565
 					</span>';
1444 1566
 
1445 1567
 		if ($isFirst)
1446
-			$isFirst = false;
1568
+		{
1569
+					$isFirst = false;
1570
+		}
1447 1571
 		elseif ($action['t'] == '')
1448
-			echo '
1572
+		{
1573
+					echo '
1449 1574
 				</div>';
1575
+		}
1450 1576
 	}
1451 1577
 
1452 1578
 	echo '
@@ -1471,9 +1597,11 @@  discard block
 block discarded – undo
1471 1597
 
1472 1598
 	// If this isn't a new rule and we have JS enabled remove the JS compatibility stuff.
1473 1599
 	if ($context['rid'])
1474
-		echo '
1600
+	{
1601
+			echo '
1475 1602
 			document.getElementById("removeonjs1").className = "hide";
1476 1603
 			document.getElementById("removeonjs2").className = "hide";';
1604
+	}
1477 1605
 
1478 1606
 	echo '
1479 1607
 			document.getElementById("addonjs1").style.display = "";
@@ -1498,10 +1626,12 @@  discard block
 block discarded – undo
1498 1626
 
1499 1627
 	// No drafts? Just show an informative message.
1500 1628
 	if (empty($context['drafts']))
1501
-		echo '
1629
+	{
1630
+			echo '
1502 1631
 		<div class="information centertext">
1503 1632
 			', $txt['draft_none'], '
1504 1633
 		</div>';
1634
+	}
1505 1635
 	else
1506 1636
 	{
1507 1637
 		// For every draft to be displayed, give it its own div, and show the important details of the draft.
Please login to merge, or discard this patch.
themes/default/GenericList.template.php 1 patch
Braces   +56 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,17 +27,22 @@  discard block
 block discarded – undo
27 27
 	$cur_list = &$context[$list_id];
28 28
 
29 29
 	if (isset($cur_list['form']))
30
-		echo '
30
+	{
31
+			echo '
31 32
 	<form class="generic_list_wrapper" action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="UTF-8">
32 33
 		<div class="generic_list">';
33
-	else
34
-		echo '
34
+	}
35
+	else {
36
+			echo '
35 37
 		<div id="wrapper_', $list_id, '" class="generic_list_wrapper">';
38
+	}
36 39
 
37 40
 	// Show the title of the table (if any), with an icon (if defined)
38 41
 	if (!empty($cur_list['title']))
39
-		echo '
42
+	{
43
+			echo '
40 44
 			<h2 class="category_header', !empty($cur_list['icon']) ? ' hdicon cat_img_' . $cur_list['icon'] : '', '">', $cur_list['title'], '</h2>';
45
+	}
41 46
 
42 47
 	// Show any data right after the title
43 48
 	if (isset($cur_list['additional_rows']['after_title']))
@@ -53,7 +58,9 @@  discard block
 block discarded – undo
53 58
 
54 59
 	// Show some data above this list
55 60
 	if (isset($cur_list['additional_rows']['top_of_list']))
56
-		template_additional_rows('top_of_list', $cur_list);
61
+	{
62
+			template_additional_rows('top_of_list', $cur_list);
63
+	}
57 64
 
58 65
 	$close_div = false;
59 66
 	if (isset($cur_list['additional_rows']['above_column_headers']))
@@ -67,8 +74,10 @@  discard block
 block discarded – undo
67 74
 	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
68 75
 	{
69 76
 		if (!$close_div)
70
-			echo '
77
+		{
78
+					echo '
71 79
 			<div class="flow_auto">';
80
+		}
72 81
 
73 82
 		$close_div = true;
74 83
 
@@ -79,8 +88,10 @@  discard block
 block discarded – undo
79 88
 	if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
80 89
 	{
81 90
 		if (!$close_div)
82
-			echo '
91
+		{
92
+					echo '
83 93
 			<div class="flow_auto">';
94
+		}
84 95
 
85 96
 		echo '
86 97
 				<div class="floatleft">', template_pagesection(false, '', array('page_index_markup' => $cur_list['page_index'])), '
@@ -89,8 +100,10 @@  discard block
 block discarded – undo
89 100
 	}
90 101
 
91 102
 	if ($close_div)
92
-		echo '
103
+	{
104
+			echo '
93 105
 			</div>';
106
+	}
94 107
 
95 108
 	// Start of the main table
96 109
 	echo '
@@ -110,9 +123,13 @@  discard block
 block discarded – undo
110 123
 		{
111 124
 			$i++;
112 125
 			if ($i === 1)
113
-				$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
126
+			{
127
+							$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
128
+			}
114 129
 			elseif ($i === $header_count)
115
-				$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
130
+			{
131
+							$col_header['class'] = empty($col_header['class']) ? '' : $col_header['class'];
132
+			}
116 133
 
117 134
 			$sort_title = $col_header['sort_image'] === 'up' ? $txt['sort_desc'] : $txt['sort_asc'];
118 135
 
@@ -130,12 +147,14 @@  discard block
 block discarded – undo
130 147
 
131 148
 	// Show a nice message informing there are no items in this list.
132 149
 	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label']))
133
-		echo '
150
+	{
151
+			echo '
134 152
 				<tr>
135 153
 					<td colspan="', $cur_list['num_columns'], '">
136 154
 						<div class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</div>
137 155
 					</td>
138 156
 				</tr>';
157
+	}
139 158
 
140 159
 	// Show the list rows.
141 160
 	elseif (!empty($cur_list['rows']))
@@ -146,8 +165,10 @@  discard block
 block discarded – undo
146 165
 				<tr class="standard_row ', $row['class'], '" id="list_', $list_id, '_', str_replace(' ', '_', $id), '">';
147 166
 
148 167
 			foreach ($row['data'] as $row_data)
149
-				echo '
168
+			{
169
+							echo '
150 170
 					<td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>';
171
+			}
151 172
 
152 173
 			echo '
153 174
 				</tr>';
@@ -166,40 +187,51 @@  discard block
 block discarded – undo
166 187
 	{
167 188
 		// Show the page index (if this list doesn't intend to show all items).
168 189
 		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
169
-			echo '
190
+		{
191
+					echo '
170 192
 				<div class="floatleft">',
171 193
 			template_pagesection(false, '', array('page_index_markup' => $cur_list['page_index'])), '
172 194
 				</div>';
195
+		}
173 196
 
174 197
 		if (isset($cur_list['additional_rows']['below_table_data']))
175
-			template_additional_rows('below_table_data', $cur_list);
198
+		{
199
+					template_additional_rows('below_table_data', $cur_list);
200
+		}
176 201
 	}
177 202
 
178 203
 	// Tabs at the bottom.  Usually bottom aligned.
179 204
 	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
180
-		template_create_list_menu($cur_list['list_menu']);
205
+	{
206
+			template_create_list_menu($cur_list['list_menu']);
207
+	}
181 208
 
182 209
 	echo '
183 210
 			</div>';
184 211
 
185 212
 	// Last chance to show more data, like buttons and links
186 213
 	if (isset($cur_list['additional_rows']['bottom_of_list']))
187
-		template_additional_rows('bottom_of_list', $cur_list);
214
+	{
215
+			template_additional_rows('bottom_of_list', $cur_list);
216
+	}
188 217
 
189 218
 	if (isset($cur_list['form']))
190 219
 	{
191 220
 		foreach ($cur_list['form']['hidden_fields'] as $name => $value)
192
-			echo '
221
+		{
222
+					echo '
193 223
 			<input type="hidden" name="', $name, '" value="', $value, '" />';
224
+		}
194 225
 
195 226
 		echo '
196 227
 		</div>
197 228
 	</form>';
198 229
 	}
199
-	else
200
-		echo '
230
+	else {
231
+			echo '
201 232
 		</div>';
202
-}
233
+	}
234
+	}
203 235
 
204 236
 /**
205 237
  * Generic template used to show additional rows of data (above/below)
@@ -212,9 +244,11 @@  discard block
 block discarded – undo
212 244
 function template_additional_rows($row_position, $cur_list)
213 245
 {
214 246
 	foreach ($cur_list['additional_rows'][$row_position] as $row)
215
-		echo '
247
+	{
248
+			echo '
216 249
 				<div class="additional_row ', $row_position, empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>';
217
-}
250
+	}
251
+	}
218 252
 
219 253
 /**
220 254
  * Used this if you want your generic lists to have navigation menus.
Please login to merge, or discard this patch.