Completed
Push — release-2.1 ( 08aa48...ab4516 )
by Mathias
06:51
created
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.
Themes/default/BoardIndex.template.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 		foreach ($context['news_lines'] as $news)
35 35
 		{
36 36
 			echo '
37
-			<li>', $news,'</li>';
37
+			<li>', $news, '</li>';
38 38
 		}
39 39
 
40 40
 		echo '
41 41
 		</ul>
42 42
 		<script>
43 43
 			jQuery("#smf_slider").slippry({
44
-				pause: ', $settings['newsfader_time'],',
44
+				pause: ', $settings['newsfader_time'], ',
45 45
 				adaptiveHeight: 0,
46 46
 				captions: 0,
47 47
 				controls: 0,
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 		// If this category even can collapse, show a link to collapse it.
79 79
 		if ($category['can_collapse'])
80 80
 			echo '
81
-					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>';
81
+					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';
82 82
 
83 83
 		echo '
84 84
 					', $category['link'], '
85 85
 				</h3>', !empty($category['description']) ? '
86 86
 				<div class="desc">' . $category['description'] . '</div>' : '', '
87 87
 			</div>
88
-			<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="'. $category['css_class'] .'"') : '') ,'>';
88
+			<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>';
89 89
 
90 90
 			/* Each board in each category's boards has:
91 91
 			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
 			foreach ($category['boards'] as $board)
95 95
 			{
96 96
 				echo '
97
-				<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : '') ,'">
97
+				<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
98 98
 					<div class="board_icon">
99 99
 						<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>
100 100
 					</div>
101 101
 					<div class="info">
102 102
 						<a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '">
103 103
 							', $board['name'], '
104
-							<p class="board_description mobile_display">', $board['description'] , '</p>
104
+							<p class="board_description mobile_display">', $board['description'], '</p>
105 105
 						</a>';
106 106
 
107 107
 				// Has it outstanding posts for approval?
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 						<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>';
111 111
 
112 112
 				echo '
113
-						<p class="board_description">', $board['description'] , '</p>';
113
+						<p class="board_description">', $board['description'], '</p>';
114 114
 
115 115
 				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
116 116
 				if (!empty($board['link_moderators']))
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 						', $board['is_redirect'] ? '' : '<br> ' . comma_format($board['topics']) . ' ' . $txt['board_topics'], '
126 126
 						</p>
127 127
 					</div>
128
-					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">';
128
+					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden', '">';
129 129
 
130 130
 				if (!empty($board['last_post']['id']))
131 131
 					echo '
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 				</h4>
375 375
 			</div>
376 376
 			<p class="inline">
377
-				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - '. $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br>
377
+				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - ' . $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br>
378 378
 				', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  (' . $context['latest_post']['time'] . ')<br>' : ''), '
379 379
 				<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>
380 380
 			</p>';
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		// Showing membergroups?
423 423
 		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
424 424
 			echo '
425
-				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']). '</span>';
425
+				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']) . '</span>';
426 426
 	}
427 427
 
428 428
 	echo '
Please login to merge, or discard this patch.
Braces   +57 added lines, -39 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@  discard block
 block discarded – undo
67 67
 	foreach ($context['categories'] as $category)
68 68
 	{
69 69
 		// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
70
-		if (empty($category['boards']) && !$category['is_collapsed'])
71
-			continue;
70
+		if (empty($category['boards']) && !$category['is_collapsed']) {
71
+					continue;
72
+		}
72 73
 
73 74
 		echo '
74 75
 		<div class="main_container">
@@ -76,9 +77,10 @@  discard block
 block discarded – undo
76 77
 				<h3 class="catbg">';
77 78
 
78 79
 		// If this category even can collapse, show a link to collapse it.
79
-		if ($category['can_collapse'])
80
-			echo '
80
+		if ($category['can_collapse']) {
81
+					echo '
81 82
 					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>';
83
+		}
82 84
 
83 85
 		echo '
84 86
 					', $category['link'], '
@@ -105,17 +107,19 @@  discard block
 block discarded – undo
105 107
 						</a>';
106 108
 
107 109
 				// Has it outstanding posts for approval?
108
-				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
109
-					echo '
110
+				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
111
+									echo '
110 112
 						<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>';
113
+				}
111 114
 
112 115
 				echo '
113 116
 						<p class="board_description">', $board['description'] , '</p>';
114 117
 
115 118
 				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
116
-				if (!empty($board['link_moderators']))
117
-					echo '
119
+				if (!empty($board['link_moderators'])) {
120
+									echo '
118 121
 						<p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
122
+				}
119 123
 
120 124
 				// Show some basic information about the number of posts, etc.
121 125
 					echo '
@@ -127,9 +131,10 @@  discard block
 block discarded – undo
127 131
 					</div>
128 132
 					<div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">';
129 133
 
130
-				if (!empty($board['last_post']['id']))
131
-					echo '
134
+				if (!empty($board['last_post']['id'])) {
135
+									echo '
132 136
 						<p>', $board['last_post']['last_post_message'], '</p>';
137
+				}
133 138
 				echo '
134 139
 					</div>';
135 140
 				// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
@@ -141,14 +146,16 @@  discard block
 block discarded – undo
141 146
 							id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
142 147
 					foreach ($board['children'] as $child)
143 148
 					{
144
-						if (!$child['is_redirect'])
145
-							$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 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>';
146
-						else
147
-							$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
149
+						if (!$child['is_redirect']) {
150
+													$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 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>';
151
+						} else {
152
+													$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
153
+						}
148 154
 
149 155
 						// Has it posts awaiting approval?
150
-						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
151
-							$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>';
156
+						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) {
157
+													$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>';
158
+						}
152 159
 
153 160
 						$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
154 161
 					}
@@ -172,10 +179,11 @@  discard block
 block discarded – undo
172 179
 	</div>';
173 180
 
174 181
 	// Show the mark all as read button?
175
-	if ($context['user']['is_logged'] && !empty($context['categories']))
176
-		echo '
182
+	if ($context['user']['is_logged'] && !empty($context['categories'])) {
183
+			echo '
177 184
 		<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
178
-}
185
+	}
186
+	}
179 187
 
180 188
 /**
181 189
  * The lower part of the outer layer of the board index
@@ -192,8 +200,9 @@  discard block
 block discarded – undo
192 200
 {
193 201
 	global $context, $options, $txt;
194 202
 
195
-	if (empty($context['info_center']))
196
-		return;
203
+	if (empty($context['info_center'])) {
204
+			return;
205
+	}
197 206
 
198 207
 	// Here's where the "Info Center" starts...
199 208
 	echo '
@@ -293,14 +302,15 @@  discard block
 block discarded – undo
293 302
 		/* Each post in latest_posts has:
294 303
 				board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
295 304
 				subject, short_subject (shortened with...), time, link, and href. */
296
-		foreach ($context['latest_posts'] as $post)
297
-			echo '
305
+		foreach ($context['latest_posts'] as $post) {
306
+					echo '
298 307
 					<tr class="windowbg">
299 308
 						<td class="recentpost"><strong>', $post['link'], '</strong></td>
300 309
 						<td class="recentposter">', $post['poster']['link'], '</td>
301 310
 						<td class="recentboard">', $post['board']['link'], '</td>
302 311
 						<td class="recenttime">', $post['time'], '</td>
303 312
 					</tr>';
313
+		}
304 314
 		echo '
305 315
 				</table>';
306 316
 	}
@@ -324,9 +334,10 @@  discard block
 block discarded – undo
324 334
 			</div>';
325 335
 
326 336
 	// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
327
-	if (!empty($context['calendar_holidays']))
328
-		echo '
337
+	if (!empty($context['calendar_holidays'])) {
338
+			echo '
329 339
 				<p class="inline holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '</p>';
340
+	}
330 341
 
331 342
 	// People's birthdays. Like mine. And yours, I guess. Kidding.
332 343
 	if (!empty($context['calendar_birthdays']))
@@ -335,9 +346,10 @@  discard block
 block discarded – undo
335 346
 				<p class="inline">
336 347
 					<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';
337 348
 		// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
338
-		foreach ($context['calendar_birthdays'] as $member)
339
-			echo '
349
+		foreach ($context['calendar_birthdays'] as $member) {
350
+					echo '
340 351
 					<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
352
+		}
341 353
 		echo '
342 354
 				</p>';
343 355
 	}
