Completed
Push — release-2.1 ( 4c82a0...64d581 )
by Rick
09:29
created
Themes/default/Errors.template.php 2 patches
Braces   +24 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 {
24 24
 	global $context, $txt;
25 25
 
26
-	if (!empty($context['simple_action']))
27
-		echo '
26
+	if (!empty($context['simple_action'])) {
27
+			echo '
28 28
 		<strong>
29 29
 			', $context['error_title'], '
30 30
 		</strong><br>
31 31
 		<div ', $context['error_code'], 'class="padding">', $context['error_message'], '</div>';
32
-	else
32
+	} else
33 33
 	{
34 34
 		echo '
35 35
 	<div id="fatal_error">
@@ -82,21 +82,23 @@  discard block
 block discarded – undo
82 82
 						&nbsp;&nbsp;', $txt['apply_filter_of_type'], ':';
83 83
 
84 84
 	$error_types = array();
85
-	foreach ($context['error_types'] as $type => $details)
86
-		$error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>';
85
+	foreach ($context['error_types'] as $type => $details) {
86
+			$error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>';
87
+	}
87 88
 
88 89
 	echo '
89 90
 						', implode('&nbsp;|&nbsp;', $error_types), '
90 91
 					</td>
91 92
 				</tr>';
92 93
 
93
-	if ($context['has_filter'])
94
-		echo '
94
+	if ($context['has_filter']) {
95
+			echo '
95 96
 				<tr>
96 97
 					<td colspan="3" class="windowbg">
97 98
 						<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>]
98 99
 					</td>
99 100
 				</tr>';
101
+	}
100 102
 
101 103
 	echo '
102 104
 				<tr>
@@ -107,11 +109,12 @@  discard block
 block discarded – undo
107 109
 				</tr>';
108 110
 
109 111
 	// No errors, then show a message
110
-	if (count($context['errors']) == 0)
111
-		echo '
112
+	if (count($context['errors']) == 0) {
113
+			echo '
112 114
 				<tr class="windowbg">
113 115
 					<td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td>
114 116
 				</tr>';
117
+	}
115 118
 
116 119
 	// we have some errors, must be some mods installed :P
117 120
 	foreach ($context['errors'] as $error)
@@ -126,20 +129,22 @@  discard block
 block discarded – undo
126 129
 							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? '' : ';desc', $context['has_filter'] ? $context['filter']['href'] : '', '" title="', $txt['reverse_direction'], '"><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></a>
127 130
 							', $error['time'], '<br>';
128 131
 
129
-		if (!empty($error['member']['ip']))
130
-			echo '
132
+		if (!empty($error['member']['ip'])) {
133
+					echo '
131 134
 							<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><span class="generic_icons filter centericon"></span></a>
132 135
 							<strong><a href="', $scripturl, '?action=trackip;searchip=', $error['member']['ip'], '">', $error['member']['ip'], '</a></strong>&nbsp;&nbsp;<br>';
136
+		}
133 137
 
134 138
 		echo '
135 139
 						</div>
136 140
 
137 141
 						<div style="float: left; width: 50%; line-height: 1.8em; padding: 0 4px;">';
138 142
 
139
-		if ($error['member']['session'] != '')
140
-			echo '
143
+		if ($error['member']['session'] != '') {
144
+					echo '
141 145
 							<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'], '"><span class="generic_icons filter centericon"></span></a>
142 146
 							', $error['member']['session'], '<br>';
147
+		}
143 148
 
144 149
 		echo '
145 150
 							<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'], '"><span class="generic_icons filter centericon"></span></a>
@@ -153,8 +158,8 @@  discard block
 block discarded – undo
153 158
 							<a style="display: table-cell;" href="', $error['url']['html'], '">', $error['url']['html'], '</a>
154 159
 						</div>';
155 160
 
156
-		if (!empty($error['file']))
157
-			echo '
161
+		if (!empty($error['file'])) {
162
+					echo '
158 163
 						<div style="float: left; width: 100%; padding: 4px 0; line-height: 1.6em; border-top: 1px solid #e3e3e3;">
159 164
 							<a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" 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'], '"><span class="generic_icons filter"></span></a>
160 165
 							<div>
@@ -162,6 +167,7 @@  discard block
 block discarded – undo
162 167
 								', $txt['line'], ': ', $error['file']['line'], '
163 168
 							</div>
164 169
 						</div>';
170
+		}
165 171
 
166 172
 		echo '
167 173
 					</td>
@@ -190,9 +196,10 @@  discard block
 block discarded – undo
190 196
 			</div>
191 197
 			<br>';
192 198
 
193
-	if ($context['sort_direction'] == 'down')
194
-		echo '
199
+	if ($context['sort_direction'] == 'down') {
200
+			echo '
195 201
 			<input type="hidden" name="desc" value="1">';
202
+	}
196 203
 
197 204
 	echo '
198 205
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	echo '
65 65
 			<div class="cat_bar">
66 66
 				<h3 class="catbg">
67
-					<a href="', $scripturl, '?action=helpadmin;help=error_log" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['errlog'], '
67
+					<a href="', $scripturl, '?action=helpadmin;help=error_log" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['errlog'], '
68 68
 				</h3>
69 69
 			</div>
70 70
 			<div class="pagesection">
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 					', $context['page_index'], '
73 73
 				</div>
74 74
 				<div class="floatright">
75
-					<input type="submit" name="removeSelection" value="', $txt['remove_selection'] ,'" data-confirm="', $txt['remove_selection_confirm'] ,'" class="button_submit you_sure">
76
-					<input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']) ,'" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']) ,'" class="button_submit you_sure">
75
+					<input type="submit" name="removeSelection" value="', $txt['remove_selection'], '" data-confirm="', $txt['remove_selection_confirm'], '" class="button_submit you_sure">
76
+					<input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']), '" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']), '" class="button_submit you_sure">
77 77
 				</div>
78 78
 			</div>
79 79
 			<table class="table_grid" id="error_log">
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 					', $context['page_index'], '
185 185
 				</div>
186 186
 				<div class="floatright">
187
-					<input type="submit" name="removeSelection" value="', $txt['remove_selection'] ,'" data-confirm="', $txt['remove_selection_confirm'] ,'" class="button_submit you_sure">
188
-					<input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']) ,'" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']) ,'" class="button_submit you_sure">
187
+					<input type="submit" name="removeSelection" value="', $txt['remove_selection'], '" data-confirm="', $txt['remove_selection_confirm'], '" class="button_submit you_sure">
188
+					<input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']), '" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']), '" class="button_submit you_sure">
189 189
 				</div>
190 190
 			</div>
191 191
 			<br>';
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	<head>
216 216
 		<meta charset="', $context['character_set'], '">
217 217
 		<title>', $context['file_data']['file'], '</title>
218
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
218
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
219 219
 	</head>
220 220
 	<body>
221 221
 		<table class="errorfile_table">';
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 		$is_target = $line_num == $context['file_data']['target'];
226 226
 		echo '
227 227
 			<tr>
228
-				<td class="righttext', $is_target ? ' current">==&gt;' : '">', $line_num , ':</td>
229
-				<td style="white-space: nowrap;', $is_target ? ' border: 1px solid black;border-width: 1px 1px 1px 0;':'','">', $line, '</td>
228
+				<td class="righttext', $is_target ? ' current">==&gt;' : '">', $line_num, ':</td>
229
+				<td style="white-space: nowrap;', $is_target ? ' border: 1px solid black;border-width: 1px 1px 1px 0;' : '', '">', $line, '</td>
230 230
 			</tr>';
231 231
 	}
232 232
 	echo '
Please login to merge, or discard this patch.
Themes/default/ManageMembergroups.template.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	echo '
344 344
 				</dl>
345 345
 				<input type="submit" name="save" value="', $txt['membergroups_edit_save'], '" class="button_submit">', $context['group']['allow_delete'] ? '
346
-				<input type="submit" name="delete" value="'. $txt['membergroups_delete'] .'" data-confirm="'. ($context['is_moderator_group'] ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete']) .'" class="button_submit you_sure">' : '', '
346
+				<input type="submit" name="delete" value="'. $txt['membergroups_delete'] . '" data-confirm="' . ($context['is_moderator_group'] ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete']) . '" class="button_submit you_sure">' : '', '
347 347
 			</div>
348 348
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
349 349
 			<input type="hidden" name="', $context['admin-mmg_token_var'], '" value="', $context['admin-mmg_token'], '">
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 
531 531
 	echo '
532 532
 	<div id="admincenter">
533
-		<form action="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : '') , ';sa=members;group=', $context['group']['id'], '" method="post" accept-charset="', $context['character_set'], '" id="view_group">
533
+		<form action="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;group=', $context['group']['id'], '" method="post" accept-charset="', $context['character_set'], '" id="view_group">
534 534
 			<div class="cat_bar">
535 535
 				<h3 class="catbg">', $context['page_title'], '</h3>
536 536
 			</div>
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 						<strong>' . $txt['membergroups_members_description'] . ':</strong>
550 550
 					</dt>
551 551
 					<dd>
552
-						', $context['group']['description'] ,'
552
+						', $context['group']['description'], '
553 553
 					</dd>';
554 554
 
555 555
 	echo '
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 						<strong>', $txt['membergroups_members_top'], ':</strong>
558 558
 					</dt>
559 559
 					<dd>
560
-						', $context['total_members'] ,'
560
+						', $context['total_members'], '
561 561
 					</dd>';
562 562
 	// Any group moderators to show?
563 563
 	if (!empty($context['group']['moderators']))
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 						<strong>', $txt['membergroups_members_group_moderators'], ':</strong>
572 572
 					</dt>
573 573
 					<dd>
574
-						', implode(', ', $moderators) ,'
574
+						', implode(', ', $moderators), '
575 575
 					</dd>';
576 576
 	}
577 577
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	echo '
598 598
 						<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' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
599 599
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
600
-						<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' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>';
600
+						<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' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>';
601 601
 	if (!empty($context['group']['assignable']))
602 602
 		echo '
603 603
 						<th style="width: 4%"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>';
Please login to merge, or discard this patch.
Braces   +92 added lines, -65 removed lines patch added patch discarded remove patch
@@ -52,9 +52,10 @@  discard block
 block discarded – undo
52 52
 							<legend>', $txt['membergroups_edit_select_group_type'], '</legend>
53 53
 							<label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>';
54 54
 
55
-		if ($context['allow_protected'])
56
-			echo '
55
+		if ($context['allow_protected']) {
56
+					echo '
57 57
 							<label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>';
58
+		}
58 59
 
59 60
 		echo '
60 61
 							<label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br>
@@ -64,14 +65,15 @@  discard block
 block discarded – undo
64 65
 					</dd>';
65 66
 	}
66 67
 
67
-	if ($context['post_group'] || $context['undefined_group'])
68
-		echo '
68
+	if ($context['post_group'] || $context['undefined_group']) {
69
+			echo '
69 70
 					<dt id="min_posts_text">
70 71
 						<strong>', $txt['membergroups_min_posts'], ':</strong>
71 72
 					</dt>
72 73
 					<dd>
73 74
 						<input type="number" name="min_posts" id="min_posts_input" size="5" class="input_text">
74 75
 					</dd>';
76
+	}
75 77
 	if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups']))
76 78
 	{
77 79
 		echo '
@@ -87,9 +89,10 @@  discard block
 block discarded – undo
87 89
 							<select name="inheritperm" id="inheritperm_select" onclick="document.getElementById(\'perm_type_inherit\').checked = true;">
88 90
 								<option value="-1">', $txt['membergroups_guests'], '</option>
89 91
 								<option value="0" selected>', $txt['membergroups_members'], '</option>';
90
-		foreach ($context['groups'] as $group)
91
-			echo '
92
+		foreach ($context['groups'] as $group) {
93
+					echo '
92 94
 								<option value="', $group['id'], '">', $group['name'], '</option>';
95
+		}
93 96
 		echo '
94 97
 							</select>
95 98
 							<br>
@@ -98,9 +101,10 @@  discard block
 block discarded – undo
98 101
 							<select name="copyperm" id="copyperm_select" onclick="document.getElementById(\'perm_type_copy\').checked = true;">
99 102
 								<option value="-1">', $txt['membergroups_guests'], '</option>
100 103
 								<option value="0" selected>', $txt['membergroups_members'], '</option>';
101
-		foreach ($context['groups'] as $group)
102
-			echo '
104
+		foreach ($context['groups'] as $group) {
105
+					echo '
103 106
 								<option value="', $group['id'], '">', $group['name'], '</option>';
107
+		}
104 108
 		echo '
105 109
 							</select>
106 110
 							<br>
@@ -173,8 +177,8 @@  discard block
 block discarded – undo
173 177
 						<input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30" class="input_text">
174 178
 					</dd>';
175 179
 
176
-	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
177
-		echo '
180
+	if ($context['group']['id'] != 3 && $context['group']['id'] != 4) {
181
+			echo '
178 182
 
179 183
 					<dt id="group_desc_text">
180 184
 						<label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label>
@@ -182,6 +186,7 @@  discard block
 block discarded – undo
182 186
 					<dd>
183 187
 						<textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea>
184 188
 					</dd>';
189
+	}
185 190
 
186 191
 	// Group type...
187 192
 	if ($context['group']['allow_post_group'])
@@ -195,9 +200,10 @@  discard block
 block discarded – undo
195 200
 							<legend>', $txt['membergroups_edit_select_group_type'], '</legend>
196 201
 							<label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>';
197 202
 
198
-		if ($context['group']['allow_protected'])
199
-			echo '
203
+		if ($context['group']['allow_protected']) {
204
+					echo '
200 205
 							<label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>';
206
+		}
201 207
 
202 208
 		echo '
203 209
 							<label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br>
@@ -207,8 +213,8 @@  discard block
 block discarded – undo
207 213
 					</dd>';
208 214
 	}
209 215
 
210
-	if ($context['group']['id'] != 3 && $context['group']['id'] != 4)
211
-		echo '
216
+	if ($context['group']['id'] != 3 && $context['group']['id'] != 4) {
217
+			echo '
212 218
 					<dt id="group_moderators_text">
213 219
 						<label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label>
214 220
 					</dt>
@@ -226,6 +232,7 @@  discard block
 block discarded – undo
226 232
 							<option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option>
227 233
 						</select>
228 234
 					</dd>';
235
+	}
229 236
 
230 237
 	// Can they inherit permissions?
231 238
 	if ($context['group']['id'] > 1 && $context['group']['id'] != 3)
@@ -242,9 +249,10 @@  discard block
 block discarded – undo
242 249
 							<option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>';
243 250
 
