Completed
Push — release-2.1 ( 8d796c...b41d22 )
by Michael
02:24 queued 02:16
created
Packages/backups/index.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4
-if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
4
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) {
5 5
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
6
+} else {
7 7
 	exit;
8
+}
8 9
 
9 10
 ?>
10 11
\ No newline at end of file
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.
other/Settings.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,8 +186,9 @@  discard block
 block discarded – undo
186 186
 
187 187
 ########## Error-Catching ##########
188 188
 # Note: You shouldn't touch these settings.
189
-if (file_exists(dirname(__FILE__) . '/db_last_error.php'))
189
+if (file_exists(dirname(__FILE__) . '/db_last_error.php')) {
190 190
 	include(dirname(__FILE__) . '/db_last_error.php');
191
+}
191 192
 
192 193
 if (!isset($db_last_error))
193 194
 {
@@ -202,11 +203,14 @@  discard block
 block discarded – undo
202 203
 }
203 204
 
204 205
 # Make sure the paths are correct... at least try to fix them.
205
-if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
206
+if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) {
206 207
 	$boarddir = dirname(__FILE__);
207
-if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources'))
208
+}
209
+if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) {
208 210
 	$sourcedir = $boarddir . '/Sources';
209
-if (!file_exists($cachedir) && file_exists($boarddir . '/cache'))
211
+}
212
+if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) {
210 213
 	$cachedir = $boarddir . '/cache';
214
+}
211 215
 
212 216
 ?>
213 217
\ No newline at end of file
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/MoveTopic.template.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
 		foreach ($category['boards'] as $board)
41 41
 			echo '
42
-									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=&gt; ' : '', $board['name'], '</option>';
42
+									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt; ' : '', $board['name'], '</option>';
43 43
 		echo '
44 44
 								</optgroup>';
45 45
 	}
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	// Stick our "create a redirection topic" template in here...
64 64
 	template_redirect_options('move');
65 65
 
66
-    echo '
66
+	echo '
67 67
 					<input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
68 68
 				</div>
69 69
 			</div>';
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function template_redirect_options($type)
88 88
 {
89
-    global $txt, $context, $modSettings;
89
+	global $txt, $context, $modSettings;
90 90
 
91
-    echo '
91
+	echo '
92 92
 					<label for="postRedirect"><input type="checkbox" name="postRedirect" id="postRedirect"', $context['is_approved'] ? ' checked' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt[$type . '_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';"> ', $txt['post_redirection'], '.</label>
93 93
 					<fieldset id="reasonArea" style="margin-top: 1ex;', $context['is_approved'] ? '' : 'display: none;', '">
94 94
 						<dl class="settings">
Please login to merge, or discard this patch.
Braces   +25 added lines, -20 removed lines patch added patch discarded remove patch
@@ -37,9 +37,10 @@  discard block
 block discarded – undo
37 37
 		echo '
38 38
 								<optgroup label="', $category['name'], '">';
39 39
 
40
-		foreach ($category['boards'] as $board)
41
-			echo '
40
+		foreach ($category['boards'] as $board) {
41
+					echo '
42 42
 									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=&gt; ' : '', $board['name'], '</option>';
43
+		}
43 44
 		echo '
44 45
 								</optgroup>';
45 46
 	}
@@ -68,9 +69,10 @@  discard block
 block discarded – undo
68 69
 				</div>
69 70
 			</div>';
70 71
 
71
-	if ($context['back_to_topic'])
72
-		echo '
72
+	if ($context['back_to_topic']) {
73
+			echo '
73 74
 			<input type="hidden" name="goback" value="1">';
75
+	}
74 76
 
75 77
 	echo '
76 78
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
@@ -120,8 +122,7 @@  discard block
 block discarded – undo
120 122
 									<option value="86400">', $txt['two_months'], '</option>
121 123
 								</select>
122 124
 							</dd>';
123
-	}
124
-	else
125
+	} else
125 126
 	{
126 127
 		echo '
127 128
 							<input type="hidden" name="redirect_expires" value="0">';
@@ -217,9 +218,9 @@  discard block
 block discarded – undo
217 218
 						<input type="submit" value="', $txt['go'], '" class="button">
218 219
 					</form>';
219 220
 
221
+	} else {
222
+			echo $txt['target_below'];
220 223
 	}