@@ -351,9 +363,10 @@  discard block
 block discarded – undo
351 363
 
352 364
 		// Each event in calendar_events should have:
353 365
 		//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
354
-		foreach ($context['calendar_events'] as $event)
355
-			echo '
366
+		foreach ($context['calendar_events'] as $event) {
367
+					echo '
356 368
 					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="generic_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', ';
369
+		}
357 370
 		echo '
358 371
 				</p>';
359 372
 	}
@@ -398,15 +411,19 @@  discard block
 block discarded – undo
398 411
 
399 412
 	// Handle hidden users and buddies.
400 413
 	$bracketList = array();
401
-	if ($context['show_buddies'])
402
-		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
403
-	if (!empty($context['num_spiders']))
404
-		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
405
-	if (!empty($context['num_users_hidden']))
406
-		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
414
+	if ($context['show_buddies']) {
415
+			$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
416
+	}
417
+	if (!empty($context['num_spiders'])) {
418
+			$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
419
+	}
420
+	if (!empty($context['num_users_hidden'])) {
421
+			$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
422
+	}
407 423
 
408
-	if (!empty($bracketList))
409
-		echo ' (' . implode(', ', $bracketList) . ')';
424
+	if (!empty($bracketList)) {
425
+			echo ' (' . implode(', ', $bracketList) . ')';
426
+	}
410 427
 
411 428
 	echo $context['show_who'] ? '</a>' : '', '
412 429
 
@@ -420,9 +437,10 @@  discard block
 block discarded – undo
420 437
 				', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']);
421 438
 
422 439
 		// Showing membergroups?
423
-		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
424
-			echo '
440
+		if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) {
441
+					echo '
425 442
 				<span class="membergroups">' . implode(',&nbsp;', $context['membergroups']). '</span>';
443
+		}
426 444
 	}
427 445
 
428 446
 	echo '
Please login to merge, or discard this patch.
Themes/default/Admin.template.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 							<div id="live_news" class="floatleft">
34 34
 								<div class="cat_bar">
35 35
 									<h3 class="catbg">
36
-										<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['live'], '
36
+										<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['live'], '
37 37
 									</h3>
38 38
 								</div>
39 39
 								<div class="windowbg nopadding">
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 								<tbody>
506 506
 									<tr class="windowbg">
507 507
 										<td class="half_table">
508
-											<a href="#" id="Tasks-link">', $txt['dvc_tasks'] ,'</a>
508
+											<a href="#" id="Tasks-link">', $txt['dvc_tasks'], '</a>
509 509
 										</td>
510 510
 										<td class="quarter_table">
511 511
 											<em id="yourTasks">??</em>
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 				echo '
769 769
 							<div class="cat_bar">
770 770
 								<h3 class="', !empty($config_var['class']) ? $config_var['class'] : 'catbg', '"', !empty($config_var['force_div_id']) ? ' id="' . $config_var['force_div_id'] . '"' : '', '>
771
-									', ($config_var['help'] ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $config_var['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="'. $txt['help'].'"></span></a>' : ''), '
771
+									', ($config_var['help'] ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $config_var['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a>' : ''), '
772 772
 									', $config_var['label'], '
773 773
 								</h3>
774 774
 							</div>';
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 				// Show the [?] button.
831 831
 				if ($config_var['help'])
832 832
 					echo '
833
-							<a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ';
833
+							<a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ';
834 834
 
835 835
 				echo '
836 836
 										<a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span>
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 					$max = isset($config_var['max']) ? ' max="' . $config_var['max'] . '"' : '';
935 935
 
936 936
 					echo '
937
-											<input type="', $type ,'"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '" value="', $config_var['value'], '"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_text"', $min . $max . $step, '>';
937
+											<input type="', $type, '"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '" value="', $config_var['value'], '"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_text"', $min . $max . $step, '>';
938 938
 				}
939 939
 
940 940
 				echo isset($config_var['postinput']) ? '
@@ -1126,13 +1126,13 @@  discard block
 block discarded – undo
1126 1126
 
1127 1127
 	foreach ($context['cust_profile_fields_placement'] as $order => $name)
1128 1128
 		echo '
1129
-												<option value="', $order ,'"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_'. $name], '</option>';
1129
+												<option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>';
1130 1130
 
1131 1131
 	echo '
1132 1132
 											</select>
1133 1133
 										</dd>
1134 1134
 										<dt>
1135
-											<a id="field_show_enclosed" href="', $scripturl, '?action=helpadmin;help=field_show_enclosed" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1135
+											<a id="field_show_enclosed" href="', $scripturl, '?action=helpadmin;help=field_show_enclosed" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1136 1136
 											<strong><label for="enclose">', $txt['custom_edit_enclose'], ':</label></strong><br>
1137 1137
 											<span class="smalltext">', $txt['custom_edit_enclose_desc'], '</span>
1138 1138
 										</dt>
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 											<input type="checkbox" name="bbc" id="bbc_dd"', $context['field']['bbc'] ? ' checked' : '', ' class="input_check">
1178 1178
 										</dd>
1179 1179
 										<dt id="options_dt">
1180
-											<a href="', $scripturl, '?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1180
+											<a href="', $scripturl, '?action=helpadmin;help=customoptions" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1181 1181
 											<strong><label for="options_dd">', $txt['custom_edit_options'], ':</label></strong><br>
1182 1182
 											<span class="smalltext">', $txt['custom_edit_options_desc'], '</span>
1183 1183
 										</dt>
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
 									<legend>', $txt['custom_edit_advanced'], '</legend>
1207 1207
 									<dl class="settings">
1208 1208
 										<dt id="mask_dt">
1209
-											<a id="custom_mask" href="', $scripturl, '?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a>
1209
+											<a id="custom_mask" href="', $scripturl, '?action=helpadmin;help=custom_mask" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>
1210 1210
 											<strong><label for="mask">', $txt['custom_edit_mask'], ':</label></strong><br>
