Completed
Pull Request — release-2.1 (#3931)
by Fran
07:05
created
Themes/default/Errors.template.php 1 patch
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.
Themes/default/PersonalMessage.template.php 2 patches
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.
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,25 +421,29 @@  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>
419 445
 					<br><span class="smalltext">&#171; ', $context['folder'] == 'sent' ? $txt['pm_sent_is_replied_to'] : $txt['pm_is_replied_to'], ' &#187;</span>';
446
+			}
420 447
 
421 448
 			echo '
422 449
 				</div>
@@ -424,13 +451,15 @@  discard block
 block discarded – undo
424 451
 			<div class="post">
425 452
 				<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>';
426 453
 
427
-			if ($message['can_report'] || $context['can_send_pm'])
428
-			echo '
454
+			if ($message['can_report'] || $context['can_send_pm']) {
455
+						echo '
429 456
 				<div class="under_message">';
457
+			}
430 458
 
431
-				if ($message['can_report'])
432
-				echo '
459
+				if ($message['can_report']) {
460
+								echo '
433 461
 					<a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '" class="floatright">' . $txt['pm_report_to_admin'] . '</a>';
462
+				}
434 463
 
435 464
 				echo '
436 465
 					<ul class="quickbuttons">';
@@ -442,32 +471,36 @@  discard block
 block discarded – undo
442 471
 					if (!$message['member']['is_guest'])
443 472
 					{
444 473
 						// Is there than more than one recipient you can reply to?
445
-						if ($message['number_recipients'] > 1)
446
-							echo '
474
+						if ($message['number_recipients'] > 1) {
475
+													echo '
447 476
 						<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>';
477
+						}
448 478
 
449 479
 						echo '
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'], ';u=', $message['member']['id'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>
451 481
 						<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>';
452 482
 					}
453 483
 					// This is for "forwarding" - even if the member is gone.
454
-					else
455
-						echo '
484
+					else {
485
+											echo '
456 486
 						<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>';
487
+					}
457 488
 				}
458 489
 				echo '
459 490
 						<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>';
460 491
 
461
-				if (empty($context['display_mode']))
462
-					echo '
492
+				if (empty($context['display_mode'])) {
493
+									echo '
463 494
 						<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>';
495
+				}
464 496
 
465 497
 				echo '
466 498
 					</ul>';
467 499
 
468
-			if ($message['can_report'] || $context['can_send_pm'])
469
-			echo '
500
+			if ($message['can_report'] || $context['can_send_pm']) {
501
+						echo '
470 502
 				</div>';
503
+			}
471 504
 
472 505
 			// Are there any custom profile fields for above the signature?
473 506
 			if (!empty($message['custom_fields']['above_signature']))
@@ -476,9 +509,10 @@  discard block
 block discarded – undo
476 509
 					<div class="custom_fields_above_signature">
477 510
 						<ul class="nolist">';
478 511
 
479
-				foreach ($message['custom_fields']['above_signature'] as $custom)
480
-					echo '
512
+				foreach ($message['custom_fields']['above_signature'] as $custom) {
513
+									echo '
481 514
 							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
515
+				}
482 516
 
483 517
 				echo '
484 518
 						</ul>
@@ -486,9 +520,10 @@  discard block
 block discarded – undo
486 520
 			}
487 521
 
488 522
 			// Show the member's signature?
489
-			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
490
-				echo '
523
+			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) {
524
+							echo '
491 525
 				<div class="signature">', $message['member']['signature'], '</div>';
526
+			}
492 527
 
493 528
 			// Are there any custom profile fields for below the signature?
494 529
 			if (!empty($message['custom_fields']['below_signature']))
@@ -497,9 +532,10 @@  discard block
 block discarded – undo
497 532
 					<div class="custom_fields_below_signature">
498 533
 						<ul class="nolist">';
499 534
 
500
-				foreach ($message['custom_fields']['below_signature'] as $custom)
501
-					echo '
535
+				foreach ($message['custom_fields']['below_signature'] as $custom) {
536
+									echo '
502 537
 							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
538
+				}
503 539
 
504 540
 				echo '
505 541
 						</ul>
@@ -524,19 +560,21 @@  discard block
 block discarded – undo
524 560
 					{
525 561
 						echo '
526 562
 						<option value="" disabled>', $txt['pm_msg_label_apply'], ':</option>';
527
-						foreach ($context['labels'] as $label)
528
-							if (!isset($message['labels'][$label['id']]))
563
+						foreach ($context['labels'] as $label) {
564
+													if (!isset($message['labels'][$label['id']]))
529 565
 								echo '
530 566
 							<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
567
+						}
531 568
 					}
532 569
 					// ... and are there any that can be removed?
533 570
 					if (!empty($message['labels']) && (count($message['labels']) > 1 || !isset($message['labels'][-1])))
534 571
 					{
535 572
 						echo '
536 573
 						<option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>';
537
-						foreach ($message['labels'] as $label)
538
-							echo '
574
+						foreach ($message['labels'] as $label) {
575
+													echo '
539 576
 							<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
577
+						}
540 578
 					}
