Completed
Pull Request — release-2.1 (#3886)
by Fran
07:42
created
Themes/default/GenericList.template.php 1 patch
Braces   +62 added lines, -44 removed lines patch added patch discarded remove patch
@@ -21,26 +21,30 @@  discard block
 block discarded – undo
21 21
 
22 22
 	// Get a shortcut to the current list.
23 23
 	$list_id = $list_id === null ? (!empty($context['default_list']) ? $context['default_list'] : '') : $list_id;
24
-	if (empty($list_id) || empty($context[$list_id]))
25
-		return;
24
+	if (empty($list_id) || empty($context[$list_id])) {
25
+			return;
26
+	}
26 27
 	$cur_list = &$context[$list_id];
27 28
 
28 29
 	// These are the main tabs that is used all around the template.
29
-	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
30
-		template_create_list_menu($cur_list['list_menu'], 'top');
30
+	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) {
31
+			template_create_list_menu($cur_list['list_menu'], 'top');
32
+	}
31 33
 
32
-	if (isset($cur_list['form']))
33
-		echo '
34
+	if (isset($cur_list['form'])) {
35
+			echo '
34 36
 	<form action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="', $context['character_set'], '">';
37
+	}
35 38
 
36 39
 	// Show the title of the table (if any).
37
-	if (!empty($cur_list['title']))
38
-		echo '
40
+	if (!empty($cur_list['title'])) {
41
+			echo '
39 42
 			<div class="cat_bar">
40 43
 				<h3 class="catbg">
41 44
 					', $cur_list['title'], '
42 45
 				</h3>
43 46
 			</div>';
47
+	}
44 48
 
45 49
 	if (isset($cur_list['additional_rows']['after_title']))
46 50
 	{
@@ -51,20 +55,23 @@  discard block
 block discarded – undo
51 55
 			</div>';
52 56
 	}
53 57
 
54
-	if (isset($cur_list['additional_rows']['top_of_list']))
55
-		template_additional_rows('top_of_list', $cur_list);
58
+	if (isset($cur_list['additional_rows']['top_of_list'])) {
59
+			template_additional_rows('top_of_list', $cur_list);
60
+	}
56 61
 
57 62
 	if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers']))
58 63
 	{
59 64
 		// Show the page index (if this list doesn't intend to show all items).
60
-		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
61
-			echo '
65
+		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) {
66
+					echo '
62 67
 				<div class="floatleft">
63 68
 					<div class="pagesection">', $cur_list['page_index'], '</div>
64 69
 				</div>';
70
+		}
65 71
 
66
-		if (isset($cur_list['additional_rows']['above_column_headers']))
67
-			template_additional_rows('above_column_headers', $cur_list);
72
+		if (isset($cur_list['additional_rows']['above_column_headers'])) {
73
+					template_additional_rows('above_column_headers', $cur_list);
74
+		}
68 75
 	}
69 76
 
70 77
 	echo '
@@ -94,11 +101,12 @@  discard block
 block discarded – undo
94 101
 			<tbody>';
95 102
 
96 103
 	// Show a nice message informing there are no items in this list.
97
-	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label']))
98
-		echo '
104
+	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) {
105
+			echo '
99 106
 				<tr class="windowbg">
100 107
 					<td colspan="', $cur_list['num_columns'], '" class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</td>
101 108
 				</tr>';
109
+	}
102 110
 
103 111
 	// Show the list rows.
104 112
 	elseif (!empty($cur_list['rows']))
@@ -108,10 +116,11 @@  discard block
 block discarded – undo
108 116
 			echo '
109 117
 				<tr class="windowbg', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', ' id="list_', $list_id, '_', $id, '">';
110 118
 
111
-			if (!empty($row['data']))
112
-				foreach ($row['data'] as $row_data)
119
+			if (!empty($row['data'])) {
120
+							foreach ($row['data'] as $row_data)
113 121
 					echo '
114 122
 					<td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>';
123
+			}
115 124
 
116 125
 			echo '
117 126
 				</tr>';
@@ -128,46 +137,53 @@  discard block
 block discarded – undo
128 137
 			<div class="flow_auto">';
129 138
 
130 139
 		// Show the page index (if this list doesn't intend to show all items).
131
-		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
132
-			echo '
140
+		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) {
141
+					echo '
133 142
 				<div class="floatleft">
134 143
 					<div class="pagesection">', $cur_list['page_index'], '</div>
135 144
 				</div>';
145
+		}
136 146
 
137
-		if (isset($cur_list['additional_rows']['below_table_data']))
138
-			template_additional_rows('below_table_data', $cur_list);
147
+		if (isset($cur_list['additional_rows']['below_table_data'])) {
148
+					template_additional_rows('below_table_data', $cur_list);
149
+		}
139 150
 
140 151
 		echo '
141 152
 			</div>';
142 153
 	}
143 154
 
144
-	if (isset($cur_list['additional_rows']['bottom_of_list']))
145
-		template_additional_rows('bottom_of_list', $cur_list);
155
+	if (isset($cur_list['additional_rows']['bottom_of_list'])) {
156
+			template_additional_rows('bottom_of_list', $cur_list);
157
+	}
146 158
 
147 159
 	if (isset($cur_list['form']))
148 160
 	{
149
-		foreach ($cur_list['form']['hidden_fields'] as $name => $value)
150
-			echo '
161
+		foreach ($cur_list['form']['hidden_fields'] as $name => $value) {
162
+					echo '
151 163
 			<input type="hidden" name="', $name, '" value="', $value, '">';
164
+		}
152 165
 
153
-		if (isset($cur_list['form']['token']))
154
-			echo '
166
+		if (isset($cur_list['form']['token'])) {
167
+					echo '
155 168
 			<input type="hidden" name="', $context[$cur_list['form']['token'] . '_token_var'], '" value="', $context[$cur_list['form']['token'] . '_token'], '">';
169
+		}
156 170
 
157 171
 		echo '
158 172
 	</form>';
159 173
 	}
160 174
 
161 175
 	// Tabs at the bottom.  Usually bottom aligned.
162
-	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
163
-		template_create_list_menu($cur_list['list_menu'], 'bottom');
176
+	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) {
177
+			template_create_list_menu($cur_list['list_menu'], 'bottom');
178
+	}
164 179
 
165
-	if (isset($cur_list['javascript']))
166
-		echo '
180
+	if (isset($cur_list['javascript'])) {
181
+			echo '
167 182
 	<script>
168 183
 		', $cur_list['javascript'], '
169 184
 	</script>';
170
-}
185
+	}
186
+	}
171 187
 
172 188
 /**
173 189
  * This template displays additional rows above or below the list.
@@ -177,10 +193,11 @@  discard block
 block discarded – undo
177 193
  */
178 194
 function template_additional_rows($row_position, $cur_list)
179 195
 {
180
-	foreach ($cur_list['additional_rows'][$row_position] as $row)
181
-		echo '
196
+	foreach ($cur_list['additional_rows'][$row_position] as $row) {
197
+			echo '
182 198
 			<div class="additional_row', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>';
183
-}
199
+	}
200
+	}
184 201
 