1211 1211
 											<span class="smalltext">', $txt['custom_edit_mask_desc'], '</span>
1212 1212
 										</dt>
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 			{
1323 1323
 				echo '
1324 1324
 							<li>
1325
-								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']';
1325
+								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']';
1326 1326
 
1327 1327
 				if ($result['help'])
1328 1328
 					echo '
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
 					<div id="admincenter">
1403 1403
 						<div id="section_header" class="cat_bar">
1404 1404
 							<h3 class="catbg">',
1405
-								$context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'] , '
1405
+								$context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'], '
1406 1406
 							</h3>
1407 1407
 						</div>
1408 1408
 						<div class="windowbg">';
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 			{
1556 1556
 				echo '
1557 1557
 								<tr class="windowbg">
1558
-									<td class="equal_table">', $key,  '</td>
1558
+									<td class="equal_table">', $key, '</td>
1559 1559
 									<td colspan="2">', $setting, '</td>
1560 1560
 								</tr>';
1561 1561
 			}
Please login to merge, or discard this patch.
Braces   +173 added lines, -125 removed lines patch added patch discarded remove patch
@@ -64,9 +64,10 @@  discard block
 block discarded – undo
64 64
 										<strong>', $txt['administrators'], ':</strong>
65 65
 										', implode(', ', $context['administrators']);
66 66
 	// If we have lots of admins... don't show them all.
67
-	if (!empty($context['more_admins_link']))
68
-		echo '
67
+	if (!empty($context['more_admins_link'])) {
68
+			echo '
69 69
 							(', $context['more_admins_link'], ')';
70
+	}
70 71
 
71 72
 	echo '
72 73
 									</div>
@@ -83,16 +84,18 @@  discard block
 block discarded – undo
83 84
 		foreach ($area['areas'] as $item_id => $item)
84 85
 		{
85 86
 			// No point showing the 'home' page here, we're already on it!
86
-			if ($area_id == 'forum' && $item_id == 'index')
87
-				continue;
87
+			if ($area_id == 'forum' && $item_id == 'index') {
88
+							continue;
89
+			}
88 90
 
89 91
 			$url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : '');
90
-			if (!empty($item['icon_file']))
91
-				echo '
92
+			if (!empty($item['icon_file'])) {
93
+							echo '
92 94
 							<a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>';
93
-			else
94
-				echo '
95
+			} else {
96
+							echo '
95 97
 							<a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>';
98
+			}
96 99
 		}
97 100
 
98 101
 		echo '
@@ -103,10 +106,11 @@  discard block
 block discarded – undo
103 106
 					</div>';
104 107
 
105 108
 	// The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization.
106
-	if (empty($modSettings['disable_smf_js']))
107
-		echo '
109
+	if (empty($modSettings['disable_smf_js'])) {
110
+			echo '
108 111
 					<script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
109 112
 					<script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>';
113
+	}
110 114
 
111 115
 	// This sets the announcements and current versions themselves ;).
112 116
 	echo '
@@ -185,9 +189,10 @@  discard block
 block discarded – undo
185 189
 								<em>', $version['version'], '</em>';
186 190
 
187 191
 		// more details for this item, show them a link
188
-		if ($context['can_admin'] && isset($version['more']))
189
-			echo
192
+		if ($context['can_admin'] && isset($version['more'])) {
193
+					echo
190 194
 								' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>';
195
+		}
191 196
 		echo '
192 197
 								<br>';
193 198
 	}
@@ -218,20 +223,22 @@  discard block
 block discarded – undo
218 223
 
219 224
 	foreach ($context['credits'] as $section)