541 579
 					echo '
542 580
 					</select>
@@ -556,13 +594,14 @@  discard block
 block discarded – undo
556 594
 	</div>';
557 595
 		}
558 596
 
559
-		if (empty($context['display_mode']))
560
-			echo '
597
+		if (empty($context['display_mode'])) {
598
+					echo '
561 599
 
562 600
 	<div class="pagesection">
563 601
 		<div class="floatleft">', $context['page_index'], '</div>
564 602
 		<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>
565 603
 	</div>';
604
+		}
566 605
 
567 606
 		// Show a few buttons if we are in conversation mode and outputting the first message.
568 607
 		elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons']))
@@ -622,11 +661,12 @@  discard block
 block discarded – undo
622 661
 		</tr>
623 662
 	</thead>
624 663
 	<tbody>';
625
-	if (!$context['show_delete'])
626
-		echo '
664
+	if (!$context['show_delete']) {
665
+			echo '
627 666
 		<tr class="windowbg">
628 667
 			<td colspan="5">', $txt['pm_alert_none'], '</td>
629 668
 		</tr>';
669
+	}
630 670
 
631 671
 	while ($message = $context['get_pmessage']('subject'))
632 672
 	{
@@ -679,9 +719,10 @@  discard block
 block discarded – undo
679 719
 
680 720
 			foreach ($context['labels'] as $label)
681 721
 			{
682
-				if ($label['id'] != $context['current_label_id'])
683
-					echo '
722
+				if ($label['id'] != $context['current_label_id']) {
723
+									echo '
684 724
 					<option value="add_', $label['id'], '">&nbsp;', $label['name'], '</option>';
725
+				}
685 726
 			}
686 727
 
687 728
 			echo '
@@ -766,9 +807,10 @@  discard block
 block discarded – undo
766 807
 					<dt class="between">', $txt['pm_search_post_age'], ':</dt>
767 808
 					<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>
768 809
 				</dl>';
769
-	if (!$context['currently_using_labels'])
770
-		echo '
810
+	if (!$context['currently_using_labels']) {
811
+			echo '
771 812
 				<input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit">';
813
+	}
772 814
 		echo '
773 815
 				<br class="clear_right">
774 816
 			</div>
@@ -788,12 +830,13 @@  discard block
 block discarded – undo
788 830
 				<div id="advanced_panel_div">
789 831
 					<ul id="searchLabelsExpand">';
790 832
 
791
-		foreach ($context['search_labels'] as $label)
792
-			echo '
833
+		foreach ($context['search_labels'] as $label) {
834
+					echo '
793 835
 						<li>
794 836
 							<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">
795 837
 							', $label['name'], '</label>
796 838
 						</li>';
839
+		}
797 840
 
798 841
 		echo '
799 842
 					</ul>
@@ -853,8 +896,8 @@  discard block
 block discarded – undo
853 896
 		</div>';
854 897
 
855 898
 	// complete results ?
856
-	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages']))
857
-		echo '
899
+	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) {
900
+			echo '
858 901
 	<table class="table_grid">
859 902
 	<thead>
860 903
 		<tr class="title_bar">
@@ -864,6 +907,7 @@  discard block
 block discarded – undo
864 907
 		</tr>
865 908
 	</thead>
866 909
 	<tbody>';
910
+	}
867 911
 
868 912
 	// Print each message out...
869 913
 	foreach ($context['personal_messages'] as $message)
@@ -883,11 +927,13 @@  discard block
 block discarded – undo
883 927
 
884 928
 				// Show the recipients.
885 929
 				// @todo This doesn't deal with the sent item searching quite right for bcc.
886
-				if (!empty($message['recipients']['to']))
887
-					echo implode(', ', $message['recipients']['to']);
930
+				if (!empty($message['recipients']['to'])) {
931
+									echo implode(', ', $message['recipients']['to']);
932
+				}
888 933
 				// Otherwise, we're just going to say "some people"...
889
-				elseif ($context['folder'] != 'sent')
890
-					echo '(', $txt['pm_undisclosed_recipients'], ')';
934
+				elseif ($context['folder'] != 'sent') {
935
+									echo '(', $txt['pm_undisclosed_recipients'], ')';
936
+				}
891 937
 
892 938
 					echo '
893 939
 				</h3>
@@ -901,14 +947,16 @@  discard block
 block discarded – undo
901 947
 					$quote_button = create_button('quote.png', 'reply_quote', 'reply_quote', 'class="centericon"');
902 948
 					$reply_button = create_button('im_reply.png', 'reply', 'reply', 'class="centericon"');
903 949
 					// You can only reply if they are not a guest...
904
-					if (!$message['member']['is_guest'])
905
-						echo '
950
+					if (!$message['member']['is_guest']) {
951
+											echo '
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'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], '
907 953
 							<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'];
954
+					}
908 955
 					// This is for "forwarding" - even if the member is gone.
909
-					else
910
-						echo '
956
+					else {
957
+											echo '
911 958
 							<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'];
959
+					}
912 960
 				}