221
-	else
222
-		echo $txt['target_below'];
223 224
 
224 225
 	echo '				</h4>
225 226
 			</div>';
@@ -237,12 +238,13 @@  discard block
 block discarded – undo
237 238
 
238 239
 		$merge_button = create_button('merge', 'merge', '');
239 240
 
240
-		foreach ($context['topics'] as $topic)
241
-			echo '
241
+		foreach ($context['topics'] as $topic) {
242
+					echo '
242 243
 						<li>
243 244
 							<a href="', $scripturl, '?action=mergetopics;sa=options;board=', $context['current_board'], '.0;from=', $context['origin_topic'], ';to=', $topic['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $merge_button, '</a>&nbsp;
244 245
 							<a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank">', $topic['subject'], '</a> ', $txt['started_by'], ' ', $topic['poster']['link'], '
245 246
 						</li>';
247
+		}
246 248
 
247 249
 		echo '
248 250
 					</ul>
@@ -251,8 +253,7 @@  discard block
 block discarded – undo
251 253
 				<div class="pagesection">
252 254
 					', $context['page_index'], '
253 255
 				</div>';
254
-	}
255
-	else
256
+	} else
256 257
 	{
257 258
 		// Just a nice "There aren't any topics" message
258 259
 		echo '
@@ -306,8 +307,8 @@  discard block
 block discarded – undo
306 307
 					</tr>
307 308
 				</thead>
308 309
 				<tbody>';
309
-		foreach ($context['topics'] as $topic)
310
-			echo '
310
+		foreach ($context['topics'] as $topic) {
311
+					echo '
311 312
 					<tr class="windowbg">
312 313
 						<td>
313 314
 							<input type="checkbox" name="topics[]" value="' . $topic['id'] . '" checked>
@@ -327,6 +328,7 @@  discard block
 block discarded – undo
327 328
 							<input type="checkbox" name="notifications[]" value="' . $topic['id'] . '" checked>
328 329
 						</td>
329 330
 					</tr>';
331
+		}
330 332
 		echo '
331 333
 				</tbody>
332 334
 			</table>
@@ -337,9 +339,10 @@  discard block
 block discarded – undo
337 339
 				<fieldset id="merge_subject" class="merge_options">
338 340
 					<legend>', $txt['merge_select_subject'], '</legend>
339 341
 					<select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">';
340
-	foreach ($context['topics'] as $topic)
341
-		echo '
342
+	foreach ($context['topics'] as $topic) {
343
+			echo '
342 344
 						<option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>';
345
+	}
343 346
 	echo '
344 347
 						<option value="0">', $txt['merge_custom_subject'], ':</option>
345 348
 					</select>
@@ -357,11 +360,12 @@  discard block
 block discarded – undo
357 360
 				<fieldset id="merge_board" class="merge_options">
358 361
 					<legend>', $txt['merge_select_target_board'], '</legend>
359 362
 					<ul>';
360
-		foreach ($context['boards'] as $board)
361
-			echo '
363
+		foreach ($context['boards'] as $board) {
364
+					echo '
362 365
 						<li>
363 366
 							<input type="radio" name="board" value="' . $board['id'] . '"' . ($board['selected'] ? ' checked' : '') . '> ' . $board['name'] . '
364 367
 						</li>';
368
+		}
365 369
 		echo '
366 370
 					</ul>
367 371
 				</fieldset>';
@@ -372,11 +376,12 @@  discard block
 block discarded – undo
372 376
 				<fieldset id="merge_poll" class="merge_options">
373 377
 					<legend>' . $txt['merge_select_poll'] . '</legend>
374 378
 					<ul>';
375
-		foreach ($context['polls'] as $poll)
376
-			echo '
379
+		foreach ($context['polls'] as $poll) {
380
+					echo '
377 381
 						<li>
378 382
 							<input type="radio" name="poll" value="' . $poll['id'] . '"' . ($poll['selected'] ? ' checked' : '') . '> ' . $poll['question'] . ' (' . $txt['topic'] . ': <a href="' . $scripturl . '?topic=' . $poll['topic']['id'] . '.0" target="_blank">' . $poll['topic']['subject'] . '</a>)
379 383
 						</li>';
384
+		}
380 385
 		echo '
381 386
 						<li>
382 387
 							<input type="radio" name="poll" value="-1"> (' . $txt['merge_no_poll'] . ')
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.
Themes/default/ReportToMod.template.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,16 +62,17 @@
 block discarded – undo
62 62
 					<div id="error_box" class="errorbox">
63 63
 						<ul id="error_list">';
64 64
 
65
-		foreach ($context['post_errors'] as $key => $error)
66
-			echo '
65
+		foreach ($context['post_errors'] as $key => $error) {
66
+					echo '
67 67
 							<li id="error_', $key, '" class="error">', $error, '</li>';
68
+		}
68 69
 
69 70
 		echo '
70 71
 						</ul>';
71
-	}
72
-	else
73
-		echo '
72
+	} else {
73
+			echo '
74 74
 						<div style="display:none" id="error_box" class="errorbox">';
75
+	}
75 76
 