220 225
 	{
221
-		if (isset($section['pretext']))
222
-			echo '
226
+		if (isset($section['pretext'])) {
227
+					echo '
223 228
 								<p>', $section['pretext'], '</p><hr>';
229
+		}
224 230
 
225 231
 		echo '
226 232
 								<dl>';
227 233
 
228 234
 		foreach ($section['groups'] as $group)
229 235
 		{
230
-			if (isset($group['title']))
231
-				echo '
236
+			if (isset($group['title'])) {
237
+							echo '
232 238
 									<dt>
233 239
 										<strong>', $group['title'], ':</strong>
234 240
 									</dt>';
241
+			}
235 242
 
236 243
 			echo '
237 244
 									<dd>', implode(', ', $group['members']), '</dd>';
@@ -240,10 +247,11 @@  discard block
 block discarded – undo
240 247
 		echo '
241 248
 								</dl>';
242 249
 
243
-		if (isset($section['posttext']))
244
-			echo '
250
+		if (isset($section['posttext'])) {
251
+					echo '
245 252
 								<hr>
246 253
 								<p>', $section['posttext'], '</p>';
254
+		}
247 255
 	}
248 256
 
249 257
 	echo '
@@ -259,9 +267,10 @@  discard block
 block discarded – undo
259 267
 							smfSupportVersions.forum = "', $context['forum_version'], '";';
260 268
 
261 269
 	// Don't worry, none of this is logged, it's just used to give information that might be of use.
262
-	foreach ($context['current_versions'] as $variable => $version)
263
-		echo '
270
+	foreach ($context['current_versions'] as $variable => $version) {
271
+			echo '
264 272
 							smfSupportVersions.', $variable, ' = "', $version['version'], '";';
273
+	}
265 274
 
266 275
 	// Now we just have to include the script and wait ;).
267 276
 	echo '
@@ -358,8 +367,8 @@  discard block
 block discarded – undo
358 367
 							<tbody>';
359 368
 
360 369
 	// Loop through every source file displaying its version - using javascript.
361
-	foreach ($context['file_versions'] as $filename => $version)
362
-		echo '
370
+	foreach ($context['file_versions'] as $filename => $version) {
371
+			echo '
363 372
 								<tr class="windowbg">
364 373
 									<td class="half_table">
365 374
 										', $filename, '
@@ -371,6 +380,7 @@  discard block
 block discarded – undo
371 380
 										<em id="currentSources', $filename, '">??</em>
372 381
 									</td>
373 382
 								</tr>';
383
+	}
374 384
 
375 385
 	// Default template files.
376 386
 	echo '
@@ -396,8 +406,8 @@  discard block
 block discarded – undo
396 406
 							<table id="Default" class="table_grid">
397 407
 								<tbody>';
398 408
 
399
-	foreach ($context['default_template_versions'] as $filename => $version)
400
-		echo '
409
+	foreach ($context['default_template_versions'] as $filename => $version) {
410
+			echo '
401 411
 									<tr class="windowbg">
402 412
 										<td class="half_table">
403 413
 											', $filename, '
@@ -409,6 +419,7 @@  discard block
 block discarded – undo
409 419
 											<em id="currentDefault', $filename, '">??</em>
410 420
 										</td>
411 421
 									</tr>';
422
+	}
412 423
 
413 424
 	// Now the language files...
414 425
 	echo '
@@ -436,8 +447,8 @@  discard block
 block discarded – undo
436 447
 
437 448
 	foreach ($context['default_language_versions'] as $language => $files)
438 449
 	{
439
-		foreach ($files as $filename => $version)
440
-			echo '
450
+		foreach ($files as $filename => $version) {
451
+					echo '
441 452
 									<tr class="windowbg">
442 453
 										<td class="half_table">
443 454
 											', $filename, '.<em>', $language, '</em>.php
@@ -449,6 +460,7 @@  discard block
 block discarded – undo
449 460
 											<em id="current', $filename, '.', $language, '">??</em>
450 461
 										</td>
451 462
 									</tr>';
463
+		}
452 464
 	}
453 465
 
454 466
 	echo '
@@ -478,8 +490,8 @@  discard block
 block discarded – undo
478 490
 							<table id="Templates" class="table_grid">
479 491
 								<tbody>';
480 492
 
481
-		foreach ($context['template_versions'] as $filename => $version)
482
-			echo '
493
+		foreach ($context['template_versions'] as $filename => $version) {
494
+					echo '
483 495
 									<tr class="windowbg">
484 496
 										<td class="half_table">
485 497
 											', $filename, '
@@ -491,6 +503,7 @@  discard block
 block discarded – undo
491 503
 											<em id="currentTemplates', $filename, '">??</em>
492 504
 										</td>
493 505
 									</tr>';
506
+		}
494 507
 
495 508
 		echo '
496 509
 								</tbody>
@@ -520,8 +533,8 @@  discard block
 block discarded – undo
520 533
 							<table id="Tasks" class="table_grid">
521 534
 								<tbody>';
522 535
 
523
-		foreach ($context['tasks_versions'] as $filename => $version)
524
-			echo '
536
+		foreach ($context['tasks_versions'] as $filename => $version) {
537
+					echo '
525 538
 									<tr class="windowbg">
526 539
 										<td class="half_table">
527 540
 											', $filename, '
@@ -533,6 +546,7 @@  discard block
 block discarded – undo
533 546
 											<em id="currentTasks', $filename, '">??</em>
534 547
 										</td>
535 548
 									</tr>';
549
+		}
536 550
 
537 551
 		echo '
538 552
 								</tbody>
@@ -574,9 +588,10 @@  discard block
 block discarded – undo
574 588
 {
575 589
 	global $context, $scripturl, $txt, $modSettings;
576 590
 
577
-	if (!empty($context['saved_successful']))
578
-		echo '
591
+	if (!empty($context['saved_successful'])) {
592
+			echo '
579 593
 					<div class="infobox">', $txt['settings_saved'], '</div>';
594
+	}
580 595
 
581 596
 	// First section is for adding/removing words from the censored list.
582 597
 	echo '
@@ -591,11 +606,12 @@  discard block
 block discarded – undo
591 606
 								<p>', $txt['admin_censored_where'], '</p>';
592 607
 
593 608
 	// Show text boxes for censoring [bad   ] => [good  ].
594
-	foreach ($context['censored_words'] as $vulgar => $proper)
595
-		echo '
609
+	foreach ($context['censored_words'] as $vulgar => $proper) {
610
+			echo '
596 611
 								<div class="block">
597 612
 									<input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> =&gt; <input type="text" name="censor_proper[]" value="', $proper, '" size="30">
598 613
 								</div>';
614
+	}
599 615
 
600 616
 	// Now provide a way to censor more words.
601 617
 	echo '
@@ -669,19 +685,21 @@  discard block
 block discarded – undo
669 685
 						<div class="windowbg2 noup">
670 686
 							', $txt['not_done_reason'];
671 687
 
672
-	if (!empty($context['continue_percent']))
673
-		echo '
688
+	if (!empty($context['continue_percent'])) {
689
+			echo '
674 690
 							<div class="progress_bar">
675 691
 								<div class="full_bar">', $context['continue_percent'], '%</div>
676 692
 								<div class="green_percent" style="width: ', $context['continue_percent'], '%;">&nbsp;</div>
677 693
 							</div>';
694
+	}
678 695
 
679
-	if (!empty($context['substep_enabled']))
680
-		echo '
696
+	if (!empty($context['substep_enabled'])) {
697
+			echo '
681 698
 							<div class="progress_bar">
682 699
 								<div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div>
683 700
 								<div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;">&nbsp;</div>
684 701
 							</div>';
702
+	}
685 703
 
686 704
 	echo '
687 705
 							<form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit">
@@ -716,35 +734,40 @@  discard block
 block discarded – undo
716 734
 {
717 735
 	global $context, $txt, $settings, $scripturl;
718 736
 
719
-	if (!empty($context['saved_successful']))
720
-		echo '
737
+	if (!empty($context['saved_successful'])) {
738
+			echo '
721 739
 					<div class="infobox">', $txt['settings_saved'], '</div>';
722
-	elseif (!empty($context['saved_failed']))
723
-		echo '
740
+	} elseif (!empty($context['saved_failed'])) {
741
+			echo '
724 742
 					<div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>';
743
+	}
725 744
 
726
-	if (!empty($context['settings_pre_javascript']))
727
-		echo '
745
+	if (!empty($context['settings_pre_javascript'])) {
746
+			echo '
728 747
 					<script>', $context['settings_pre_javascript'], '</script>';
748
+	}
729 749
 
730
-	if (!empty($context['settings_insert_above']))
731
-		echo $context['settings_insert_above'];
750
+	if (!empty($context['settings_insert_above'])) {
751
+			echo $context['settings_insert_above'];
752
+	}
732 753
 
733 754
 	echo '
734 755
 					<div id="admincenter">
735 756
 						<form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>';
736 757
 
737 758
 	// Is there a custom title?
738
-	if (isset($context['settings_title']))
739
-		echo '
759
+	if (isset($context['settings_title'])) {
760
+			echo '
740 761
 							<div class="cat_bar">
741 762
 								<h3 class="catbg">', $context['settings_title'], '</h3>
742 763
 							</div>';
764
+	}
743 765
 
744 766
 	// Have we got a message to display?
745
-	if (!empty($context['settings_message']))
746
-		echo '
767
+	if (!empty($context['settings_message'])) {
768
+			echo '
747 769
 							<div class="information">', $context['settings_message'], '</div>';
770
+	}
748 771
 
749 772
 	// Now actually loop through all the variables.
750 773
 	$is_open = false;
@@ -797,8 +820,9 @@  discard block
 block discarded – undo
797 820
 		// Hang about? Are you pulling my leg - a callback?!
798 821
 		if (is_array($config_var) && $config_var['type'] == 'callback')
799 822
 		{
800
-			if (function_exists('template_callback_' . $config_var['name']))
801
-				call_user_func('template_callback_' . $config_var['name']);
823
+			if (function_exists('template_callback_' . $config_var['name'])) {
824
+							call_user_func('template_callback_' . $config_var['name']);
825
+			}
802 826
 
803 827
 			continue;
804 828
 		}
@@ -828,9 +852,10 @@  discard block
 block discarded – undo
828 852
 				$text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time');
829 853
 
830 854
 				// Show the [?] button.
831
-				if ($config_var['help'])
832
-					echo '
855
+				if ($config_var['help']) {
856
+									echo '
833 857
 							<a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ';
858
+				}
834 859
 
835 860
 				echo '
836 861
 										<a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span>
@@ -839,22 +864,25 @@  discard block
 block discarded – undo
839 864
 										$config_var['preinput'];
840 865
 
841 866
 				// Show a check box.
842
-				if ($config_var['type'] == 'check')
843
-					echo '
867
+				if ($config_var['type'] == 'check') {
868
+									echo '
844 869
 										<input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1" class="input_check">';
870
+				}
845 871
 				// Escape (via htmlspecialchars.) the text box.
846
-				elseif ($config_var['type'] == 'password')
847
-					echo '
872
+				elseif ($config_var['type'] == 'password') {
873
+									echo '
848 874
 										<input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;" class="input_password"><br>
849 875
 										<input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' class="input_password">';
876
+				}
850 877
 				// Show a selection box.
851 878
 				elseif ($config_var['type'] == 'select')
852 879
 				{
853 880
 					echo '
854 881
 										<select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>';
855
-					foreach ($config_var['data'] as $option)
856
-						echo '
882
+					foreach ($config_var['data'] as $option) {
883
+											echo '
857 884
 											<option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>';
885
+					}
858 886
 					echo '
859 887
 										</select>';
860 888
 				}
@@ -869,15 +897,17 @@  discard block
 block discarded – undo
869 897
 												<legend class="board_selector"><a href="#">', $txt['select_boards_from_list'], '</a></legend>';
870 898
 					foreach ($context['board_list'] as $id_cat => $cat)
871 899
 					{
872
-						if (!$first)
873
-							echo '
900
+						if (!$first) {
901
+													echo '
874 902
 											<hr>';
903
+						}
875 904
 						echo '
876 905
 											<strong>', $cat['name'], '</strong>
877 906
 											<ul>';
878
-						foreach ($cat['boards'] as $id_board => $brd)
879
-							echo '
907
+						foreach ($cat['boards'] as $id_board => $brd) {
908
+													echo '
880 909
 												<li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1" class="input_check"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat('&nbsp; &nbsp;', $brd['child_level']) : '', $brd['name'], '</label></li>';
910
+						}
881 911
 
882 912
 						echo '
883 913
 											</ul>';
@@ -887,12 +917,14 @@  discard block
 block discarded – undo
887 917
 											</fieldset>';
888 918
 				}
889 919
 				// Text area?
890
-				elseif ($config_var['type'] == 'large_text')
891
-					echo '
920
+				elseif ($config_var['type'] == 'large_text') {
921
+									echo '
892 922
 											<textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>';
923
+				}
893 924
 				// Permission group?
894
-				elseif ($config_var['type'] == 'permissions')
895
-					theme_inline_permissions($config_var['name']);
925
+				elseif ($config_var['type'] == 'permissions') {
926
+									theme_inline_permissions($config_var['name']);
927
+				}
896 928
 				// BBC selection?
897 929
 				elseif ($config_var['type'] == 'bbc')
898 930
 				{
@@ -903,20 +935,22 @@  discard block
 block discarded – undo
903 935
 
904 936
 					foreach ($context['bbc_columns'] as $bbcColumn)
905 937
 					{
906
-						foreach ($bbcColumn as $bbcTag)
907
-							echo '
938
+						foreach ($bbcColumn as $bbcTag) {
939
+													echo '
908 940
 														<li class="list_bbc floatleft">
909 941
 															<input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', ' class="input_check"> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', '
910 942
 														</li>';
943
+						}
911 944
 					}
912 945
 					echo '							</ul>
913 946
 												<input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', ' class="input_check"> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label>
914 947
 											</fieldset>';
915 948
 				}
916 949
 				// A simple message?
917
-				elseif ($config_var['type'] == 'var_message')
918
-					echo '
950
+				elseif ($config_var['type'] == 'var_message') {
951
+									echo '
919 952
 											<div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>', $config_var['var_message'], '</div>';
953
+				}
920 954
 				// Assume it must be a text box
921 955
 				else
922 956
 				{
@@ -941,63 +975,70 @@  discard block
 block discarded – undo
941 975
 											' . $config_var['postinput'] : '',
942 976
 										'</dd>';
943 977
 			}
944
-		}
945
-
946
-		else
978
+		} else
947 979
 		{
948 980
 			// Just show a separator.
949
-			if ($config_var == '')
950
-				echo '
981
+			if ($config_var == '') {
982
+							echo '
951 983
 								</dl>
952 984
 								<hr>
953 985
 								<dl class="settings">';
954
-			else
955
-				echo '
986
+			} else {
987
+							echo '
956 988
 									<dd>
957 989
 										<strong>' . $config_var . '</strong>
958 990
 									</dd>';
991
+			}
959 992
 		}
960 993
 	}