913 961
 
914 962
 				echo '
@@ -929,17 +977,19 @@  discard block
 block discarded – undo
929 977
 	}
930 978
 
931 979
 	// Finish off the page...
932
-	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages']))
933
-		echo '
980
+	if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) {
981
+			echo '
934 982
 		</tbody>
935 983
 		</table>';
984
+	}
936 985
 
937 986
 	// No results?
938
-	if (empty($context['personal_messages']))
939
-		echo '
987
+	if (empty($context['personal_messages'])) {
988
+			echo '
940 989
 		<div class="windowbg">
941 990
 			<p class="centertext">', $txt['pm_search_none_found'], '</p>
942 991
 		</div>';
992
+	}
943 993
 
944 994
 	echo '
945 995
 		<div class="pagesection">
@@ -963,12 +1013,14 @@  discard block
 block discarded – undo
963 1013
 				<h3 class="catbg">', $txt['pm_send_report'], '</h3>
964 1014
 			</div>
965 1015
 			<div class="windowbg">';
966
-				if (!empty($context['send_log']['sent']))
967
-					foreach ($context['send_log']['sent'] as $log_entry)
1016
+				if (!empty($context['send_log']['sent'])) {
1017
+									foreach ($context['send_log']['sent'] as $log_entry)
968 1018
 						echo '<span class="error">', $log_entry, '</span><br>';
969
-				if (!empty($context['send_log']['failed']))
970
-					foreach ($context['send_log']['failed'] as $log_entry)
1019
+				}
1020
+				if (!empty($context['send_log']['failed'])) {
1021
+									foreach ($context['send_log']['failed'] as $log_entry)
971 1022
 						echo '<span class="error">', $log_entry, '</span><br>';
1023
+				}
972 1024
 				echo '
973 1025
 			</div>
974 1026
 			<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 '
@@ -1125,10 +1179,11 @@  discard block
 block discarded – undo
1125 1179
 					<dt><strong>', $txt['subject'], '</strong></dt>
1126 1180
 					<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
1127 1181
 
1128
-		foreach ($context['drafts'] as $draft)
1129
-			echo '
1182
+		foreach ($context['drafts'] as $draft) {
1183
+					echo '
1130 1184
 					<dt>', $draft['link'], '</dt>
1131 1185
 					<dd>', $draft['poster_time'], '</dd>';
1186
+		}
1132 1187
 		echo '
1133 1188
 				</dl>
1134 1189
 			</div>';
@@ -1234,8 +1289,8 @@  discard block
 block discarded – undo
1234 1289
 			}';
1235 1290
 
1236 1291
 	// Code for showing and hiding drafts
1237
-	if (!empty($context['drafts']))
1238
-		echo '
1292
+	if (!empty($context['drafts'])) {
1293
+			echo '
1239 1294
 			var oSwapDraftOptions = new smc_Toggle({
1240 1295
 				bToggleEnabled: true,
1241 1296
 				bCurrentlyCollapsed: true,
@@ -1257,13 +1312,14 @@  discard block
 block discarded – undo
1257 1312
 					}
1258 1313
 				]
1259 1314
 			});';
1315
+	}
1260 1316
 
1261 1317
 	echo '
1262 1318
 		</script>';
1263 1319
 
1264 1320
 	// Show the message you're replying to.
1265
-	if ($context['reply'])
1266
-		echo '
1321
+	if ($context['reply']) {
1322
+			echo '
1267 1323
 	<br>
1268 1324
 	<br>
1269 1325
 	<div class="cat_bar">
@@ -1277,6 +1333,7 @@  discard block
 block discarded – undo
1277 1333
 		<hr>
1278 1334
 		', $context['quoted_message']['body'], '
1279 1335
 	</div><br class="clear">';
1336
+	}
1280 1337
 
1281 1338
 	echo '
1282 1339
 		<script>
@@ -1287,22 +1344,24 @@  discard block
 block discarded – undo
1287 1344
 				sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
1288 1345
 				sToControlId: \'to_control\',
1289 1346
 				aToRecipients: [';
1290
-	foreach ($context['recipients']['to'] as $i => $member)
1291
-		echo '
1347
+	foreach ($context['recipients']['to'] as $i => $member) {
1348
+			echo '
1292 1349
 					{
1293 1350
 						sItemId: ', JavaScriptEscape($member['id']), ',
1294 1351
 						sItemName: ', JavaScriptEscape($member['name']), '
1295 1352
 					}', $i == count($context['recipients']['to']) - 1 ? '' : ',';
1353
+	}
1296 1354
 
1297 1355
 	echo '
1298 1356
 				],
1299 1357
 				aBccRecipients: [';
1300
-	foreach ($context['recipients']['bcc'] as $i => $member)
1301
-		echo '
1358
+	foreach ($context['recipients']['bcc'] as $i => $member) {
1359
+			echo '
1302 1360
 					{
1303 1361
 						sItemId: ', JavaScriptEscape($member['id']), ',
1304 1362
 						sItemName: ', JavaScriptEscape($member['name']), '
1305 1363
 					}', $i == count($context['recipients']['bcc']) - 1 ? '' : ',';
1364
+	}
1306 1365
 
1307 1366
 	echo '
1308 1367
 				],