244 251
 		// For all the inheritable groups show an option.
245
-		foreach ($context['inheritable_groups'] as $id => $group)
246
-			echo '
252
+		foreach ($context['inheritable_groups'] as $id => $group) {
253
+					echo '
247 254
 							<option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>';
255
+		}
248 256
 
249 257
 		echo '
250 258
 						</select>
@@ -252,8 +260,8 @@  discard block
 block discarded – undo
252 260
 					</dd>';
253 261
 	}
254 262
 
255
-	if ($context['group']['allow_post_group'])
256
-		echo '
263
+	if ($context['group']['allow_post_group']) {
264
+			echo '
257 265
 
258 266
 					<dt id="min_posts_text">
259 267
 						<label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label>
@@ -261,6 +269,7 @@  discard block
 block discarded – undo
261 269
 					<dd>
262 270
 						<input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6" class="input_text">
263 271
 					</dd>';
272
+	}
264 273
 	echo '
265 274
 					<dt>
266 275
 						<label for="online_color_input"><strong>', $txt['membergroups_online_color'], ':</strong></label>
@@ -301,9 +310,10 @@  discard block
 block discarded – undo
301 310
 	}
302 311
 
303 312
 	// No? Hide the entire control.
304
-	else
305
-		echo '
313
+	else {
314
+			echo '
306 315
 					<input type="hidden" name="icon_image" value="">';
316
+	}
307 317
 
308 318
 	echo '
309 319
 					<dt>
@@ -314,8 +324,8 @@  discard block
 block discarded – undo
314 324
 						<input type="text" name="max_messages" id="max_messages_input" value="', $context['group']['id'] == 1 ? 0 : $context['group']['max_messages'], '" size="6"', $context['group']['id'] == 1 ? ' disabled' : '', ' class="input_text">
315 325
 					</dd>';
316 326
 	//Force 2FA for this membergroup?
317
-	if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2)
318
-	echo '
327
+	if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) {
328
+		echo '
319 329
 					<dt>
320 330
 						<label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br>
321 331
 						<span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span>
@@ -323,6 +333,7 @@  discard block
 block discarded – undo
323 333
 					<dd>
324 334
 						<input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', ' class="input_check">
325 335
 					</dd>';
336
+	}
326 337
 
327 338
 	if (!empty($context['categories']))
328 339
 	{
@@ -332,10 +343,11 @@  discard block
 block discarded – undo
332 343
 						<span class="smalltext">' . $txt['membergroups_new_board_post_groups'] . '</span>' : '', '
333 344
 					</dt>
334 345
 					<dd>';
335
-		if (!empty($context['can_manage_boards']))
336
-			echo $txt['membergroups_can_manage_access'];
337
-		else
338
-			template_add_edit_group_boards_list();
346
+		if (!empty($context['can_manage_boards'])) {
347
+					echo $txt['membergroups_can_manage_access'];
348
+		} else {
349
+					template_add_edit_group_boards_list();
350
+		}
339 351
 
340 352
 		echo '
341 353
 					</dd>';
@@ -364,20 +376,21 @@  discard block
 block discarded – undo
364 376
 				sItemListContainerId: \'moderator_container\',
365 377
 				aListItems: [';
366 378
 
367
-			foreach ($context['group']['moderators'] as $id_member => $member_name)
368
-				echo '
379
+			foreach ($context['group']['moderators'] as $id_member => $member_name) {
380
+							echo '
369 381
 							{
370 382
 								sItemId: ', JavaScriptEscape($id_member), ',
371 383
 								sItemName: ', JavaScriptEscape($member_name), '
372 384
 							}', $id_member == $context['group']['last_moderator_id'] ? '' : ',';
385
+			}
373 386
 
374 387
 			echo '
375 388
 				]
376 389
 			});
377 390
 		</script>';
378 391
 
379
-	if ($context['group']['allow_post_group'])
380
-		echo '
392
+	if ($context['group']['allow_post_group']) {
393
+			echo '
381 394
 		<script>
382 395
 			function swapPostGroup(isChecked)
383 396
 			{
@@ -425,7 +438,8 @@  discard block
 block discarded – undo
425 438
 
426 439
 			swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', ');
427 440
 		</script>';
428
-}
441
+	}
442
+	}
429 443
 