961 994
 
962
-	if ($is_open)
963
-		echo '
995
+	if ($is_open) {
996
+			echo '
964 997
 								</dl>';
998
+	}
965 999
 
966
-	if (empty($context['settings_save_dont_show']))
967
-		echo '
1000
+	if (empty($context['settings_save_dont_show'])) {
1001
+			echo '
968 1002
 								<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit">';
1003
+	}
969 1004
 
970
-	if ($is_open)
971
-		echo '
1005
+	if ($is_open) {
1006
+			echo '
972 1007
 							</div>';
1008
+	}
973 1009
 
974 1010
 
975 1011
 	// At least one token has to be used!
976
-	if (isset($context['admin-ssc_token']))
977
-		echo '
1012
+	if (isset($context['admin-ssc_token'])) {
1013
+			echo '
978 1014
 							<input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">';
1015
+	}
979 1016
 
980
-	if (isset($context['admin-dbsc_token']))
981
-		echo '
1017
+	if (isset($context['admin-dbsc_token'])) {
1018
+			echo '
982 1019
 							<input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">';
1020
+	}
983 1021
 
984
-	if (isset($context['admin-mp_token']))
985
-		echo '
1022
+	if (isset($context['admin-mp_token'])) {
1023
+			echo '
986 1024
 							<input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">';
1025
+	}
987 1026
 
988 1027
 	echo '
989 1028
 							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
990 1029
 						</form>
991 1030
 					</div>';
992 1031
 
993
-	if (!empty($context['settings_post_javascript']))
994
-		echo '
1032
+	if (!empty($context['settings_post_javascript'])) {
1033
+			echo '
995 1034
 					<script>
996 1035
 					', $context['settings_post_javascript'], '
997 1036
 					</script>';
1037
+	}
998 1038
 
999
-	if (!empty($context['settings_insert_below']))
1000
-		echo $context['settings_insert_below'];
1039
+	if (!empty($context['settings_insert_below'])) {
1040
+			echo $context['settings_insert_below'];
1041
+	}
1001 1042
 
1002 1043
 	// We may have added a board listing. If we did, we need to make it work.