@@ -1389,26 +1448,28 @@  discard block
 block discarded – undo
1389 1448
 				</th>
1390 1449
 				<th class="centertext table_icon">';
1391 1450
 
1392
-	if (count($context['labels']) > 2)
1393
-		echo '
1451
+	if (count($context['labels']) > 2) {
1452
+			echo '
1394 1453
 					<input type="checkbox" class="input_check" onclick="invertAll(this, this.form);">';
1454
+	}
1395 1455
 
1396 1456
 	echo '
1397 1457
 				</th>
1398 1458
 			</tr>
1399 1459
 		</thead>
1400 1460
 		<tbody>';
1401
-	if (count($context['labels']) < 2)
1402
-		echo '
1461
+	if (count($context['labels']) < 2) {
1462
+			echo '
1403 1463
 			<tr class="windowbg">
1404 1464
 				<td colspan="2">', $txt['pm_labels_no_exist'], '</td>
1405 1465
 			</tr>';
1406
-	else
1466
+	} else
1407 1467
 	{
1408 1468
 		foreach ($context['labels'] as $label)
1409 1469
 		{
1410
-			if ($label['id'] == -1)
1411
-				continue;
1470
+			if ($label['id'] == -1) {
1471
+							continue;
1472
+			}
1412 1473
 
1413 1474
 				echo '
1414 1475
 			<tr class="windowbg">
@@ -1423,12 +1484,13 @@  discard block
 block discarded – undo
1423 1484
 		</tbody>
1424 1485
 		</table>';
1425 1486
 
1426
-	if (!count($context['labels']) < 2)
1427
-		echo '
1487
+	if (!count($context['labels']) < 2) {
1488
+			echo '
1428 1489
 		<div class="padding">
1429 1490
 			<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">
1430 1491
 			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure">
1431 1492
 		</div>';
1493
+	}
1432 1494
 
1433 1495
 	echo '
1434 1496
 		<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -1483,9 +1545,10 @@  discard block
 block discarded – undo
1483 1545
 				<dd>
1484 1546
 					<select name="id_admin">
1485 1547
 						<option value="0">', $txt['pm_report_all_admins'], '</option>';
1486
-		foreach ($context['admins'] as $id => $name)
1487
-			echo '
1548
+		foreach ($context['admins'] as $id => $name) {
1549
+					echo '
1488 1550
 						<option value="', $id, '">', $name, '</option>';
1551
+		}
1489 1552
 		echo '
1490 1553
 					</select>
1491 1554
 				</dd>';
@@ -1547,9 +1610,10 @@  discard block
 block discarded – undo
1547 1610
 				</th>
1548 1611
 				<th class="centertext table_icon">';
1549 1612
 
1550
-	if (!empty($context['rules']))
1551
-		echo '
1613
+	if (!empty($context['rules'])) {
1614
+			echo '
1552 1615
 					<input type="checkbox" onclick="invertAll(this, this.form);" class="input_check">';
1616
+	}
1553 1617
 
1554 1618
 	echo '
1555 1619
 				</th>
@@ -1557,13 +1621,14 @@  discard block
 block discarded – undo
1557 1621
 		</thead>
1558 1622
 		<tbody>';
1559 1623
 
1560
-	if (empty($context['rules']))
1561
-		echo '
1624
+	if (empty($context['rules'])) {
1625
+			echo '
1562 1626
 			<tr class="windowbg">
1563 1627
 				<td colspan="2">
1564 1628
 					', $txt['pm_rules_none'], '
1565 1629
 				</td>
1566 1630
 			</tr>';
1631
+	}
1567 1632
 
1568 1633
 	foreach ($context['rules'] as $rule)
1569 1634
 	{
@@ -1584,14 +1649,16 @@  discard block
 block discarded – undo
1584 1649
 		<div class="righttext">
1585 1650
 			<a class="button_link" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>';
1586 1651
 
1587
-	if (!empty($context['rules']))
1588
-		echo '
1652
+	if (!empty($context['rules'])) {
1653
+			echo '
1589 1654
 			[<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>]';
1655
+	}
1590 1656
 
1591
-	if (!empty($context['rules']))
1592
-		echo '
1657
+	if (!empty($context['rules'])) {
1658
+			echo '
1593 1659
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1594 1660
 			<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">';
1661
+	}
1595 1662
 
1596 1663
 	echo '
1597 1664
 		</div>
@@ -1613,14 +1680,16 @@  discard block
 block discarded – undo
1613 1680
 			var groups = new Array()
1614 1681
 			var labels = new Array()';
1615 1682
 
1616
-	foreach ($context['groups'] as $id => $title)
1617
-		echo '
1683
+	foreach ($context['groups'] as $id => $title) {
1684
+			echo '
1618 1685
 			groups[', $id, '] = "', addslashes($title), '";';
1686
+	}
1619 1687
 
1620
-	foreach ($context['labels'] as $label)
1621
-		if ($label['id'] != -1)
1688
+	foreach ($context['labels'] as $label) {
1689
+			if ($label['id'] != -1)
1622 1690
 			echo '
1623 1691
 			labels[', ($label['id']), '] = "', addslashes($label['name']), '";';
1692
+	}
1624 1693
 
1625 1694
 	echo '
1626 1695
 			function addCriteriaOption()
@@ -1635,8 +1704,9 @@  discard block
 block discarded – undo
1635 1704
 
1636 1705
 				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>';
1637 1706
 
1638
-	foreach ($context['groups'] as $id => $group)
1639
-		echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>';
1707
+	foreach ($context['groups'] as $id => $group) {
1708
+			echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>';
1709
+	}
1640 1710
 
1641 1711
 	echo '<\' + \'/select><\' + \'/span><span id="criteriaAddHere"><\' + \'/span>\');
1642 1712
 			}
@@ -1653,9 +1723,10 @@  discard block
 block discarded – undo
1653 1723
 
1654 1724
 				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>';
1655 1725
 
1656
-	foreach ($context['labels'] as $label)
1657
-		if ($label['id'] != -1)
1726
+	foreach ($context['labels'] as $label) {
1727
+			if ($label['id'] != -1)
1658 1728
 			echo '<option value="', ($label['id']), '">', addslashes($label['name']), '<\' + \'/option>';
1729
+	}
1659 1730
 
1660 1731
 	echo '<\' + \'/select><\' + \'/span><span id="actionAddHere"><\' + \'/span>\');
1661 1732
 			}
@@ -1769,18 +1840,20 @@  discard block
 block discarded – undo
1769 1840
 	$isFirst = true;
1770 1841
 	foreach ($context['rule']['criteria'] as $k => $criteria)
1771 1842
 	{
1772
-		if (!$isFirst && $criteria['t'] == '')
1773
-			echo '<div id="removeonjs1">';
1774
-		elseif (!$isFirst)
1775
-			echo '<br>';
1843
+		if (!$isFirst && $criteria['t'] == '') {
1844
+					echo '<div id="removeonjs1">';
1845
+		} elseif (!$isFirst) {
1846
+					echo '<br>';
1847
+		}
1776 1848
 
1777 1849
 		echo '
1778 1850
 				<select name="ruletype[', $k, ']" id="ruletype', $k, '" onchange="updateRuleDef(', $k, '); rebuildRuleDesc();">
1779 1851
 					<option value="">', $txt['pm_rule_criteria_pick'], ':</option>';
1780 1852
 
1781
-		foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr)
1782
-			echo '
1853
+		foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) {
1854
+					echo '
1783 1855
 					<option value="', $cr, '"', $criteria['t'] == $cr ? ' selected' : '', '>', $txt['pm_rule_' . $cr], '</option>';
1856
+		}
1784 1857
 
