Passed
Push — patch_1-1-9 ( d927f0...e2616d )
by Spuds
01:06 queued 27s
created
themes/default/VerificationControls.template.php 1 patch
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,13 +29,17 @@  discard block
 block discarded – undo
29 29
 	$i = 0;
30 30
 
31 31
 	if ($verify_context['render'])
32
-		echo $before;
32
+	{
33
+			echo $before;
34
+	}
33 35
 
34 36
 	// Loop through each item to show them.
35 37
 	foreach ($verify_context['test'] as $key => $verification)
36 38
 	{
37 39
 		if (empty($verification['values']) || empty($verification['template']))
38
-			continue;
40
+		{
41
+					continue;
42
+		}
39 43
 
40 44
 		echo '
41 45
 			<div id="verification_control_', $i, '" class="verification_control">';
@@ -49,8 +53,10 @@  discard block
 block discarded – undo
49 53
 	}
50 54
 
51 55
 	if ($verify_context['render'])
52
-		echo $after;
53
-}
56
+	{
57
+			echo $after;
58
+	}
59
+	}
54 60
 
55 61
 /**
56 62
  * Used to show a verification question
@@ -63,12 +69,14 @@  discard block
 block discarded – undo
63 69
 	global $context;
64 70
 
65 71
 	foreach ($verify_context as $question)
66
-		echo '
72
+	{
73
+			echo '
67 74
 				<div class="verificationquestion">
68 75
 					<label for="', $verify_id, '_vv[q][', $question['id'], ']">', $question['q'], ':</label>
69 76
 					<input type="text" id="', $verify_id, '_vv[q][', $question['id'], ']" name="', $verify_id, '_vv[q][', $question['id'], ']" size="30" value="', $question['a'], '" ', $question['is_error'] ? ' class="border_error"' : '', ' tabindex="', $context['tabindex']++, '" class="input_text" />
70 77
 				</div>';
71
-}
78
+	}
79
+	}
72 80
 
73 81
 /**
74 82
  * Used to show one of those easy for robot, hard for human captcha's
Please login to merge, or discard this patch.
themes/default/ManageBoards.template.php 1 patch
Braces   +102 added lines, -36 removed lines patch added patch discarded remove patch
@@ -26,17 +26,21 @@  discard block
 block discarded – undo
26 26
 		<h2 class="category_header">', $txt['boardsEdit'], '</h2>';
27 27
 
28 28
 	if (!empty($context['move_board']))
29
-		echo '
29
+	{
30
+			echo '
30 31
 		<div class="information">
31 32
 			<p>', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', '</p>
32 33
 		</div>';
34
+	}
33 35
 
34 36
 	// No categories so show a label.
35 37
 	if (empty($context['categories']))
36
-		echo '
38
+	{
39
+			echo '
37 40
 		<div class="content centertext">
38 41
 			', $txt['mboards_no_cats'], '
39 42
 		</div>';
43
+	}
40 44
 
41 45
 	// Loop through every category, listing the boards in each as we go.
42 46
 	$sortables = array();
@@ -58,37 +62,47 @@  discard block
 block discarded – undo
58 62
 				<ul class="nolist">';
59 63
 
60 64
 		if (!empty($category['move_link']))
61
-			echo '
65
+		{
66
+					echo '
62 67
 					<li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $category['move_link']['label'], '" /></a></li>';
68
+		}
63 69
 
64 70
 		$first = true;
65 71
 		$depth = 0;
66 72
 
67 73
 		// If there is nothing in a category, add a drop zone
68 74
 		if (empty($category['boards']))
69
-			echo '
75
+		{
76
+					echo '
70 77
 					<li id="cbp_' . $category['id'] . ',-1,"></li>';
78
+		}
71 79
 
72 80
 		// List through every board in the category, printing its name and link to modify the board.
73 81
 		foreach ($category['boards'] as $board)
74 82
 		{
75 83
 			// Going in a level deeper (sub-board)
76 84
 			if ($board['child_level'] > $depth)
77
-				echo '
85
+			{
86
+							echo '
78 87
 						<ul class="nolist">';
88
+			}
79 89
 			// Backing up a level to a childs parent
80 90
 			elseif ($board['child_level'] < $depth)
81 91
 			{
82 92
 				for ($i = $board['child_level']; $i < $depth; $i++)
83
-					echo
93
+				{
94
+									echo
84 95
 					'
85 96
 							</li>
86 97
 						</ul>';
98
+				}
87 99
 			}
88 100
 			// Base node parent but not the first one
89 101
 			elseif ($board['child_level'] == 0 && !$first)
90
-				echo '
102
+			{
103
+							echo '
91 104
 					</li>';
105
+			}
92 106
 
93 107
 			echo '
94 108
 					<li id="cbp_' . $category['id'] . ',' . $board['id'] . '"', (!empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? 'class="recycle_board"' : ''), ' style="', $board['move'] ? ';color: red;' : '', '">
@@ -103,8 +117,10 @@  discard block
 block discarded – undo
103 117
 					<li style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">';
104 118
 
105 119
 				foreach ($board['move_links'] as $link)
106
-					echo '
120
+				{
121
+									echo '
107 122
 						<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><img src="', $settings['images_url'], '/board_select_spot', $link['child_level'] > 0 ? '_child' : '', '.png" alt="', $link['label'], '" style="padding: 0px; margin: 0px;" /></a>';
123
+				}
108 124
 
109 125
 				echo '
110 126
 					</li>';
@@ -120,10 +136,12 @@  discard block
 block discarded – undo
120 136
 			if ($depth > 0)
121 137
 			{
122 138
 				for ($i = $depth; $i > 0; $i--)
123
-					echo
139
+				{
140
+									echo
124 141
 					'
125 142
 							</li>
126 143
 						</ul>';
144
+				}
127 145
 			}
128 146
 
129 147
 			echo '
@@ -195,8 +213,10 @@  discard block
 block discarded – undo
195 213
 
196 214
 		// Print every existing category into a select box.
197 215
 		foreach ($context['category_order'] as $order)
198
-			echo '
216
+		{
217
+					echo '
199 218
 							<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
219
+		}
200 220
 
201 221
 		echo '
202 222
 						</select>
@@ -226,24 +246,31 @@  discard block
 block discarded – undo
226 246
 				<div class="submitbutton">';
227 247
 
228 248
 	if (isset($context['category']['is_new']))
229
-		echo '
249
+	{
250
+			echo '
230 251
 						<input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" />';
231
-	else
232
-		echo '
252
+	}
253
+	else {
254
+			echo '
233 255
 						<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" />
234 256
 						<input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" />';
257
+	}
235 258
 
236 259
 	echo '
237 260
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
238 261
 
239 262
 	if (!empty($context['token_check']))
240
-		echo '
263
+	{
264
+			echo '
241 265
 						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
266
+	}
242 267
 
243 268
 	// If this category is empty we don't bother with the next confirmation screen.
244 269
 	if ($context['category']['is_empty'])
245
-		echo '
270
+	{
271
+			echo '
246 272
 						<input type="hidden" name="empty" value="1" />';
273
+	}
247 274
 
248 275
 	echo '
249 276
 					</div>
@@ -270,8 +297,10 @@  discard block
 block discarded – undo
270 297
 				<ul>';
271 298
 
272 299
 	foreach ($context['category']['children'] as $child)
273
-		echo '
300
+	{
301
+			echo '
274 302
 					<li>', $child, '</li>';
303
+	}
275 304
 
276 305
 	echo '
277 306
 					</ul>
@@ -284,9 +313,11 @@  discard block
 block discarded – undo
284 313
 					<select name="cat_to" ', count($context['category_order']) == 1 ? 'disabled="disabled"' : '', '>';
285 314
 
286 315
 	foreach ($context['category_order'] as $cat)
287
-		if ($cat['id'] != 0)
316
+	{
317
+			if ($cat['id'] != 0)
288 318
 			echo '
289 319
 							<option value="', $cat['id'], '">', $cat['true_name'], '</option>';
320
+	}
290 321
 
291 322
 	echo '
292 323
 					</select>
@@ -299,8 +330,10 @@  discard block
 block discarded – undo
299 330
 				</div>';
300 331
 
301 332
 	if (!empty($context['token_check']))
302
-		echo '
333
+	{
334
+			echo '
303 335
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
336
+	}
304 337
 
305 338
 	echo '
306 339
 			</div>
@@ -336,8 +369,10 @@  discard block
 block discarded – undo
336 369
 						<select id="new_cat" name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">';
337 370
 
338 371
 	foreach ($context['categories'] as $category)
339
-		echo '
372
+	{
373
+			echo '
340 374
 							<option', $category['selected'] ? ' selected="selected"' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
375
+	}
341 376
 
342 377
 	echo '
343 378
 						</select>
@@ -367,8 +402,10 @@  discard block
 block discarded – undo
367 402
 								', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '';
368 403
 
369 404
 		foreach ($context['board_order'] as $order)
370
-			echo '
405
+		{
406
+					echo '
371 407
 							<option', $order['selected'] ? ' selected="selected"' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
408
+		}
372 409
 
373 410
 		echo '
374 411
 						</select>
@@ -399,12 +436,16 @@  discard block
 block discarded – undo
399 436
 						<select id="profile" name="profile">';
400 437
 
401 438
 	if (isset($context['board']['is_new']))
402
-		echo '
439
+	{
440
+			echo '
403 441
 							<option value="-1">[', $txt['permission_profile_inherit'], ']</option>';
442
+	}
404 443
 
405 444
 	foreach ($context['profiles'] as $id => $profile)
406
-		echo '
445
+	{
446
+			echo '
407 447
 								<option value="', $id, '" ', $id == $context['board']['profile'] ? 'selected="selected"' : '', '>', $profile['name'], '</option>';
448
+	}
408 449
 
409 450
 	echo '
410 451
 						</select>
@@ -522,7 +563,8 @@  discard block
 block discarded – undo
522 563
 		});', true);
523 564
 
524 565
 	if (empty($context['board']['is_recycle']) && empty($context['board']['topics']))
525
-		echo '
566
+	{
567
+			echo '
526 568
 				<dl class="settings">
527 569
 					<dt>
528 570
 						<label for="redirect_enable">', $txt['mboards_redirect'], ':</label><br />
@@ -532,17 +574,22 @@  discard block
 block discarded – undo
532 574
 						<input type="checkbox" id="redirect_enable" name="redirect_enable"', $context['board']['redirect'] != '' ? ' checked="checked"' : '', ' onclick="refreshOptions();" />
533 575
 					</dd>
534 576
 				</dl>';
577
+	}
535 578
 
536 579
 	if (!empty($context['board']['is_recycle']))
537
-		echo '
580
+	{
581
+			echo '
538 582
 				<div class="infobox">', $txt['mboards_redirect_disabled_recycle'], '<br />', $txt['mboards_recycle_disabled_delete'], '</div>';
583
+	}
539 584
 
540 585
 	if (empty($context['board']['is_recycle']) && !empty($context['board']['topics']))
541
-		echo '
586
+	{
587
+			echo '
542 588
 				<div class="infobox">
543 589
 					<strong>', $txt['mboards_redirect'], '</strong><br />
544 590
 					', $txt['mboards_redirect_disabled'], '
545 591
 				</div>';
592
+	}
546 593
 
547 594
 	if (!$context['board']['topics'] && empty($context['board']['is_recycle']))
548 595
 	{
@@ -560,7 +607,8 @@  discard block
 block discarded – undo
560 607
 				</div>';
561 608
 
562 609
 		if ($context['board']['redirect'])
563
-			echo '
610
+		{
611
+					echo '
564 612
 				<div id="reset_redirect_div">
565 613
 					<dl class="settings">
566 614
 						<dt>
@@ -573,6 +621,7 @@  discard block
 block discarded – undo
573 621
 						</dd>
574 622
 					</dl>
575 623
 				</div>';
624
+		}
576 625
 	}
577 626
 
578 627
 	echo '
@@ -601,8 +650,10 @@  discard block
 block discarded – undo
601 650
 								<option value="0"', $context['board']['theme'] == 0 ? ' selected="selected"' : '', '>', $txt['mboards_theme_default'], '</option>';
602 651
 
603 652
 	foreach ($context['themes'] as $theme)
604
-		echo '
653
+	{
654
+			echo '
605 655
 								<option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
656
+	}
606 657
 
607 658
 	echo '
608 659
 							</select>
@@ -629,20 +680,27 @@  discard block
 block discarded – undo
629 680
 
630 681
 	// If this board has no children don't bother with the next confirmation screen.
631 682
 	if ($context['board']['no_children'])
632
-		echo '
683
+	{
684
+			echo '
633 685
 					<input type="hidden" name="no_children" value="1" />';
686
+	}
634 687
 
635 688
 	if (isset($context['board']['is_new']))
636
-		echo '
689
+	{
690
+			echo '
637 691
 					<input type="hidden" name="cur_cat" value="', $context['board']['category'], '" />
638 692
 					<input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" />';
639
-	else
640
-		echo '
693
+	}
694
+	else {
695
+			echo '
641 696
 					<input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" />';
697
+	}
642 698
 
643 699
 	if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle']))
644
-		echo '
700
+	{
701
+			echo '
645 702
 					<input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" onclick="return confirm(\'', $txt['boardConfirm'], '\');" />';
703
+	}
646 704
 
647 705
 	echo '
648 706
 				</div>
@@ -666,11 +724,13 @@  discard block
 block discarded – undo
666 724
 			aListItems: [';
667 725
 
668 726
 	foreach ($context['board']['moderators'] as $id_member => $member_name)
669
-		$js .= '
727
+	{
728
+			$js .= '
670 729
 					{
671 730
 						sItemId: ' . JavaScriptEscape($id_member) . ',
672 731
 						sItemName: ' . JavaScriptEscape($member_name) . '
673 732
 					}' . ($id_member == $context['board']['last_moderator_id'] ? '' : ',');
733
+	}
674 734
 
675 735
 	$js .= '
676 736
 			]
@@ -698,8 +758,10 @@  discard block
 block discarded – undo
698 758
 			document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";';
699 759
 
700 760
 		if ($context['board']['redirect'])
701
-			echo '
761
+		{
762
+					echo '
702 763
 			document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";';
764
+		}
703 765
 	}
704 766
 
705 767
 	echo '
@@ -727,8 +789,10 @@  discard block
 block discarded – undo
727 789
 					<ul>';
728 790
 
729 791
 	foreach ($context['children'] as $child)
730
-		echo '
792
+	{
793
+			echo '
731 794
 						<li>', $child['node']['name'], '</li>';
795
+	}
732 796
 
733 797
 	echo '
734 798
 					</ul>
@@ -741,9 +805,11 @@  discard block
 block discarded – undo
741 805
 					<select name="board_to" ', empty($context['can_move_children']) ? 'disabled="disabled"' : '', '>';
742 806
 
743 807
 	foreach ($context['board_order'] as $board)
744
-		if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
808
+	{
809
+			if ($board['id'] != $context['board']['id'] && empty($board['is_child']))
745 810
 			echo '
746 811
 						<option value="', $board['id'], '">', $board['name'], '</option>';
812
+	}
747 813
 
748 814
 	echo '
749 815
 					</select>
Please login to merge, or discard this patch.
themes/default/Errors.template.php 1 patch
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
 	$error_types = array();
71 71
 	foreach ($context['error_types'] as $type => $details)
72
-		$error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt="" /> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'class="selected"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>';
72
+	{
73
+			$error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt="" /> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'class="selected"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>';
74
+	}
73 75
 
74 76
 	echo '
75 77
 						', implode('&nbsp;|&nbsp;', $error_types), '
@@ -77,12 +79,14 @@  discard block
 block discarded – undo
77 79
 				</tr>';
78 80
 
79 81
 	if ($context['has_filter'])
80
-		echo '
82
+	{
83
+			echo '
81 84
 				<tr>
82 85
 					<td colspan="3">
83 86
 						<strong>&nbsp;&nbsp;', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], '&nbsp;&nbsp;[<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>]
84 87
 					</td>
85 88
 				</tr>';
89
+	}
86 90
 
87 91
 	echo '
88 92
 				<tr class="secondary_header">
@@ -94,10 +98,12 @@  discard block
 block discarded – undo
94 98
 
95 99
 	// No errors, then show a message
96 100
 	if (count($context['errors']) == 0)
97
-		echo '
101
+	{
102
+			echo '
98 103
 				<tr>
99 104
 					<td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td>
100 105
 				</tr>';
106
+	}
101 107
 
102 108
 	// We have some errors, show them...
103 109
 	foreach ($context['errors'] as $error)
@@ -129,13 +135,15 @@  discard block
 block discarded – undo
129 135
 						<ul class="error_type">';
130 136
 
131 137
 		if ($error['member']['session'] != '')
132
-			echo '
138
+		{
139
+					echo '
133 140
 							<li>
134 141
 								<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '" class="icon i-search"></a>
135 142
 								<span>
136 143
 									', $error['member']['session'], '
137 144
 								</span>
138 145
 							</li>';
146
+		}
139 147
 		echo '
140 148
 							<li>
141 149
 								<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '" class="icon i-search"></a>
@@ -161,7 +169,8 @@  discard block
 block discarded – undo
161 169
 						</ul>';
162 170
 
163 171
 		if (!empty($error['file']))
164
-			echo '
172
+		{
173
+					echo '
165 174
 						<ul class="error_where">
166 175
 							<li>
167 176
 								<a class="scope" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '" class="icon i-search"></a>
@@ -171,6 +180,7 @@  discard block
 block discarded – undo
171 180
 								</span>
172 181
 							</li>
173 182
 						</ul>';
183
+		}
174 184
 
175 185
 		echo '
176 186
 					</td>
@@ -201,8 +211,10 @@  discard block
 block discarded – undo
201 211
 					<input type="submit" name="delall" value="', $context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all'], '" onclick="return confirm(\'', $context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove'], '\');" />';
202 212
 
203 213
 	if ($context['sort_direction'] == 'down')
204
-		echo '
214
+	{
215
+			echo '
205 216
 					<input type="hidden" name="desc" value="1" />';
217
+	}
206 218
 
207 219
 	echo '
208 220
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -260,7 +272,9 @@  discard block
 block discarded – undo
260 272
 		<div class="content">';
261 273
 
262 274
 	foreach ($context['attachment_error_keys'] as $key)
263
-		template_show_error($key);
275
+	{
276
+			template_show_error($key);
277
+	}
264 278
 
265 279
 	echo '
266 280
 		</div>
Please login to merge, or discard this patch.
themes/default/ProfileAccount.template.php 1 patch
Braces   +45 added lines, -15 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@  discard block
 block discarded – undo
35 35
 	var colors = {';
36 36
 
37 37
 	foreach ($context['colors'] as $limit => $color)
38
-		echo $limit, ' : "', $color, '", ';
38
+	{
39
+			echo $limit, ' : "', $color, '", ';
40
+	}
39 41
 
40 42
 	echo '};
41 43
 
@@ -43,7 +45,9 @@  discard block
 block discarded – undo
43 45
 	var effectTexts = {';
44 46
 
45 47
 	foreach ($context['level_effects'] as $limit => $text)
46
-		echo $limit, ' : "', $text, '", ';
48
+	{
49
+			echo $limit, ' : "', $text, '", ';
50
+	}
47 51
 
48 52
 	echo '}
49 53
 
@@ -51,7 +55,9 @@  discard block
 block discarded – undo
51 55
 	var templates = {';
52 56
 
53 57
 	foreach ($context['notification_templates'] as $limit => $type)
54
-		echo $limit, ' :"', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '", ';
58
+	{
59
+			echo $limit, ' :"', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '", ';
60
+	}
55 61
 
56 62
 	echo '};
57 63
 	</script>';
@@ -63,21 +69,25 @@  discard block
 block discarded – undo
63 69
 		</h2>';
64 70
 
65 71
 	if (!$context['user']['is_owner'])
66
-		echo '
72
+	{
73
+			echo '
67 74
 		<p class="description">', $txt['profile_warning_desc'], '</p>';
75
+	}
68 76
 
69 77
 	echo '
70 78
 		<div class="content">
71 79
 			<dl class="settings">';
72 80
 
73 81
 	if (!$context['user']['is_owner'])
74
-		echo '
82
+	{
83
+			echo '
75 84
 				<dt>
76 85
 					<strong>', $txt['profile_warning_name'], ':</strong>
77 86
 				</dt>
78 87
 				<dd>
79 88
 					<strong>', $context['member']['name'], '</strong>
80 89
 				</dd>';
90
+	}
81 91
 
82 92
 	echo '
83 93
 				<dt>
@@ -86,17 +96,21 @@  discard block
 block discarded – undo
86 96
 
87 97
 	// For non-javascript give a better list.
88 98
 	foreach ($context['level_effects'] as $limit => $effect)
89
-		echo '
99
+	{
100
+			echo '
90 101
 						', sprintf($txt['profile_warning_effect_text'], $limit, $effect), '<br />';
102
+	}
91 103
 
92 104
 	echo '
93 105
 					</div>';
94 106
 
95 107
 	// Is there only so much they can apply?
96 108
 	if ($context['warning_limit'])
97
-		echo '
109
+	{
110
+			echo '
98 111
 					<br />
99 112
 					<span class="smalltext">', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), '</span>';
113
+	}
100 114
 
101 115
 	echo '
102 116
 				</dt>
@@ -156,8 +170,10 @@  discard block
 block discarded – undo
156 170
 						<option value="-1" disabled="disabled">', str_repeat('&#8212;', strlen($txt['profile_warning_notify_template'])), '</option>';
157 171
 
158 172
 		foreach ($context['notification_templates'] as $id_template => $template)
159
-			echo '
173
+		{
174
+					echo '
160 175
 						<option value="', $id_template, '">&#10148;&nbsp;', $template['title'], '</option>';
176
+		}
161 177
 
162 178
 		echo '
163 179
 					</select>
@@ -173,8 +189,10 @@  discard block
 block discarded – undo
173 189
 			<div class="submitbutton">';
174 190
 
175 191
 	if (!empty($context['token_check']))
176
-		echo '
192
+	{
193
+			echo '
177 194
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
195
+	}
178 196
 
179 197
 	echo '
180 198
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -194,8 +212,10 @@  discard block
 block discarded – undo
194 212
 		document.getElementById(\'preview_button\').style.display = "none";';
195 213
 
196 214
 	if (!$context['user']['is_owner'])
197
-		echo '
215
+	{
216
+			echo '
198 217
 		modifyWarnNotify();';
218
+	}
199 219
 
200 220
 	echo '
201 221
 	</script>';
@@ -217,16 +237,20 @@  discard block
 block discarded – undo
217 237
 
218 238
 	// If deleting another account give them a lovely info box.
219 239
 	if (!$context['user']['is_owner'])
220
-		echo '
240
+	{
241
+			echo '
221 242
 			<p class="description">', $txt['deleteAccount_desc'], '</p>';
243
+	}
222 244
 
223 245
 	echo '
224 246
 			<div class="content">';
225 247
 
226 248
 	// If they are deleting their account AND the admin needs to approve it - give them another piece of info ;)
227 249
 	if ($context['needs_approval'])
228
-		echo '
250
+	{
251
+			echo '
229 252
 				<div class="warningbox">', $txt['deleteAccount_approval'], '</div>';
253
+	}
230 254
 
231 255
 	// If the user is deleting their own account warn them first - and require a password!
232 256
 	if ($context['user']['is_owner'])
@@ -239,8 +263,10 @@  discard block
 block discarded – undo
239 263
 					<input type="submit" name="save" value="', $txt['delete'], '" />';
240 264
 
241 265
 		if (!empty($context['token_check']))
242
-			echo '
266
+		{
267
+					echo '
243 268
 					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
269
+		}
244 270
 
245 271
 		echo '
246 272
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -257,7 +283,8 @@  discard block
 block discarded – undo
257 283
 
258 284
 		// Only actually give these options if they are kind of important.
259 285
 		if ($context['can_delete_posts'])
260
-			echo '
286
+		{
287
+					echo '
261 288
 					<dt>
262 289
 						<a href="', $scripturl, '?action=quickhelp;help=deleteAccount_posts" onclick="return reqOverlayDiv(this.href);" class="helpicon i-help"><s>', $txt['help'], '</s></a>
263 290
 						<label for="remove_type">', $txt['deleteAccount_posts'], '</label>:
@@ -269,6 +296,7 @@  discard block
 block discarded – undo
269 296
 							<option value="topics">', $txt['deleteAccount_topics'], '</option>
270 297
 						</select>
271 298
 					</dd>';
299
+		}
272 300
 
273 301
 		echo '
274 302
 					<dt>
@@ -281,8 +309,10 @@  discard block
 block discarded – undo
281 309
 				<input type="submit" name="save" value="', $txt['delete'], '" class="right_submit" />';
282 310
 
283 311
 		if (!empty($context['token_check']))
284
-			echo '
312
+		{
313
+					echo '
285 314
 				<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
315
+		}
286 316
 
287 317
 		echo '
288 318
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Please login to merge, or discard this patch.
themes/default/Poll.template.php 1 patch
Braces   +19 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,18 +31,22 @@  discard block
 block discarded – undo
31 31
 	</script>';
32 32
 
33 33
 	if (!empty($context['form_url']))
34
-		echo '
34
+	{
35
+			echo '
35 36
 	<div id="edit_poll">
36 37
 		<form id="postmodify" name="postmodify" action="', $context['form_url'], '" method="post" accept-charset="UTF-8" onsubmit="submitonce(this); smc_saveEntities(\'postmodify\', [\'question\'], \'options-\');">
37 38
 			<h2 class="category_header">', $context['page_title'], '</h2>
38 39
 			<div>
39 40
 				<div class="well">';
41
+	}
40 42
 
41 43
 	template_show_error('poll_error');
42 44
 
43 45
 	if (!empty($context['poll']['id']))
44
-		echo '
46
+	{
47
+			echo '
45 48
 					<input type="hidden" name="poll" value="', $context['poll']['id'], '" />';
49
+	}
46 50
 	echo '
47 51
 						<fieldset id="poll_main">
48 52
 							<legend>', $txt['poll_question_options'], '</legend>
@@ -60,7 +64,9 @@  discard block
 block discarded – undo
60 64
 
61 65
 		// Does this option have a vote count yet, or is it new?
62 66
 		if (isset($choice['votes']) && $choice['votes'] != -1)
63
-			echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
67
+		{
68
+					echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
69
+		}
64 70
 
65 71
 		echo '
66 72
 								</li>';
@@ -99,13 +105,15 @@  discard block
 block discarded – undo
99 105
 								</dd>';
100 106
 
101 107
 		if ($context['poll']['guest_vote_allowed'])
102
-			echo '
108
+		{
109
+					echo '
103 110
 								<dt>
104 111
 									<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
105 112
 								</dt>
106 113
 								<dd>
107 114
 									<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked="checked"' : '', ' />
108 115
 								</dd>';
116
+		}
109 117
 	}
110 118
 
111 119
 	echo '
@@ -129,14 +137,17 @@  discard block
 block discarded – undo
129 137
 	// If this is an edit, we can allow them to reset the vote counts.
130 138
 	// @todo a warning maybe while saving?
131 139
 	if (!empty($context['is_edit']))
132
-		echo '
140
+	{
141
+			echo '
133 142
 					<fieldset id="poll_reset">
134 143
 						<legend>', $txt['reset_votes'], '</legend>
135 144
 						<input type="checkbox" id="resetVoteCount" name="resetVoteCount" value="on" /> <label for="resetVoteCount">' . $txt['reset_votes_check'] . '</label>
136 145
 					</fieldset>';
146
+	}
137 147
 
138 148
 	if (!empty($context['form_url']))
139
-		echo '
149
+	{
150
+			echo '
140 151
 					<div class="submitbutton">
141 152
 						<input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" />
142 153
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -146,4 +157,5 @@  discard block
 block discarded – undo
146 157
 			</div>
147 158
 		</form>
148 159
 	</div>';
149
-}
160
+	}
161
+	}
Please login to merge, or discard this patch.
themes/default/ManageThemes.template.php 1 patch
Braces   +108 added lines, -40 removed lines patch added patch discarded remove patch
@@ -49,10 +49,12 @@  discard block
 block discarded – undo
49 49
 								<ul id="known_themes_list_ul">';
50 50
 
51 51
 	foreach ($context['themes'] as $theme)
52
-		echo '
52
+	{
53
+			echo '
53 54
 									<li>
54 55
 										<label for="options-known_themes_', $theme['id'], '"><input type="checkbox" name="options[known_themes][]" id="options-known_themes_', $theme['id'], '" value="', $theme['id'], '"', $theme['known'] ? ' checked="checked"' : '', ' /> ', $theme['name'], '</label>
55 56
 									</li>';
57
+	}
56 58
 
57 59
 	echo '
58 60
 								</ul>
@@ -66,8 +68,10 @@  discard block
 block discarded – undo
66 68
 
67 69
 	// Put an option for each theme in the select box.
68 70
 	foreach ($context['themes'] as $theme)
69
-		echo '
71
+	{
72
+			echo '
70 73
 								<option value="', $theme['id'], '"', $modSettings['theme_guests'] == $theme['id'] ? ' selected="selected"' : '', '>', $theme['name'], '</option>';
74
+	}
71 75
 
72 76
 	echo '
73 77
 							</select>
@@ -83,8 +87,10 @@  discard block
 block discarded – undo
83 87
 
84 88
 	// Same thing, this time for changing the theme of everyone.
85 89
 	foreach ($context['themes'] as $theme)
86
-		echo '
90
+	{
91
+			echo '
87 92
 								<option value="', $theme['id'], '">', $theme['name'], '</option>';
93
+	}
88 94
 
89 95
 	echo '
90 96
 							</select>
@@ -108,21 +114,25 @@  discard block
 block discarded – undo
108 114
 
109 115
 	// Warn them if theme creation isn't possible!
110 116
 	if (!$context['can_create_new'])
111
-		echo '
117
+	{
118
+			echo '
112 119
 					<div class="errorbox">', $txt['theme_install_writable'], '</div>';
120
+	}
113 121
 
114 122
 	echo '
115 123
 					<dl class="settings">';
116 124
 
117 125
 	// Here's a little box for installing a new theme.
118 126
 	if ($context['can_create_new'])
119
-		echo '
127
+	{
128
+			echo '
120 129
 						<dt>
121 130
 							<label for="theme_gz">', $txt['theme_install_file'], '</label>
122 131
 						</dt>
123 132
 						<dd>
124 133
 							<input type="file" name="theme_gz" id="theme_gz" value="theme_gz" size="40" onchange="this.form.copy.disabled = this.value != \'\'; this.form.theme_dir.disabled = this.value != \'\';" class="input_file" />
125 134
 						</dd>';
135
+	}
126 136
 
127 137
 	echo '
128 138
 						<dt>
@@ -133,13 +143,15 @@  discard block
 block discarded – undo
133 143
 						</dd>';
134 144
 
135 145
 	if ($context['can_create_new'])
136
-		echo '
146
+	{
147
+			echo '
137 148
 						<dt>
138 149
 							<label for="copy">', $txt['theme_install_new'], '</label>
139 150
 						</dt>
140 151
 						<dd>
141 152
 							<input type="text" name="copy" id="copy" value="', $context['new_theme_name'], '" size="40" class="input_text" />
142 153
 						</dd>';
154
+	}
143 155
 
144 156
 	echo '
145 157
 					</dl>
@@ -180,13 +192,16 @@  discard block
 block discarded – undo
180 192
 
181 193
 		// You *cannot* delete the default theme. It's important!
182 194
 		if ($theme['id'] != 1)
183
-			echo '
195
+		{
196
+					echo '
184 197
 						<a class="delete_theme icon" data-theme_id="', $theme['id'], '" href="', $scripturl, '?action=admin;area=theme;sa=remove;th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['admin-tr_token_var'], '=', $context['admin-tr_token'], '">
185 198
 							<img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['theme_remove'], '" title="', $txt['theme_remove'], '" />
186 199
 						</a>';
187
-		else
188
-			echo '
200
+		}
201
+		else {
202
+					echo '
189 203
 						<a class="hdicon cat_img_helptopics help floatleft" href="' . $scripturl . '?action=quickhelp;help=themeadmin_delete_help" onclick="return reqOverlayDiv(this.href);" id="themeadmin_delete_help" title="' . $txt['help'] . '"></a>';
204
+		}
190 205
 
191 206
 		echo '
192 207
 				</h2>
@@ -300,12 +315,14 @@  discard block
 block discarded – undo
300 315
 
301 316
 		// Show the change option box ?
302 317
 		if ($context['theme_options_reset'])
303
-			echo '
318
+		{
319
+					echo '
304 320
 						<select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;">
305 321
 							<option value="0" selected="selected">', $txt['themeadmin_reset_options_none'], '</option>
306 322
 							<option value="1">', $txt['themeadmin_reset_options_change'], '</option>
307 323
 							<option value="2">', $txt['themeadmin_reset_options_default'], '</option>
308 324
 						</select>';
325
+		}
309 326
 
310 327
 		// Display checkbox options
311 328
 		if ($setting['type'] == 'checkbox')
@@ -313,8 +330,10 @@  discard block
 block discarded – undo
313 330
 			echo '
314 331
 						<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
315 332
 			if (isset($setting['description']))
316
-				echo '
333
+			{
334
+							echo '
317 335
 						<br /><span class="smalltext">', $setting['description'], '</span>';
336
+			}
318 337
 
319 338
 			echo '
320 339
 					</dt>
@@ -329,8 +348,10 @@  discard block
 block discarded – undo
329 348
 						<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
330 349
 
331 350
 			if (isset($setting['description']))
332
-				echo '
351
+			{
352
+							echo '
333 353
 						<br /><span class="smalltext">', $setting['description'], '</span>';
354
+			}
334 355
 
335 356
 			echo '
336 357
 					</dt>
@@ -338,8 +359,10 @@  discard block
 block discarded – undo
338 359
 						<select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled="disabled"' : '', '>';
339 360
 
340 361
 			foreach ($setting['options'] as $value => $label)
341
-				echo '
362
+			{
363
+							echo '
342 364
 							<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
365
+			}
343 366
 
344 367
 			echo '
345 368
 						</select>';
@@ -351,8 +374,10 @@  discard block
 block discarded – undo
351 374
 						<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
352 375
 
353 376
 			if (isset($setting['description']))
354
-				echo '
377
+			{
378
+							echo '
355 379
 						<br /><span class="smalltext">', $setting['description'], '</span>';
380
+			}
356 381
 
357 382
 			echo '
358 383
 					</dt>
@@ -454,8 +479,10 @@  discard block
 block discarded – undo
454 479
 						<select id="variant" name="options[default_variant]" onchange="changeVariant(this.value)">';
455 480
 
456 481
 		foreach ($context['theme_variants'] as $key => $variant)
457
-			echo '
482
+		{
483
+					echo '
458 484
 							<option value="', $key, '" ', $context['default_variant'] == $key ? 'selected="selected"' : '', '>', $variant['label'], '</option>';
485
+		}
459 486
 
460 487
 		echo '
461 488
 						</select>
@@ -497,8 +524,10 @@  discard block
 block discarded – undo
497 524
 						<label for="', $setting['id'], '">', $setting['label'], '</label>';
498 525
 
499 526
 			if (isset($setting['description']))
500
-				echo '
527
+			{
528
+							echo '
501 529
 						<br /><span class="smalltext">', $setting['description'], '</span>';
530
+			}
502 531
 
503 532
 			echo '
504 533
 					</dt>
@@ -515,8 +544,10 @@  discard block
 block discarded – undo
515 544
 						<label for="', $setting['id'], '">', $setting['label'], '</label>';
516 545
 
517 546
 			if (isset($setting['description']))
518
-				echo '
547
+			{
548
+							echo '
519 549
 						<br /><span class="smalltext">', $setting['description'], '</span>';
550
+			}
520 551
 
521 552
 			echo '
522 553
 					</dt>
@@ -539,16 +570,19 @@  discard block
 block discarded – undo
539 570
 						<div class="smalltext">', $setting['description']['main'], '
540 571
 							<dl>';
541 572
 					foreach ($setting['description']['options'] as $option)
542
-						echo '
573
+					{
574
+											echo '
543 575
 								<dt><strong>', $txt[$option[0]], '</strong></dt>
544 576
 								<dd>', $txt[$option[1]], '</dd>';
577
+					}
545 578
 					echo '
546 579
 							</dl>
547 580
 						</div>';
548 581
 				}
549
-				else
550
-					echo '
582
+				else {
583
+									echo '
551 584
 						<br /><span class="smalltext">', $setting['description'], '</span>';
585
+				}
552 586
 			}
553 587
 
554 588
 			echo '
@@ -557,8 +591,10 @@  discard block
 block discarded – undo
557 591
 						<select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">';
558 592
 
559 593
 			foreach ($setting['options'] as $value => $label)
560
-				echo '
594
+			{
595
+							echo '
561 596
 							<option value="', $value, '"', $value == $setting['value'] ? ' selected="selected"' : '', '>', $label, '</option>';
597
+			}
562 598
 
563 599
 			echo '
564 600
 						</select>
@@ -572,8 +608,10 @@  discard block
 block discarded – undo
572 608
 						<label for="', $setting['id'], '">', $setting['label'], '</label>';
573 609
 
574 610
 			if (isset($setting['description']))
575
-				echo '
611
+			{
612
+							echo '
576 613
 						<br /><span class="smalltext">', $setting['description'], '</span>';
614
+			}
577 615
 
578 616
 			echo '
579 617
 					</dt>
@@ -794,9 +832,12 @@  discard block
 block discarded – undo
794 832
 				<span class="floatright">';
795 833
 
796 834
 		if ($template['can_copy'])
797
-			echo '<a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=copy;template=', $template['value'], '" onclick="return confirm(\'', $template['already_exists'] ? $txt['themeadmin_edit_overwrite_confirm'] : $txt['themeadmin_edit_copy_confirm'], '\');">', $txt['themeadmin_edit_do_copy'], '</a>';
798
-		else
799
-			echo $txt['themeadmin_edit_no_copy'];
835
+		{
836
+					echo '<a href="', $scripturl, '?action=admin;area=theme;th=', $context['theme_id'], ';', $context['session_var'], '=', $context['session_id'], ';sa=copy;template=', $template['value'], '" onclick="return confirm(\'', $template['already_exists'] ? $txt['themeadmin_edit_overwrite_confirm'] : $txt['themeadmin_edit_copy_confirm'], '\');">', $txt['themeadmin_edit_do_copy'], '</a>';
837
+		}
838
+		else {
839
+					echo $txt['themeadmin_edit_no_copy'];
840
+		}
800 841
 
801 842
 		echo '
802 843
 				</span>
@@ -835,14 +876,19 @@  discard block
 block discarded – undo
835 876
 					<td>';
836 877
 
837 878
 		if ($file['is_editable'])
838
-			echo '
879
+		{
880
+					echo '
839 881
 						<a href="', $file['href'], '"', $file['is_template'] ? ' style="font-weight: bold;"' : '', '>', $file['filename'], '</a>';
882
+		}
840 883
 		elseif ($file['is_directory'])
841
-			echo '
884
+		{
885
+					echo '
842 886
 						<a href="', $file['href'], '" class="is_directory">', $file['filename'], '</a>', ($file['is_writable']) ? '' : ' (' . $txt['theme_edit_not_writable'] . ')';
843
-		else
844
-			echo
887
+		}
888
+		else {
889
+					echo
845 890
 			$file['filename'];
891
+		}
846 892
 
847 893
 		echo '
848 894
 					</td>
@@ -866,10 +912,12 @@  discard block
 block discarded – undo
866 912
 	global $context, $scripturl, $txt;
867 913
 
868 914
 	if ($context['session_error'])
869
-		echo '
915
+	{
916
+			echo '
870 917
 	<div class="errorbox">
871 918
 		', $txt['error_session_timeout'], '
872 919
 	</div>';
920
+	}
873 921
 
874 922
 	// From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com.
875 923
 	echo '
@@ -886,8 +934,10 @@  discard block
 block discarded – undo
886 934
 			<div class="content">';
887 935
 
888 936
 	if (!$context['allow_save'])
889
-		echo '
937
+	{
938
+			echo '
890 939
 					', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br />';
940
+	}
891 941
 
892 942
 	echo '
893 943
 				<textarea name="entire_file" cols="80" rows="20" class="edit_file" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea><br />
@@ -899,8 +949,10 @@  discard block
 block discarded – undo
899 949
 
900 950
 	// Hopefully our token exists.
901 951
 	if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token']))
902
-		echo '
952
+	{
953
+			echo '
903 954
 					<input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '" />';
955
+	}
904 956
 
905 957
 	echo '		</div>
906 958
 			</div>
@@ -916,18 +968,22 @@  discard block
 block discarded – undo
916 968
 	global $context, $scripturl, $txt;
917 969
 
918 970
 	if ($context['session_error'])
919
-		echo '
971
+	{
972
+			echo '
920 973
 	<div class="errorbox">
921 974
 		', $txt['error_session_timeout'], '
922 975
 	</div>';
976
+	}
923 977
 
924 978
 	if (isset($context['parse_error']))
925
-		foreach ($context['parse_error'] as $error)
979
+	{
980
+			foreach ($context['parse_error'] as $error)
926 981
 			echo '
927 982
 	<div class="errorbox">
928 983
 		', $txt['themeadmin_edit_error'], '
929 984
 			<div><span class="tt">', $error, '</span></div>
930 985
 	</div>';
986
+	}
931 987
 
932 988
 	// Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.)
933 989
 	echo '
@@ -937,15 +993,19 @@  discard block
 block discarded – undo
937 993
 			<div class="content">';
938 994
 
939 995
 	if (!$context['allow_save'])
940
-		echo '
996
+	{
997
+			echo '
941 998
 				', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br />';
999
+	}
942 1000
 
943 1001
 	foreach ($context['file_parts'] as $part)
944
-		echo '
1002
+	{
1003
+			echo '
945 1004
 				<label for="on_line', $part['line'], '">', $txt['themeadmin_edit_on_line'], ' ', $part['line'], '</label><br />
946 1005
 				<div class="centertext">
947 1006
 					<textarea id="on_line', $part['line'], '" name="entire_file[]" cols="80" rows="', $part['lines'] > 14 ? '14' : $part['lines'], '" class="edit_file">', $part['data'], '</textarea>
948 1007
 				</div>';
1008
+	}
949 1009
 
950 1010
 	echo '
951 1011
 				<div class="submitbutton">
@@ -955,8 +1015,10 @@  discard block
 block discarded – undo
955 1015
 
956 1016
 	// You better have one of these to do that
957 1017
 	if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token']))
958
-		echo '
1018
+	{
1019
+			echo '
959 1020
 					<input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '" />';
1021
+	}
960 1022
 
961 1023
 	echo '
962 1024
 				</div>
@@ -973,17 +1035,21 @@  discard block
 block discarded – undo
973 1035
 	global $context, $scripturl, $txt;
974 1036
 
975 1037
 	if ($context['session_error'])
976
-		echo '
1038
+	{
1039
+			echo '
977 1040
 	<div class="errorbox">
978 1041
 		', $txt['error_session_timeout'], '
979 1042
 	</div>';
1043
+	}
980 1044
 
981 1045
 	// Is this file writeable?
982 1046
 	if (!$context['allow_save'])
983
-		echo '
1047
+	{
1048
+			echo '
984 1049
 	<div class="errorbox">
985 1050
 		', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
986 1051
 	</div>';
1052
+	}
987 1053
 
988 1054
 	// Just show a big box.... gray out the Save button if it's not save-able... (ie. not 777.)
989 1055
 	echo '
@@ -999,8 +1065,10 @@  discard block
 block discarded – undo
999 1065
 
1000 1066
 	// Hopefully it exists.
1001 1067
 	if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token']))
1002
-		echo '
1068
+	{
1069
+			echo '
1003 1070
 					<input type="hidden" name="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token_var'], '" value="', $context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'], '" />';
1071
+	}
1004 1072
 
1005 1073
 	echo '
1006 1074
 				</div>
Please login to merge, or discard this patch.
themes/default/Maillist.template.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,12 +72,14 @@  discard block
 block discarded – undo
72 72
 			// Otherwise see what we can do...';
73 73
 
74 74
 	foreach ($context['bounce_templates'] as $k => $type)
75
-		echo '
75
+	{
76
+			echo '
76 77
 			if (index == ', $k, ')
77 78
 			{
78 79
 				document.getElementById(\'warn_body\').value = "', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";
79 80
 				document.getElementById(\'warn_sub\').value = "', strtr($type['subject'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";
80 81
 			}';
82
+	}
81 83
 
82 84
 	echo '
83 85
 		}
@@ -92,8 +94,10 @@  discard block
 block discarded – undo
92 94
 
93 95
 	// Any special messages?
94 96
 	if (!empty($context['settings_message']))
95
-		echo '
97
+	{
98
+			echo '
96 99
 			<div class="successbox">', $context['settings_message'], '</div>';
100
+	}
97 101
 
98 102
 	// The main body
99 103
 	echo '
@@ -125,8 +129,10 @@  discard block
 block discarded – undo
125 129
 						<option value="-1" disabled="disabled">', str_repeat('&#8212;', strlen($txt['bounce_notify_template'])), '</option>';
126 130
 
127 131
 	foreach ($context['bounce_templates'] as $id_template => $template)
128
-		echo '
132
+	{
133
+			echo '
129 134
 							<option value="', $id_template, '">&#10148;&nbsp;', $template['title'], '</option>';
135
+	}
130 136
 
131 137
 	echo '
132 138
 					</select>
@@ -190,8 +196,10 @@  discard block
 block discarded – undo
190 196
 				<select class="input_select" name="boardto[', $data['id'], ']" >';
191 197
 
192 198
 		foreach ($context['boards'] as $board_id => $board_name)
193
-			echo '
199
+		{
200
+					echo '
194 201
 					<option value="', $board_id, '"', (($data['boardto'] == $board_id) ? ' selected="selected"' : ''), '>', $board_name, '</option>';
202
+		}
195 203
 
196 204
 		echo '
197 205
 				</select>
@@ -211,8 +219,10 @@  discard block
 block discarded – undo
211 219
 				<select name="boardto[', $count, ']" >';
212 220
 
213 221
 			foreach ($context['boards'] as $board_id => $board_name)
214
-				echo '
222
+			{
223
+							echo '
215 224
 					<option value="', $board_id, '">', $board_name, '</option>';
225
+			}
216 226
 
217 227
 			echo '
218 228
 				</select>
@@ -286,13 +296,15 @@  discard block
 block discarded – undo
286 296
 			</dl>';
287 297
 
288 298
 	if ($context['template_data']['can_edit_personal'])
289
-		echo '
299
+	{
300
+			echo '
290 301
 			<input type="checkbox" name="make_personal" id="make_personal" ', $context['template_data']['personal'] ? 'checked="checked"' : '', ' />
291 302
 				<label for="make_personal">
292 303
 					', $txt['ml_bounce_template_personal'], '
293 304
 				</label>
294 305
 				<br />
295 306
 				<span class="smalltext">', $txt['ml_bounce_template_personal_desc'], '</span>';
307
+	}
296 308
 
297 309
 	echo '
298 310
 			<div class="submitbutton">
Please login to merge, or discard this patch.
themes/default/Recent.template.php 1 patch
Braces   +41 added lines, -17 removed lines patch added patch discarded remove patch
@@ -49,11 +49,13 @@  discard block
 block discarded – undo
49 49
 	template_pagesection();
50 50
 
51 51
 	if (!empty($context['using_relative_time']))
52
-		echo '
52
+	{
53
+			echo '
53 54
 		<script>
54 55
 			$(\'.topic_latest\').addClass(\'relative\');
55 56
 		</script>';
56
-}
57
+	}
58
+	}
57 59
 
58 60
 /**
59 61
  * Unread posts page.
@@ -67,11 +69,13 @@  discard block
 block discarded – undo
67 69
 		template_pagesection('recent_buttons', 'right');
68 70
 
69 71
 		if ($context['showCheckboxes'])
70
-			echo '
72
+		{
73
+					echo '
71 74
 					<form id="quickModForm" action="', $scripturl, '?action=quickmod" method="post" accept-charset="UTF-8" name="quickModForm">
72 75
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
73 76
 						<input type="hidden" name="qaction" value="markread" />
74 77
 						<input type="hidden" name="redirect_url" value="', $context['querystring_board_limits'], '" />';
78
+		}
75 79
 
76 80
 		echo '
77 81
 						<h2 class="category_header" id="unread_header">
@@ -81,10 +85,12 @@  discard block
 block discarded – undo
81 85
 
82 86
 		// Show a "select all" box for quick moderation?
83 87
 		if ($context['showCheckboxes'])
84
-			echo '
88
+		{
89
+					echo '
85 90
 							<li class="listlevel1 quickmod_select_all">
86 91
 								<input type="checkbox" onclick="invertAll(this, document.getElementById(\'quickModForm\'), \'topics[]\');" />
87 92
 							</li>';
93
+		}
88 94
 
89 95
 		$current_header = $context['topics_headers'][$context['sort_by']];
90 96
 		echo '
@@ -97,10 +103,12 @@  discard block
 block discarded – undo
97 103
 								<ul class="menulevel2" id="sortby">';
98 104
 
99 105
 		foreach ($context['topics_headers'] as $key => $value)
100
-			echo '
106
+		{
107
+					echo '
101 108
 									<li class="listlevel2 sort_by_item" id="sort_by_item_', $key, '">
102 109
 										<a href="', $value['url'], '" class="linklevel2">', $txt[$key], ' ', $value['sort_dir_img'], '</a>
103 110
 									</li>';
111
+		}
104 112
 
105 113
 		echo '
106 114
 								</ul>
@@ -112,16 +120,23 @@  discard block
 block discarded – undo
112 120
 		{
113 121
 			// Calculate the color class of the topic.
114 122
 			if ($topic['is_sticky'] && $topic['is_locked'])
115
-				$color_class = 'locked_row sticky_row';
123
+			{
124
+							$color_class = 'locked_row sticky_row';
125
+			}
116 126
 			// Sticky topics should get a different color, too.
117 127
 			elseif ($topic['is_sticky'])
118
-				$color_class = 'sticky_row';
128
+			{
129
+							$color_class = 'sticky_row';
130
+			}
119 131
 			// Locked topics get special treatment as well.
120 132
 			elseif ($topic['is_locked'])
121
-				$color_class = 'locked_row';
133
+			{
134
+							$color_class = 'locked_row';
135
+			}
122 136
 			// Last, but not least: regular topics.
123
-			else
124
-				$color_class = 'basic_row';
137
+			else {
138
+							$color_class = 'basic_row';
139
+			}
125 140
 
126 141
 			echo '
127 142
 							<li class="', $color_class, '">
@@ -129,8 +144,10 @@  discard block
 block discarded – undo
129 144
 									<p class="topic_icons', empty($modSettings['messageIcons_enable']) ? ' topicicon i-' . $topic['first_post']['icon'] : '', '">';
130 145
 
131 146
 			if (!empty($modSettings['messageIcons_enable']))
132
-				echo '
147
+			{
148
+							echo '
133 149
 										<img src="', $topic['first_post']['icon_url'], '" alt="" />';
150
+			}
134 151
 
135 152
 			echo '
136 153
 										', $topic['is_posted_in'] ? '<span class="fred topicicon i-profile"></span>' : '', '
@@ -162,10 +179,12 @@  discard block
 block discarded – undo
162 179
 								</div>';
163 180
 
164 181
 			if ($context['showCheckboxes'])
165
-				echo '
182
+			{
183
+							echo '
166 184
 								<p class="topic_moderation" >
167 185
 									<input type="checkbox" name="topics[]" value="', $topic['id'], '" />
168 186
 								</p>';
187
+			}
169 188
 
170 189
 			echo '
171 190
 							</li>';
@@ -175,11 +194,13 @@  discard block
 block discarded – undo
175 194
 						</ul>';
176 195
 
177 196
 		if ($context['showCheckboxes'])
178
-			echo '
197
+		{
198
+					echo '
179 199
 					</form>';
200
+		}
180 201
 	}
181
-	else
182
-		echo '
202
+	else {
203
+			echo '
183 204
 					<div class="forum_category">
184 205
 						<h2 class="category_header">
185 206
 							', $txt['topic_alert_none'], '
@@ -188,7 +209,8 @@  discard block
 block discarded – undo
188 209
 							', $context['showing_all_topics'] ? '<strong>' . $txt['find_no_results'] . '</strong>' : $txt['unread_topics_visit_none'], '
189 210
 						</div>
190 211
 					</div>';
191
-}
212
+	}
213
+	}
192 214
 
193 215
 function template_unread_below()
194 216
 {
@@ -204,10 +226,12 @@  discard block
 block discarded – undo
204 226
 		template_basicicons_legend();
205 227
 
206 228
 		if (!empty($context['using_relative_time']))
207
-			echo '
229
+		{
230
+					echo '
208 231
 			<script>
209 232
 				$(\'.topic_latest\').addClass(\'relative\');
210 233
 			</script>';
234
+		}
211 235
 
212 236
 		echo '
213 237
 		</div>';
Please login to merge, or discard this patch.
themes/default/ProfileHistory.template.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,10 @@  discard block
 block discarded – undo
39 39
 
40 40
 	// Second address detected?
41 41
 	if (!empty($context['last_ip2']))
42
-		echo '
42
+	{
43
+			echo '
43 44
 							, <a href="', $scripturl, '?action=profile;area=history;sa=ip;searchip=', $context['last_ip2'], ';u=', $context['member']['id'], '">', $context['last_ip2'], '</a>';
45
+	}
44 46
 
45 47
 	echo '
46 48
 						</dd>';
@@ -109,8 +111,10 @@  discard block
 block discarded – undo
109 111
 			<div class="content">';
110 112
 
111 113
 		foreach ($context['whois_servers'] as $server)
112
-			echo '
114
+		{
115
+					echo '
113 116
 					<a href="', $server['url'], '" target="_blank" class="new_win">', $server['name'], '</a><br />';
117
+		}
114 118
 
115 119
 		echo '
116 120
 			</div>';
@@ -121,8 +125,10 @@  discard block
 block discarded – undo
121 125
 		<h2 class="category_header">', $txt['members_from_ip'], ' ', $context['ip'], '</h2>';
122 126
 
123 127
 	if (empty($context['ips']))
124
-		echo '
128
+	{
129
+			echo '
125 130
 		<p class="description"><em>', $txt['no_members_from_ip'], '</em></p>';
131
+	}
126 132
 	else
127 133
 	{
128 134
 		echo '
@@ -137,11 +143,13 @@  discard block
 block discarded – undo
137 143
 
138 144
 		// Loop through each of the members and display them.
139 145
 		foreach ($context['ips'] as $ip => $memberlist)
140
-			echo '
146
+		{
147
+					echo '
141 148
 				<tr>
142 149
 					<td><a href="', $context['base_url'], ';searchip=', $ip, '">', $ip, '</a></td>
143 150
 					<td>', implode(', ', $memberlist), '</td>
144 151
 				</tr>';
152
+		}
145 153
 
146 154
 		echo '
147 155
 			</tbody>
Please login to merge, or discard this patch.