1003 1044
 	addInlineJavascript('
@@ -1020,9 +1061,10 @@  discard block
 block discarded – undo
1020 1061
 {
1021 1062
 	global $context, $txt;
1022 1063
 
1023
-	if (!empty($context['saved_successful']))
1024
-		echo '
1064
+	if (!empty($context['saved_successful'])) {
1065
+			echo '
1025 1066
 					<div class="infobox">', $txt['settings_saved'], '</div>';
1067
+	}
1026 1068
 
1027 1069
 	// Standard fields.
1028 1070
 	template_show_list('standard_profile_fields');
@@ -1054,11 +1096,12 @@  discard block
 block discarded – undo
1054 1096
 	if (isset($_GET['msg']))
1055 1097
 	{
1056 1098
 		loadLanguage('Errors');
1057
-		if (isset($txt['custom_option_' . $_GET['msg']]))
1058
-			echo '
1099
+		if (isset($txt['custom_option_' . $_GET['msg']])) {
1100
+					echo '
1059 1101
 					<div class="errorbox">',
1060 1102
 						$txt['custom_option_' . $_GET['msg']], '
1061 1103
 					</div>';
1104
+		}
1062 1105
 	}
1063 1106
 
1064 1107
 	echo '
@@ -1124,9 +1167,10 @@  discard block
 block discarded – undo
1124 1167
 										<dd>
1125 1168
 											<select name="placement" id="placement">';
1126 1169
 
1127
-	foreach ($context['cust_profile_fields_placement'] as $order => $name)
1128
-		echo '
1170
+	foreach ($context['cust_profile_fields_placement'] as $order => $name) {
1171
+			echo '
1129 1172
 												<option value="', $order ,'"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_'. $name], '</option>';
1173
+	}
1130 1174
 
1131 1175
 	echo '
1132 1176
 											</select>
@@ -1149,9 +1193,10 @@  discard block
 block discarded – undo
1149 1193
 										</dt>
1150 1194
 										<dd>
1151 1195
 											<select name="field_type" id="field_type" onchange="updateInputBoxes();">';
1152
-	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type)
1153
-		echo '
1196
+	foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) {
1197
+			echo '
1154 1198
 												<option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>';
1199
+	}
1155 1200
 
1156 1201
 	echo '
1157 1202
 											</select>
@@ -1252,9 +1297,10 @@  discard block
 block discarded – undo
1252 1297
 								</fieldset>
1253 1298
 									<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">';
1254 1299
 
1255
-	if ($context['fid'])
1256
-		echo '
1300
+	if ($context['fid']) {
1301
+			echo '
1257 1302
 									<input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button_submit you_sure">';
1303
+	}
1258 1304
 
1259 1305
 	echo '
1260 1306
 							</div>
@@ -1297,8 +1343,7 @@  discard block
 block discarded – undo
1297 1343
 	{
1298 1344
 		echo '
1299 1345
 						<p class="centertext"><strong>', $txt['admin_search_results_none'], '</strong></p>';
1300
-	}
1301
-	else
1346
+	} else
1302 1347
 	{
1303 1348
 		echo '
1304 1349
 						<ol class="search_results">';
@@ -1324,9 +1369,10 @@  discard block
 block discarded – undo
1324 1369
 							<li>
1325 1370
 								<a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']';
1326 1371
 
1327
-				if ($result['help'])
1328
-					echo '
1372
+				if ($result['help']) {
1373
+									echo '
1329 1374
 								<p class="double_height">', $result['help'], '</p>';
1375
+				}
1330 1376
 
1331 1377
 				echo '
1332 1378
 							</li>';
@@ -1366,18 +1412,20 @@  discard block
 block discarded – undo
1366 1412
 									<strong>', $txt['setup_verification_answer'], '</strong>
1367 1413
 								</dd>';
1368 1414
 
1369
-		if (!empty($context['qa_by_lang'][$lang_id]))
1370
-			foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1415
+		if (!empty($context['qa_by_lang'][$lang_id])) {
1416
+					foreach ($context['qa_by_lang'][$lang_id] as $q_id)
1371 1417
 			{
1372 1418
 				$question = $context['question_answers'][$q_id];
1419
+		}
1373 1420
 				echo '
1374 1421
 								<dt>
1375 1422
 									<input type="text" name="question[', $lang_id, '][', $q_id, ']" value="', $question['question'], '" size="50" class="input_text verification_question">
1376 1423
 								</dt>
1377 1424
 								<dd>';
1378
-				foreach ($question['answers'] as $answer)
1379
-					echo '
1425
+				foreach ($question['answers'] as $answer) {
1426
+									echo '
1380 1427
 									<input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="input_text verification_answer">';
1428
+				}
1381 1429
 
1382 1430
 				echo '
1383 1431
 									<div class="qa_add_answer"><a href="javascript:void(0);" onclick="return addAnswer(this);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div>
@@ -1416,11 +1464,12 @@  discard block
 block discarded – undo
1416 1464
 							', $txt['errors_found'], ':
1417 1465
 							<ul>';
1418 1466
 
1419
-			foreach ($context['repair_errors'] as $error)
1420
-				echo '
1467
+			foreach ($context['repair_errors'] as $error) {
1468
+							echo '
1421 1469
 								<li>
1422 1470
 									', $error, '
1423 1471
 								</li>';
1472
+			}
1424 1473
 
1425 1474
 			echo '
1426 1475
 							</ul>
@@ -1430,16 +1479,15 @@  discard block
 block discarded – undo
1430 1479
 							<p class="padding">
1431 1480
 								<strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong>
1432 1481
 							</p>';
1433
-		}
1434
-		else
1435
-			echo '
1482
+		} else {
1483
+					echo '
1436 1484
 							<p>', $txt['maintain_no_errors'], '</p>
1437 1485
 							<p class="padding">
1438 1486
 								<a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a>
1439 1487
 							</p>';
1488
+		}
1440 1489
 
1441
-	}
1442
-	else
1490
+	} else
1443 1491
 	{
1444 1492
 		if (!empty($context['redirect_to_recount']))
1445 1493
 		{
@@ -1451,8 +1499,7 @@  discard block
 block discarded – undo
1451 1499
 								<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1452 1500
 								<input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '">
1453 1501
 							</form>';
1454
-		}
1455
-		else
1502
+		} else
1456 1503
 		{
1457 1504
 			echo '
1458 1505
 							<p>', $txt['errors_fixed'], '</p>
@@ -1604,8 +1651,8 @@  discard block
 block discarded – undo
1604 1651
 function template_admin_quick_search()
1605 1652
 {
1606 1653
 	global $context, $txt, $scripturl;
1607
-	if ($context['user']['is_admin'])
1608
-		echo '
1654
+	if ($context['user']['is_admin']) {
1655
+			echo '
1609 1656
 								<span class="floatright">
1610 1657
 									<span class="generic_icons filter centericon"></span>
1611 1658
 									<input type="search" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';" class="input_text">
@@ -1616,6 +1663,7 @@  discard block
 block discarded – undo
1616 1663
 									</select>
1617 1664
 									<input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button_submit">
1618 1665
 								</span>';
1619
-}
1666
+	}
1667
+	}
1620 1668
 
1621 1669
 ?>