1785 1858
 		echo '
1786 1859
 				</select>
@@ -1791,18 +1864,20 @@  discard block
 block discarded – undo
1791 1864
 					<select name="ruledefgroup[', $k, ']" id="ruledefgroup', $k, '" onchange="rebuildRuleDesc();">
1792 1865
 						<option value="">', $txt['pm_rule_sel_group'], '</option>';
1793 1866
 
1794
-		foreach ($context['groups'] as $id => $group)
1795
-			echo '
1867
+		foreach ($context['groups'] as $id => $group) {
1868
+					echo '
1796 1869
 						<option value="', $id, '"', $criteria['t'] == 'gid' && $criteria['v'] == $id ? ' selected' : '', '>', $group, '</option>';
1870
+		}
1797 1871
 		echo '
1798 1872
 					</select>
1799 1873
 				</span>';
1800 1874
 
1801 1875
 		// If this is the dummy we add a means to hide for non js users.
1802
-		if ($isFirst)
1803
-			$isFirst = false;
1804
-		elseif ($criteria['t'] == '')
1805
-			echo '</div>';
1876
+		if ($isFirst) {
1877
+					$isFirst = false;
1878
+		} elseif ($criteria['t'] == '') {
1879
+					echo '</div>';
1880
+		}
1806 1881
 	}
1807 1882
 
1808 1883
 	echo '
@@ -1825,10 +1900,11 @@  discard block
 block discarded – undo
1825 1900
 	$isFirst = true;
1826 1901
 	foreach ($context['rule']['actions'] as $k => $action)