76 77
 	echo '
77 78
 					</div>';
Please login to merge, or discard this patch.
Themes/default/Help.template.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 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="help_popup">
31 31
 		<div class="windowbg description">
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 		<title>', $txt['find_members'], '</title>
51 51
 		<meta charset="', $context['character_set'], '">
52 52
 		<meta name="robots" content="noindex">
53
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
54
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
53
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
54
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
55 55
 		<script>
56 56
 			var membersAdded = [];
57 57
 			function addMember(name)
Please login to merge, or discard this patch.
Braces   +15 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,9 +86,10 @@  discard block
 block discarded – undo
86 86
 					<span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>';
87 87
 
88 88
 	// Only offer to search for buddies if we have some!
89
-	if (!empty($context['show_buddies']))
90
-		echo '
89
+	if (!empty($context['show_buddies'])) {
90
+			echo '
91 91
 					<span class="smalltext"><label for="buddies"><input type="checkbox" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>';
92
+	}
92 93
 
93 94
 	echo '
94 95
 					<div class="padding righttext">
@@ -103,10 +104,10 @@  discard block
 block discarded – undo
103 104
 					<h3 class="catbg">', $txt['find_results'], '</h3>
104 105
 				</div>';
105 106
 
106
-	if (empty($context['results']))
107
-		echo '
107
+	if (empty($context['results'])) {
108
+			echo '
108 109
 				<p class="error">', $txt['find_no_results'], '</p>';
109
-	else
110
+	} else
110 111
 	{
111 112
 		echo '
112 113
 				<ul class="padding">';
@@ -135,11 +136,12 @@  discard block
 block discarded – undo
135 136
 			<input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '">
136 137
 		</form>';
137 138
 
138
-	if (empty($context['results']))
139
-		echo '
139
+	if (empty($context['results'])) {
140
+			echo '
140 141
 		<script>
141 142
 			document.getElementById("search").focus();
142 143
 		</script>';
144
+	}
143 145
 
144 146
 	echo '
145 147
 	</body>
@@ -183,8 +185,8 @@  discard block
 block discarded – undo
183 185
 {
184 186
 	global $txt, $context, $modSettings;
185 187
 
186
-	if (!empty($modSettings['requireAgreement']))
187
-		echo '
188
+	if (!empty($modSettings['requireAgreement'])) {
189
+			echo '
188 190
 			<div class="cat_bar">
189 191
 				<h3 class="catbg">
190 192
 					', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], '
@@ -193,11 +195,12 @@  discard block
 block discarded – undo
193 195
 			<div class="roundframe">
194 196
 				', $context['agreement'], '
195 197
 			</div>';
196
-	else
197
-		echo '
198
+	} else {
199
+			echo '
198 200
 			<div class="noticebox">
199 201
 				', $txt['agreement_disabled'], '
200 202
 			</div>';
201
-}
203
+	}
204
+	}
202 205
 
203 206
 ?>
204 207
\ No newline at end of file
Please login to merge, or discard this patch.