430 444
 /**
431 445
  * The template for determining which boards a group has access to.
@@ -442,13 +456,13 @@  discard block
 block discarded – undo
442 456
 
443 457
 	foreach ($context['categories'] as $category)
444 458
 	{
445
-		if (empty($modSettings['deny_boards_access']))
446
-			echo '
459
+		if (empty($modSettings['deny_boards_access'])) {
460
+					echo '
447 461
 									<li class="category">
448 462
 										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a>
449 463
 									<ul style="width:100%">';
450
-		else
451
-			echo '
464
+		} else {
465
+					echo '
452 466
 									<li class="category">
453 467
 										<strong>', $category['name'], '</strong>
454 468
 										<span class="select_all_box">
@@ -461,16 +475,17 @@  discard block
 block discarded – undo
461 475
 											</select>
462 476
 										</span>
463 477
 										<ul style="width:100%" id="boards_list_', $category['id'], '">';
478
+		}
464 479
 
465 480
 		foreach ($category['boards'] as $board)
466 481
 		{
467
-			if (empty($modSettings['deny_boards_access']))
468
-				echo '
482
+			if (empty($modSettings['deny_boards_access'])) {
483
+							echo '
469 484
 										<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
470 485
 											<input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', ' class="input_check"> <label for="brd', $board['id'], '">', $board['name'], '</label>
471 486
 										</li>';
472
-			else
473
-				echo '
487
+			} else {
488
+							echo '
474 489
 											<li class="board" style="width:100%">
475 490
 												<span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span>
476 491
 												<span style="width:50%;float:right">
@@ -479,6 +494,7 @@  discard block
 block discarded – undo
479 494
 													<input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', ' class="input_check"> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label>
480 495
 												</span>
481 496
 											</li>';
497
+			}
482 498
 		}
483 499
 
484 500
 		echo '
@@ -489,13 +505,13 @@  discard block
 block discarded – undo
489 505
 	echo '
490 506
 							</ul>';
491 507
 
492
-	if (empty($modSettings['deny_boards_access']))
493
-		echo '
508
+	if (empty($modSettings['deny_boards_access'])) {
509
+			echo '
494 510
 								<br class="clear"><br>
495 511
 								<input type="checkbox" id="checkall_check" class="input_check" onclick="invertAll(this, this.form, \'boardaccess\');"> <label for="checkall_check"><em>', $txt['check_all'], '</em></label>
496 512
 							</fieldset>';
497
-	else
498
-		echo '
513
+	} else {
514
+			echo '
499 515
 								<br class="clear">
500 516
 								<span class="select_all_box">
501 517
 									<em>', $txt['all'], ': </em>
@@ -511,15 +527,17 @@  discard block
 block discarded – undo
511 527
 									});
512 528
 								});
513 529
 							</script>';
530
+	}
514 531
 
515
-	if ($collapse)
516
-		echo '
532
+	if ($collapse) {
533
+			echo '
517 534
 							<a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a>
518 535
 							<script>
519 536
 								document.getElementById("visible_boards_link").style.display = "";
520 537
 								document.getElementById("visible_boards").style.display = "none";
521 538
 							</script>';
522
-}
539
+	}
540
+	}
523 541
 
524 542
 /**
525 543
  * Templatine for viewing the members of a group.
@@ -543,14 +561,15 @@  discard block
 block discarded – undo
543 561
 						<span ', $context['group']['online_color'] ? 'style="color: ' . $context['group']['online_color'] . ';"' : '', '>', $context['group']['name'], '</span> ', $context['group']['icons'], '
544 562
 					</dd>';
545 563
 	//Any description to show?
546
-	if (!empty($context['group']['description']))
547
-		echo '
564
+	if (!empty($context['group']['description'])) {
565
+			echo '
548 566
 					<dt>
549 567
 						<strong>' . $txt['membergroups_members_description'] . ':</strong>
550 568
 					</dt>
551 569
 					<dd>
552 570
 						', $context['group']['description'] ,'
553 571
 					</dd>';
572
+	}
554 573
 
555 574
 	echo '
556 575
 					<dt>
@@ -563,8 +582,9 @@  discard block
 block discarded – undo
563 582
 	if (!empty($context['group']['moderators']))
564 583
 	{
565 584
 		$moderators = array();
566
-		foreach ($context['group']['moderators'] as $moderator)
567
-			$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
585
+		foreach ($context['group']['moderators'] as $moderator) {
586
+					$moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>';
587
+		}
568 588
 
569 589
 		echo '
570 590
 					<dt>
@@ -590,27 +610,30 @@  discard block
 block discarded – undo
590 610
 					<tr class="title_bar">
591 611
 						<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' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>';
592 612
 
593
-	if ($context['can_send_email'])
594
-		echo '
613
+	if ($context['can_send_email']) {
614
+			echo '
595 615
 						<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' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>';
616
+	}
596 617
 
597 618
 	echo '
598 619
 						<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' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
599 620
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>
600 621
 						<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' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>';
601
-	if (!empty($context['group']['assignable']))
602
-		echo '
622
+	if (!empty($context['group']['assignable'])) {
623
+			echo '
603 624
 						<th style="width: 4%"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>';
625
+	}
604 626
 	echo '
605 627
 					</tr>
606 628
 				</thead>
607 629
 				<tbody>';
608 630
 
609
-	if (empty($context['members']))
610
-		echo '
631
+	if (empty($context['members'])) {
632
+			echo '
611 633
 					<tr class="windowbg">
612 634
 						<td colspan="6">', $txt['membergroups_members_no_members'], '</td>
613 635
 					</tr>';
636
+	}
614 637
 
615 638
 	foreach ($context['members'] as $member)
616 639
 	{
@@ -629,9 +652,10 @@  discard block
 block discarded – undo
629 652
 						<td>', $member['last_online'], '</td>
630 653
 						<td>', $member['registered'], '</td>
631 654
 						<td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>';
632
-		if (!empty($context['group']['assignable']))
633
-			echo '
655
+		if (!empty($context['group']['assignable'])) {
656
+					echo '
634 657
 						<td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" class="input_check" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>';
658
+		}
635 659
 		echo '
636 660
 					</tr>';
637 661
 	}
@@ -640,11 +664,12 @@  discard block
 block discarded – undo
640 664
 				</tbody>
641 665
 			</table>';
642 666
 
643
-	if (!empty($context['group']['assignable']))
644
-		echo '
667
+	if (!empty($context['group']['assignable'])) {
668
+			echo '
645 669
 			<div class="floatright">
646 670
 				<input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button_submit ">
647 671
 			</div>';
672
+	}
648 673
 
649 674
 	echo '
650 675
 			<div class="pagesection flow_hidden">
@@ -678,8 +703,8 @@  discard block
 block discarded – undo
678 703
 		</form>
679 704
 	</div>';
680 705
 
681
-	if (!empty($context['group']['assignable']))
682
-		echo '
706
+	if (!empty($context['group']['assignable'])) {
707
+			echo '
683 708
 		<script>
684 709
 			var oAddMemberSuggest = new smc_AutoSuggest({
685 710
 				sSelf: \'oAddMemberSuggest\',
@@ -695,7 +720,8 @@  discard block
 block discarded – undo
695 720
 				sItemListContainerId: \'toAddItemContainer\'
696 721
 			});
697 722
 		</script>';
698
-}
723
+	}
724
+	}
699 725
 
700 726
 /**
701 727
  * Allow the moderator to enter a reason to each user being rejected.
@@ -715,8 +741,8 @@  discard block
 block discarded – undo
715 741
 				<dl class="settings">';
716 742
 
717 743
 	// Loop through and print out a reason box for each...
718
-	foreach ($context['group_requests'] as $request)
719
-		echo '
744
+	foreach ($context['group_requests'] as $request) {
745
+			echo '
720 746
 					<dt>
721 747
 						<strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong>
722 748
 					</dt>
@@ -724,6 +750,7 @@  discard block
 block discarded – undo
724 750
 						<input type="hidden" name="groupr[]" value="', $request['id'], '">
725 751
 						<textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea>
726 752
 					</dd>';
753
+	}
727 754
 
728 755
 	echo '
729 756
 				</dl>
Please login to merge, or discard this patch.
Themes/default/ManageSearch.template.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			<div class="windowbg2">
27 27
 				<dl class="settings">
28 28
 					<dt>
29
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight1_val">
29
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight1_val">
30 30
 						', $txt['search_weight_frequency'], ':</label>
31 31
 					</dt>
32 32
 					<dd>
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 						<span id="weight1" class="search_weight">', $context['relative_weights']['search_weight_frequency'], '%</span>
35 35
 					</dd>
36 36
 					<dt>
37
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_age" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight2_val">
37
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_age" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight2_val">
38 38
 						', $txt['search_weight_age'], ':</label>
39 39
 					</dt>
40 40
 					<dd>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 						<span id="weight2" class="search_weight">', $context['relative_weights']['search_weight_age'], '%</span>
43 43
 					</dd>
44 44
 					<dt>
45
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_length" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight3_val">
45
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_length" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight3_val">
46 46
 						', $txt['search_weight_length'], ':</label>
47 47
 					</dt>
48 48
 					<dd>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 						<span id="weight3" class="search_weight">', $context['relative_weights']['search_weight_length'], '%</span>
51 51
 					</dd>
52 52
 					<dt>
53
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_subject" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight4_val">
53
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_subject" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight4_val">
54 54
 						', $txt['search_weight_subject'], ':</label>
55 55
 					</dt>
56 56
 					<dd>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 						<span id="weight4" class="search_weight">', $context['relative_weights']['search_weight_subject'], '%</span>
59 59
 					</dd>
60 60
 					<dt>
61
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_first_message" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight5_val">
61
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_first_message" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight5_val">
62 62
 						', $txt['search_weight_first_message'], ':</label>
63 63
 					</dt>
64 64
 					<dd>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 						<span id="weight5" class="search_weight">', $context['relative_weights']['search_weight_first_message'], '%</span>
67 67
 					</dd>
68 68
 					<dt>
69
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_sticky" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight6_val">
69
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_sticky" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight6_val">
70 70
 						', $txt['search_weight_sticky'], ':</label>
71 71
 					</dt>
72 72
 					<dd>
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		echo '
142 142
 						<dt>
143
-							<input type="radio" name="search_index" value="fulltext"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? ' checked' : '', empty($context['fulltext_index']) ? ' onclick="alert(\'' . $txt['search_method_fulltext_warning'] . '\'); selectRadioByName(this.form.search_index, \'fulltext\');"': '', ' class="input_radio">
143
+							<input type="radio" name="search_index" value="fulltext"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? ' checked' : '', empty($context['fulltext_index']) ? ' onclick="alert(\'' . $txt['search_method_fulltext_warning'] . '\'); selectRadioByName(this.form.search_index, \'fulltext\');"' : '', ' class="input_radio">
144 144
 							', $txt['search_method_fulltext_index'], '
145 145
 						</dt>
146 146
 						<dd>
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		echo '
192 192
 						<dt>
193 193
 							<input type="radio" name="search_index" value="', $api['setting_index'], '"', !empty($modSettings['search_index']) && $modSettings['search_index'] == $api['setting_index'] ? ' checked' : '', ' class="input_radio">
194
-							', $api['label'] ,'
194
+							', $api['label'], '
195 195
 						</dt>';
196 196
 
197 197
 	if ($api['desc'])
Please login to merge, or discard this patch.
Braces   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 			<div class="windowbg2">
112 112
 				<dl class="settings">';
113 113
 
114
-	if (!empty($context['table_info']))
115
-		echo '
114
+	if (!empty($context['table_info'])) {
115
+			echo '
116 116
 					<dt>
117 117
 						<strong>', $txt['search_method_messages_table_space'], ':</strong>
118 118
 					</dt>
@@ -125,6 +125,7 @@  discard block
 block discarded – undo
125 125
 					<dd>
126 126
 						', $context['table_info']['index_length'], '
127 127
 					</dd>';
128
+	}
128 129
 	echo '
129 130
 				</dl>
130 131
 				', $context['double_index'] ? '<div class="noticebox">
@@ -146,16 +147,17 @@  discard block
 block discarded – undo
146 147
 						<dd>
147 148
 
148 149
 							<span class="smalltext">';
149
-	if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext']))
150
-		echo '
150
+	if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) {
151
+			echo '
151 152
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a 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>]';
152
-	elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext']))
153
-		echo '
153
+	} elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) {
154
+			echo '
154 155
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create'];
155
-	else
156
-		echo '
156
+	} else {
157
+			echo '
157 158
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a 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>
158 159
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length'];
160
+	}
159 161
 	echo '
160 162
 								</span>
161 163
 						</dd>';
@@ -168,25 +170,27 @@  discard block
 block discarded – undo
168 170
 						</dt>
169 171
 						<dd>
170 172
 							<span class="smalltext">';
171
-	if ($context['custom_index'])
172
-		echo '
173
+	if ($context['custom_index']) {
174
+			echo '
173 175
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a 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>
174 176
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
175
-	elseif ($context['partial_custom_index'])
176
-		echo '
177
+	} elseif ($context['partial_custom_index']) {
178
+			echo '
177 179
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a 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 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>
178 180
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
179
-	else
180
-		echo '
181
+	} else {
182
+			echo '
181 183
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]';
184
+	}
182 185
 	echo '
183 186
 							</span>
184 187
 						</dd>';
185 188
 
186 189
 	foreach ($context['search_apis'] as $api)
187 190
 	{
188
-		if (empty($api['label']) || $api['has_template'])
189
-			continue;
191
+		if (empty($api['label']) || $api['has_template']) {
192
+					continue;
193
+		}
190 194
 
191 195
 		echo '
192 196
 						<dt>
@@ -194,12 +198,13 @@  discard block
 block discarded – undo
194 198
 							', $api['label'] ,'
195 199
 						</dt>';
196 200
 
197
-	if ($api['desc'])
198
-		echo '
201
+	if ($api['desc']) {
202
+			echo '
199 203
 						<dd>
200 204
 							<span class="smalltext">', $api['desc'], '</span>
201 205
 						</dd>';
202 206
 	}
207
+	}
203 208
 
204 209
 	echo '
205 210
 					</dl>
Please login to merge, or discard this patch.
Themes/default/ManageMembers.template.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 				</thead>
149 149
 				<tbody>';
150 150
 
151
-			foreach ($context['membergroups'] as $membergroup)
152
-				echo '
151
+			foreach ($context['membergroups'] as $membergroup) {
152
+							echo '
153 153
 					<tr class="windowbg">
154 154
 						<td>', $membergroup['name'], '</td>
155 155
 						<td class="centercol">
@@ -159,6 +159,7 @@  discard block
 block discarded – undo
159 159
 							', $membergroup['can_be_additional'] ? '<input type="checkbox" name="membergroups[2][]" value="' . $membergroup['id'] . '" checked class="input_check">' : '', '
160 160
 						</td>
161 161
 					</tr>';
162
+			}
162 163
 
163 164
 			echo '
164 165
 					<tr class="windowbg">
@@ -185,8 +186,8 @@  discard block
 block discarded – undo
185 186
 				</thead>
186 187
 				<tbody>';
187 188
 
188
-			foreach ($context['postgroups'] as $postgroup)
189
-				echo '
189
+			foreach ($context['postgroups'] as $postgroup) {
190
+							echo '
190 191
 					<tr class="windowbg">
191 192
 						<td>
192 193
 							', $postgroup['name'], '
@@ -195,6 +196,7 @@  discard block
 block discarded – undo
195 196
 							<input type="checkbox" name="postgroups[]" value="', $postgroup['id'], '" checked class="input_check">
196 197
 						</td>
197 198
 					</tr>';
199
+			}
198 200
 
199 201
 			echo '
200 202
 					<tr class="windowbg">
Please login to merge, or discard this patch.
Themes/default/Likes.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 		<meta charset="', $context['character_set'], '">
25 25
 		<meta name="robots" content="noindex">
26 26
 		<title>', $context['page_title'], '</title>
27
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
28
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
27
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
28
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
29 29
 	</head>
30 30
 	<body id="likes_popup">
31 31
 		<div class="windowbg">
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 2 patches
Braces   +262 added lines, -181 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 	<div id="personal_messages">';
22 22
 
23 23
 	// Show the capacity bar, if available.
24
-	if (!empty($context['limit_bar']))
25
-		echo '
24
+	if (!empty($context['limit_bar'])) {
25
+			echo '
26 26
 		<div class="cat_bar">
27 27
 			<h3 class="catbg">
28 28
 				<span class="floatleft">', $txt['pm_capacity'], ':</span>
@@ -32,14 +32,16 @@  discard block
 block discarded – undo
32 32
 				<span class="floatright', $context['limit_bar']['percent'] > 90 ? ' alert' : '', '">', $context['limit_bar']['text'], '</span>
33 33
 			</h3>
34 34
 		</div>';
35
+	}
35 36
 
36 37
 	// Message sent? Show a small indication.
37
-	if (isset($context['pm_sent']))
38
-		echo '
38
+	if (isset($context['pm_sent'])) {
39
+			echo '
39 40
 		<div class="infobox">
40 41
 			', $txt['pm_sent'], '
41 42
 		</div>';
42
-}
43
+	}
44
+	}
43 45
 
44 46
 /**
45 47
  * Just the end of the index bar, nothing special.
@@ -72,8 +74,7 @@  discard block
 block discarded – undo
72 74
 	{
73 75
 		echo '
74 76
 			<div class="no_unread">', $txt['pm_no_unread'], '</div>';
75
-	}
76
-	else
77
+	} else
77 78
 	{
78 79
 		foreach ($context['unread_pms'] as $id_pm => $pm_details)
79 80
 		{
@@ -193,14 +194,15 @@  discard block
 block discarded – undo
193 194
 	if ($context['get_pmessage']('message', true))
194 195
 	{
195 196
 		// Show the helpful titlebar - generally.
196
-		if ($context['display_mode'] != 1)
197
-			echo '
197
+		if ($context['display_mode'] != 1) {
198
+					echo '
198 199
 				<div class="cat_bar">
199 200
 					<h3 class="catbg">
200 201
 						<span id="author">', $txt['author'], '</span>
201 202
 						<span id="topic_title">', $txt[$context['display_mode'] == 0 ? 'messages' : 'conversation'], '</span>
202 203
 					</h3>
203 204
 				</div>';
205
+		}
204 206
 
205 207
 		// Show a few buttons if we are in conversation mode and outputting the first message.
206 208
 		if ($context['display_mode'] == 2)
@@ -229,9 +231,10 @@  discard block
 block discarded – undo
229 231
 			<div class="custom_fields_above_member">
230 232
 				<ul class="nolist">';
231 233
 
232
-			foreach ($message['custom_fields']['above_member'] as $custom)
233
-				echo '
234
+			foreach ($message['custom_fields']['above_member'] as $custom) {
235
+							echo '
234 236
 					<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
237
+			}
235 238
 
236 239
 			echo '
237 240
 				</ul>
@@ -243,9 +246,10 @@  discard block
 block discarded – undo
243 246
 				<a id="msg', $message['id'], '"></a>';
244 247
 
245 248
 		// Show online and offline buttons?
246
-		if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
247
-			echo '
249
+		if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) {
250
+					echo '
248 251
 				<span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>';
252
+		}
249 253
 
250 254
 		// Show a link to the member's profile (but only if the sender isn't a guest).
251 255
 				echo '
@@ -258,48 +262,56 @@  discard block
 block discarded – undo
258 262
 			<ul class="user_info">';
259 263
 
260 264
 			// Show the user's avatar.
261
-			if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
262
-				echo '
265
+			if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) {
266
+							echo '
263 267
 				<li class="avatar">
264 268
 					<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $message['member']['avatar']['image'], '</a>
265 269
 				</li>';
270
+			}
266 271
 
267 272
 		// Are there any custom fields below the avatar?
268
-		if (!empty($message['custom_fields']['below_avatar']))
269
-			foreach ($message['custom_fields']['below_avatar'] as $custom)
273
+		if (!empty($message['custom_fields']['below_avatar'])) {
274
+					foreach ($message['custom_fields']['below_avatar'] as $custom)
270 275
 				echo '
271 276
 				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
277
+		}
272 278
 
273
-			if (!$message['member']['is_guest'])
274
-				echo '
279
+			if (!$message['member']['is_guest']) {
280
+							echo '
275 281
 				<li class="icons">', $message['member']['group_icons'], '</li>';
282
+			}
276 283
 			// Show the member's primary group (like 'Administrator') if they have one.
277
-			if (isset($message['member']['group']) && $message['member']['group'] != '')
278
-				echo '
284
+			if (isset($message['member']['group']) && $message['member']['group'] != '') {
285
+							echo '
279 286
 				<li class="membergroup">', $message['member']['group'], '</li>';
287
+			}
280 288
 
281 289
 			// Show the member's custom title, if they have one.
282
-			if (isset($message['member']['title']) && $message['member']['title'] != '')
283
-				echo '
290
+			if (isset($message['member']['title']) && $message['member']['title'] != '') {
291
+							echo '
284 292
 				<li class="title">', $message['member']['title'], '</li>';
293
+			}
285 294
 
286 295
 			// Don't show these things for guests.
287 296
 			if (!$message['member']['is_guest'])
288 297
 			{
289 298
 				// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
290
-				if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
291
-					echo '
299
+				if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') {
300
+									echo '
292 301
 				<li class="postgroup">', $message['member']['post_group'], '</li>';
302
+				}
293 303
 
294 304
 				// Show how many posts they have made.
295
-				if (!isset($context['disabled_fields']['posts']))
296
-					echo '
305
+				if (!isset($context['disabled_fields']['posts'])) {
306
+									echo '
297 307
 				<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
308
+				}
298 309
 
299 310
 				// Show their personal text?
300
-				if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '')
301
-					echo '
311
+				if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '') {
312
+									echo '
302 313
 				<li class="blurb">', $message['member']['blurb'], '</li>';
314
+				}
303 315
 
304 316
 				// Any custom fields to show as icons?
305 317
 				if (!empty($message['custom_fields']['icons']))
@@ -308,9 +320,10 @@  discard block
 block discarded – undo
308 320
 				<li class="im_icons">
309 321
 					<ol>';
310 322
 
311
-					foreach ($message['custom_fields']['icons'] as $custom)
312
-						echo '
323
+					foreach ($message['custom_fields']['icons'] as $custom) {
324
+											echo '
313 325
 						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
326
+					}
314 327
 
315 328
 					echo '
316 329
 					</ol>
@@ -318,19 +331,22 @@  discard block
 block discarded – undo
318 331
 				}
319 332
 
320 333
 		// Show the IP to this user for this post - because you can moderate?
321
-		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
322
-			echo '
334
+		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) {
335
+					echo '
323 336
 				<li class="poster_ip"><a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);" class="help">(?)</a></li>';
337
+		}
324 338
 
325 339
 		// Or, should we show it because this is you?
326
-		elseif ($message['can_see_ip'])
327
-			echo '
340
+		elseif ($message['can_see_ip']) {
341
+					echo '
328 342
 				<li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $message['member']['ip'], '</a></li>';
343
+		}
329 344
 
330 345
 		// Okay, you are logged in, then we can show something about why IPs are logged...
331
-		else
332
-			echo '
346
+		else {
347
+					echo '
333 348
 				<li class="poster_ip"><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $txt['logged'], '</a></li>';
349
+		}
334 350
 
335 351
 				// Show the profile, website, email address, and personal message buttons.
336 352
 				if ($message['member']['show_profile_buttons'])
@@ -340,24 +356,28 @@  discard block
 block discarded – undo
340 356
 					<ol class="profile_icons">';
341 357
 
342 358
 					// Show the profile button
343
-					if ($message['member']['can_view_profile'])
344
-						echo '
359
+					if ($message['member']['can_view_profile']) {
360
+											echo '
345 361
 						<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '">' : $txt['view_profile']), '</a></li>';
362
+					}
346 363
 
347 364
 					// Don't show an icon if they haven't specified a website.
348
-					if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
349
-						echo '
365
+					if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) {
366
+											echo '
350 367
 						<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<span class="generic_icons www centericon" title="' . $message['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>';
368
+					}
351 369
 
352 370
 					// Don't show the email address if they want it hidden.
353
-					if ($message['member']['show_email'])
354
-						echo '
371
+					if ($message['member']['show_email']) {
372
+											echo '
355 373
 						<li><a href="mailto:', $message['member']['email'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<span class="generic_icons mail centericon" title="' . $txt['email'] . '"></span>' : $txt['email']), '</a></li>';
374
+					}
356 375
 
357 376
 					// Since we know this person isn't a guest, you *can* message them.
358
-					if ($context['can_send_pm'])
359
-						echo '
377
+					if ($context['can_send_pm']) {
378
+											echo '
360 379
 						<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<span class="generic_icons im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . ' centericon" title="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '"></span> ' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
380
+					}
361 381
 
362 382
 					echo '
363 383
 					</ol>
@@ -365,21 +385,24 @@  discard block
 block discarded – undo
365 385
 				}
366 386
 
367 387
 				// Any custom fields for standard placement?
368
-				if (!empty($message['custom_fields']['standard']))
369
-					foreach ($message['custom_fields']['standard'] as $custom)
388
+				if (!empty($message['custom_fields']['standard'])) {
389
+									foreach ($message['custom_fields']['standard'] as $custom)
370 390
 						echo '
371 391
 				<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
392
+				}
372 393
 
373 394
 				// Are we showing the warning status?
374
-				if ($message['member']['can_see_warning'])
375
-					echo '
395
+				if ($message['member']['can_see_warning']) {
396
+									echo '
376 397
 				<li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<span class="generic_icons warning_', $message['member']['warning_status'], '"></span>', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
398
+				}
377 399
 
378 400
 				// Are there any custom fields to show at the bottom of the poster info?
379
-				if (!empty($message['custom_fields']['bottom_poster']))
380
-					foreach ($message['custom_fields']['bottom_poster'] as $custom)
401
+				if (!empty($message['custom_fields']['bottom_poster'])) {
402
+									foreach ($message['custom_fields']['bottom_poster'] as $custom)
381 403
 						echo '
382 404
 				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
405
+				}
383 406
 			}
384 407
 
385 408
 			// Done with the information about the poster... on to the post itself.
@@ -398,24 +421,28 @@  discard block
 block discarded – undo
398 421
 					<span class="smalltext">&#171; <strong> ', $txt['sent_to'], ':</strong> ';
399 422
 
400 423
 			// People it was sent directly to....
401
-			if (!empty($message['recipients']['to']))
402
-				echo implode(', ', $message['recipients']['to']);
424
+			if (!empty($message['recipients']['to'])) {
425
+							echo implode(', ', $message['recipients']['to']);
426
+			}
403 427
 			// Otherwise, we're just going to say "some people"...
404
-			elseif ($context['folder'] != 'sent')
405
-				echo '(', $txt['pm_undisclosed_recipients'], ')';
428
+			elseif ($context['folder'] != 'sent') {
429
+							echo '(', $txt['pm_undisclosed_recipients'], ')';
430
+			}
406 431
 
407 432
 			echo '
408 433
 						<strong> ', $txt['on'], ':</strong> ', $message['time'], ' &#187;
409 434
 					</span>';
410 435
 
411 436
 			// If we're in the sent items, show who it was sent to besides the "To:" people.
412
-			if (!empty($message['recipients']['bcc']))
413
-				echo '
437
+			if (!empty($message['recipients']['bcc'])) {
438
+							echo '
414 439
 					<br><span class="smalltext">&#171; <strong> ', $txt['pm_bcc'], ':</strong> ', implode(', ', $message['recipients']['bcc']), ' &#187;</span>';
440
+			}
415 441
 
416
-			if (!empty($message['is_replied_to']))
417
-				echo '
442
+			if (!empty($message['is_replied_to'])) {
443
+							echo '
418 444
 					<br><span class="smalltext">&#171; ', $txt['pm_is_replied_to'], ' &#187;</span>';
445
+			}
419 446
 
420 447
 			echo '
421 448
 				</div>
@@ -423,13 +450,15 @@  discard block
 block discarded – undo
423 450
 			<div class="post">
424 451
 				<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>';
425 452
 
426
-			if ($message['can_report'] || $context['can_send_pm'])
427
-			echo '
453
+			if ($message['can_report'] || $context['can_send_pm']) {
454
+						echo '
428 455
 				<div class="under_message">';
456
+			}
429 457
 
430
-				if ($message['can_report'])
431
-				echo '
458
+				if ($message['can_report']) {
459
+								echo '
432 460
 					<a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '" class="floatright">' . $txt['pm_report_to_admin'] . '</a>';
461
+				}
433 462
 
434 463
 				echo '
435 464
 					<ul class="quickbuttons">';
@@ -441,32 +470,36 @@  discard block
 block discarded – undo
441 470
 					if (!$message['member']['is_guest'])
442 471
 					{
443 472
 						// Is there than more than one recipient you can reply to?
444
-						if ($message['number_recipients'] > 1)
445
-							echo '
473
+						if ($message['number_recipients'] > 1) {
474
+													echo '
446 475
 						<li><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"><span class="generic_icons reply_all_button"></span>', $txt['reply_to_all'], '</a></li>';
476
+						}
447 477
 
448 478
 						echo '
449 479
 						<li><a 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'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>
450 480
 						<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>';
451 481
 					}
452 482
 					// This is for "forwarding" - even if the member is gone.
453
-					else
454
-						echo '
483
+					else {
484
+											echo '
455 485
 						<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote"><span class="generic_icons quote"></span>', $txt['reply_quote'], '</a></li>';
486
+					}
456 487
 				}
457 488
 				echo '
458 489
 						<li><a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions%5b', $message['id'], '%5D=delete;f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', addslashes($txt['remove_message_question']), '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'], '</a></li>';
459 490
 
460
-				if (empty($context['display_mode']))
461
-					echo '
491
+				if (empty($context['display_mode'])) {
492
+									echo '
462 493
 						<li><input type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;" class="input_check"></li>';
494
+				}
463 495
 
464 496
 				echo '
465 497
 					</ul>';
466 498
 
467
-			if ($message['can_report'] || $context['can_send_pm'])
468
-			echo '
499
+			if ($message['can_report'] || $context['can_send_pm']) {
500
+						echo '
469 501
 				</div>';
502
+			}
470 503
 
471 504
 			// Are there any custom profile fields for above the signature?
472 505
 			if (!empty($message['custom_fields']['above_signature']))
@@ -475,9 +508,10 @@  discard block
 block discarded – undo
475 508
 					<div class="custom_fields_above_signature">
476 509
 						<ul class="nolist">';
477 510
 
478
-				foreach ($message['custom_fields']['above_signature'] as $custom)
479
-					echo '
511
+				foreach ($message['custom_fields']['above_signature'] as $custom) {
512
+									echo '
480 513
 							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
514
+				}
481 515
 
482 516
 				echo '
483 517
 						</ul>
@@ -485,9 +519,10 @@  discard block
 block discarded – undo
485 519
 			}
486 520
 
487 521
 			// Show the member's signature?
488
-			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
489
-				echo '
522
+			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) {
523
+							echo '
490 524
 				<div class="signature">', $message['member']['signature'], '</div>';
525
+			}
491 526
 
492 527
 			// Are there any custom profile fields for below the signature?
493 528
 			if (!empty($message['custom_fields']['below_signature']))
@@ -496,9 +531,10 @@  discard block
 block discarded – undo
496 531
 					<div class="custom_fields_below_signature">
497 532
 						<ul class="nolist">';
498 533
 
499
-				foreach ($message['custom_fields']['below_signature'] as $custom)
500
-					echo '
534
+				foreach ($message['custom_fields']['below_signature'] as $custom) {
535
+									echo '
501 536
 							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
537
+				}
502 538
 
503 539
 				echo '
504 540
 						</ul>
@@ -523,19 +559,21 @@  discard block
 block discarded – undo
523 559
 					{
524 560
 						echo '
525 561
 						<option value="" disabled>', $txt['pm_msg_label_apply'], ':</option>';
526
-						foreach ($context['labels'] as $label)
527
-							if (!isset($message['labels'][$label['id']]))
562
+						foreach ($context['labels'] as $label) {
563
+													if (!isset($message['labels'][$label['id']]))
528 564
 								echo '
529 565
 							<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
566
+						}
530 567
 					}
531 568
 					// ... and are there any that can be removed?
532 569
 					if (!empty($message['labels']) && (count($message['labels']) > 1 || !isset($message['labels'][-1])))
533 570
 					{
534 571
 						echo '
535 572
 						<option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>';
536
-						foreach ($message['labels'] as $label)
537
-							echo '
573
+						foreach ($message['labels'] as $label) {
574
+													echo '
538 575
 							<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
576
+						}
539 577
 					}
540 578
 					echo '
541 579
 					</select>
@@ -555,13 +593,14 @@  discard block
 block discarded – undo
555 593
 	</div>';
556 594
 		}
557 595
 
558
-		if (empty($context['display_mode']))
559
-			echo '
596
+		if (empty($context['display_mode'])) {
597
+					echo '
560 598
 
561 599
 	<div class="pagesection">
562 600
 		<div class="floatleft">', $context['page_index'], '</div>
563 601
 		<div class="floatright"><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="button_submit"></div>
564 602
 	</div>';
603
+		}
565 604
 
566 605
 		// Show a few buttons if we are in conversation mode and outputting the first message.
567 606
 		elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons']))
@@ -621,11 +660,12 @@  discard block
 block discarded – undo
621 660
 		</tr>
622 661
 	</thead>
623 662
 	<tbody>';
624
-	if (!$context['show_delete'])
625
-		echo '
663
+	if (!$context['show_delete']) {
664
+			echo '
626 665
 		<tr class="windowbg">
627 666
 			<td colspan="5">', $txt['pm_alert_none'], '</td>
628 667
 		</tr>';
668
+	}
629 669
 
630 670
 	while ($message = $context['get_pmessage']('subject'))
631 671
 	{
@@ -678,9 +718,10 @@  discard block
 block discarded – undo
678 718
 
679 719
 			foreach ($context['labels'] as $label)
680 720
 			{
681
-				if ($label['id'] != $context['current_label_id'])
682
-					echo '
721
+				if ($label['id'] != $context['current_label_id']) {
722
+									echo '
683 723
 					<option value="add_', $label['id'], '">&nbsp;', $label['name'], '</option>';
724
+				}
684 725
 			}
685 726
 
686 727
 			echo '
@@ -765,9 +806,10 @@  discard block
 block discarded – undo
765 806
 					<dt class="between">', $txt['pm_search_post_age'], ':</dt>
766 807
 					<dd>', $txt['pm_search_between'], ' <input type="number" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="5" class="input_text" min="0" max="9999">&nbsp;', $txt['pm_search_between_and'], '&nbsp;<input type="number" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="5" class="input_text" min="0" max="9999"> ', $txt['pm_search_between_days'], '</dd>
767 808
 				</dl>';
768
-	if (!$context['currently_using_labels'])
769
-		echo '
809
+	if (!$context['currently_using_labels']) {
810
+			echo '
770 811
 				<input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit">';
812
+	}
771 813
 		echo '
772 814
 				<br class="clear_right">
773 815
 			</div>
@@ -787,12 +829,13 @@  discard block
 block discarded – undo
787 829
 				<div id="advanced_panel_div">
788 830
 					<ul id="searchLabelsExpand">';
789 831
 
790
-		foreach ($context['search_labels'] as $label)
791
-			echo '
832
+		foreach ($context['search_labels'] as $label) {
833
+					echo '
792 834
 						<li>
793 835
 							<label for="searchlabel_', $label['id'], '"><input type="checkbox" id="searchlabel_', $label['id'], '" name="searchlabel[', $label['id'], ']" value="', $label['id'], '"', $label['checked'] ? ' checked' : '', ' class="input_check">
794 836
 							', $label['name'], '</label>
795 837
 						</li>';
838
+		}
796 839
 
797 840
 		echo '
798 841
 					</ul>
@@ -852,8 +895,8 @@  discard block
 block discarded – undo
852 895
 		</div>';
853 896
 
854 897
 	// complete results ?
855
-	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages']))
856
-		echo '
898
+	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) {
899
+			echo '
857 900
 	<table class="table_grid">
858 901
 	<thead>
859 902
 		<tr class="title_bar">
@@ -863,6 +906,7 @@  discard block
 block discarded – undo
863 906
 		</tr>
864 907
 	</thead>
865 908
 	<tbody>';
909
+	}
866 910
 
867 911
 	// Print each message out...
868 912
 	foreach ($context['personal_messages'] as $message)
@@ -882,11 +926,13 @@  discard block
 block discarded – undo
882 926
 
883 927
 				// Show the recipients.
884 928
 				// @todo This doesn't deal with the sent item searching quite right for bcc.
885
-				if (!empty($message['recipients']['to']))
886
-					echo implode(', ', $message['recipients']['to']);
929
+				if (!empty($message['recipients']['to'])) {
930
+									echo implode(', ', $message['recipients']['to']);
931
+				}
887 932
 				// Otherwise, we're just going to say "some people"...
888
-				elseif ($context['folder'] != 'sent')
889
-					echo '(', $txt['pm_undisclosed_recipients'], ')';
933
+				elseif ($context['folder'] != 'sent') {
934
+									echo '(', $txt['pm_undisclosed_recipients'], ')';
935
+				}
890 936
 
891 937
 					echo '
892 938
 				</h3>
@@ -900,14 +946,16 @@  discard block
 block discarded – undo
900 946
 					$quote_button = create_button('quote.png', 'reply_quote', 'reply_quote', 'class="centericon"');
901 947
 					$reply_button = create_button('im_reply.png', 'reply', 'reply', 'class="centericon"');
902 948
 					// You can only reply if they are not a guest...
903
-					if (!$message['member']['is_guest'])
904
-						echo '
949
+					if (!$message['member']['is_guest']) {
950
+											echo '
905 951
 							<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=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], '
906 952
 							<a 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'], '">', $reply_button , '</a> ', $context['menu_separator'];
953
+					}
907 954
 					// This is for "forwarding" - even if the member is gone.
908
-					else
909
-						echo '
955
+					else {
956
+											echo '
910 957
 							<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator'];
958
+					}
911 959
 				}
912 960
 
913 961
 				echo '
@@ -928,17 +976,19 @@  discard block
 block discarded – undo
928 976
 	}
929 977
 
930 978
 	// Finish off the page...
931
-	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages']))
932
-		echo '
979
+	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) {
980
+			echo '
933 981
 		</tbody>
934 982
 		</table>';
983
+	}
935 984
 
936 985
 	// No results?
937
-	if (empty($context['personal_messages']))
938
-		echo '
986
+	if (empty($context['personal_messages'])) {
987
+			echo '
939 988
 		<div class="windowbg">
940 989
 			<p class="centertext">', $txt['pm_search_none_found'], '</p>
941 990
 		</div>';
991
+	}
942 992
 
943 993
 	echo '
944 994
 		<div class="pagesection">
@@ -962,12 +1012,14 @@  discard block
 block discarded – undo
962 1012
 				<h3 class="catbg">', $txt['pm_send_report'], '</h3>
963 1013
 			</div>
964 1014
 			<div class="windowbg">';
965
-				if (!empty($context['send_log']['sent']))
966
-					foreach ($context['send_log']['sent'] as $log_entry)
1015
+				if (!empty($context['send_log']['sent'])) {
1016
+									foreach ($context['send_log']['sent'] as $log_entry)
967 1017
 						echo '<span class="error">', $log_entry, '</span><br>';
968
-				if (!empty($context['send_log']['failed']))
969
-					foreach ($context['send_log']['failed'] as $log_entry)
1018
+				}
1019
+				if (!empty($context['send_log']['failed'])) {
1020
+									foreach ($context['send_log']['failed'] as $log_entry)
970 1021
 						echo '<span class="error">', $log_entry, '</span><br>';
1022
+				}
971 1023
 				echo '
972 1024
 			</div>
973 1025
 			<br>';
@@ -1016,12 +1068,13 @@  discard block
 block discarded – undo
1016 1068
 					</dl>
1017 1069
 				</div>';
1018 1070
 
1019
-	if (!empty($modSettings['drafts_pm_enabled']))
1020
-		echo '
1071
+	if (!empty($modSettings['drafts_pm_enabled'])) {
1072
+			echo '
1021 1073
 				<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
1022 1074
 					sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), '
1023 1075
 					', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
1024 1076
 				</div>';
1077
+	}
1025 1078
 
1026 1079
 	echo '
1027 1080
 				<dl id="post_header">';
@@ -1076,9 +1129,10 @@  discard block
 block discarded – undo
1076 1129
 	}
1077 1130
 
1078 1131
 	// What about smileys?
1079
-	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup']))
1080
-		echo '
1132
+	if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) {
1133
+			echo '
1081 1134
 				<div id="smileyBox_message"></div>';
1135
+	}
1082 1136
 
1083 1137
 	// Show BBC buttons, smileys and textbox.
1084 1138
 	echo '
@@ -1126,10 +1180,11 @@  discard block
 block discarded – undo
1126 1180
 					<dt><strong>', $txt['subject'], '</strong></dt>
1127 1181
 					<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
1128 1182
 
1129
-		foreach ($context['drafts'] as $draft)
1130
-			echo '
1183
+		foreach ($context['drafts'] as $draft) {
1184
+					echo '
1131 1185
 					<dt>', $draft['link'], '</dt>
1132 1186
 					<dd>', $draft['poster_time'], '</dd>';
1187
+		}
1133 1188
 		echo '
1134 1189
 				</dl>
1135 1190
 			</div>';
@@ -1235,8 +1290,8 @@  discard block
 block discarded – undo
1235 1290
 			}';
1236 1291
 
1237 1292
 	// Code for showing and hiding drafts
1238
-	if (!empty($context['drafts']))
1239
-		echo '
1293
+	if (!empty($context['drafts'])) {
1294
+			echo '
1240 1295
 			var oSwapDraftOptions = new smc_Toggle({
1241 1296
 				bToggleEnabled: true,
1242 1297
 				bCurrentlyCollapsed: true,
@@ -1258,13 +1313,14 @@  discard block
 block discarded – undo
1258 1313
 					}
1259 1314
 				]
1260 1315
 			});';
1316
+	}
1261 1317
 
1262 1318
 	echo '
1263 1319
 		</script>';
1264 1320
 
1265 1321
 	// Show the message you're replying to.
1266
-	if ($context['reply'])
1267
-		echo '
1322
+	if ($context['reply']) {
1323
+			echo '
1268 1324
 	<br>
1269 1325
 	<br>
1270 1326
 	<div class="cat_bar">
@@ -1278,6 +1334,7 @@  discard block
 block discarded – undo
1278 1334
 		<hr>
1279 1335
 		', $context['quoted_message']['body'], '
1280 1336
 	</div><br class="clear">';
1337
+	}
1281 1338
 
1282 1339
 	echo '
1283 1340
 		<script>
@@ -1288,22 +1345,24 @@  discard block
 block discarded – undo
1288 1345
 				sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
1289 1346
 				sToControlId: \'to_control\',
1290 1347
 				aToRecipients: [';
1291
-	foreach ($context['recipients']['to'] as $i => $member)
1292
-		echo '
1348
+	foreach ($context['recipients']['to'] as $i => $member) {
1349
+			echo '
1293 1350
 					{
1294 1351
 						sItemId: ', JavaScriptEscape($member['id']), ',
1295 1352
 						sItemName: ', JavaScriptEscape($member['name']), '
1296 1353
 					}', $i == count($context['recipients']['to']) - 1 ? '' : ',';
1354
+	}
1297 1355
 
1298 1356
 	echo '
1299 1357
 				],
1300 1358
 				aBccRecipients: [';
1301
-	foreach ($context['recipients']['bcc'] as $i => $member)
1302
-		echo '
1359
+	foreach ($context['recipients']['bcc'] as $i => $member) {
1360
+			echo '
1303 1361
 					{
1304 1362
 						sItemId: ', JavaScriptEscape($member['id']), ',
1305 1363
 						sItemName: ', JavaScriptEscape($member['name']), '
1306 1364
 					}', $i == count($context['recipients']['bcc']) - 1 ? '' : ',';
1365
+	}
1307 1366
 
1308 1367
 	echo '
1309 1368
 				],
@@ -1390,26 +1449,28 @@  discard block
 block discarded – undo
1390 1449
 				</th>
1391 1450
 				<th class="centertext" width="4%">';
1392 1451
 
1393
-	if (count($context['labels']) > 2)
1394
-		echo '
1452
+	if (count($context['labels']) > 2) {
1453
+			echo '
1395 1454
 					<input type="checkbox" class="input_check" onclick="invertAll(this, this.form);">';
1455
+	}
1396 1456
 
1397 1457
 	echo '
1398 1458
 				</th>
1399 1459
 			</tr>
1400 1460
 		</thead>
1401 1461
 		<tbody>';
1402
-	if (count($context['labels']) < 2)
1403
-		echo '
1462
+	if (count($context['labels']) < 2) {
1463
+			echo '
1404 1464
 			<tr class="windowbg">
1405 1465
 				<td colspan="2">', $txt['pm_labels_no_exist'], '</td>
1406 1466
 			</tr>';
1407
-	else
1467
+	} else
1408 1468
 	{
1409 1469
 		foreach ($context['labels'] as $label)
1410 1470
 		{
1411
-			if ($label['id'] == -1)
1412
-				continue;
1471
+			if ($label['id'] == -1) {
1472
+							continue;
1473
+			}
1413 1474
 
1414 1475
 				echo '
1415 1476
 			<tr class="windowbg">
@@ -1424,12 +1485,13 @@  discard block
 block discarded – undo
1424 1485
 		</tbody>
1425 1486
 		</table>';
1426 1487
 
1427
-	if (!count($context['labels']) < 2)
1428
-		echo '
1488
+	if (!count($context['labels']) < 2) {
1489
+			echo '
1429 1490
 		<div class="padding">
1430 1491
 			<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">
1431 1492
 			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure">
1432 1493
 		</div>';
1494
+	}
1433 1495
 
1434 1496
 	echo '
1435 1497
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -1484,9 +1546,10 @@  discard block
 block discarded – undo
1484 1546
 				<dd>
1485 1547
 					<select name="id_admin">
1486 1548
 						<option value="0">', $txt['pm_report_all_admins'], '</option>';
1487
-		foreach ($context['admins'] as $id => $name)
1488
-			echo '
1549
+		foreach ($context['admins'] as $id => $name) {
1550
+					echo '
1489 1551
 						<option value="', $id, '">', $name, '</option>';
1552
+		}
1490 1553
 		echo '
1491 1554
 					</select>
1492 1555
 				</dd>';
@@ -1548,9 +1611,10 @@  discard block
 block discarded – undo
1548 1611
 				</th>
1549 1612
 				<th width="4%" class="centertext">';
1550 1613
 
1551
-	if (!empty($context['rules']))
1552
-		echo '
1614
+	if (!empty($context['rules'])) {
1615
+			echo '
1553 1616
 					<input type="checkbox" onclick="invertAll(this, this.form);" class="input_check">';
1617
+	}
1554 1618
 
1555 1619
 	echo '
1556 1620
 				</th>
@@ -1558,13 +1622,14 @@  discard block
 block discarded – undo
1558 1622
 		</thead>
1559 1623
 		<tbody>';
1560 1624
 
1561
-	if (empty($context['rules']))
1562
-		echo '
1625
+	if (empty($context['rules'])) {
1626
+			echo '
1563 1627
 			<tr class="windowbg">
1564 1628
 				<td colspan="2">
1565 1629
 					', $txt['pm_rules_none'], '
1566 1630
 				</td>
1567 1631
 			</tr>';
1632
+	}
1568 1633
 
1569 1634
 	foreach ($context['rules'] as $rule)
1570 1635
 	{
@@ -1585,14 +1650,16 @@  discard block
 block discarded – undo
1585 1650
 		<div class="righttext">
1586 1651
 			<a class="button_link" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>';
1587 1652
 
1588
-	if (!empty($context['rules']))
1589
-		echo '
1653
+	if (!empty($context['rules'])) {
1654
+			echo '
1590 1655
 			[<a 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>]';
1656
+	}
1591 1657
 
1592
-	if (!empty($context['rules']))
1593
-		echo '
1658
+	if (!empty($context['rules'])) {
1659
+			echo '
1594 1660
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1595 1661
 			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button_submit smalltext you_sure">';
1662
+	}
1596 1663
 
1597 1664
 	echo '
1598 1665
 		</div>
@@ -1614,14 +1681,16 @@  discard block
 block discarded – undo
1614 1681
 			var groups = new Array()
1615 1682
 			var labels = new Array()';
1616 1683
 
1617
-	foreach ($context['groups'] as $id => $title)
1618
-		echo '
1684
+	foreach ($context['groups'] as $id => $title) {
1685
+			echo '
1619 1686
 			groups[', $id, '] = "', addslashes($title), '";';
1687
+	}
1620 1688
 
1621
-	foreach ($context['labels'] as $label)
1622
-		if ($label['id'] != -1)
1689
+	foreach ($context['labels'] as $label) {
1690
+			if ($label['id'] != -1)
1623 1691
 			echo '
1624 1692
 			labels[', ($label['id']), '] = "', addslashes($label['name']), '";';
1693
+	}
1625 1694
 
1626 1695
 	echo '
1627 1696
 			function addCriteriaOption()
@@ -1636,8 +1705,9 @@  discard block
 block discarded – undo
1636 1705
 
1637 1706
 				setOuterHTML(document.getElementById("criteriaAddHere"), \'<br><select name="ruletype[\' + criteriaNum + \']" id="ruletype\' + criteriaNum + \'" onchange="updateRuleDef(\' + criteriaNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_criteria_pick']), ':<\' + \'/option><option value="mid">', addslashes($txt['pm_rule_mid']), '<\' + \'/option><option value="gid">', addslashes($txt['pm_rule_gid']), '<\' + \'/option><option value="sub">', addslashes($txt['pm_rule_sub']), '<\' + \'/option><option value="msg">', addslashes($txt['pm_rule_msg']), '<\' + \'/option><option value="bud">', addslashes($txt['pm_rule_bud']), '<\' + \'/option><\' + \'/select>&nbsp;<span id="defdiv\' + criteriaNum + \'" style="display: none;"><input type="text" name="ruledef[\' + criteriaNum + \']" id="ruledef\' + criteriaNum + \'" onkeyup="rebuildRuleDesc();" value="" class="input_text"><\' + \'/span><span id="defseldiv\' + criteriaNum + \'" style="display: none;"><select name="ruledefgroup[\' + criteriaNum + \']" id="ruledefgroup\' + criteriaNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_group']), '<\' + \'/option>';
1638 1707
 
1639
-	foreach ($context['groups'] as $id => $group)
1640
-		echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>';
1708
+	foreach ($context['groups'] as $id => $group) {
1709
+			echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>';
1710
+	}
1641 1711
 
1642 1712
 	echo '<\' + \'/select><\' + \'/span><span id="criteriaAddHere"><\' + \'/span>\');
1643 1713
 			}
@@ -1654,9 +1724,10 @@  discard block
 block discarded – undo
1654 1724
 
1655 1725
 				setOuterHTML(document.getElementById("actionAddHere"), \'<br><select name="acttype[\' + actionNum + \']" id="acttype\' + actionNum + \'" onchange="updateActionDef(\' + actionNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_action']), ':<\' + \'/option><option value="lab">', addslashes($txt['pm_rule_label']), '<\' + \'/option><option value="del">', addslashes($txt['pm_rule_delete']), '<\' + \'/option><\' + \'/select>&nbsp;<span id="labdiv\' + actionNum + \'" style="display: none;"><select name="labdef[\' + actionNum + \']" id="labdef\' + actionNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_label']), '<\' + \'/option>';
1656 1726
 
1657
-	foreach ($context['labels'] as $label)
1658
-		if ($label['id'] != -1)
1727
+	foreach ($context['labels'] as $label) {
1728
+			if ($label['id'] != -1)
1659 1729
 			echo '<option value="', ($label['id']), '">', addslashes($label['name']), '<\' + \'/option>';
1730
+	}
1660 1731
 
1661 1732
 	echo '<\' + \'/select><\' + \'/span><span id="actionAddHere"><\' + \'/span>\');
1662 1733
 			}
@@ -1770,18 +1841,20 @@  discard block
 block discarded – undo
1770 1841
 	$isFirst = true;
1771 1842
 	foreach ($context['rule']['criteria'] as $k => $criteria)
1772 1843
 	{
1773
-		if (!$isFirst && $criteria['t'] == '')
1774
-			echo '<div id="removeonjs1">';
1775
-		elseif (!$isFirst)
1776
-			echo '<br>';
1844
+		if (!$isFirst && $criteria['t'] == '') {
1845
+					echo '<div id="removeonjs1">';
1846
+		} elseif (!$isFirst) {
1847
+					echo '<br>';
1848
+		}
1777 1849
 
1778 1850
 		echo '
1779 1851
 				<select name="ruletype[', $k, ']" id="ruletype', $k, '" onchange="updateRuleDef(', $k, '); rebuildRuleDesc();">
1780 1852
 					<option value="">', $txt['pm_rule_criteria_pick'], ':</option>';
1781 1853
 
1782
-		foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr)
1783
-			echo '
1854
+		foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) {
1855
+					echo '
1784 1856
 					<option value="', $cr, '"', $criteria['t'] == $cr ? ' selected' : '', '>', $txt['pm_rule_' . $cr], '</option>';
1857
+		}
1785 1858
 
1786 1859
 		echo '
1787 1860
 				</select>
@@ -1792,18 +1865,20 @@  discard block
 block discarded – undo
1792 1865
 					<select name="ruledefgroup[', $k, ']" id="ruledefgroup', $k, '" onchange="rebuildRuleDesc();">
1793 1866
 						<option value="">', $txt['pm_rule_sel_group'], '</option>';
1794 1867
 
1795
-		foreach ($context['groups'] as $id => $group)
1796
-			echo '
1868
+		foreach ($context['groups'] as $id => $group) {
1869
+					echo '
1797 1870
 						<option value="', $id, '"', $criteria['t'] == 'gid' && $criteria['v'] == $id ? ' selected' : '', '>', $group, '</option>';
1871
+		}
1798 1872
 		echo '
1799 1873
 					</select>
1800 1874
 				</span>';
1801 1875
 
1802 1876
 		// If this is the dummy we add a means to hide for non js users.
1803
-		if ($isFirst)
1804
-			$isFirst = false;
1805
-		elseif ($criteria['t'] == '')
1806
-			echo '</div>';
1877
+		if ($isFirst) {
1878
+					$isFirst = false;
1879
+		} elseif ($criteria['t'] == '') {
1880
+					echo '</div>';
1881
+		}
1807 1882
 	}
1808 1883
 
1809 1884
 	echo '
@@ -1826,10 +1901,11 @@  discard block
 block discarded – undo
1826 1901
 	$isFirst = true;
1827 1902
 	foreach ($context['rule']['actions'] as $k => $action)
1828 1903
 	{
1829
-		if (!$isFirst && $action['t'] == '')
1830
-			echo '<div id="removeonjs2">';
1831
-		elseif (!$isFirst)
1832
-			echo '<br>';
1904
+		if (!$isFirst && $action['t'] == '') {
1905
+					echo '<div id="removeonjs2">';
1906
+		} elseif (!$isFirst) {
1907
+					echo '<br>';
1908
+		}
1833 1909
 
1834 1910
 		echo '
1835 1911
 				<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
@@ -1840,20 +1916,22 @@  discard block
 block discarded – undo
1840 1916
 				<span id="labdiv', $k, '">
1841 1917
 					<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
1842 1918
 						<option value="">', $txt['pm_rule_sel_label'], '</option>';
1843
-		foreach ($context['labels'] as $label)
1844
-			if ($label['id'] != -1)
1919
+		foreach ($context['labels'] as $label) {
1920
+					if ($label['id'] != -1)
1845 1921
 				echo '
1846 1922
 						<option value="', ($label['id']), '"', $action['t'] == 'lab' && $action['v'] == $label['id'] ? ' selected' : '', '>', $label['name'], '</option>';
1923
+		}
1847 1924
 
1848 1925
 		echo '
1849 1926
 					</select>
1850 1927
 				</span>';
1851 1928
 
1852
-		if ($isFirst)
1853
-			$isFirst = false;
1854
-		elseif ($action['t'] == '')
1855
-			echo '
1929
+		if ($isFirst) {
1930
+					$isFirst = false;
1931
+		} elseif ($action['t'] == '') {
1932
+					echo '
1856 1933
 			</div>';
1934
+		}
1857 1935
 	}
1858 1936
 
1859 1937
 	echo '
@@ -1877,22 +1955,25 @@  discard block
 block discarded – undo
1877 1955
 		echo '
1878 1956
 	<script>';
1879 1957
 
1880
-	foreach ($context['rule']['criteria'] as $k => $c)
1881
-		echo '
1958
+	foreach ($context['rule']['criteria'] as $k => $c) {
1959
+			echo '
1882 1960
 			updateRuleDef(', $k, ');';
1961
+	}
1883 1962
 
1884
-	foreach ($context['rule']['actions'] as $k => $c)
1885
-		echo '
1963
+	foreach ($context['rule']['actions'] as $k => $c) {
1964
+			echo '
1886 1965
 			updateActionDef(', $k, ');';
1966
+	}
1887 1967
 
1888 1968
 	echo '
1889 1969
 			rebuildRuleDesc();';
1890 1970
 
1891 1971
 	// If this isn't a new rule and we have JS enabled remove the JS compatibility stuff.
1892
-	if ($context['rid'])
1893
-		echo '
1972
+	if ($context['rid']) {
1973
+			echo '
1894 1974
 			document.getElementById("removeonjs1").style.display = "none";
1895 1975
 			document.getElementById("removeonjs2").style.display = "none";';
1976
+	}
1896 1977
 
1897 1978
 	echo '
1898 1979
 			document.getElementById("addonjs1").style.display = "";
@@ -1925,12 +2006,12 @@  discard block
 block discarded – undo
1925 2006
 
1926 2007
 
1927 2008
 	// No drafts? Just show an informative message.
1928
-	if (empty($context['drafts']))
1929
-		echo '
2009
+	if (empty($context['drafts'])) {
2010
+			echo '
1930 2011
 		<div class="windowbg2 centertext">
1931 2012
 			', $txt['draft_none'], '
1932 2013
 		</div>';
1933
-	else
2014
+	} else
1934 2015
 	{
1935 2016
 		// For every draft to be displayed, give it its own div, and show the important details of the draft.
1936 2017
 		foreach ($context['drafts'] as $draft)
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 			foreach ($message['custom_fields']['above_member'] as $custom)
233 233
 				echo '
234
-					<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
234
+					<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
235 235
 
236 236
 			echo '
237 237
 				</ul>
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 		if (!empty($message['custom_fields']['below_avatar']))
269 269
 			foreach ($message['custom_fields']['below_avatar'] as $custom)
270 270
 				echo '
271
-				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
271
+				<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
272 272
 
273 273
 			if (!$message['member']['is_guest'])
274 274
 				echo '
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
 					foreach ($message['custom_fields']['icons'] as $custom)
312 312
 						echo '
313
-						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
313
+						<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
314 314
 
315 315
 					echo '
316 316
 					</ol>
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 				if (!empty($message['custom_fields']['standard']))
369 369
 					foreach ($message['custom_fields']['standard'] as $custom)
370 370
 						echo '
371
-				<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
371
+				<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
372 372
 
373 373
 				// Are we showing the warning status?
374 374
 				if ($message['member']['can_see_warning'])
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 				if (!empty($message['custom_fields']['bottom_poster']))
380 380
 					foreach ($message['custom_fields']['bottom_poster'] as $custom)
381 381
 						echo '
382
-				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
382
+				<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
383 383
 			}
384 384
 
385 385
 			// Done with the information about the poster... on to the post itself.
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 
479 479
 				foreach ($message['custom_fields']['above_signature'] as $custom)
480 480
 					echo '
481
-							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
481
+							<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
482 482
 
483 483
 				echo '
484 484
 						</ul>
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
 				foreach ($message['custom_fields']['below_signature'] as $custom)
501 501
 					echo '
502
-							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
502
+							<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
503 503
 
504 504
 				echo '
505 505
 						</ul>
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 	while ($message = $context['get_pmessage']('subject'))
632 632
 	{
633 633
 		echo '
634
-		<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '','">
634
+		<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '', '">
635 635
 			<td class="table_icon">
636 636
 			<script>
637 637
 				currentLabels[', $message['id'], '] = {';
@@ -903,12 +903,12 @@  discard block
 block discarded – undo
903 903
 					// You can only reply if they are not a guest...
904 904
 					if (!$message['member']['is_guest'])
905 905
 						echo '
906
-							<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=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], '
907
-							<a 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'], '">', $reply_button , '</a> ', $context['menu_separator'];
906
+							<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=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], '
907
+							<a 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'], '">', $reply_button, '</a> ', $context['menu_separator'];
908 908
 					// This is for "forwarding" - even if the member is gone.
909 909
 					else
910 910
 						echo '
911
-							<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator'];
911
+							<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button, '</a>', $context['menu_separator'];
912 912
 				}
913 913
 
914 914
 				echo '
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
 			<div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
1009 1009
 				<dl>
1010 1010
 					<dt>
1011
-						<strong id="error_serious">', $txt['error_while_submitting'] , '</strong>
1011
+						<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
1012 1012
 					</dt>
1013 1013
 					<dd class="error" id="error_list">
1014 1014
 						', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), '
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
 					<span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span>
1065 1065
 				</dt>
1066 1066
 				<dd id="pm_subject">
1067
-					<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"',isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/>
1067
+					<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : ' class="input_text"', '/>
1068 1068
 				</dd>
1069 1069
 			</dl><hr>';
1070 1070
 
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
 		echo '
1428 1428
 		<div class="padding">
1429 1429
 			<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">
1430
-			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure">
1430
+			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'], '" class="button_submit you_sure">
1431 1431
 		</div>';
1432 1432
 
1433 1433
 	echo '
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
 	if (!empty($context['rules']))
1592 1592
 		echo '
1593 1593
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1594
-			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button_submit smalltext you_sure">';
1594
+			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'], '" class="button_submit smalltext you_sure">';
1595 1595
 
1596 1596
 	echo '
1597 1597
 		</div>
@@ -1832,9 +1832,9 @@  discard block
 block discarded – undo
1832 1832
 
1833 1833
 		echo '
1834 1834
 				<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
1835
-					<option value="">', $txt['pm_rule_sel_action'] , ':</option>
1836
-					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option>
1837
-					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option>
1835
+					<option value="">', $txt['pm_rule_sel_action'], ':</option>
1836
+					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'], '</option>
1837
+					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'], '</option>
1838 1838
 				</select>
1839 1839
 				<span id="labdiv', $k, '">
1840 1840
 					<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
@@ -1951,7 +1951,7 @@  discard block
 block discarded – undo
1951 1951
 					</div>
1952 1952
 					<ul class="quickbuttons">
1953 1953
 						<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;id_draft=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons modifybutton"></span>', $txt['draft_edit'], '</a></li>
1954
-						<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'] ,'?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
1954
+						<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'], '?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
1955 1955
 					</ul>
1956 1956
 				</div>';
1957 1957
 		}
Please login to merge, or discard this patch.
Themes/default/Login.template.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		<div class="tborder login">
118 118
 			<div class="cat_bar">
119 119
 				<h3 class="catbg">
120
-					', $txt['tfa_profile_label'] ,'
120
+					', $txt['tfa_profile_label'], '
121 121
 				</h3>
122 122
 			</div>
123 123
 			<div class="roundframe">';
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	echo '
304 304
 			<strong>', $txt['password'], ':</strong>
305 305
 			<input type="password" name="', $context['sessionCheckType'], '_pass" size="24" class="input_password">
306
-			<a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><br>
306
+			<a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><br>
307 307
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
308 308
 			<input type="hidden" name="', $context['admin-login_token_var'], '" value="', $context['admin-login_token'], '">
309 309
 			<input type="submit" style="margin-top: 1em;" value="', $txt['login'], '" class="button_submit">';
Please login to merge, or discard this patch.
Braces   +35 added lines, -24 removed lines patch added patch discarded remove patch
@@ -28,14 +28,16 @@  discard block
 block discarded – undo
28 28
 				<form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">';
29 29
 
30 30
 	// Did they make a mistake last time?
31
-	if (!empty($context['login_errors']))
32
-		echo '
31
+	if (!empty($context['login_errors'])) {
32
+			echo '
33 33
 					<div class="errorbox">', implode('<br>', $context['login_errors']), '</div><br>';
34
+	}
34 35
 
35 36
 	// Or perhaps there's some special description for this time?
36
-	if (isset($context['description']))
37
-		echo '
37
+	if (isset($context['description'])) {
38
+			echo '
38 39
 					<p class="information">', $context['description'], '</p>';
40
+	}
39 41
 
40 42
 	// Now just get the basic information - username, password, etc.
41 43
 	echo '
@@ -51,10 +53,11 @@  discard block
 block discarded – undo
51 53
 						<dt>', $txt['always_logged_in'], ':</dt>
52 54
 						<dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;"></dd>';
53 55
 	// If they have deleted their account, give them a chance to change their mind.
54
-	if (isset($context['login_show_undelete']))
55
-		echo '
56
+	if (isset($context['login_show_undelete'])) {
57
+			echo '
56 58
 						<dt class="alert">', $txt['undelete_account'], ':</dt>
57 59
 						<dd><input type="checkbox" name="undelete" class="input_check"></dd>';
60
+	}
58 61
 	echo '
59 62
 					</dl>
60 63
 					<p><input type="submit" value="', $txt['login'], '" class="button_submit"></p>
@@ -66,8 +69,8 @@  discard block
 block discarded – undo
66 69
 						setTimeout(function() {
67 70
 							document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus();
68 71
 						}, 150);';
69
-	if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2))
70
-		echo '
72
+	if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) {
73
+			echo '
71 74
 						form = $("#frmLogin");
72 75
 						form.submit(function(e) {
73 76
 							e.preventDefault();
@@ -91,16 +94,18 @@  discard block
 block discarded – undo
91 94
 
92 95
 							return false;
93 96
 						});';
97
+	}
94 98
 
95 99
 	echo '
96 100
 					</script>
97 101
 				</form>';
98 102
 
99 103
 	// It is a long story as to why we have this when we're clearly not going to use it.
100
-	if (!empty($context['from_ajax']))
101
-		echo '
104
+	if (!empty($context['from_ajax'])) {
105
+			echo '
102 106
 					<br>
103 107
 					<a href="javascript:self.close();"></a>';
108
+	}
104 109
 	echo '
105 110
 			</div>
106 111
 		</div>';
@@ -121,9 +126,10 @@  discard block
 block discarded – undo
121 126
 				</h3>
122 127
 			</div>
123 128
 			<div class="roundframe">';
124
-	if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error']))
125
-		echo '
129
+	if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) {
130
+			echo '
126 131
 				<div class="error">', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], '</div>';
132
+	}
127 133
 	echo '
128 134
 				<form action="', $context['tfa_url'], '" method="post" id="frmTfa">
129 135
 					<div id="tfaCode">
@@ -146,8 +152,8 @@  discard block
 block discarded – undo
146 152
 				</form>
147 153
 				<script>
148 154
 						form = $("#frmTfa");';
149
-	if (!empty($context['from_ajax']))
150
-		echo '
155
+	if (!empty($context['from_ajax'])) {
156
+			echo '
151 157
 						form.submit(function(e) {
152 158
 							// If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page
153 159
 							if (form.find("input[name=tfa_backup]:first").val().length > 0)
@@ -166,6 +172,7 @@  discard block
 block discarded – undo
166 172
 
167 173
 							return false;
168 174
 						});';
175
+	}
169 176
 	echo '
170 177
 						form.find("input[name=backup]").click(function(e) {
171 178
 							$("#tfaBackup").show();
@@ -197,10 +204,11 @@  discard block
 block discarded – undo
197 204
 				', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>';
198 205
 
199 206
 
200
-	if ($context['can_register'])
201
-		echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']);
202
-	else
203
-		echo $txt['login_below'];
207
+	if ($context['can_register']) {
208
+			echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']);
209
+	} else {
210
+			echo $txt['login_below'];
211
+	}
204 212
 
205 213
 	// And now the login information.
206 214
 	echo '
@@ -296,9 +304,10 @@  discard block
 block discarded – undo
296 304
 		</div>
297 305
 		<div class="roundframe centertext">';
298 306
 
299
-	if (!empty($context['incorrect_password']))
300
-		echo '
307
+	if (!empty($context['incorrect_password'])) {
308
+			echo '
301 309
 			<div class="error">', $txt['admin_incorrect_password'], '</div>';
310
+	}
302 311
 
303 312
 	echo '
304 313
 			<strong>', $txt['password'], ':</strong>
@@ -338,11 +347,12 @@  discard block
 block discarded – undo
338 347
 			<div class="roundframe">';
339 348
 
340 349
 	// You didn't even have an ID?
341
-	if (empty($context['member_id']))
342
-		echo '
350
+	if (empty($context['member_id'])) {
351
+			echo '
343 352
 				<dl>
344 353
 					<dt>', $txt['invalid_activation_username'], ':</dt>
345 354
 					<dd><input type="text" name="user" size="30" class="input_text"></dd>';
355
+	}
346 356
 
347 357
 	echo '
348 358
 					<dt>', $txt['invalid_activation_retry'], ':</dt>
@@ -379,13 +389,14 @@  discard block
 block discarded – undo
379 389
 					<dd><input type="password" name="passwd" size="30" class="input_password"></dd>
380 390
 				</dl>';
381 391
 
382
-	if ($context['can_activate'])
383
-		echo '
392
+	if ($context['can_activate']) {
393
+			echo '
384 394
 				<p>', $txt['invalid_activation_known'], '</p>
385 395
 				<dl>
386 396
 					<dt>', $txt['invalid_activation_retry'], ':</dt>
387 397
 					<dd><input type="text" name="code" size="30" class="input_text"></dd>
388 398
 				</dl>';
399
+	}
389 400
 
390 401
 	echo '
391 402
 				<p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button_submit"></p>
Please login to merge, or discard this patch.
Themes/default/Register.template.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
151 151
 							<span class="smalltext">', $field['desc'], '</span>
152 152
 						</dt>
153
-						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
153
+						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>';
154 154
 
155 155
 		echo '
156 156
 					</dl>';
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 		<meta charset="', $context['character_set'], '">
437 437
 		<title>', $txt['visual_verification_sound'], '</title>
438 438
 		<meta name="robots" content="noindex">
439
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
439
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
440 440
 		<style>';
441 441
 
442 442
 	// Just show the help text and a "close window" link.
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
543 543
 							<span class="smalltext">', $field['desc'], '</span>
544 544
 						</dt>
545
-						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
545
+						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>';
546 546
 
547 547
 	echo '
548 548
 						<dt>
Please login to merge, or discard this patch.
Braces   +72 added lines, -52 removed lines patch added patch discarded remove patch
@@ -28,13 +28,14 @@  discard block
 block discarded – undo
28 28
 			<div id="confirm_buttons">';
29 29
 
30 30
 	// Age restriction in effect?
31
-	if ($context['show_coppa'])
32
-		echo '
31
+	if ($context['show_coppa']) {
32
+			echo '
33 33
 				<input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button_submit"><br><br>
34 34
 				<input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button_submit">';
35
-	else
36
-		echo '
35
+	} else {
36
+			echo '
37 37
 				<input type="submit" name="accept_agreement" value="', $txt['agreement_agree'], '" class="button_submit">';
38
+	}
38 39
 
39 40
 	echo '
40 41
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -77,9 +78,10 @@  discard block
 block discarded – undo
77 78
 			<ul>';
78 79
 
79 80
 		// Cycle through each error and display an error message.
80
-		foreach ($context['registration_errors'] as $error)
81
-			echo '
81
+		foreach ($context['registration_errors'] as $error) {
82
+					echo '
82 83
 				<li>', $error, '</li>';
84
+		}
83 85
 
84 86
 		echo '
85 87
 			</ul>
@@ -143,14 +145,15 @@  discard block
 block discarded – undo
143 145
 
144 146
 					<dl class="register_form">';
145 147
 
146
-		foreach ($context['custom_fields'] as $field)
147
-			if ($field['show_reg'] > 1)
148
+		foreach ($context['custom_fields'] as $field) {
149
+					if ($field['show_reg'] > 1)
148 150
 				echo '
149 151
 						<dt>
150 152
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
151 153
 							<span class="smalltext">', $field['desc'], '</span>
152 154
 						</dt>
153 155
 						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
156
+		}
154 157
 
155 158
 		echo '
156 159
 					</dl>';
@@ -184,41 +187,45 @@  discard block
 block discarded – undo
184 187
 					$callback_func = 'template_profile_' . $field['callback_func'];
185 188
 					$callback_func();
186 189
 				}
187
-			}
188
-			else
190
+			} else
189 191
 			{
190 192
 					echo '
191 193
 						<dt>
192 194
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['label'], ':</strong>';
193 195
 
194 196
 				// Does it have any subtext to show?
195
-				if (!empty($field['subtext']))
196
-					echo '
197
+				if (!empty($field['subtext'])) {
198
+									echo '
197 199
 							<span class="smalltext">', $field['subtext'], '</span>';
200
+				}
198 201
 
199 202
 				echo '
200 203
 						</dt>
201 204
 						<dd>';
202 205
 
203 206
 				// Want to put something infront of the box?
204
-				if (!empty($field['preinput']))
205
-					echo '
207
+				if (!empty($field['preinput'])) {
208
+									echo '
206 209
 							', $field['preinput'];
210
+				}
207 211
 
208 212
 				// What type of data are we showing?
209
-				if ($field['type'] == 'label')
210
-					echo '
213
+				if ($field['type'] == 'label') {
214
+									echo '
211 215
 							', $field['value'];
216
+				}
212 217
 
213 218
 				// Maybe it's a text box - very likely!
214
-				elseif (in_array($field['type'], array('int', 'float', 'text', 'password')))
215
-					echo '
219
+				elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) {
220
+									echo '
216 221
 							<input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '">';
222
+				}
217 223
 
218 224
 				// You "checking" me out? ;)
219
-				elseif ($field['type'] == 'check')
220
-					echo '
225
+				elseif ($field['type'] == 'check') {
226
+									echo '
221 227
 							<input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" class="input_check" ', $field['input_attr'], '>';
228
+				}
222 229
 
223 230
 				// Always fun - select boxes!
224 231
 				elseif ($field['type'] == 'select')
@@ -229,13 +236,15 @@  discard block
 block discarded – undo
229 236
 					if (isset($field['options']))
230 237
 					{
231 238
 						// Is this some code to generate the options?
232
-						if (!is_array($field['options']))
233
-							$field['options'] = eval($field['options']);
239
+						if (!is_array($field['options'])) {
240
+													$field['options'] = eval($field['options']);
241
+						}
234 242
 						// Assuming we now have some!
235
-						if (is_array($field['options']))
236
-							foreach ($field['options'] as $value => $name)
243
+						if (is_array($field['options'])) {
244
+													foreach ($field['options'] as $value => $name)
237 245
 								echo '
238 246
 								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
247
+						}
239 248
 					}
240 249
 
241 250
 					echo '
@@ -243,9 +252,10 @@  discard block
 block discarded – undo
243 252
 				}
244 253
 
245 254
 				// Something to end with?
246
-				if (!empty($field['postinput']))
247
-					echo '
255
+				if (!empty($field['postinput'])) {
256
+									echo '
248 257
 							', $field['postinput'];
258
+				}
249 259
 
250 260
 				echo '
251 261
 						</dd>';
@@ -258,13 +268,14 @@  discard block
 block discarded – undo
258 268
 	{
259 269
 		foreach ($context['custom_fields'] as $field)
260 270
 		{
261
-			if ($field['show_reg'] < 2)
262
-				echo '
271
+			if ($field['show_reg'] < 2) {
272
+							echo '
263 273
 						<dt>
264 274
 							<strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong>
265 275
 							<span class="smalltext">', $field['desc'], '</span>
266 276
 						</dt>
267 277
 						<dd>', $field['input_html'], '</dd>';
278
+			}
268 279
 		}
269 280
 	}
270 281
 
@@ -294,13 +305,14 @@  discard block
 block discarded – undo
294 305
 			<div id="confirm_buttons" class="flow_auto">';
295 306
 
296 307
 	// Age restriction in effect?
297
-	if (!$context['require_agreement'] && $context['show_coppa'])
298
-		echo '
308
+	if (!$context['require_agreement'] && $context['show_coppa']) {
309
+			echo '
299 310
 				<input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button_submit"><br><br>
300 311
 				<input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button_submit">';
301
-	else
302
-		echo '
312
+	} else {
313
+			echo '
303 314
 				<input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button_submit">';
315
+	}
304 316
 	echo '
305 317
 			</div>
306 318
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -445,19 +457,20 @@  discard block
 block discarded – undo
445 457
 	</head>
446 458
 	<body style="margin: 1ex;">
447 459
 		<div class="windowbg description" style="text-align: center;">';
448
-	if (isBrowser('is_ie') || isBrowser('is_ie11'))
449
-		echo '
460
+	if (isBrowser('is_ie') || isBrowser('is_ie11')) {
461
+			echo '
450 462
 			<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav">
451 463
 				<param name="AutoStart" value="1">
452 464
 				<param name="FileName" value="', $context['verification_sound_href'], '">
453 465
 			</object>';
454
-	else
455
-		echo '
466
+	} else {
467
+			echo '
456 468
 			<audio src="', $context['verification_sound_href'], '" controls>
457 469
 				<object type="audio/x-wav" data="', $context['verification_sound_href'], '">
458 470
 					<a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a>
459 471
 				</object>
460 472
 			</audio>';
473
+	}
461 474
 	echo '
462 475
 		<br>
463 476
 		<a href="', $context['verification_sound_href'], ';sound" rel="nofollow">', $txt['visual_verification_sound_again'], '</a><br>
@@ -484,11 +497,12 @@  discard block
 block discarded – undo
484 497
 				</div>
485 498
 				<div id="register_screen" class="windowbg2">';
486 499
 
487
-	if (!empty($context['registration_done']))
488
-		echo '
500
+	if (!empty($context['registration_done'])) {
501
+			echo '
489 502
 					<div class="infobox">
490 503
 						', $context['registration_done'], '
491 504
 					</div>';
505
+	}
492 506
 
493 507
 	echo '
494 508
 					<dl class="register_form" id="admin_register_form">
@@ -524,9 +538,10 @@  discard block
 block discarded – undo
524 538
 						<dd>
525 539
 							<select name="group" id="group_select" tabindex="', $context['tabindex']++, '">';
526 540
 
527
-		foreach ($context['member_groups'] as $id => $name)
528
-			echo '
541
+		foreach ($context['member_groups'] as $id => $name) {
542
+					echo '
529 543
 								<option value="', $id, '">', $name, '</option>';
544
+		}
530 545
 
531 546
 		echo '
532 547
 							</select>
@@ -534,8 +549,8 @@  discard block
 block discarded – undo
534 549
 	}
535 550
 
536 551
 	// If there is any field marked as required, show it here!
537
-	if (!empty($context['custom_fields_required']) && !empty($context['custom_fields']))
538
-		foreach ($context['custom_fields'] as $field)
552
+	if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) {
553
+			foreach ($context['custom_fields'] as $field)
539 554
 			if ($field['show_reg'] > 1)
540 555
 				echo '
541 556
 						<dt>
@@ -543,6 +558,7 @@  discard block
 block discarded – undo
543 558
 							<span class="smalltext">', $field['desc'], '</span>
544 559
 						</dt>
545 560
 						<dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ .'" name="', $field['input_html']), '</dd>';
561
+	}
546 562
 
547 563
 	echo '
548 564
 						<dt>
@@ -579,12 +595,13 @@  discard block
 block discarded – undo
579 595
 {
580 596
 	global $context, $scripturl, $txt;
581 597
 
582
-	if (!empty($context['saved_successful']))
583
-		echo '
598
+	if (!empty($context['saved_successful'])) {
599
+			echo '
584 600
 					<div class="infobox">', $txt['settings_saved'], '</div>';
585
-	elseif (!empty($context['could_not_save']))
586
-		echo '
601
+	} elseif (!empty($context['could_not_save'])) {
602
+			echo '
587 603
 					<div class="errorbox">', $txt['admin_agreement_not_saved'], '</div>';
604
+	}
588 605
 
589 606
 	// Just a big box to edit the text file ;).
590 607
 	echo '
@@ -594,9 +611,10 @@  discard block
 block discarded – undo
594 611
 			</div>';
595 612
 
596 613
 	// Warning for if the file isn't writable.
597
-	if (!empty($context['warning']))
598
-		echo '
614
+	if (!empty($context['warning'])) {
615
+			echo '
599 616
 			<p class="error">', $context['warning'], '</p>';
617
+	}
600 618
 
601 619
 	echo '
602 620
 			<div class="windowbg2" id="registration_agreement">';
@@ -613,9 +631,10 @@  discard block
 block discarded – undo
613 631
 						<strong>', $txt['admin_agreement_select_language'], ':</strong>&nbsp;
614 632
 						<select name="agree_lang" onchange="document.getElementById(\'change_reg\').submit();" tabindex="', $context['tabindex']++, '">';
615 633
 
616
-		foreach ($context['editable_agreements'] as $file => $name)
617
-			echo '
634
+		foreach ($context['editable_agreements'] as $file => $name) {
635
+					echo '
618 636
 							<option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>';
637
+		}
619 638
 
620 639
 		echo '
621 640
 						</select>
@@ -659,9 +678,10 @@  discard block
 block discarded – undo
659 678
 {
660 679
 	global $context, $scripturl, $txt;
661 680
 
662
-	if (!empty($context['saved_successful']))
663
-		echo '
681
+	if (!empty($context['saved_successful'])) {
682
+			echo '
664 683
 	<div class="infobox">', $txt['settings_saved'], '</div>';
684
+	}
665 685
 
666 686
 	echo '
667 687
 		<form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '">
Please login to merge, or discard this patch.
Themes/default/MessageIndex.template.php 2 patches
Braces   +94 added lines, -65 removed lines patch added patch discarded remove patch
@@ -45,17 +45,19 @@  discard block
 block discarded – undo
45 45
 						<a class="subject" href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a>';
46 46
 
47 47
 			// Has it outstanding posts for approval?
48
-			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
49
-				echo '
48
+			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
49
+							echo '
50 50
 						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
51
+			}
51 52
 
52 53
 			echo '
53 54
 						<p class="board_description">', $board['description'] , '</p>';
54 55
 
55 56
 			// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
56
-			if (!empty($board['moderators']) || !empty($board['moderator_groups']))
57
-				echo '
57
+			if (!empty($board['moderators']) || !empty($board['moderator_groups'])) {
58
+							echo '
58 59
 						<p class="moderators">', count($board['link_moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
60
+			}
59 61
 
60 62
 			// Show some basic information about the number of posts, etc.
61 63
 			echo '
@@ -67,9 +69,10 @@  discard block
 block discarded – undo
67 69
 					</div>
68 70
 					<div class="lastpost">';
69 71
 
70
-			if (!empty($board['last_post']['id']))
71
-				echo '
72
+			if (!empty($board['last_post']['id'])) {
73
+							echo '
72 74
 						<p>', $board['last_post']['last_post_message'], '</p>';
75
+			}
73 76
 			echo '
74 77
 					</div>';
75 78
 
@@ -82,14 +85,16 @@  discard block
 block discarded – undo
82 85
 						id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
83 86
 				foreach ($board['children'] as $child)
84 87
 				{
85
-					if (!$child['is_redirect'])
86
-						$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a  ' . ($child['new'] ? 'class="new_posts" ' : '') . 'href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
87
-					else
88
-						$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
88
+					if (!$child['is_redirect']) {
89
+											$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a  ' . ($child['new'] ? 'class="new_posts" ' : '') . 'href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
90
+					} else {
91
+											$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
92
+					}
89 93
 
90 94
 					// Has it posts awaiting approval?
91
-					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
92
-						$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
95
+					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics'])) {
96
+											$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
97
+					}
93 98
 
94 99
 					$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
95 100
 				}
@@ -108,8 +113,9 @@  discard block
 block discarded – undo
108 113
 	}
109 114
 
110 115
 	// They can only mark read if they are logged in and it's enabled!
111
-	if (!$context['user']['is_logged'])
112
-		unset($context['normal_buttons']['markread']);
116
+	if (!$context['user']['is_logged']) {
117
+			unset($context['normal_buttons']['markread']);
118
+	}
113 119
 
114 120
 	if (!$context['no_topic_listing'])
115 121
 	{
@@ -132,13 +138,15 @@  discard block
 block discarded – undo
132 138
 	<div id="description_board" class="generic_list_wrapper">
133 139
 		<h3>', $context['name'], '</h3>
134 140
 		<p>';
135
-	if ($context['description'] != '')
136
-	echo '
141
+	if ($context['description'] != '') {
142
+		echo '
137 143
 		', $context['description'], '&nbsp;';
144
+	}
138 145
 
139
-	if (!empty($context['moderators']))
140
-	echo '
146
+	if (!empty($context['moderators'])) {
147
+		echo '
141 148
 		', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.';
149
+	}
142 150
 
143 151
 	echo '
144 152
 		</p>
@@ -146,9 +154,10 @@  discard block
 block discarded – undo
146 154
 		}
147 155
 
148 156
 		// If Quick Moderation is enabled start the form.
149
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
150
-			echo '
157
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) {
158
+					echo '
151 159
 	<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">';
160
+		}
152 161
 
153 162
 		echo '
154 163
 		<div id="messageindex">';
@@ -156,10 +165,11 @@  discard block
 block discarded – undo
156 165
 		{
157 166
 		echo '
158 167
 			<div class="information">';
159
-			if ($settings['display_who_viewing'] == 1)
160
-				echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
161
-		else
162
-				echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
168
+			if ($settings['display_who_viewing'] == 1) {
169
+							echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
170
+			} else {
171
+						echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
172
+		}
163 173
 			echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'];
164 174
 
165 175
 		echo '
@@ -178,19 +188,22 @@  discard block
 block discarded – undo
178 188
 					<div class="lastpost">', $context['topics_headers']['last_post'], '</div>';
179 189
 
180 190
 			// Show a "select all" box for quick moderation?
181
-			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
182
-				echo '
191
+			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) {
192
+							echo '
183 193
 					<div class="moderation"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check"></div>';
194
+			}
184 195
 
185 196
 			// If it's on in "image" mode, don't show anything but the column.
186
-			elseif (!empty($context['can_quick_mod']))
187
-				echo '
197
+			elseif (!empty($context['can_quick_mod'])) {
198
+							echo '
188 199
 					<div class="moderation">&nbsp;</div>';
200
+			}
189 201
 		}
190 202
 		// No topics.... just say, "sorry bub".
191
-		else
192
-			echo '
203
+		else {
204
+					echo '
193 205
 					<h3 class="titlebg">', $txt['topic_alert_none'], '</h3>';
206
+		}
194 207
 
195 208
 		echo '
196 209
 		</div>';
@@ -222,21 +235,26 @@  discard block
 block discarded – undo
222 235
 			// Now we handle the icons
223 236
 			echo '
224 237
 							<div class="icons floatright">';
225
-			if ($topic['is_watched'])
226
-				echo '
238
+			if ($topic['is_watched']) {
239
+							echo '
227 240
 								<span class="generic_icons watch" title="', $txt['watching_this_topic'], '"></span>';
228
-			if ($topic['is_locked'])
229
-				echo '
241
+			}
242
+			if ($topic['is_locked']) {
243
+							echo '
230 244
 								<span class="generic_icons lock"></span>';
231
-			if ($topic['is_sticky'])
232
-				echo '
245
+			}
246
+			if ($topic['is_sticky']) {
247
+							echo '
233 248
 								<span class="generic_icons sticky"></span>';
234
-			if ($topic['is_redirect'])
235
-				echo '
249
+			}
250
+			if ($topic['is_redirect']) {
251
+							echo '
236 252
 								<span class="generic_icons move"></span>';
237
-			if ($topic['is_poll'])
238
-				echo '
253
+			}
254
+			if ($topic['is_poll']) {
255
+							echo '
239 256
 								<span class="generic_icons poll"></span>';
257
+			}
240 258
 			echo '
241 259
 							</div>';
242 260
 
@@ -262,26 +280,31 @@  discard block
 block discarded – undo
262 280
 			{
263 281
 				echo '
264 282
 					<div class="moderation">';
265
-				if ($options['display_quick_mod'] == 1)
266
-					echo '
283
+				if ($options['display_quick_mod'] == 1) {
284
+									echo '
267 285
 						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">';
268
-				else
286
+				} else
269 287
 				{
270 288
 					// Check permissions on each and show only the ones they are allowed to use.
271
-					if ($topic['quick_mod']['remove'])
272
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons delete" title="', $txt['remove_topic'], '"></span></a>';
289
+					if ($topic['quick_mod']['remove']) {
290
+											echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons delete" title="', $txt['remove_topic'], '"></span></a>';
291
+					}
273 292
 
274
-					if ($topic['quick_mod']['lock'])
275
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>';
293
+					if ($topic['quick_mod']['lock']) {
294
+											echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>';
295
+					}
276 296
 
277
-					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
278
-						echo '<br>';
297
+					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) {
298
+											echo '<br>';
299
+					}
279 300
 
280
-					if ($topic['quick_mod']['sticky'])
281
-						echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>';
301
+					if ($topic['quick_mod']['sticky']) {
302
+											echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>';
303
+					}
282 304
 
283
-					if ($topic['quick_mod']['move'])
284
-						echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>';
305
+					if ($topic['quick_mod']['move']) {
306
+											echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>';
307
+					}
285 308
 				}
286 309
 				echo '
287 310
 					</div>';
@@ -299,18 +322,20 @@  discard block
 block discarded – undo
299 322
 					<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
300 323
 						<option value="">--------</option>';
301 324
 
302
-			foreach ($context['qmod_actions'] as $qmod_action)
303
-				if ($context['can_' . $qmod_action])
325
+			foreach ($context['qmod_actions'] as $qmod_action) {
326
+							if ($context['can_' . $qmod_action])
304 327
 					echo '
305 328
 						<option value="' . $qmod_action . '">' . $txt['quick_mod_'  . $qmod_action] . '</option>';
329
+			}
306 330
 
307 331
 			echo '
308 332
 					</select>';
309 333
 
310 334
 			// Show a list of boards they can move the topic to.
311
-			if ($context['can_move'])
312
-				echo '
335
+			if ($context['can_move']) {
336
+							echo '
313 337
 			<span id="quick_mod_jump_to">&nbsp;</span>';
338
+			}
314 339
 
315 340
 			echo '
316 341
 					<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit qaction">
@@ -321,10 +346,11 @@  discard block
 block discarded – undo
321 346
 	</div>';
322 347
 
323 348
 		// Finish off the form - again.
324
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
325
-			echo '
349
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) {
350
+					echo '
326 351
 	<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
327 352
 	</form>';
353
+		}
328 354
 
329 355
 	// Mobile action buttons (bottom)
330 356
 	echo '
@@ -343,8 +369,8 @@  discard block
 block discarded – undo
343 369
 	// Show breadcrumbs at the bottom too.
344 370
 	theme_linktree();
345 371
 
346
-	if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move'])
347
-		echo '
372
+	if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) {
373
+			echo '
348 374
 			<script>
349 375
 				if (typeof(window.XMLHttpRequest) != "undefined")
350 376
 					aJumpTo[aJumpTo.length] = new JumpTo({
@@ -363,6 +389,7 @@  discard block
 block discarded – undo
363 389
 						sCustomName: "move_to"
364 390
 					});
365 391
 			</script>';
392
+	}
366 393
 
367 394
 	// Javascript for inline editing.
368 395
 	echo '
@@ -398,8 +425,8 @@  discard block
 block discarded – undo
398 425
 		<div class="information">
399 426
 			<p class="floatright" id="message_index_jump_to">&nbsp;</p>';
400 427
 
401
-	if (empty($context['no_topic_listing']))
402
-		echo '
428
+	if (empty($context['no_topic_listing'])) {
429
+			echo '
403 430
 			<p class="floatleft">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
404 431
 				<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="" class="centericon"> ' . $txt['participation_caption'] . '<br>' : '', '
405 432
 				'. ($modSettings['pollMode'] == '1' ? '<span class="generic_icons poll centericon"></span> ' . $txt['poll'] : '') . '<br>
@@ -409,9 +436,10 @@  discard block
 block discarded – undo
409 436
 				<span class="generic_icons lock centericon"></span> ' . $txt['locked_topic'] . '<br>
410 437
 				<span class="generic_icons sticky centericon"></span> ' . $txt['sticky_topic'] . '<br>
411 438
 			</p>';
439
+	}
412 440
 
413
-	if (!empty($context['jump_to']))
414
-		echo '
441
+	if (!empty($context['jump_to'])) {
442
+			echo '
415 443
 			<script>
416 444
 				if (typeof(window.XMLHttpRequest) != "undefined")
417 445
 					aJumpTo[aJumpTo.length] = new JumpTo({
@@ -427,6 +455,7 @@  discard block
 block discarded – undo
427 455
 						sGoButtonLabel: "', $txt['quick_mod_go'], '"
428 456
 					});
429 457
 			</script>';
458
+	}
430 459
 
431 460
 	echo '
432 461
 			<br class="clear">
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 					<div class="info">
45 45
 						<a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '">
46 46
 							', $board['name'], '
47
-							<p class="board_description mobile_display">', $board['description'] , '</p>
47
+							<p class="board_description mobile_display">', $board['description'], '</p>
48 48
 						</a>';
49 49
 
50 50
 			// Has it outstanding posts for approval?
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
54 54
 
55 55
 			echo '
56
-						<p class="board_description">', $board['description'] , '</p>';
56
+						<p class="board_description">', $board['description'], '</p>';
57 57
 
58 58
 			// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
59 59
 			if (!empty($board['moderators']) || !empty($board['moderator_groups']))
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	// Mobile action buttons (top)
120 120
 	echo '
121 121
 		<div class="mobile_buttons floatright">
122
-			<a class="button mobile_act">', $txt['mobile_action'],'</a>
122
+			<a class="button mobile_act">', $txt['mobile_action'], '</a>
123 123
 		</div>';
124 124
 
125 125
 		echo '
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 					<img src="', $topic['first_post']['icon_url'], '" alt="">
220 220
 					', $topic['is_posted_in'] ? '<img class="posted" src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="">' : '', '
221 221
 				</div>
222
-					<div class="info', !empty($context['can_quick_mod']) ? '' : ' info_block','">
222
+					<div class="info', !empty($context['can_quick_mod']) ? '' : ' info_block', '">
223 223
 						<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '"  ondblclick="oQuickModifyTopic.modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>';
224 224
 
225 225
 			// Now we handle the icons
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 								</span>
252 252
 							</div>
253 253
 							<p class="floatleft">', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '</p>
254
-							', !empty($topic['pages']) ? '<span id="pages'. $topic['first_post']['id']. '" class="topic_pages">&nbsp;'. $topic['pages']. '</span>' : '','
254
+							', !empty($topic['pages']) ? '<span id="pages' . $topic['first_post']['id'] . '" class="topic_pages">&nbsp;' . $topic['pages'] . '</span>' : '', '
255 255
 							<br class="clear">
256 256
 						</div>
257 257
 					</div>
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 			foreach ($context['qmod_actions'] as $qmod_action)
306 306
 				if ($context['can_' . $qmod_action])
307 307
 					echo '
308
-						<option value="' . $qmod_action . '">' . $txt['quick_mod_'  . $qmod_action] . '</option>';
308
+						<option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>';
309 309
 
310 310
 			echo '
311 311
 					</select>';
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	// Mobile action buttons (bottom)
333 333
 	echo '
334 334
 		<div class="mobile_buttons floatright">
335
-			<a class="button mobile_act">', $txt['mobile_action'],'</a>
335
+			<a class="button mobile_act">', $txt['mobile_action'], '</a>
336 336
 		</div>';
337 337
 
338 338
 		echo '
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	echo '
383 383
 			<div id="mobile_action" class="popup_container">
384 384
 				<div class="popup_window description">
385
-					<div class="popup_heading">', $txt['mobile_action'],'
385
+					<div class="popup_heading">', $txt['mobile_action'], '
386 386
 					<a href="javascript:void(0);" class="generic_icons hide_popup"></a></div>
387 387
 					', template_button_strip($context['normal_buttons']), '
388 388
 				</div>
Please login to merge, or discard this patch.