1827 1902
 	{
1828
-		if (!$isFirst && $action['t'] == '')
1829
-			echo '<div id="removeonjs2">';
1830
-		elseif (!$isFirst)
1831
-			echo '<br>';
1903
+		if (!$isFirst && $action['t'] == '') {
1904
+					echo '<div id="removeonjs2">';
1905
+		} elseif (!$isFirst) {
1906
+					echo '<br>';
1907
+		}
1832 1908
 
1833 1909
 		echo '
1834 1910
 				<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
@@ -1839,20 +1915,22 @@  discard block
 block discarded – undo
1839 1915
 				<span id="labdiv', $k, '">
1840 1916
 					<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
1841 1917
 						<option value="">', $txt['pm_rule_sel_label'], '</option>';
1842
-		foreach ($context['labels'] as $label)
1843
-			if ($label['id'] != -1)
1918
+		foreach ($context['labels'] as $label) {
1919
+					if ($label['id'] != -1)
1844 1920
 				echo '
1845 1921
 						<option value="', ($label['id']), '"', $action['t'] == 'lab' && $action['v'] == $label['id'] ? ' selected' : '', '>', $label['name'], '</option>';
1922
+		}
1846 1923
 
1847 1924
 		echo '
1848 1925
 					</select>
1849 1926
 				</span>';
1850 1927
 
1851
-		if ($isFirst)
1852
-			$isFirst = false;
1853
-		elseif ($action['t'] == '')
1854
-			echo '
1928
+		if ($isFirst) {
1929
+					$isFirst = false;
1930
+		} elseif ($action['t'] == '') {
1931
+					echo '
1855 1932
 			</div>';
1933
+		}
1856 1934
 	}
1857 1935
 
1858 1936
 	echo '
@@ -1876,22 +1954,25 @@  discard block
 block discarded – undo
1876 1954
 		echo '
1877 1955
 	<script>';
1878 1956
 
1879
-	foreach ($context['rule']['criteria'] as $k => $c)
1880
-		echo '
1957
+	foreach ($context['rule']['criteria'] as $k => $c) {
1958
+			echo '
1881 1959
 			updateRuleDef(', $k, ');';
1960
+	}
1882 1961
 
1883
-	foreach ($context['rule']['actions'] as $k => $c)
1884
-		echo '
1962
+	foreach ($context['rule']['actions'] as $k => $c) {
1963
+			echo '
1885 1964
 			updateActionDef(', $k, ');';
1965
+	}
1886 1966
 
1887 1967
 	echo '
1888 1968
 			rebuildRuleDesc();';
1889 1969
 
1890 1970
 	// If this isn't a new rule and we have JS enabled remove the JS compatibility stuff.
1891
-	if ($context['rid'])
1892
-		echo '
1971
+	if ($context['rid']) {
1972
+			echo '
1893 1973
 			document.getElementById("removeonjs1").style.display = "none";
1894 1974
 			document.getElementById("removeonjs2").style.display = "none";';
1975
+	}
1895 1976
 
1896 1977
 	echo '
1897 1978
 			document.getElementById("addonjs1").style.display = "";
@@ -1919,12 +2000,12 @@  discard block
 block discarded – undo
1919 2000
 		</div>';
1920 2001
 
1921 2002
 	// No drafts? Just show an informative message.