Please login to merge, or discard this patch.
Themes/default/ManageSearch.template.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			<div class="windowbg2 noup">
27 27
 				<dl class="settings">
28 28
 					<dt>
29
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight1_val">
29
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight1_val">
30 30
 						', $txt['search_weight_frequency'], ':</label>
31 31
 					</dt>
32 32
 					<dd>
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 						<span id="weight1" class="search_weight">', $context['relative_weights']['search_weight_frequency'], '%</span>
35 35
 					</dd>
36 36
 					<dt>
37
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_age" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight2_val">
37
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_age" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight2_val">
38 38
 						', $txt['search_weight_age'], ':</label>
39 39
 					</dt>
40 40
 					<dd>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 						<span id="weight2" class="search_weight">', $context['relative_weights']['search_weight_age'], '%</span>
43 43
 					</dd>
44 44
 					<dt>
45
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_length" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight3_val">
45
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_length" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight3_val">
46 46
 						', $txt['search_weight_length'], ':</label>
47 47
 					</dt>
48 48
 					<dd>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 						<span id="weight3" class="search_weight">', $context['relative_weights']['search_weight_length'], '%</span>
51 51
 					</dd>
52 52
 					<dt>
53
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_subject" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight4_val">
53
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_subject" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight4_val">
54 54
 						', $txt['search_weight_subject'], ':</label>
55 55
 					</dt>
56 56
 					<dd>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 						<span id="weight4" class="search_weight">', $context['relative_weights']['search_weight_subject'], '%</span>
59 59
 					</dd>
60 60
 					<dt>
61
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_first_message" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight5_val">
61
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_first_message" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight5_val">
62 62
 						', $txt['search_weight_first_message'], ':</label>
63 63
 					</dt>
64 64
 					<dd>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 						<span id="weight5" class="search_weight">', $context['relative_weights']['search_weight_first_message'], '%</span>
67 67
 					</dd>
68 68
 					<dt>
69
-						<a href="', $scripturl, '?action=helpadmin;help=search_weight_sticky" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><label for="weight6_val">
69
+						<a href="', $scripturl, '?action=helpadmin;help=search_weight_sticky" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><label for="weight6_val">
70 70
 						', $txt['search_weight_sticky'], ':</label>
71 71
 					</dt>
72 72
 					<dd>
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		echo '
142 142
 						<dt>
143
-							<input type="radio" name="search_index" value="fulltext"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? ' checked' : '', empty($context['fulltext_index']) ? ' onclick="alert(\'' . $txt['search_method_fulltext_warning'] . '\'); selectRadioByName(this.form.search_index, \'fulltext\');"': '', ' class="input_radio">
143
+							<input type="radio" name="search_index" value="fulltext"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? ' checked' : '', empty($context['fulltext_index']) ? ' onclick="alert(\'' . $txt['search_method_fulltext_warning'] . '\'); selectRadioByName(this.form.search_index, \'fulltext\');"' : '', ' class="input_radio">
144 144
 							', $txt['search_method_fulltext_index'], '
145 145
 						</dt>
146 146
 						<dd>
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		echo '
192 192
 						<dt>
193 193
 							<input type="radio" name="search_index" value="', $api['setting_index'], '"', !empty($modSettings['search_index']) && $modSettings['search_index'] == $api['setting_index'] ? ' checked' : '', ' class="input_radio">
194
-							', $api['label'] ,'
194
+							', $api['label'], '
195 195
 						</dt>';
196 196
 
197 197
 	if ($api['desc'])
Please login to merge, or discard this patch.
Braces   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 			<div class="windowbg2 noup">
112 112
 				<dl class="settings">';
113 113
 
114
-	if (!empty($context['table_info']))
115
-		echo '
114
+	if (!empty($context['table_info'])) {
115
+			echo '
116 116
 					<dt>
117 117
 						<strong>', $txt['search_method_messages_table_space'], ':</strong>
118 118
 					</dt>
@@ -125,6 +125,7 @@  discard block
 block discarded – undo
125 125
 					<dd>
126 126
 						', $context['table_info']['index_length'], '
127 127
 					</dd>';
128
+	}
128 129
 	echo '
129 130
 				</dl>
130 131
 				', $context['double_index'] ? '<div class="noticebox">
@@ -146,16 +147,17 @@  discard block
 block discarded – undo
146 147
 						<dd>
147 148
 
148 149
 							<span class="smalltext">';
149
-	if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext']))
150
-		echo '
150
+	if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) {
151
+			echo '
151 152
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]';
152
-	elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext']))
153
-		echo '
153
+	} elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) {
154
+			echo '
154 155
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create'];
155
-	else
156
-		echo '
156
+	} else {
157
+			echo '
157 158
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br>
158 159
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length'];
160
+	}
159 161
 	echo '
160 162
 								</span>
161 163
 						</dd>';
@@ -168,25 +170,27 @@  discard block
 block discarded – undo
168 170
 						</dt>
169 171
 						<dd>
170 172
 							<span class="smalltext">';
171
-	if ($context['custom_index'])
172
-		echo '
173
+	if ($context['custom_index']) {
174
+			echo '
173 175
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br>
174 176
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
175
-	elseif ($context['partial_custom_index'])
176
-		echo '
177
+	} elseif ($context['partial_custom_index']) {
178
+			echo '
177 179
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br>
178 180
 								<strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
179
-	else
180
-		echo '
181
+	} else {
182
+			echo '
181 183
 								<strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]';
184
+	}
182 185
 	echo '
183 186
 							</span>
184 187
 						</dd>';
185 188
 
186 189
 	foreach ($context['search_apis'] as $api)
187 190
 	{
188
-		if (empty($api['label']) || $api['has_template'])
189
-			continue;
191
+		if (empty($api['label']) || $api['has_template']) {
192
+					continue;
193
+		}
190 194
 
191 195
 		echo '
192 196
 						<dt>
@@ -194,12 +198,13 @@  discard block
 block discarded – undo
194 198
 							', $api['label'] ,'
195 199
 						</dt>';
196 200
 
197
-	if ($api['desc'])
198
-		echo '
201
+	if ($api['desc']) {
202
+			echo '
199 203
 						<dd>
200 204
 							<span class="smalltext">', $api['desc'], '</span>
201 205
 						</dd>';
202 206
 	}
207
+	}
203 208
 
204 209
 	echo '
205 210
 					</dl>
Please login to merge, or discard this patch.
Themes/default/ManageMembers.template.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 				</thead>
149 149
 				<tbody>';
150 150
 
151
-			foreach ($context['membergroups'] as $membergroup)
152
-				echo '
151
+			foreach ($context['membergroups'] as $membergroup) {
152
+							echo '
153 153
 					<tr class="windowbg">
154 154
 						<td>', $membergroup['name'], '</td>
155 155
 						<td class="centercol">
@@ -159,6 +159,7 @@  discard block
 block discarded – undo
159 159
 							', $membergroup['can_be_additional'] ? '<input type="checkbox" name="membergroups[2][]" value="' . $membergroup['id'] . '" checked class="input_check">' : '', '
160 160
 						</td>
161 161
 					</tr>';
162
+			}
162 163
 