185 202
 /**
186 203
  * This function creates a menu
@@ -239,18 +256,19 @@  discard block
 block discarded – undo
239 256
 
240 257
 		foreach ($list_menu['links'] as $link)
241 258
 		{
242
-			if ($link['is_selected'])
243
-				echo '
259
+			if ($link['is_selected']) {
260
+							echo '
244 261
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '">&nbsp;</td>
245 262
 							<td class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back">
246 263
 								<a href="', $link['href'], '">', $link['label'], '</a>
247 264
 							</td>
248 265
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '">&nbsp;</td>';
249
-			else
250
-				echo '
266
+			} else {
267
+							echo '
251 268
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back">
252 269
 								<a href="', $link['href'], '">', $link['label'], '</a>
253 270
 							</td>';
271
+			}
254 272
 		}
255 273
 
256 274
 		echo '
@@ -261,12 +279,12 @@  discard block
 block discarded – undo
261 279
 				<td>&nbsp;</td>' : '', '
262 280
 			</tr>
263 281
 		</table>';
264
-	}
265
-	elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons')
282
+	} elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons')
266 283
 	{
267 284
 		$links = array();
268
-		foreach ($list_menu['links'] as $link)
269
-			$links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>';
285
+		foreach ($list_menu['links'] as $link) {
286
+					$links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>';
287
+		}
270 288
 
271 289
 		echo '
272 290
 		<table style="margin-', $list_menu['position'], ': 10px; width: 100%;">
Please login to merge, or discard this patch.
Themes/default/Recent.template.php 1 patch
Braces   +74 added lines, -52 removed lines patch added patch discarded remove patch
@@ -43,28 +43,33 @@  discard block
 block discarded – undo
43 43
 					</div>
44 44
 					<div class="list_posts">', $post['message'], '</div>';
45 45
 
46
-		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
47
-			echo '
46
+		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
47
+					echo '
48 48
 					<ul class="quickbuttons">';
49
+		}
49 50
 
50 51
 		// If they *can* reply?
51
-		if ($post['can_reply'])
52
-			echo '
52
+		if ($post['can_reply']) {
53
+					echo '
53 54
 						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>';
55
+		}
54 56
 
55 57
 		// If they *can* quote?
56
-		if ($post['can_quote'])
57
-			echo '
58
+		if ($post['can_quote']) {
59
+					echo '
58 60
 						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>';
61
+		}
59 62
 
60 63
 		// How about... even... remove it entirely?!
61
-		if ($post['can_delete'])
62
-			echo '
64
+		if ($post['can_delete']) {
65
+					echo '
63 66
 						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
67
+		}
64 68
 
65
-		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
66
-			echo '
69
+		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
70
+					echo '
67 71
 					</ul>';
72
+		}
68 73
 
69 74
 		echo '
70 75
 			</div>';
@@ -86,12 +91,13 @@  discard block
 block discarded – undo
86 91
 	echo '
87 92
 	<div id="recent" class="main_content">';
88 93
 
89
-	if ($context['showCheckboxes'])
90
-		echo '
94
+	if ($context['showCheckboxes']) {
95
+			echo '
91 96
 		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
92 97
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
93 98
 			<input type="hidden" name="qaction" value="markread">
94 99
 			<input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
100
+	}
95 101
 
96 102
 	if (!empty($context['topics']))
97 103
 	{
@@ -117,11 +123,12 @@  discard block
 block discarded – undo
117 123
 					</div>';
118 124
 
119 125
 		// Show a "select all" box for quick moderation?
120
-		if ($context['showCheckboxes'])
121
-			echo '
126
+		if ($context['showCheckboxes']) {
127
+					echo '
122 128
 					<div class="moderation">
123 129
 						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">
124 130
 					</div>';
131
+		}
125 132
 
126 133
 		echo '
127 134
 				</div>
@@ -140,15 +147,18 @@  discard block
 block discarded – undo
140 147
 			// Now we handle the icons
141 148
 			echo '
142 149
 							<div class="icons floatright">';
143
-			if ($topic['is_locked'])
144
-				echo '
150
+			if ($topic['is_locked']) {
151
+							echo '
145 152
 								<span class="generic_icons lock"></span>';
146
-			if ($topic['is_sticky'])
147
-				echo '
153
+			}
154
+			if ($topic['is_sticky']) {
155
+							echo '
148 156
 								<span class="generic_icons sticky"></span>';
149
-			if ($topic['is_poll'])
150
-				echo '
157
+			}
158
+			if ($topic['is_poll']) {
159
+							echo '
151 160
 								<span class="generic_icons poll"></span>';
161
+			}
152 162
 			echo '
153 163
 							</div>';
154 164
 
@@ -173,19 +183,21 @@  discard block
 block discarded – undo
173 183
 							', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '
174 184
 						</div>';
175 185
 
176
-			if ($context['showCheckboxes'])
177
-				echo '
186
+			if ($context['showCheckboxes']) {
187
+							echo '
178 188
 						<div class="moderation">
179 189
 							<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">
180 190
 						</div>';
191
+			}
181 192
 
182 193
 				echo '
183 194
 					</div>';
184 195
 		}
185 196
 
186
-		if (empty($context['topics']))
187
-			echo '
197
+		if (empty($context['topics'])) {
198
+					echo '
188 199
 						<div style="display: none;"></div>';
200
+		}
189 201
 
190 202
 		echo '
191 203
 				</div>
@@ -197,25 +209,27 @@  discard block
 block discarded – undo
197 209
 				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
198 210
 				<div class="pagelinks">', $context['page_index'], '</div>
199 211
 			</div>';
200
-	}
201
-	else
202
-		echo '
212
+	} else {
213
+			echo '
203 214
 			<div class="cat_bar">
204 215
 				<h3 class="catbg centertext">
205 216
 					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
206 217
 				</h3>
207 218
 			</div>';
219
+	}
208 220
 
209
-	if ($context['showCheckboxes'])
210
-		echo '
221
+	if ($context['showCheckboxes']) {
222
+			echo '
211 223
 		</form>';
224
+	}
212 225
 
213 226
 	echo '
214 227
 	</div>';
215 228
 
216
-	if (empty($context['no_topic_listing']))
217
-		template_topic_legend();
218
-}
229
+	if (empty($context['no_topic_listing'])) {
230
+			template_topic_legend();
231
+	}
232
+	}
219 233
 
220 234
 /**
221 235
  * Template for showing unread replies (eg new replies to topics you've posted in)
@@ -227,12 +241,13 @@  discard block
 block discarded – undo
227 241
 	echo '
228 242
 	<div id="recent">';
229 243
 
230
-	if ($context['showCheckboxes'])
231
-		echo '
244
+	if ($context['showCheckboxes']) {
245
+			echo '
232 246
 		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
233 247
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
234 248
 			<input type="hidden" name="qaction" value="markread">
235 249
 			<input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
250
+	}
236 251
 
237 252
 	if (!empty($context['topics']))
238 253
 	{
@@ -258,11 +273,12 @@  discard block
 block discarded – undo
258 273
 					</div>';
259 274
 
260 275
 		// Show a "select all" box for quick moderation?
261
-		if ($context['showCheckboxes'])
262
-				echo '
276
+		if ($context['showCheckboxes']) {
277
+						echo '
263 278
 					<div class="moderation">
264 279
 						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">
265 280
 					</div>';
281
+		}
266 282
 
267 283
 		echo '
268 284
 				</div>
@@ -281,15 +297,18 @@  discard block
 block discarded – undo
281 297
 			// Now we handle the icons
282 298
 			echo '
283 299
 								<div class="icons floatright">';
284
-			if ($topic['is_locked'])
285
-				echo '
300
+			if ($topic['is_locked']) {
301
+							echo '
286 302
 									<span class="generic_icons lock"></span>';
287
-			if ($topic['is_sticky'])
288
-				echo '
303
+			}
304
+			if ($topic['is_sticky']) {
305
+							echo '
289 306
 									<span class="generic_icons sticky"></span>';
290
-			if ($topic['is_poll'])
291
-				echo '
307
+			}
308
+			if ($topic['is_poll']) {
309
+							echo '
292 310
 									<span class="generic_icons poll"></span>';
311
+			}
293 312
 			echo '
294 313
 								</div>';
295 314
 
@@ -314,11 +333,12 @@  discard block
 block discarded – undo
314 333
 								', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '
315 334
 							</div>';
316 335
 
317
-			if ($context['showCheckboxes'])
318
-				echo '
336
+			if ($context['showCheckboxes']) {
337
+							echo '
319 338
 							<div class="moderation">
320 339
 								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">
321 340
 							</div>';
341
+			}
322 342
 			echo '
323 343
 						</div>';
324 344
 		}
@@ -331,24 +351,26 @@  discard block
 block discarded – undo
331 351
 				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
332 352
 				<div class="pagelinks">', $context['page_index'], '</div>
333 353
 			</div>';
334
-	}
335
-	else
336
-		echo '
354
+	} else {
355
+			echo '
337 356
 			<div class="cat_bar">
338 357
 				<h3 class="catbg centertext">
339 358
 					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
340 359
 				</h3>
341 360
 			</div>';
361
+	}
342 362
 
343
-	if ($context['showCheckboxes'])
344
-		echo '
363
+	if ($context['showCheckboxes']) {
364
+			echo '
345 365
 		</form>';
366
+	}
346 367
 
347 368
 	echo '
348 369
 	</div>';
349 370
 
350
-	if (empty($context['no_topic_listing']))
351
-		template_topic_legend();
352
-}
371
+	if (empty($context['no_topic_listing'])) {
372
+			template_topic_legend();
373
+	}
374
+	}
353 375
 
354 376
 ?>
355 377
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/Reports.template.php 1 patch
Braces   +32 added lines, -24 removed lines patch added patch discarded remove patch
@@ -29,9 +29,10 @@  discard block
 block discarded – undo
29 29
 	// Go through each type of report they can run.
30 30
 	foreach ($context['report_types'] as $type)
31 31
 	{
32
-		if (isset($type['description']))
33
-			echo '
32
+		if (isset($type['description'])) {
33
+					echo '
34 34
 					<dt>', $type['description'], '</dt>';
35
+		}
35 36
 		echo '
36 37
 					<dd>
37 38
 						<input type="radio" id="rt_', $type['id'], '" name="rt" value="', $type['id'], '"', $type['is_first'] ? ' checked' : '', ' class="input_radio">
@@ -61,8 +62,9 @@  discard block
 block discarded – undo
61 62
 		</div>
62 63
 		<div id="report_buttons">';
63 64
 
64
-	if (!empty($context['report_buttons']))
65
-		template_button_strip($context['report_buttons'], 'right');
65
+	if (!empty($context['report_buttons'])) {
66
+			template_button_strip($context['report_buttons'], 'right');
67
+	}
66 68
 
67 69
 	echo '
68 70
 		</div>';
@@ -73,25 +75,27 @@  discard block
 block discarded – undo
73 75
 		echo '
74 76
 		<table class="table_grid report_results">';
75 77
 
76
-		if (!empty($table['title']))
77
-			echo '
78
+		if (!empty($table['title'])) {
79
+					echo '
78 80
 			<thead>
79 81
 				<tr class="title_bar">
80 82
 					<th scope="col" colspan="', $table['column_count'], '">', $table['title'], '</th>
81 83
 				</tr>
82 84
 			</thead>
83 85
 			<tbody>';
86
+		}
84 87
 
85 88
 		// Now do each row!
86 89
 		$row_number = 0;
87 90
 		foreach ($table['data'] as $row)
88 91
 		{
89
-			if ($row_number == 0 && !empty($table['shading']['top']))
90
-				echo '
92
+			if ($row_number == 0 && !empty($table['shading']['top'])) {
93
+							echo '
91 94
 				<tr class="windowbg table_caption">';
92
-			else
93
-				echo '
95
+			} else {
96
+							echo '
94 97
 				<tr class="', !empty($row[0]['separator']) ? 'title_bar' : 'windowbg', '">';
98
+			}
95 99
 
96 100
 			// Now do each column.
97 101
 			$column_number = 0;
@@ -109,16 +113,17 @@  discard block
 block discarded – undo
109 113
 				}
110 114
 
111 115
 				// Shaded?
112
-				if ($column_number == 0 && !empty($table['shading']['left']))
113
-					echo '
116
+				if ($column_number == 0 && !empty($table['shading']['left'])) {
117
+									echo '
114 118
 					<td class="table_caption ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '>
115 119
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
116 120
 					</td>';
117
-				else
118
-					echo '
121
+				} else {
122
+									echo '
119 123
 					<td class="smalltext centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '>
120 124
 						', $data['v'], '
121 125
 					</td>';
126
+				}
122 127
 
123 128
 				$column_number++;
124 129
 			}
@@ -167,24 +172,26 @@  discard block
 block discarded – undo
167 172
 		<div style="overflow: visible;', $table['max_width'] != 'auto' ? ' width: ' . $table['max_width'] . 'px;' : '', '">
168 173
 			<table class="bordercolor">';
169 174
 
170
-		if (!empty($table['title']))
171
-			echo '
175
+		if (!empty($table['title'])) {
176
+					echo '
172 177
 				<tr class="title_bar">
173 178
 					<td colspan="', $table['column_count'], '">
174 179
 						', $table['title'], '
175 180
 					</td>
176 181
 				</tr>';
182
+		}
177 183
 
178 184
 		// Now do each row!
179 185
 		$row_number = 0;
180 186
 		foreach ($table['data'] as $row)
181 187
 		{
182
-			if ($row_number == 0 && !empty($table['shading']['top']))
183
-				echo '
188
+			if ($row_number == 0 && !empty($table['shading']['top'])) {
189
+							echo '
184 190
 				<tr class="titlebg">';
185
-			else
186
-				echo '
191
+			} else {
192
+							echo '
187 193
 				<tr class="windowbg">';
194
+			}
188 195
 
189 196
 			// Now do each column!!
190 197
 			$column_number = 0;
@@ -201,16 +208,17 @@  discard block
 block discarded – undo
201 208
 				}
202 209
 
203 210
 				// Shaded?
204
-				if ($column_number == 0 && !empty($table['shading']['left']))
205
-					echo '
211
+				if ($column_number == 0 && !empty($table['shading']['left'])) {
212
+									echo '
206 213
 					<td class="titlebg ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '>
207 214
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
208 215
 					</td>';
209
-				else
210
-					echo '
216
+				} else {
217
+									echo '
211 218
 					<td class="centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '>
212 219
 						', $data['v'], '
213 220
 					</td>';
221
+				}
214 222
 
215 223
 				$column_number++;
216 224
 			}
Please login to merge, or discard this patch.
Themes/default/ManagePaid.template.php 1 patch
Braces   +61 added lines, -44 removed lines patch added patch discarded remove patch
@@ -24,11 +24,12 @@  discard block
 block discarded – undo
24 24
 				<h3 class="catbg">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h3>
25 25
 			</div>';
26 26
 
27
-	if (!empty($context['disable_groups']))
28
-		echo '
27
+	if (!empty($context['disable_groups'])) {
28
+			echo '
29 29
 			<div class="information">
30 30
 				<span class="alert">', $txt['paid_mod_edit_note'], '</span>
31 31
 			</div>';
32
+	}
32 33
 
33 34
 	echo '
34 35
 			<div class="windowbg2">
@@ -68,9 +69,10 @@  discard block
 block discarded – undo
68 69
 							<option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>';
69 70
 
70 71
 	// Put each group into the box.
71
-	foreach ($context['groups'] as $id => $name)
72
-		echo '
72
+	foreach ($context['groups'] as $id => $name) {
73
+			echo '
73 74
 							<option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>';
75
+	}
74 76
 
75 77
 	echo '
76 78
 						</select>
@@ -81,9 +83,10 @@  discard block
 block discarded – undo
81 83
 					<dd>';
82 84
 
83 85
 	// Put a checkbox in for each group
84
-	foreach ($context['groups'] as $id => $name)
85
-		echo '
86
+	foreach ($context['groups'] as $id => $name) {
87
+			echo '
86 88
 						<label for="addgroup_', $id, '"><input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', ' class="input_check">&nbsp;<span class="smalltext">', $name, '</span></label><br>';
89
+	}
87 90
 
88 91
 	echo '
89 92
 					</dd>
@@ -135,8 +138,8 @@  discard block
 block discarded – undo
135 138
 					<fieldset>';
136 139
 
137 140
 	//!! Removed until implemented
138
-	if (!empty($sdflsdhglsdjgs))
139
-		echo '
141
+	if (!empty($sdflsdhglsdjgs)) {
142
+			echo '
140 143
 						<dl class="settings">
141 144
 							<dt>
142 145
 								<label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span>
@@ -145,6 +148,7 @@  discard block
 block discarded – undo
145 148
 								<input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', ' class="input_check">
146 149
 							</dd>
147 150
 						</dl>';
151
+	}
148 152
 
149 153
 	echo '
150 154
 						<div class="information">
@@ -245,8 +249,8 @@  discard block
 block discarded – undo
245 249
 				<dl class="settings">';
246 250
 
247 251
 	// Do we need a username?
248
-	if ($context['action_type'] == 'add')
249
-		echo '
252
+	if ($context['action_type'] == 'add') {
253
+			echo '
250 254
 
251 255
 					<dt>
252 256
 						<strong>', $txt['paid_username'], ':</strong><br>
@@ -255,6 +259,7 @@  discard block
 block discarded – undo
255 259
 					<dd>
256 260
 						<input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text">
257 261
 					</dd>';
262
+	}
258 263
 
259 264
 	echo '
260 265
 					<dt>
@@ -272,9 +277,10 @@  discard block
 block discarded – undo
272 277
 					<select name="year" id="year" onchange="generateDays();">';
273 278
 
274 279
 	// Show a list of all the years we allow...
275
-	for ($year = 2005; $year <= 2030; $year++)
276
-		echo '
280
+	for ($year = 2005; $year <= 2030; $year++) {
281
+			echo '
277 282
 						<option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>';
283
+	}
278 284
 
279 285
 	echo '
280 286
 					</select>&nbsp;
@@ -282,9 +288,10 @@  discard block
 block discarded – undo
282 288
 					<select name="month" id="month" onchange="generateDays();">';
283 289
 
284 290
 	// There are 12 months per year - ensure that they all get listed.
285
-	for ($month = 1; $month <= 12; $month++)
286
-		echo '
291
+	for ($month = 1; $month <= 12; $month++) {
292
+			echo '
287 293
 						<option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
294
+	}
288 295
 
289 296
 	echo '
290 297
 					</select>&nbsp;
@@ -292,9 +299,10 @@  discard block
 block discarded – undo
292 299
 					<select name="day" id="day">';
293 300
 
294 301
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
295
-	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++)
296
-		echo '
302
+	for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) {
303
+			echo '
297 304
 						<option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>';
305
+	}
298 306
 
299 307
 	echo '
300 308
 					</select>
@@ -306,9 +314,10 @@  discard block
 block discarded – undo
306 314
 					<select name="yearend" id="yearend" onchange="generateDays(\'end\');">';
307 315
 
308 316
 	// Show a list of all the years we allow...
309
-	for ($year = 2005; $year <= 2030; $year++)
310
-		echo '
317
+	for ($year = 2005; $year <= 2030; $year++) {
318
+			echo '
311 319
 						<option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>';
320
+	}
312 321
 
313 322
 	echo '
314 323
 					</select>&nbsp;
@@ -316,9 +325,10 @@  discard block
 block discarded – undo
316 325
 					<select name="monthend" id="monthend" onchange="generateDays(\'end\');">';
317 326
 
318 327
 	// There are 12 months per year - ensure that they all get listed.
319
-	for ($month = 1; $month <= 12; $month++)
320
-		echo '
328
+	for ($month = 1; $month <= 12; $month++) {
329
+			echo '
321 330
 						<option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
331
+	}
322 332
 
323 333
 	echo '
324 334
 					</select>&nbsp;
@@ -326,9 +336,10 @@  discard block
 block discarded – undo
326 336
 					<select name="dayend" id="dayend">';
327 337
 
328 338
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
329
-	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++)
330
-		echo '
339
+	for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) {
340
+			echo '
331 341
 						<option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>';
342
+	}
332 343
 
333 344
 	echo '
334 345
 					</select>
@@ -410,8 +421,7 @@  discard block
 block discarded – undo
410 421
 			<div class="information">
411 422
 				', $txt['paid_subs_none'], '
412 423
 			</div>';
413
-	}
414
-	else
424
+	} else
415 425
 	{
416 426
 		echo '
417 427
 			<div class="information">
@@ -423,8 +433,9 @@  discard block
 block discarded – undo
423 433
 		{
424 434
 
425 435
 			// Ignore the inactive ones...
426
-			if (empty($subscription['active']))
427
-				continue;
436
+			if (empty($subscription['active'])) {
437
+							continue;
438
+			}
428 439
 
429 440
 			echo '
430 441
 			<div class="cat_bar">
@@ -434,9 +445,10 @@  discard block
 block discarded – undo
434 445
 				<p><strong>', $subscription['name'], '</strong></p>
435 446
 				<p class="smalltext">', $subscription['desc'], '</p>';
436 447
 
437
-			if (!$subscription['flexible'])
438
-				echo '
448
+			if (!$subscription['flexible']) {
449
+							echo '
439 450
 					<div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>';
451
+			}
440 452
 
441 453
 			if ($context['user']['is_owner'])
442 454
 			{
@@ -449,24 +461,25 @@  discard block
 block discarded – undo
449 461
 					<select name="cur[', $subscription['id'], ']">';
450 462
 
451 463
 					// Print out the costs for this one.
452
-					foreach ($subscription['costs'] as $duration => $value)
453
-						echo '
464
+					foreach ($subscription['costs'] as $duration => $value) {
465
+											echo '
454 466
 						<option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>';
467
+					}
455 468
 
456 469
 					echo '
457 470
 					</select>';
458
-				}
459
-				else
460
-					echo '
471
+				} else {
472
+									echo '
461 473
 					', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']);
474
+				}
462 475
 
463 476
 				echo '
464 477
 					<hr>
465 478
 					<input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit">';
466
-			}
467
-			else
468
-				echo '
479
+			} else {
480
+							echo '
469 481
 					<a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>';
482
+			}
470 483
 
471 484
 			echo '
472 485
 			</div>';
@@ -493,19 +506,20 @@  discard block
 block discarded – undo
493 506
 			</thead>
494 507
 			<tbody>';
495 508
 
496
-	if (empty($context['current']))
497
-		echo '
509
+	if (empty($context['current'])) {
510
+			echo '
498 511
 				<tr class="windowbg">
499 512
 					<td colspan="4">
500 513
 						', $txt['paid_none_yet'], '
501 514
 					</td>
502 515
 				</tr>';
516
+	}
503 517
 
504 518
 	foreach ($context['current'] as $sub)
505 519
 	{
506 520
 
507
-		if (!$sub['hide'])
508
-			echo '
521
+		if (!$sub['hide']) {
522
+					echo '
509 523
 				<tr class="windowbg">
510 524
 					<td>
511 525
 						', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), '
@@ -517,6 +531,7 @@  discard block
 block discarded – undo
517 531
 						', $sub['end'], '
518 532
 					</td>
519 533
 				</tr>';
534
+		}
520 535
 	}
521 536
 	echo '
522 537
 			</tbody>
@@ -567,15 +582,17 @@  discard block
 block discarded – undo
567 582
 			', $gateway['desc'], '<br>
568 583
 				<form action="', $gateway['form'], '" method="post">';
569 584
 
570
-		if (!empty($gateway['javascript']))
571
-			echo '
585
+		if (!empty($gateway['javascript'])) {
586
+					echo '
572 587
 					<script>
573 588
 						', $gateway['javascript'], '
574 589
 					</script>';
590
+		}
575 591
 
576
-		foreach ($gateway['hidden'] as $name => $value)
577
-			echo '
592
+		foreach ($gateway['hidden'] as $name => $value) {
593
+					echo '
578 594
 					<input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">';
595
+		}
579 596
 
580 597
 		echo '
581 598
 					<br><input type="submit" value="', $gateway['submit'], '" class="button_submit">
Please login to merge, or discard this patch.
Themes/default/MessageIndex.template.php 1 patch
Braces   +94 added lines, -65 removed lines patch added patch discarded remove patch
@@ -48,17 +48,19 @@  discard block
 block discarded – undo
48 48
 						</a>';
49 49
 
50 50
 			// Has it outstanding posts for approval?
51
-			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
52
-				echo '
51
+			if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
52
+							echo '
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 56
 			echo '
56 57
 						<p class="board_description">', $board['description'] , '</p>';
57 58
 
58 59
 			// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
59
-			if (!empty($board['moderators']) || !empty($board['moderator_groups']))
60
-				echo '
60
+			if (!empty($board['moderators']) || !empty($board['moderator_groups'])) {
61
+							echo '
61 62
 						<p class="moderators">', count($board['link_moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
63
+			}
62 64
 
63 65
 			// Show some basic information about the number of posts, etc.
64 66
 			echo '
@@ -70,9 +72,10 @@  discard block
 block discarded – undo
70 72
 					</div>
71 73
 					<div class="lastpost lpr_border">';
72 74
 
73
-			if (!empty($board['last_post']['id']))
74
-				echo '
75
+			if (!empty($board['last_post']['id'])) {
76
+							echo '
75 77
 						<p>', $board['last_post']['last_post_message'], '</p>';
78
+			}
76 79
 			echo '
77 80
 					</div>';
78 81
 
@@ -85,14 +88,16 @@  discard block
 block discarded – undo
85 88
 						id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
86 89
 				foreach ($board['children'] as $child)
87 90
 				{
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>';
91
+					if (!$child['is_redirect']) {
92
+											$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>';
93
+					} else {
94
+											$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
95
+					}
92 96
 
93 97
 					// Has it posts awaiting approval?
94
-					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
95
-						$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>';
98
+					if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics'])) {
99
+											$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>';
100
+					}
96 101
 
97 102
 					$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
98 103
 				}
@@ -111,8 +116,9 @@  discard block
 block discarded – undo
111 116
 	}
112 117
 
113 118
 	// They can only mark read if they are logged in and it's enabled!
114
-	if (!$context['user']['is_logged'])
115
-		unset($context['normal_buttons']['markread']);
119
+	if (!$context['user']['is_logged']) {
120
+			unset($context['normal_buttons']['markread']);
121
+	}
116 122
 
117 123
 	if (!$context['no_topic_listing'])
118 124
 	{
@@ -135,13 +141,15 @@  discard block
 block discarded – undo
135 141
 	<div id="description_board" class="generic_list_wrapper">
136 142
 		<h3>', $context['name'], '</h3>
137 143
 		<p>';
138
-	if ($context['description'] != '')
139
-	echo '
144
+	if ($context['description'] != '') {
145
+		echo '
140 146
 		', $context['description'], '&nbsp;';
147
+	}
141 148
 
142
-	if (!empty($context['moderators']))
143
-	echo '
149
+	if (!empty($context['moderators'])) {
150
+		echo '
144 151
 		', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.';
152
+	}
145 153
 
146 154
 	echo '
147 155
 		</p>
@@ -149,9 +157,10 @@  discard block
 block discarded – undo
149 157
 		}
150 158
 
151 159
 		// If Quick Moderation is enabled start the form.
152
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
153
-			echo '
160
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) {
161
+					echo '
154 162
 	<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">';
163
+		}
155 164
 
156 165
 		echo '
157 166
 		<div id="messageindex">';
@@ -159,10 +168,11 @@  discard block
 block discarded – undo
159 168
 		{
160 169
 		echo '
161 170
 			<div class="information">';
162
-			if ($settings['display_who_viewing'] == 1)
163
-				echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
164
-		else
165
-				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'] . ')');
171
+			if ($settings['display_who_viewing'] == 1) {
172
+							echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
173
+			} else {
174
+						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'] . ')');
175
+		}
166 176
 			echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'];
167 177
 
168 178
 		echo '
@@ -181,19 +191,22 @@  discard block
 block discarded – undo
181 191
 					<div class="lastpost">', $context['topics_headers']['last_post'], '</div>';
182 192
 
183 193
 			// Show a "select all" box for quick moderation?
184
-			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
185
-				echo '
194
+			if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) {
195
+							echo '
186 196
 					<div class="moderation"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check"></div>';
197
+			}
187 198
 
188 199
 			// If it's on in "image" mode, don't show anything but the column.
189
-			elseif (!empty($context['can_quick_mod']))
190
-				echo '
200
+			elseif (!empty($context['can_quick_mod'])) {
201
+							echo '
191 202
 					<div class="moderation">&nbsp;</div>';
203
+			}
192 204
 		}
193 205
 		// No topics.... just say, "sorry bub".
194
-		else
195
-			echo '
206
+		else {
207
+					echo '
196 208
 					<h3 class="titlebg">', $txt['topic_alert_none'], '</h3>';
209
+		}
197 210
 
198 211
 		echo '
199 212
 		</div>';
@@ -225,21 +238,26 @@  discard block
 block discarded – undo
225 238
 			// Now we handle the icons
226 239
 			echo '
227 240
 							<div class="icons floatright">';
228
-			if ($topic['is_watched'])
229
-				echo '
241
+			if ($topic['is_watched']) {
242
+							echo '
230 243
 								<span class="generic_icons watch" title="', $txt['watching_this_topic'], '"></span>';
231
-			if ($topic['is_locked'])
232
-				echo '
244
+			}
245
+			if ($topic['is_locked']) {
246
+							echo '
233 247
 								<span class="generic_icons lock"></span>';
234
-			if ($topic['is_sticky'])
235
-				echo '
248
+			}
249
+			if ($topic['is_sticky']) {
250
+							echo '
236 251
 								<span class="generic_icons sticky"></span>';
237
-			if ($topic['is_redirect'])
238
-				echo '
252
+			}
253
+			if ($topic['is_redirect']) {
254
+							echo '
239 255
 								<span class="generic_icons move"></span>';
240
-			if ($topic['is_poll'])
241
-				echo '
256
+			}
257
+			if ($topic['is_poll']) {
258
+							echo '
242 259
 								<span class="generic_icons poll"></span>';
260
+			}
243 261
 			echo '
244 262
 							</div>';
245 263
 
@@ -265,26 +283,31 @@  discard block
 block discarded – undo
265 283
 			{
266 284
 				echo '
267 285
 					<div class="moderation">';
268
-				if ($options['display_quick_mod'] == 1)
269
-					echo '
286
+				if ($options['display_quick_mod'] == 1) {
287
+									echo '
270 288
 						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">';
271
-				else
289
+				} else
272 290
 				{
273 291
 					// Check permissions on each and show only the ones they are allowed to use.
274
-					if ($topic['quick_mod']['remove'])
275
-						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>';
292
+					if ($topic['quick_mod']['remove']) {
293
+											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>';
294
+					}
276 295
 
277
-					if ($topic['quick_mod']['lock'])
278
-						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>';
296
+					if ($topic['quick_mod']['lock']) {
297
+											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>';
298
+					}
279 299
 
280
-					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
281
-						echo '<br>';
300
+					if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) {
301
+											echo '<br>';
302
+					}
282 303
 
283
-					if ($topic['quick_mod']['sticky'])
284
-						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>';
304
+					if ($topic['quick_mod']['sticky']) {
305
+											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>';
306
+					}
285 307
 
286
-					if ($topic['quick_mod']['move'])
287
-						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>';
308
+					if ($topic['quick_mod']['move']) {
309
+											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>';
310
+					}
288 311
 				}
289 312
 				echo '
290 313
 					</div>';
@@ -302,18 +325,20 @@  discard block
 block discarded – undo
302 325
 					<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
303 326
 						<option value="">--------</option>';
304 327
 
305
-			foreach ($context['qmod_actions'] as $qmod_action)
306
-				if ($context['can_' . $qmod_action])
328
+			foreach ($context['qmod_actions'] as $qmod_action) {
329
+							if ($context['can_' . $qmod_action])
307 330
 					echo '
308 331
 						<option value="' . $qmod_action . '">' . $txt['quick_mod_'  . $qmod_action] . '</option>';
332
+			}
309 333
 
310 334
 			echo '
311 335
 					</select>';
312 336
 
313 337
 			// Show a list of boards they can move the topic to.
314
-			if ($context['can_move'])
315
-				echo '
338
+			if ($context['can_move']) {
339
+							echo '
316 340
 			<span id="quick_mod_jump_to">&nbsp;</span>';
341
+			}
317 342
 
318 343
 			echo '
319 344
 					<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">
@@ -324,10 +349,11 @@  discard block
 block discarded – undo
324 349
 	</div>';
325 350
 
326 351
 		// Finish off the form - again.
327
-		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
328
-			echo '
352
+		if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) {
353
+					echo '
329 354
 	<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
330 355
 	</form>';
356
+		}
331 357
 
332 358
 	// Mobile action buttons (bottom)
333 359
 	echo '
@@ -346,8 +372,8 @@  discard block
 block discarded – undo
346 372
 	// Show breadcrumbs at the bottom too.
347 373
 	theme_linktree();
348 374
 
349
-	if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move'])
350
-		echo '
375
+	if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) {
376
+			echo '
351 377
 			<script>
352 378
 				if (typeof(window.XMLHttpRequest) != "undefined")
353 379
 					aJumpTo[aJumpTo.length] = new JumpTo({
@@ -366,6 +392,7 @@  discard block
 block discarded – undo
366 392
 						sCustomName: "move_to"
367 393
 					});
368 394
 			</script>';
395
+	}
369 396
 
370 397
 	// Javascript for inline editing.
371 398
 	echo '
@@ -401,8 +428,8 @@  discard block
 block discarded – undo
401 428
 		<div class="information">
402 429
 			<p class="floatright" id="message_index_jump_to">&nbsp;</p>';
403 430
 
404
-	if (empty($context['no_topic_listing']))
405
-		echo '
431
+	if (empty($context['no_topic_listing'])) {
432
+			echo '
406 433
 			<p class="floatleft">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
407 434
 				<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="" class="centericon"> ' . $txt['participation_caption'] . '<br>' : '', '
408 435
 				'. ($modSettings['pollMode'] == '1' ? '<span class="generic_icons poll centericon"></span> ' . $txt['poll'] : '') . '<br>
@@ -412,9 +439,10 @@  discard block
 block discarded – undo
412 439
 				<span class="generic_icons lock centericon"></span> ' . $txt['locked_topic'] . '<br>
413 440
 				<span class="generic_icons sticky centericon"></span> ' . $txt['sticky_topic'] . '<br>
414 441
 			</p>';
442
+	}
415 443
 
416
-	if (!empty($context['jump_to']))
417
-		echo '
444
+	if (!empty($context['jump_to'])) {
445
+			echo '
418 446
 			<script>
419 447
 				if (typeof(window.XMLHttpRequest) != "undefined")
420 448
 					aJumpTo[aJumpTo.length] = new JumpTo({
@@ -430,6 +458,7 @@  discard block
 block discarded – undo
430 458
 						sGoButtonLabel: "', $txt['quick_mod_go'], '"
431 459
 					});
432 460
 			</script>';
461
+	}
433 462
 
434 463
 	echo '
435 464
 			<br class="clear">
Please login to merge, or discard this patch.
Themes/default/Search.template.php 1 patch
Braces   +85 added lines, -60 removed lines patch added patch discarded remove patch
@@ -25,13 +25,15 @@  discard block
 block discarded – undo
25 25
 			</h3>
26 26
 		</div>';
27 27
 
28
-	if (!empty($context['search_errors']))
29
-		echo '
28
+	if (!empty($context['search_errors'])) {
29
+			echo '
30 30
 		<div class="errorbox">', implode('<br>', $context['search_errors']['messages']), '</div>';
31
+	}
31 32
 
32
-	if (!empty($context['search_ignored']))
33
-		echo '
33
+	if (!empty($context['search_ignored'])) {
34
+			echo '
34 35
 		<p class="noticebox">', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>';
36
+	}
35 37
 
36 38
 	echo '
37 39
 		<fieldset id="advanced_search">
@@ -43,9 +45,10 @@  discard block
 block discarded – undo
43 45
 					<dd>
44 46
 						<input type="search" name="search" id="searchfor" ', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text">';
45 47
 
46
-	if (empty($modSettings['search_simple_fulltext']))
47
-		echo '
48
+	if (empty($modSettings['search_simple_fulltext'])) {
49
+			echo '
48 50
 						<em class="smalltext">', $txt['search_example'], '</em>';
51
+	}
49 52
 
50 53
 	echo '
51 54
 					</dd>
@@ -112,11 +115,12 @@  discard block
 block discarded – undo
112 115
 	}
113 116
 
114 117
 	// If $context['search_params']['topic'] is set, that means we're searching just one topic.
115
-	if (!empty($context['search_params']['topic']))
116
-		echo '
118
+	if (!empty($context['search_params']['topic'])) {
119
+			echo '
117 120
 				<p>', $txt['search_specific_topic'], ' &quot;', $context['search_topic']['link'], '&quot;.</p>
118 121
 				<input type="hidden" name="topic" value="', $context['search_topic']['id'], '">
119 122
 				<input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit">';
123
+	}
120 124
 
121 125
 	echo '
122 126
 			</div>
@@ -147,14 +151,15 @@  discard block
 block discarded – undo
147 151
 
148 152
 			foreach ($category['boards'] as $board)
149 153
 			{
150
-				if ($i == $limit)
151
-					echo '
154
+				if ($i == $limit) {
155
+									echo '
152 156
 							</ul>
153 157
 						</li>
154 158
 					</ul>
155 159
 					<ul class="ignoreboards floatright">
156 160
 						<li class="category">
157 161
 							<ul>';
162
+				}
158 163
 
159 164
 				echo '
160 165
 								<li class="board">
@@ -242,13 +247,15 @@  discard block
 block discarded – undo
242 247
 		<div class="roundframe">';
243 248
 
244 249
 		// Did they make any typos or mistakes, perhaps?
245
-		if (isset($context['did_you_mean']))
246
-			echo '
250
+		if (isset($context['did_you_mean'])) {
251
+					echo '
247 252
 			<p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>';
253
+		}
248 254
 
249
-		if (!empty($context['search_ignored']))
250
-			echo '
255
+		if (!empty($context['search_ignored'])) {
256
+					echo '
251 257
 			<p>', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>';
258
+		}
252 259
 
253 260
 		echo '
254 261
 			<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
@@ -270,10 +277,11 @@  discard block
 block discarded – undo
270 277
 					<input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '">
271 278
 					<input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '">
272 279
 				</div>';
273
-		if (!empty($context['search_params']['brd']))
274
-			foreach ($context['search_params']['brd'] as $board_id)
280
+		if (!empty($context['search_params']['brd'])) {
281
+					foreach ($context['search_params']['brd'] as $board_id)
275 282
 				echo '
276 283
 				<input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '">';
284
+		}
277 285
 
278 286
 		echo '
279 287
 			</form>
@@ -284,17 +292,19 @@  discard block
 block discarded – undo
284 292
 	if ($context['compact'])
285 293
 	{
286 294
 		// Quick moderation set to checkboxes? Oh, how fun :/.
287
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
288
-			echo '
295
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
296
+					echo '
289 297
 	<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">';
298
+		}
290 299
 
291 300
 	echo '
292 301
 		<div class="cat_bar">
293 302
 			<h3 class="catbg">
294 303
 				<span class="floatright">';
295
-					if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
296
-					echo '
304
+					if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
305
+										echo '
297 306
 							<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">';
307
+					}
298 308
 				echo '
299 309
 				</span>
300 310
 				<span class="generic_icons filter"></span>&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'
@@ -302,14 +312,15 @@  discard block
 block discarded – undo
302 312
 		</div>';
303 313
 
304 314
 		// was anything even found?
305
-		if (!empty($context['topics']))
306
-		echo'
315
+		if (!empty($context['topics'])) {
316
+				echo'
307 317
 		<div class="pagesection">
308 318
 			<span>', $context['page_index'], '</span>
309 319
 		</div>';
310
-		else
311
-			echo '
320
+		} else {
321
+					echo '
312 322
 			<div class="roundframe">', $txt['find_no_results'], '</div>';
323
+		}
313 324
 
314 325
 		// while we have results to show ...
315 326
 		while ($topic = $context['get_topics']())
@@ -337,38 +348,43 @@  discard block
 block discarded – undo
337 348
 					{
338 349
 						echo '
339 350
 						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">';
340
-					}
341
-					else
351
+					} else
342 352
 					{
343
-						if ($topic['quick_mod']['remove'])
344
-							echo '
353
+						if ($topic['quick_mod']['remove']) {
354
+													echo '
345 355
 						<a href="', $scripturl, '?action=quickmod;board='. $topic['board']['id']. '.0;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>';
356
+						}
346 357
 
347
-						if ($topic['quick_mod']['lock'])
348
-							echo '
358
+						if ($topic['quick_mod']['lock']) {
359
+													echo '
349 360
 						<a href="', $scripturl, '?action=quickmod;board='. $topic['board']['id']. '.0;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>';
361
+						}
350 362
 
351
-						if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
352
-							echo '
363
+						if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) {
364
+													echo '
353 365
 						<br>';
366
+						}
354 367
 
355
-						if ($topic['quick_mod']['sticky'])
356
-							echo '
368
+						if ($topic['quick_mod']['sticky']) {
369
+													echo '
357 370
 						<a href="', $scripturl, '?action=quickmod;board='. $topic['board']['id']. '.0;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>';
371
+						}
358 372
 
359
-						if ($topic['quick_mod']['move'])
360
-							echo '
373
+						if ($topic['quick_mod']['move']) {
374
+													echo '
361 375
 						<a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>';
376
+						}
362 377
 					}
363 378
 
364 379
 					echo '
365 380
 					</div>';
366 381
 				}
367 382
 
368
-				if ($message['body_highlighted'] != '')
369
-					echo '
383
+				if ($message['body_highlighted'] != '') {
384
+									echo '
370 385
 					<br class="clear">
371 386
 					<div class="list_posts double_height">', $message['body_highlighted'], '</div>';
387
+				}
372 388
 			}
373 389
 
374 390
 			echo '
@@ -376,11 +392,12 @@  discard block
 block discarded – undo
376 392
 			</div>';
377 393
 
378 394
 		}
379
-		if (!empty($context['topics']))
380
-		echo '
395
+		if (!empty($context['topics'])) {
396
+				echo '
381 397
 		<div class="pagesection">
382 398
 			<span>', $context['page_index'], '</span>
383 399
 		</div>';
400
+		}
384 401
 
385 402
 		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
386 403
 		{
@@ -390,17 +407,19 @@  discard block
 block discarded – undo
390 407
 					<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
391 408
 						<option value="">--------</option>';
392 409
 
393
-			foreach ($context['qmod_actions'] as $qmod_action)
394
-				if ($context['can_' . $qmod_action])
410
+			foreach ($context['qmod_actions'] as $qmod_action) {
411
+							if ($context['can_' . $qmod_action])
395 412
 					echo '
396 413
 							<option value="' . $qmod_action . '">' . $txt['quick_mod_'  . $qmod_action] . '</option>';
414
+			}
397 415
 
398 416
 			echo '
399 417
 					</select>';
400 418
 
401
-			if ($context['can_move'])
402
-				echo '
419
+			if ($context['can_move']) {
420
+							echo '
403 421
 				<span id="quick_mod_jump_to">&nbsp;</span>';
422
+			}
404 423
 
405 424
 			echo '
406 425
 					<input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '">
@@ -410,13 +429,13 @@  discard block
 block discarded – undo
410 429
 		}
411 430
 
412 431
 
413
-		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
414
-			echo '
432
+		if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) {
433
+					echo '
415 434
 			<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
416 435
 		</form>';
436
+		}
417 437
 
418
-	}
419
-	else
438
+	} else
420 439
 	{
421 440
 		echo '
422 441
 		<div class="cat_bar">
@@ -428,9 +447,10 @@  discard block
 block discarded – undo
428 447
 			<span>', $context['page_index'], '</span>
429 448
 		</div>';
430 449
 
431
-		if (empty($context['topics']))
432
-			echo '
450
+		if (empty($context['topics'])) {
451
+					echo '
433 452
 		<div class="information">(', $txt['search_no_results'], ')</div>';
453
+		}
434 454
 
435 455
 		while ($topic = $context['get_topics']())
436 456
 		{
@@ -445,23 +465,27 @@  discard block
 block discarded – undo
445 465
 					</div>
446 466
 					<div class="list_posts">', $message['body_highlighted'], '</div>';
447 467
 
448
-			if ($topic['can_reply'])
449
-				echo '
468
+			if ($topic['can_reply']) {
469
+							echo '
450 470
 						<ul class="quickbuttons">';
471
+			}
451 472
 
452 473
 				// If they *can* reply?
453
-			if ($topic['can_reply'])
454
-				echo '
474
+			if ($topic['can_reply']) {
475
+							echo '
455 476
 							<li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>';
477
+			}
456 478
 
457 479
 				// If they *can* quote?
458
-			if ($topic['can_quote'])
459
-				echo '
480
+			if ($topic['can_quote']) {
481
+							echo '
460 482
 							<li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'] . ';quote=' . $message['id'] . '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>';
483
+			}
461 484
 
462
-			if ($topic['can_reply'])
463
-				echo '
485
+			if ($topic['can_reply']) {
486
+							echo '
464 487
 						</ul>';
488
+			}
465 489
 			echo '
466 490
 					<br class="clear">
467 491
 				</div>';
@@ -480,8 +504,8 @@  discard block
 block discarded – undo
480 504
 		<div class="smalltext righttext" id="search_jump_to">&nbsp;</div>
481 505
 		<script>';
482 506
 
483
-	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move'])
484
-		echo '
507
+	if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) {
508
+			echo '
485 509
 				if (typeof(window.XMLHttpRequest) != "undefined")
486 510
 					aJumpTo[aJumpTo.length] = new JumpTo({
487 511
 						sContainerId: "quick_mod_jump_to",
@@ -496,6 +520,7 @@  discard block
 block discarded – undo
496 520
 						bDisabled: true,
497 521
 						sCustomName: "move_to"
498 522
 					});';
523
+	}
499 524
 
500 525
 	echo '
501 526
 			if (typeof(window.XMLHttpRequest) != "undefined")
Please login to merge, or discard this patch.
Themes/default/ManageBans.template.php 1 patch
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -26,9 +26,10 @@  discard block
 block discarded – undo
26 26
 				</h3>
27 27
 			</div>';
28 28
 
29
-	if ($context['ban']['is_new'])
30
-		echo '
29
+	if ($context['ban']['is_new']) {
30
+			echo '
31 31
 			<div class="information noup">', $txt['ban_add_notes'], '</div>';
32
+	}
32 33
 
33 34
 	// If there were errors creating the ban, show them.
34 35
 	if (!empty($context['error_messages']))
@@ -38,9 +39,10 @@  discard block
 block discarded – undo
38 39
 				<strong>', $txt['ban_errors_detected'], '</strong>
39 40
 				<ul>';
40 41
 
41
-		foreach ($context['error_messages'] as $error)
42
-			echo '
42
+		foreach ($context['error_messages'] as $error) {
43
+					echo '
43 44
 					<li class="error">', $error, '</li>';
45
+		}
44 46
 
45 47
 		echo '
46 48
 				</ul>
@@ -57,8 +59,8 @@  discard block
 block discarded – undo
57 59
 					<input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60" class="input_text">
58 60
 				</dd>';
59 61
 
60
-	if (isset($context['ban']['reason']))
61
-		echo '
62
+	if (isset($context['ban']['reason'])) {
63
+			echo '
62 64
 				<dt>
63 65
 					<strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br>
64 66
 					<span class="smalltext">', $txt['ban_reason_desc'], '</span>
@@ -66,9 +68,10 @@  discard block
 block discarded – undo
66 68
 				<dd>
67 69
 					<textarea name="reason" id="reason" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['reason'], '</textarea>
68 70
 				</dd>';
71
+	}
69 72
 
70
-	if (isset($context['ban']['notes']))
71
-		echo '
73
+	if (isset($context['ban']['notes'])) {
74
+			echo '
72 75
 				<dt>
73 76
 					<strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br>
74 77
 					<span class="smalltext">', $txt['ban_notes_desc'], '</span>
@@ -76,6 +79,7 @@  discard block
 block discarded – undo
76 79
 				<dd>
77 80
 					<textarea name="notes" id="ban_notes" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['notes'], '</textarea>
78 81
 				</dd>';
82
+	}
79 83
 
80 84
 	echo '
81 85
 				</dl>
@@ -115,8 +119,8 @@  discard block
 block discarded – undo
115 119
 							<input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text">
116 120
 						</dd>';
117 121
 
118
-		if (empty($modSettings['disableHostnameLookup']))
119
-			echo '
122
+		if (empty($modSettings['disableHostnameLookup'])) {
123
+					echo '
120 124
 						<dt>
121 125
 							<input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '>
122 126
 							<label for="hostname_check">', $txt['ban_on_hostname'], '</label>
@@ -124,6 +128,7 @@  discard block
 block discarded – undo
124 128
 						<dd>
125 129
 							<input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text">
126 130
 						</dd>';
131
+		}
127 132
 
128 133
 		echo '
129 134
 						<dt>
@@ -153,14 +158,15 @@  discard block
 block discarded – undo
153 158
 					<dl class="settings">';
154 159
 
155 160
 					$count = 0;
156
-					foreach ($ban_ips as $ip)
157
-						echo '
161
+					foreach ($ban_ips as $ip) {
162
+											echo '
158 163
 						<dt>
159 164
 							<input type="checkbox" id="suggestions_', $key ,'_', $count, '" name="ban_suggestions[', $key ,'][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '" class="input_check">
160 165
 						</dt>
161 166
 						<dd>
162 167
 							<label for="suggestions_', $key ,'_', $count++, '">', $ip, '</label>
163 168
 						</dd>';
169
+					}
164 170
 
165 171
 					echo '
166 172
 					</dl>';
@@ -202,8 +208,8 @@  discard block
 block discarded – undo
202 208
 		addLoadEvent(fUpdateStatus);';
203 209
 
204 210
 	// Auto suggest only needed for adding new bans, not editing
205
-	if ($context['ban']['is_new'] && empty($_REQUEST['u']))
206
-		echo '
211
+	if ($context['ban']['is_new'] && empty($_REQUEST['u'])) {
212
+			echo '
207 213
 			var oAddMemberSuggest = new smc_AutoSuggest({
208 214
 			sSelf: \'oAddMemberSuggest\',
209 215
 			sSessionId: smf_session_id,
@@ -221,6 +227,7 @@  discard block
 block discarded – undo
221 227
 			return true;
222 228
 		}
223 229
 		oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');';
230
+	}
224 231
 
225 232
 	echo '
226 233
 		function confirmBan(aForm)
@@ -268,8 +275,8 @@  discard block
 block discarded – undo
268 275
 							<input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text">
269 276
 						</dd>';
270 277
 
271
-				if (empty($modSettings['disableHostnameLookup']))
272
-					echo '
278
+				if (empty($modSettings['disableHostnameLookup'])) {
279
+									echo '
273 280
 							<dt>
274 281
 								<input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '>
275 282
 								<label for="hostname_check">', $txt['ban_on_hostname'], '</label>
@@ -277,6 +284,7 @@  discard block
 block discarded – undo
277 284
 							<dd>
278 285
 								<input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text">
279 286
 							</dd>';
287
+				}
280 288
 
281 289
 				echo '
282 290
 						<dt>
Please login to merge, or discard this patch.
Themes/default/ManageSmileys.template.php 1 patch
Braces   +55 added lines, -41 removed lines patch added patch discarded remove patch
@@ -65,18 +65,19 @@  discard block
 block discarded – undo
65 65
 					</dt>
66 66
 					<dd>
67 67
 						', $modSettings['smileys_url'], '/';
68
-		if ($context['current_set']['id'] == 'default')
69
-			echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">';
70
-		elseif (empty($context['smiley_set_dirs']))
71
-			echo '
68
+		if ($context['current_set']['id'] == 'default') {
69
+					echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">';
70
+		} elseif (empty($context['smiley_set_dirs'])) {
71
+					echo '
72 72
 						<input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text"> ';
73
-		else
73
+		} else
74 74
 		{
75 75
 			echo '
76 76
 						<select name="smiley_sets_path" id="smiley_sets_path">';
77
-			foreach ($context['smiley_set_dirs'] as $smiley_set_dir)
78
-				echo '
77
+			foreach ($context['smiley_set_dirs'] as $smiley_set_dir) {
78
+							echo '
79 79
 							<option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>';
80
+			}
80 81
 			echo '
81 82
 						</select> ';
82 83
 		}
@@ -91,14 +92,15 @@  discard block
 block discarded – undo
91 92
 					</dd>';
92 93
 
93 94
 		// If this is a new smiley set they have the option to import smileys already in the directory.
94
-		if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable']))
95
-			echo '
95
+		if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) {
96
+					echo '
96 97
 					<dt>
97 98
 						<strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong>
98 99
 					</dt>
99 100
 					<dd>
100 101
 						<input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" class="input_check">
101 102
 					</dd>';
103
+		}
102 104
 
103 105
 		echo '
104 106
 				</dl>
@@ -132,9 +134,10 @@  discard block
 block discarded – undo
132 134
 					<dd>
133 135
 						<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">';
134 136
 
135
-		foreach ($context['smiley_sets'] as $smiley_set)
136
-			echo '
137
+		foreach ($context['smiley_sets'] as $smiley_set) {
138
+					echo '
137 139
 						<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
140
+		}
138 141
 
139 142
 		echo '
140 143
 						</select>)
@@ -149,16 +152,17 @@  discard block
 block discarded – undo
149 152
 						<strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong>
150 153
 					</dt>
151 154
 					<dd>';
152
-			if (empty($context['filenames']))
153
-				echo '
155
+			if (empty($context['filenames'])) {
156
+							echo '
154 157
 						<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" class="input_text">';
155
-			else
158
+			} else
156 159
 			{
157 160
 				echo '
158 161
 						<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">';
159
-				foreach ($context['filenames'] as $filename)
160
-					echo '
162
+				foreach ($context['filenames'] as $filename) {
163
+									echo '
161 164
 							<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
165
+				}
162 166
 				echo '
163 167
 						</select>';
164 168
 			}
@@ -227,9 +231,10 @@  discard block
 block discarded – undo
227 231
 						<dd>
228 232
 							', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">';
229 233
 
230
-		foreach ($context['smiley_sets'] as $smiley_set)
231
-			echo '
234
+		foreach ($context['smiley_sets'] as $smiley_set) {
235
+					echo '
232 236
 							<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>';
237
+		}
233 238
 
234 239
 		echo '
235 240
 							</select>
@@ -238,16 +243,17 @@  discard block
 block discarded – undo
238 243
 							<strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong>
239 244
 						</dt>
240 245
 						<dd>';
241
-	if (empty($context['filenames']))
242
-		echo '
246
+	if (empty($context['filenames'])) {
247
+			echo '
243 248
 							<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text">';
244
-	else
249
+	} else
245 250
 	{
246 251
 		echo '
247 252
 								<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">';
248
-		foreach ($context['filenames'] as $filename)
249
-			echo '
253
+		foreach ($context['filenames'] as $filename) {
254
+					echo '
250 255
 								<option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>';
256
+		}
251 257
 		echo '
252 258
 							</select>';
253 259
 	}
@@ -275,14 +281,15 @@  discard block
 block discarded – undo
275 281
 				</fieldset>
276 282
 
277 283
 				<dl id="uploadMore" style="display: none;" class="settings">';
278
-	foreach ($context['smiley_sets'] as $smiley_set)
279
-		echo '
284
+	foreach ($context['smiley_sets'] as $smiley_set) {
285
+			echo '
280 286
 					<dt>
281 287
 						', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ':
282 288
 					</dt>
283 289
 					<dd>
284 290
 						<input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file">
285 291
 					</dd>';
292
+	}
286 293
 	echo '
287 294
 				</dl>
288 295
 			</div>
@@ -351,24 +358,27 @@  discard block
 block discarded – undo
351 358
 				<strong>', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...</strong><br>';
352 359
 		foreach ($location['rows'] as $row)
353 360
 		{
354
-			if (!empty($context['move_smiley']))
355
-				echo '
361
+			if (!empty($context['move_smiley'])) {
362
+							echo '
356 363
 					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
364
+			}
357 365
 
358 366
 			foreach ($row as $smiley)
359 367
 			{
360
-				if (empty($context['move_smiley']))
361
-					echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>';
362
-				else
363
-					echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
368
+				if (empty($context['move_smiley'])) {
369
+									echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>';
370
+				} else {
371
+									echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
372
+				}
364 373
 			}
365 374
 
366 375
 			echo '
367 376
 				<br>';
368 377
 		}
369
-		if (!empty($context['move_smiley']))
370
-			echo '
378
+		if (!empty($context['move_smiley'])) {
379
+					echo '
371 380
 				<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>';
381
+		}
372 382
 		echo '
373 383
 			</div>
374 384
 		<input type="hidden" name="reorder" value="1">
@@ -404,14 +414,15 @@  discard block
 block discarded – undo
404 414
 			</div>
405 415
 			<div class="windowbg2">
406 416
 				<dl class="settings">';
407
-	if (!$context['new_icon'])
408
-		echo '
417
+	if (!$context['new_icon']) {
418
+			echo '
409 419
 					<dt>
410 420
 						<strong>', $txt['smiley_preview'], ': </strong>
411 421
 					</dt>
412 422
 					<dd>
413 423
 						<img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '">
414 424
 					</dd>';
425
+	}
415 426
 	echo '
416 427
 					<dt>
417 428
 						<strong><label for="icon_filename">', $txt['smileys_filename'], '</label>: </strong><br><span class="smalltext">', $txt['icons_filename_all_png'], '</span>
@@ -436,9 +447,10 @@  discard block
 block discarded – undo
436 447
 	{
437 448
 		echo '
438 449
 							<optgroup label="', $category['name'], '">';
439
-		foreach ($category['boards'] as $board)
440
-			echo '
450
+		foreach ($category['boards'] as $board) {
451
+					echo '
441 452
 								<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
453
+		}
442 454
 		echo '
443 455
 							</optgroup>';
444 456
 	}
@@ -453,19 +465,21 @@  discard block
 block discarded – undo
453 465
 							<option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>';
454 466
 
455 467
 	// Print the list of all the icons it can be put after...
456
-	foreach ($context['icons'] as $id => $data)
457
-		if (empty($context['icon']['id']) || $id != $context['icon']['id'])
468
+	foreach ($context['icons'] as $id => $data) {
469
+			if (empty($context['icon']['id']) || $id != $context['icon']['id'])
458 470
 			echo '
459 471
 							<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
472
+	}
460 473
 
461 474
 	echo '
462 475
 						</select>
463 476
 					</dd>
464 477
 				</dl>';
465 478
 
466
-	if (!$context['new_icon'])
467
-		echo '
479
+	if (!$context['new_icon']) {
480
+			echo '
468 481
 				<input type="hidden" name="icon" value="', $context['icon']['id'], '">';
482
+	}
469 483
 
470 484
 	echo '
471 485
 				<input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button_submit">
Please login to merge, or discard this patch.
Themes/default/Memberlist.template.php 1 patch
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,9 +26,10 @@  discard block
 block discarded – undo
26 26
 		<div class="cat_bar">
27 27
 			<h3 class="catbg">
28 28
 				<span class="floatleft">', $txt['members_list'], '</span>';
29
-		if (!isset($context['old_search']))
30
-				echo '
29
+		if (!isset($context['old_search'])) {
30
+						echo '
31 31
 				<span class="floatright">', $context['letter_links'], '</span>';
32
+		}
32 33
 		echo '
33 34
 			</h3>
34 35
 		</div>';
@@ -43,19 +44,22 @@  discard block
 block discarded – undo
43 44
 	foreach ($context['columns'] as $key => $column)
44 45
 	{
45 46
 		// @TODO maybe find something nicer?
46
-		if ($key == 'email_address' && !$context['can_send_email'])
47
-			continue;
47
+		if ($key == 'email_address' && !$context['can_send_email']) {
48
+					continue;
49
+		}
48 50
 
49 51
 		// This is a selected column, so underline it or some such.
50
-		if ($column['selected'])
51
-			echo '
52
+		if ($column['selected']) {
53
+					echo '
52 54
 					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', ' selected" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '>
53 55
 						<a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . '</a><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></th>';
56
+		}
54 57
 		// This is just some column... show the link and be done with it.
55
-		else
56
-			echo '
58
+		else {
59
+					echo '
57 60
 					<th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
58 61
 						', $column['link'], '</th>';
62
+		}
59 63
 	}
60 64
 	echo '
61 65
 				</tr>
@@ -74,9 +78,10 @@  discard block
 block discarded – undo
74 78
 					</td>
75 79
 					<td class="lefttext">', $member['link'], '</td>';
76 80
 
77
-		if (!isset($context['disabled_fields']['website']))
78
-			echo '
81
+		if (!isset($context['disabled_fields']['website'])) {
82
+					echo '
79 83
 					<td class="centertext website_url">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><span class="generic_icons www" title="' . $member['website']['title'] . '"></span></a>' : '', '</td>';
84
+		}
80 85
 
81 86
 		// Group and date.
82 87
 		echo '
@@ -89,11 +94,12 @@  discard block
 block discarded – undo
89 94
 					<td class="centertext" style="white-space: nowrap; width: 15px">', $member['posts'], '</td>
90 95
 					<td class="centertext statsbar" style="width: 120px">';
91 96
 
92
-			if (!empty($member['post_percent']))
93
-				echo '
97
+			if (!empty($member['post_percent'])) {
98
+							echo '
94 99
 						<div class="bar" style="width: ', $member['post_percent'] + 4, 'px;">
95 100
 							<div style="width: ', $member['post_percent'], 'px;"></div>
96 101
 						</div>';
102
+			}
97 103
 
98 104
 			echo '
99 105
 					</td>';
@@ -102,9 +108,10 @@  discard block
 block discarded – undo
102 108
 		// Show custom fields marked to be shown here
103 109
 		if (!empty($context['custom_profile_fields']['columns']))
104 110
 		{
105
-			foreach ($context['custom_profile_fields']['columns'] as $key => $column)
106
-				echo '
111
+			foreach ($context['custom_profile_fields']['columns'] as $key => $column) {
112
+							echo '
107 113
 					<td class="righttext">', $member['options'][$key], '</td>';
114
+			}
108 115
 		}
109 116
 
110 117
 		echo '
@@ -112,11 +119,12 @@  discard block
 block discarded – undo
112 119
 		}
113 120
 	}
114 121
 	// No members?
115
-	else
116
-		echo '
122
+	else {
123
+			echo '
117 124
 				<tr>
118 125
 					<td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td>
119 126
 				</tr>';
127
+	}
120 128
 
121 129
 				echo '
122 130
 			</tbody>
@@ -129,9 +137,10 @@  discard block
 block discarded – undo
129 137
 			<div class="pagelinks floatleft">', $context['page_index'], '</div>';
130 138
 
131 139
 	// If it is displaying the result of a search show a "search again" link to edit their criteria.
132
-	if (isset($context['old_search']))
133
-		echo '
140
+	if (isset($context['old_search'])) {
141
+			echo '
134 142
 			<a class="button_link" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>';
143
+	}
135 144
 	echo '
136 145
 		</div>
137 146
 	</div>';
Please login to merge, or discard this patch.