1922
-	if (empty($context['drafts']))
1923
-		echo '
2003
+	if (empty($context['drafts'])) {
2004
+			echo '
1924 2005
 		<div class="windowbg2 centertext">
1925 2006
 			', $txt['draft_none'], '
1926 2007
 		</div>';
1927
-	else
2008
+	} else
1928 2009
 	{
1929 2010
 		// For every draft to be displayed, give it its own div, and show the important details of the draft.
1930 2011
 		foreach ($context['drafts'] as $draft)
Please login to merge, or discard this patch.
Themes/default/ManageAttachments.template.php 1 patch
Braces   +20 added lines, -14 removed lines patch added patch discarded remove patch
@@ -116,9 +116,10 @@  discard block
 block discarded – undo
116 116
 				<h3 class="catbg">', $txt['attachment_transfer'], '</h3>
117 117
 			</div>';
118 118
 
119
-	if (!empty($context['results']))
120
-		echo '
119
+	if (!empty($context['results'])) {
120
+			echo '
121 121
 			<div class="noticebox">', $context['results'], '</div>';
122
+	}
122 123
 
123 124
 	echo '
124 125
 			<div class="windowbg2 noup">
@@ -129,9 +130,10 @@  discard block
 block discarded – undo
129 130
 						<dd><select name="from">
130 131
 							<option value="0">', $txt['attachment_transfer_select'], '</option>';
131 132
 
132
-	foreach ($context['attach_dirs'] as $id => $dir)
133
-		echo '
133
+	foreach ($context['attach_dirs'] as $id => $dir) {
134
+			echo '
134 135
 							<option value="', $id, '">', $dir, '</option>';
136
+	}
135 137
 	echo '
136 138
 						</select></dd>
137 139
 						<dt>', $txt['attachment_transfer_auto'], '</dt>
@@ -139,13 +141,14 @@  discard block
 block discarded – undo
139 141
 							<option value="0">', $txt['attachment_transfer_auto_select'], '</option>
140 142
 							<option value="-1">', $txt['attachment_transfer_forum_root'], '</option>';
141 143
 
142
-	if (!empty($context['base_dirs']))
143
-		foreach ($context['base_dirs'] as $id => $dir)
144
+	if (!empty($context['base_dirs'])) {
145
+			foreach ($context['base_dirs'] as $id => $dir)
144 146
 			echo '
145 147
 							<option value="', $id, '">', $dir, '</option>';
146
-	else
147
-			echo '
148
+	} else {
149
+				echo '
148 150
 							<option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>';
151
+	}
149 152
 
150 153
 	echo '
151 154
 						</select></dd>
@@ -153,16 +156,18 @@  discard block
 block discarded – undo
153 156
 						<dd><select name="to">
154 157
 							<option value="0">', $txt['attachment_transfer_select'], '</option>';
155 158
 
156
-	foreach ($context['attach_dirs'] as $id => $dir)
157
-		echo '
159
+	foreach ($context['attach_dirs'] as $id => $dir) {
160
+			echo '
158 161
 							<option value="', $id, '">', $dir, '</option>';
162
+	}
159 163
 	echo '
160 164
 						</select></dd>';
161 165
 
162
-	if (!empty($modSettings['attachmentDirFileLimit']))
163
-		echo '
166
+	if (!empty($modSettings['attachmentDirFileLimit'])) {
167
+			echo '
164 168
 						<dt>', $txt['attachment_transfer_empty'], '</dt>
165 169
 						<dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>';
170
+	}
166 171
 	echo '
167 172
 					</dl>
168 173
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -238,10 +243,11 @@  discard block
 block discarded – undo
238 243
 		// Loop through each error reporting the status
239 244
 		foreach ($context['repair_errors'] as $error => $number)
240 245
 		{
241
-			if (!empty($number))
242
-			echo '
246
+			if (!empty($number)) {
247
+						echo '
243 248
 				<input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '" class="input_check">
244 249
 				<label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>';
250
+			}
245 251
 		}
246 252
 
247 253
 		echo '		<br>
Please login to merge, or discard this patch.
Themes/default/Printpage.template.php 1 patch
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,11 +145,12 @@  discard block
 block discarded – undo
145 145
 				<div class="question">', $txt['poll_question'], ': <strong>', $context['poll']['question'], '</strong>';
146 146
 
147 147
 		$options = 1;
148
-		foreach ($context['poll']['options'] as $option)
149
-			echo '
148
+		foreach ($context['poll']['options'] as $option) {
149
+					echo '
150 150
 					<div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $options++, ': <strong>', $option['option'], '</strong>
151 151
 						', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', '
152 152
 					</div>';
153
+		}
153 154
 
154 155
 		echo '
155 156
 			</div>';
@@ -171,9 +172,10 @@  discard block
 block discarded – undo
171 172
 			echo '
172 173
 				<hr>';
173 174
 
174
-			foreach ($context['printattach'][$post['id_msg']] as $attach)
175
-				echo '
175
+			foreach ($context['printattach'][$post['id_msg']] as $attach) {
176
+							echo '
176 177
 					<img width="' . $attach['width'] . '" height="' . $attach['height'] . '" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="">';
178
+			}
177 179
 		}
178 180
 
179 181
 		echo '
@@ -213,11 +215,12 @@  discard block
 block discarded – undo
213 215
 		<div class="print_options">';
214 216
 
215 217
 	// which option is set, text or text&images
216
-	if (isset($_REQUEST['images']))
217
-		echo '
218
+	if (isset($_REQUEST['images'])) {
219
+			echo '
218 220
 			<a href="', $url_text, '">', $txt['print_page_text'], '</a> | <strong><a href="', $url_images, '">', $txt['print_page_images'], '</a></strong>';
219
-	else
220
-		echo '
221
+	} else {
222
+			echo '
221 223
 			<strong><a href="', $url_text, '">', $txt['print_page_text'], '</a></strong> | <a href="', $url_images, '">', $txt['print_page_images'], '</a>';
222
-}
224
+	}
225
+	}
223 226
 ?>
224 227
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/ManageLanguages.template.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,11 +36,12 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	// An error?
39
-	if (!empty($context['error_message']))
40
-		echo '
39
+	if (!empty($context['error_message'])) {
40
+			echo '
41 41
 	<div class="errorbox">
42 42
 		', $context['error_message'], '
43 43
 	</div>';
44
+	}
44 45
 
45 46
 	// Provide something of an introduction...
46 47
 	echo '
@@ -67,11 +68,12 @@  discard block
 block discarded – undo
67 68
 	// If the files are not writable, we might!
68 69
 	if (!empty($context['still_not_writable']))
69 70
 	{
70
-		if (!empty($context['package_ftp']['error']))
71
-			echo '
71
+		if (!empty($context['package_ftp']['error'])) {
72
+					echo '
72 73
 			<div class="errorbox">
73 74
 				', $context['package_ftp']['error'], '
74 75
 			</div>';
76
+		}
75 77
 
76 78
 		echo '
77 79
 			<div class="cat_bar">
@@ -243,11 +245,12 @@  discard block
 block discarded – undo
243 245
 
244 246
 	// Is it not writable?
245 247
 	// Show an error.
246
-	if (!empty($context['entries_not_writable_message']))
247
-		echo '
248
+	if (!empty($context['entries_not_writable_message'])) {
249
+			echo '
248 250
 			<div class="errorbox">
249 251
 				', $context['entries_not_writable_message'], '
250 252
 			</div>';
253
+	}
251 254
 
252 255
 	// Already have some file entries?
253 256
 	if (!empty($context['file_entries']))
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/ManageCalendar.template.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,9 +39,10 @@  discard block
 block discarded – undo
39 39
 						<select name="year" id="year" onchange="generateDays();">
40 40
 							<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>';
41 41
 	// Show a list of all the years we allow...
42
-	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
43
-		echo '
42
+	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
43
+			echo '
44 44
 							<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>';
45
+	}
45 46
 