163 164
 			echo '
164 165
 					<tr class="windowbg">
@@ -185,8 +186,8 @@  discard block
 block discarded – undo
185 186
 				</thead>
186 187
 				<tbody>';
187 188
 
188
-			foreach ($context['postgroups'] as $postgroup)
189
-				echo '
189
+			foreach ($context['postgroups'] as $postgroup) {
190
+							echo '
190 191
 					<tr class="windowbg">
191 192
 						<td>
192 193
 							', $postgroup['name'], '
@@ -195,6 +196,7 @@  discard block
 block discarded – undo
195 196
 							<input type="checkbox" name="postgroups[]" value="', $postgroup['id'], '" checked class="input_check">
196 197
 						</td>
197 198
 					</tr>';
199
+			}
198 200
 
199 201
 			echo '
200 202
 					<tr class="windowbg">
Please login to merge, or discard this patch.
Themes/default/Likes.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 		<meta charset="', $context['character_set'], '">
25 25
 		<meta name="robots" content="noindex">
26 26
 		<title>', $context['page_title'], '</title>
27
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
28
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
27
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
28
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
29 29
 	</head>
30 30
 	<body id="likes_popup">
31 31
 		<div class="windowbg">
Please login to merge, or discard this patch.
Themes/default/ManageAttachments.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
 					}
177 177
 
178 178
 					function show_msg() {
179
-						$(\'#progress_msg\').html(\'<div><img src="', $settings['actual_images_url'], '/loading_sm.gif" alt="', $txt['ajax_in_progress'], '" width="35" height="35">&nbsp; ', $txt['attachment_transfer_progress'] , '<\/div>\');
179
+						$(\'#progress_msg\').html(\'<div><img src="', $settings['actual_images_url'], '/loading_sm.gif" alt="', $txt['ajax_in_progress'], '" width="35" height="35">&nbsp; ', $txt['attachment_transfer_progress'], '<\/div>\');
180 180
 						show_progress();
181 181
 					}
182 182
 
Please login to merge, or discard this 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.
proxy.php 1 patch
Braces   +32 added lines, -21 removed lines patch added patch discarded remove patch
@@ -66,26 +66,31 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function checkRequest()
68 68
 	{
69
-		if (!$this->enabled)
70
-			return false;
69
+		if (!$this->enabled) {
70
+					return false;
71
+		}
71 72
 
72 73
 		// Try to create the image cache directory if it doesn't exist
73
-		if (!file_exists($this->cache))
74
-			if (!mkdir($this->cache) || !copy(dirname($this->cache) . '/index.php', $this->cache . '/index.php'))
74
+		if (!file_exists($this->cache)) {
75
+					if (!mkdir($this->cache) || !copy(dirname($this->cache) . '/index.php', $this->cache . '/index.php'))
75 76
 				return false;
77
+		}
76 78
 
77
-		if (empty($_GET['hash']) || empty($_GET['request']))
78
-			return false;
79
+		if (empty($_GET['hash']) || empty($_GET['request'])) {
80
+					return false;
81
+		}
79 82
 
80 83
 		$hash = $_GET['hash'];
81 84
 		$request = $_GET['request'];
82 85
 
83
-		if (md5($request . $this->secret) != $hash)
84
-			return false;
86
+		if (md5($request . $this->secret) != $hash) {
87
+					return false;
88
+		}
85 89
 
86 90
 		// Attempt to cache the request if it doesn't exist
87
-		if (!$this->isCached($request))
88
-			return $this->cacheImage($request);
91
+		if (!$this->isCached($request)) {
92
+					return $this->cacheImage($request);
93
+		}
89 94
 
90 95
 		return true;
91 96
 	}
@@ -106,15 +111,17 @@  discard block
 block discarded – undo
106 111
 		if (!$cached || time() - $cached['time'] > (5 * 86400))
107 112
 		{
108 113
 			@unlink($cached_file);
109
-			if ($this->checkRequest())
110
-				$this->serve();
114
+			if ($this->checkRequest()) {
115
+							$this->serve();
116
+			}
111 117
 			exit;
112 118
 		}
113 119
 
114 120
 		// Make sure we're serving an image
115 121
 		$contentParts = explode('/', !empty($cached['content_type']) ? $cached['content_type'] : '');
116
-		if ($contentParts[0] != 'image')
117
-			exit;
122
+		if ($contentParts[0] != 'image') {
123
+					exit;
124
+		}
118 125
 
119 126
 		header('Content-type: ' . $cached['content_type']);
120 127
 		header('Content-length: ' . $cached['size']);
@@ -160,19 +167,22 @@  discard block
 block discarded – undo
160 167
 		$request = $curl->get_url_data($request);
161 168
 		$response = $request->result();
162 169
 
163
-		if (empty($response))
164
-			return false;
170
+		if (empty($response)) {
171
+					return false;
172
+		}
165 173
 
166 174
 		$headers = $response['headers'];
167 175
 
168 176
 		// Make sure the url is returning an image
169 177
 		$contentParts = explode('/', !empty($headers['content-type']) ? $headers['content-type'] : '');
170
-		if ($contentParts[0] != 'image')
171
-			return false;
178
+		if ($contentParts[0] != 'image') {
179
+					return false;
180
+		}
172 181
 
173 182
 		// Validate the filesize
174
-		if ($response['size'] > ($this->maxSize * 1024))
175
-			return false;
183
+		if ($response['size'] > ($this->maxSize * 1024)) {
184
+					return false;
185
+		}
176 186
 
177 187
 		return file_put_contents($dest, json_encode(array(
178 188
 			'content_type' => $headers['content-type'],
@@ -184,7 +194,8 @@  discard block
 block discarded – undo
184 194
 }
185 195
 
186 196
 $proxy = new ProxyServer();
187
-if ($proxy->checkRequest())
197
+if ($proxy->checkRequest()) {
188 198
 	$proxy->serve();
199
+}
189 200
 
190 201
 exit;
Please login to merge, or discard this patch.
ssi_examples.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -583,8 +583,7 @@  discard block
 block discarded – undo
583 583
 	{
584 584
 		$header = '<?php require("' . ($user_info['is_admin'] ? addslashes(realpath($boarddir . '/SSI.php')) : 'SSI.php') . '"); ?>' . "\n" . $header;
585 585
 		return $header . template_homepage_sample1_html() . $footer;
586
-	}
587
-	else
586
+	} else
588 587
 	{
589 588
 		echo $header;
590 589
 		template_homepage_sample1_php();
@@ -599,9 +598,10 @@  discard block
 block discarded – undo
599 598
 
600 599
 	$topics = ssi_recentTopics(8, null, null, 'array');
601 600
 
602
-	foreach ($topics as $topic)
603
-		echo '
601
+	foreach ($topics as $topic) {
602
+			echo '
604 603
 			<li><a href="', $topic['href'], '">', $topic['subject'], '</a> ', $txt['by'], ' ', $topic['poster']['link'], '</li>';
604
+	}
605 605
 
606 606
 	unset($topics);
607 607
 
Please login to merge, or discard this patch.