46 47
 	echo '
47 48
 						</select>&nbsp;
@@ -49,9 +50,10 @@  discard block
 block discarded – undo
49 50
 						<select name="month" id="month" onchange="generateDays();">';
50 51
 
51 52
 	// There are 12 months per year - ensure that they all get listed.
52
-	for ($month = 1; $month <= 12; $month++)
53
-		echo '
53
+	for ($month = 1; $month <= 12; $month++) {
54
+			echo '
54 55
 							<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
56
+	}
55 57
 
56 58
 	echo '
57 59
 						</select>&nbsp;
@@ -59,23 +61,25 @@  discard block
 block discarded – undo
59 61
 						<select name="day" id="day" onchange="generateDays();">';
60 62
 
61 63
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
62
-	for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
63
-		echo '
64
+	for ($day = 1; $day <= $context['holiday']['last_day']; $day++) {
65
+			echo '
64 66
 							<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>';
67
+	}
65 68
 
66 69
 	echo '
67 70
 						</select>
68 71
 					</dd>
69 72
 				</dl>';
70 73
 
71
-	if ($context['is_new'])
72
-		echo '
74
+	if ($context['is_new']) {
75
+			echo '
73 76
 				<input type="submit" value="', $txt['holidays_button_add'], '" class="button_submit">';
74
-	else
75
-		echo '
77
+	} else {
78
+			echo '
76 79
 				<input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button_submit">
77 80
 				<input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button_submit">
78 81
 				<input type="hidden" name="holiday" value="', $context['holiday']['id'], '">';
82
+	}
79 83
 	echo '
80 84
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
81 85
 			</div>
Please login to merge, or discard this patch.
Themes/default/Poll.template.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 				<h3 class="catbg">', $context['page_title'], '</h3>
47 47
 			</div>';
48 48
 
49
-	if (!empty($context['poll_error']['messages']))
50
-		echo '
49
+	if (!empty($context['poll_error']['messages'])) {
50
+			echo '
51 51
 			<div class="errorbox">
52 52
 				<dl class="poll_error">
53 53
 					<dt>
@@ -58,6 +58,7 @@  discard block
 block discarded – undo
58 58
 					</dt>
59 59
 				</dl>
60 60
 			</div>';
61
+	}
61 62
 
62 63
 	echo '
63 64
 			<div>
@@ -79,8 +80,9 @@  discard block
 block discarded – undo
79 80
 								<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" class="input_text" size="80" maxlength="255">';
80 81
 
81 82
 		// Does this option have a vote count yet, or is it new?
82
-		if ($choice['votes'] != -1)
83
-			echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
83
+		if ($choice['votes'] != -1) {
84
+					echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
85
+		}
84 86
 
85 87
 		echo '
86 88
 							</dd>';
@@ -118,14 +120,15 @@  discard block
 block discarded – undo
118 120
 								<input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', ' class="input_check">
119 121
 							</dd>';
120 122
 
121
-		if ($context['poll']['guest_vote_allowed'])
122
-			echo '
123
+		if ($context['poll']['guest_vote_allowed']) {
124
+					echo '
123 125
 							<dt>
124 126
 								<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
125 127
 							</dt>
126 128
 							<dd>
127 129
 								<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', ' class="input_check">
128 130
 							</dd>';
131
+		}
129 132
 	}
130 133
 
131 134
 	echo '
@@ -140,12 +143,13 @@  discard block
 block discarded – undo
140 143
 						</dl>
141 144
 					</fieldset>';
142 145
 	// If this is an edit, we can allow them to reset the vote counts.
143
-	if ($context['is_edit'])
144
-		echo '
146
+	if ($context['is_edit']) {
147
+			echo '
145 148
 					<fieldset id="poll_reset">
146 149
 						<legend>', $txt['reset_votes'], '</legend>
147 150
 						<input type="checkbox" name="resetVoteCount" value="on" class="input_check"> ' . $txt['reset_votes_check'] . '
148 151
 					</fieldset>';
152
+	}
149 153
 	echo '
150 154
 					<input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit">
151 155
 				</div>
Please login to merge, or discard this patch.
Themes/default/GenericList.template.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
 				),
221 221
 			),
222 222
 		);
223
-	*/
223
+	 */
224 224
 
225 225
 	// Are we using right-to-left orientation?
226 226
 	$first = $context['right_to_left'] ? 'last' : 'first';
Please login to merge, or discard this 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.