Completed
Branch release-2.1 (e49a83)
by Michael
08:59
created
Themes/default/images/membericons/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.
Themes/default/images/topic/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.
Themes/default/scripts/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.
Themes/default/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.
Themes/default/ManageCalendar.template.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,9 +39,10 @@  discard block
 block discarded – undo
39 39
 						<select name="year" id="year" onchange="generateDays();">
40 40
 							<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>';
41 41
 	// Show a list of all the years we allow...
42
-	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
43
-		echo '
42
+	for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
43
+			echo '
44 44
 							<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>';
45
+	}
45 46
 
46 47
 	echo '
47 48
 						</select>&nbsp;
@@ -49,9 +50,10 @@  discard block
 block discarded – undo
49 50
 						<select name="month" id="month" onchange="generateDays();">';
50 51
 
51 52
 	// There are 12 months per year - ensure that they all get listed.
52
-	for ($month = 1; $month <= 12; $month++)
53
-		echo '
53
+	for ($month = 1; $month <= 12; $month++) {
54
+			echo '
54 55
 							<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
56
+	}
55 57
 
56 58
 	echo '
57 59
 						</select>&nbsp;
@@ -59,23 +61,25 @@  discard block
 block discarded – undo
59 61
 						<select name="day" id="day" onchange="generateDays();">';
60 62
 
61 63
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
62
-	for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
63
-		echo '
64
+	for ($day = 1; $day <= $context['holiday']['last_day']; $day++) {
65
+			echo '
64 66
 							<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>';
67
+	}
65 68
 
66 69
 	echo '
67 70
 						</select>
68 71
 					</dd>
69 72
 				</dl>';
70 73
 
71
-	if ($context['is_new'])
72
-		echo '
74
+	if ($context['is_new']) {
75
+			echo '
73 76
 				<input type="submit" value="', $txt['holidays_button_add'], '" class="button_submit">';
74
-	else
75
-		echo '
77
+	} else {
78
+			echo '
76 79
 				<input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button_submit">
77 80
 				<input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button_submit">
78 81
 				<input type="hidden" name="holiday" value="', $context['holiday']['id'], '">';
82
+	}
79 83
 	echo '
80 84
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
81 85
 			</div>
Please login to merge, or discard this patch.
Themes/default/Poll.template.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 				<h3 class="catbg">', $context['page_title'], '</h3>
47 47
 			</div>';
48 48
 
49
-	if (!empty($context['poll_error']['messages']))
50
-		echo '
49
+	if (!empty($context['poll_error']['messages'])) {
50
+			echo '
51 51
 			<div class="errorbox">
52 52
 				<dl class="poll_error">
53 53
 					<dt>
@@ -58,6 +58,7 @@  discard block
 block discarded – undo
58 58
 					</dt>
59 59
 				</dl>
60 60
 			</div>';
61
+	}
61 62
 
62 63
 	echo '
63 64
 			<div>
@@ -79,8 +80,9 @@  discard block
 block discarded – undo
79 80
 								<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" class="input_text" size="80" maxlength="255">';
80 81
 
81 82
 		// Does this option have a vote count yet, or is it new?
82
-		if ($choice['votes'] != -1)
83
-			echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
83
+		if ($choice['votes'] != -1) {
84
+					echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
85
+		}
84 86
 
85 87
 		echo '
86 88
 							</dd>';
@@ -118,14 +120,15 @@  discard block
 block discarded – undo
118 120
 								<input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', ' class="input_check">
119 121
 							</dd>';
120 122
 
121
-		if ($context['poll']['guest_vote_allowed'])
122
-			echo '
123
+		if ($context['poll']['guest_vote_allowed']) {
124
+					echo '
123 125
 							<dt>
124 126
 								<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
125 127
 							</dt>
126 128
 							<dd>
127 129
 								<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', ' class="input_check">
128 130
 							</dd>';
131
+		}
129 132
 	}
130 133
 
131 134
 	echo '
@@ -140,12 +143,13 @@  discard block
 block discarded – undo
140 143
 						</dl>
141 144
 					</fieldset>';
142 145
 	// If this is an edit, we can allow them to reset the vote counts.
143
-	if ($context['is_edit'])
144
-		echo '
146
+	if ($context['is_edit']) {
147
+			echo '
145 148
 					<fieldset id="poll_reset">
146 149
 						<legend>', $txt['reset_votes'], '</legend>
147 150
 						<input type="checkbox" name="resetVoteCount" value="on" class="input_check"> ' . $txt['reset_votes_check'] . '
148 151
 					</fieldset>';
152
+	}
149 153
 	echo '
150 154
 					<input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit">
151 155
 				</div>
Please login to merge, or discard this patch.
Themes/default/GenericList.template.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
 				),
221 221
 			),
222 222
 		);
223
-	*/
223
+	 */
224 224
 
225 225
 	// Are we using right-to-left orientation?
226 226
 	$first = $context['right_to_left'] ? 'last' : 'first';
Please login to merge, or discard this patch.
Braces   +62 added lines, -44 removed lines patch added patch discarded remove patch
@@ -21,26 +21,30 @@  discard block
 block discarded – undo
21 21
 
22 22
 	// Get a shortcut to the current list.
23 23
 	$list_id = $list_id === null ? (!empty($context['default_list']) ? $context['default_list'] : '') : $list_id;
24
-	if (empty($list_id) || empty($context[$list_id]))
25
-		return;
24
+	if (empty($list_id) || empty($context[$list_id])) {
25
+			return;
26
+	}
26 27
 	$cur_list = &$context[$list_id];
27 28
 
28 29
 	// These are the main tabs that is used all around the template.
29
-	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top'))
30
-		template_create_list_menu($cur_list['list_menu'], 'top');
30
+	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) {
31
+			template_create_list_menu($cur_list['list_menu'], 'top');
32
+	}
31 33
 
32
-	if (isset($cur_list['form']))
33
-		echo '
34
+	if (isset($cur_list['form'])) {
35
+			echo '
34 36
 	<form action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="', $context['character_set'], '">';
37
+	}
35 38
 
36 39
 	// Show the title of the table (if any).
37
-	if (!empty($cur_list['title']))
38
-		echo '
40
+	if (!empty($cur_list['title'])) {
41
+			echo '
39 42
 			<div class="cat_bar">
40 43
 				<h3 class="catbg">
41 44
 					', $cur_list['title'], '
42 45
 				</h3>
43 46
 			</div>';
47
+	}
44 48
 
45 49
 	if (isset($cur_list['additional_rows']['after_title']))
46 50
 	{
@@ -51,20 +55,23 @@  discard block
 block discarded – undo
51 55
 			</div>';
52 56
 	}
53 57
 
54
-	if (isset($cur_list['additional_rows']['top_of_list']))
55
-		template_additional_rows('top_of_list', $cur_list);
58
+	if (isset($cur_list['additional_rows']['top_of_list'])) {
59
+			template_additional_rows('top_of_list', $cur_list);
60
+	}
56 61
 
57 62
 	if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers']))
58 63
 	{
59 64
 		// Show the page index (if this list doesn't intend to show all items).
60
-		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
61
-			echo '
65
+		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) {
66
+					echo '
62 67
 				<div class="floatleft">
63 68
 					<div class="pagesection">', $cur_list['page_index'], '</div>
64 69
 				</div>';
70
+		}
65 71
 
66
-		if (isset($cur_list['additional_rows']['above_column_headers']))
67
-			template_additional_rows('above_column_headers', $cur_list);
72
+		if (isset($cur_list['additional_rows']['above_column_headers'])) {
73
+					template_additional_rows('above_column_headers', $cur_list);
74
+		}
68 75
 	}
69 76
 
70 77
 	echo '
@@ -94,11 +101,12 @@  discard block
 block discarded – undo
94 101
 			<tbody>';
95 102
 
96 103
 	// Show a nice message informing there are no items in this list.
97
-	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label']))
98
-		echo '
104
+	if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) {
105
+			echo '
99 106
 				<tr class="windowbg">
100 107
 					<td colspan="', $cur_list['num_columns'], '" class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</td>
101 108
 				</tr>';
109
+	}
102 110
 
103 111
 	// Show the list rows.
104 112
 	elseif (!empty($cur_list['rows']))
@@ -108,10 +116,11 @@  discard block
 block discarded – undo
108 116
 			echo '
109 117
 				<tr class="windowbg', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', ' id="list_', $list_id, '_', $id, '">';
110 118
 
111
-			if (!empty($row['data']))
112
-				foreach ($row['data'] as $row_data)
119
+			if (!empty($row['data'])) {
120
+							foreach ($row['data'] as $row_data)
113 121
 					echo '
114 122
 					<td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>';
123
+			}
115 124
 
116 125
 			echo '
117 126
 				</tr>';
@@ -128,46 +137,53 @@  discard block
 block discarded – undo
128 137
 			<div class="flow_auto">';
129 138
 
130 139
 		// Show the page index (if this list doesn't intend to show all items).
131
-		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index']))
132
-			echo '
140
+		if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) {
141
+					echo '
133 142
 				<div class="floatleft">
134 143
 					<div class="pagesection">', $cur_list['page_index'], '</div>
135 144
 				</div>';
145
+		}
136 146
 
137
-		if (isset($cur_list['additional_rows']['below_table_data']))
138
-			template_additional_rows('below_table_data', $cur_list);
147
+		if (isset($cur_list['additional_rows']['below_table_data'])) {
148
+					template_additional_rows('below_table_data', $cur_list);
149
+		}
139 150
 
140 151
 		echo '
141 152
 			</div>';
142 153
 	}
143 154
 
144
-	if (isset($cur_list['additional_rows']['bottom_of_list']))
145
-		template_additional_rows('bottom_of_list', $cur_list);
155
+	if (isset($cur_list['additional_rows']['bottom_of_list'])) {
156
+			template_additional_rows('bottom_of_list', $cur_list);
157
+	}
146 158
 
147 159
 	if (isset($cur_list['form']))
148 160
 	{
149
-		foreach ($cur_list['form']['hidden_fields'] as $name => $value)
150
-			echo '
161
+		foreach ($cur_list['form']['hidden_fields'] as $name => $value) {
162
+					echo '
151 163
 			<input type="hidden" name="', $name, '" value="', $value, '">';
164
+		}
152 165
 
153
-		if (isset($cur_list['form']['token']))
154
-			echo '
166
+		if (isset($cur_list['form']['token'])) {
167
+					echo '
155 168
 			<input type="hidden" name="', $context[$cur_list['form']['token'] . '_token_var'], '" value="', $context[$cur_list['form']['token'] . '_token'], '">';
169
+		}
156 170
 
157 171
 		echo '
158 172
 	</form>';
159 173
 	}
160 174
 
161 175
 	// Tabs at the bottom.  Usually bottom aligned.
162
-	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom'))
163
-		template_create_list_menu($cur_list['list_menu'], 'bottom');
176
+	if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) {
177
+			template_create_list_menu($cur_list['list_menu'], 'bottom');
178
+	}
164 179
 
165
-	if (isset($cur_list['javascript']))
166
-		echo '
180
+	if (isset($cur_list['javascript'])) {
181
+			echo '
167 182
 	<script>
168 183
 		', $cur_list['javascript'], '
169 184
 	</script>';
170
-}
185
+	}
186
+	}
171 187
 
172 188
 /**
173 189
  * This template displays additional rows above or below the list.
@@ -177,10 +193,11 @@  discard block
 block discarded – undo
177 193
  */
178 194
 function template_additional_rows($row_position, $cur_list)
179 195
 {
180
-	foreach ($cur_list['additional_rows'][$row_position] as $row)
181
-		echo '
196
+	foreach ($cur_list['additional_rows'][$row_position] as $row) {
197
+			echo '
182 198
 			<div class="additional_row', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>';
183
-}
199
+	}
200
+	}
184 201
 
185 202
 /**
186 203
  * This function creates a menu
@@ -239,18 +256,19 @@  discard block
 block discarded – undo
239 256
 
240 257
 		foreach ($list_menu['links'] as $link)
241 258
 		{
242
-			if ($link['is_selected'])
243
-				echo '
259
+			if ($link['is_selected']) {
260
+							echo '
244 261
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '">&nbsp;</td>
245 262
 							<td class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back">
246 263
 								<a href="', $link['href'], '">', $link['label'], '</a>
247 264
 							</td>
248 265
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '">&nbsp;</td>';
249
-			else
250
-				echo '
266
+			} else {
267
+							echo '
251 268
 							<td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back">
252 269
 								<a href="', $link['href'], '">', $link['label'], '</a>
253 270
 							</td>';
271
+			}
254 272
 		}
255 273
 
256 274
 		echo '
@@ -261,12 +279,12 @@  discard block
 block discarded – undo
261 279
 				<td>&nbsp;</td>' : '', '
262 280
 			</tr>
263 281
 		</table>';
264
-	}
265
-	elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons')
282
+	} elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons')
266 283
 	{
267 284
 		$links = array();
268
-		foreach ($list_menu['links'] as $link)
269
-			$links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>';
285
+		foreach ($list_menu['links'] as $link) {
286
+					$links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>';
287
+		}
270 288
 
271 289
 		echo '
272 290
 		<table style="margin-', $list_menu['position'], ': 10px; width: 100%;">
Please login to merge, or discard this patch.
Themes/default/Recent.template.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	<div id="recent" class="main_section">
22 22
 		<div class="cat_bar">
23 23
 			<h3 class="catbg">
24
-				<span class="xx"></span>',$txt['recent_posts'],'
24
+				<span class="xx"></span>',$txt['recent_posts'], '
25 25
 			</h3>
26 26
 		</div>
27 27
 		<div class="pagesection">', $context['page_index'], '</div>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	foreach ($context['posts'] as $post)
36 36
 	{
37 37
 		echo '
38
-			<div class="', $post['css_class'] ,'">
38
+			<div class="', $post['css_class'], '">
39 39
 					<div class="counter">', $post['counter'], '</div>
40 40
 					<div class="topic_details">
41 41
 						<h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		// How about... even... remove it entirely?!
61 61
 		if ($post['can_delete'])
62 62
 			echo '
63
-						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
63
+						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
64 64
 
65 65
 		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
66 66
 			echo '
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 						<div class="', $topic['css_class'], '">
275 275
 							<div class="board_icon">
276 276
 								<img src="', $topic['first_post']['icon_url'], '" alt="">
277
-								', $topic['is_posted_in'] ? '<img class="posted" src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="">' : '','
277
+								', $topic['is_posted_in'] ? '<img class="posted" src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="">' : '', '
278 278
 							</div>
279 279
 							<div class="info">';
280 280
 
Please login to merge, or discard this patch.
Braces   +74 added lines, -52 removed lines patch added patch discarded remove patch
@@ -43,28 +43,33 @@  discard block
 block discarded – undo
43 43
 					</div>
44 44
 					<div class="list_posts">', $post['message'], '</div>';
45 45
 
46
-		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
47
-			echo '
46
+		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
47
+					echo '
48 48
 					<ul class="quickbuttons">';
49
+		}
49 50
 
50 51
 		// If they *can* reply?
51
-		if ($post['can_reply'])
52
-			echo '
52
+		if ($post['can_reply']) {
53
+					echo '
53 54
 						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>';
55
+		}
54 56
 
55 57
 		// If they *can* quote?
56
-		if ($post['can_quote'])
57
-			echo '
58
+		if ($post['can_quote']) {
59
+					echo '
58 60
 						<li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>';
61
+		}
59 62
 
60 63
 		// How about... even... remove it entirely?!
61
-		if ($post['can_delete'])
62
-			echo '
64
+		if ($post['can_delete']) {
65
+					echo '
63 66
 						<li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>';
67
+		}
64 68
 
65
-		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete'])
66
-			echo '
69
+		if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) {
70
+					echo '
67 71
 					</ul>';
72
+		}
68 73
 
69 74
 		echo '
70 75
 			</div>';
@@ -86,12 +91,13 @@  discard block
 block discarded – undo
86 91
 	echo '
87 92
 	<div id="recent" class="main_content">';
88 93
 
89
-	if ($context['showCheckboxes'])
90
-		echo '
94
+	if ($context['showCheckboxes']) {
95
+			echo '
91 96
 		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
92 97
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
93 98
 			<input type="hidden" name="qaction" value="markread">
94 99
 			<input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
100
+	}
95 101
 
96 102
 	if (!empty($context['topics']))
97 103
 	{
@@ -117,11 +123,12 @@  discard block
 block discarded – undo
117 123
 					</div>';
118 124
 
119 125
 		// Show a "select all" box for quick moderation?
120
-		if ($context['showCheckboxes'])
121
-			echo '
126
+		if ($context['showCheckboxes']) {
127
+					echo '
122 128
 					<div class="moderation">
123 129
 						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">
124 130
 					</div>';
131
+		}
125 132
 
126 133
 		echo '
127 134
 				</div>
@@ -140,15 +147,18 @@  discard block
 block discarded – undo
140 147
 			// Now we handle the icons
141 148
 			echo '
142 149
 							<div class="icons floatright">';
143
-			if ($topic['is_locked'])
144
-				echo '
150
+			if ($topic['is_locked']) {
151
+							echo '
145 152
 								<span class="generic_icons lock"></span>';
146
-			if ($topic['is_sticky'])
147
-				echo '
153
+			}
154
+			if ($topic['is_sticky']) {
155
+							echo '
148 156
 								<span class="generic_icons sticky"></span>';
149
-			if ($topic['is_poll'])
150
-				echo '
157
+			}
158
+			if ($topic['is_poll']) {
159
+							echo '
151 160
 								<span class="generic_icons poll"></span>';
161
+			}
152 162
 			echo '
153 163
 							</div>';
154 164
 
@@ -173,19 +183,21 @@  discard block
 block discarded – undo
173 183
 							', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '
174 184
 						</div>';
175 185
 
176
-			if ($context['showCheckboxes'])
177
-				echo '
186
+			if ($context['showCheckboxes']) {
187
+							echo '
178 188
 						<div class="moderation">
179 189
 							<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">
180 190
 						</div>';
191
+			}
181 192
 
182 193
 				echo '
183 194
 					</div>';
184 195
 		}
185 196
 
186
-		if (empty($context['topics']))
187
-			echo '
197
+		if (empty($context['topics'])) {
198
+					echo '
188 199
 						<div style="display: none;"></div>';
200
+		}
189 201
 
190 202
 		echo '
191 203
 				</div>
@@ -197,25 +209,27 @@  discard block
 block discarded – undo
197 209
 				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
198 210
 				<div class="pagelinks">', $context['page_index'], '</div>
199 211
 			</div>';
200
-	}
201
-	else
202
-		echo '
212
+	} else {
213
+			echo '
203 214
 			<div class="cat_bar">
204 215
 				<h3 class="catbg centertext">
205 216
 					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
206 217
 				</h3>
207 218
 			</div>';
219
+	}
208 220
 
209
-	if ($context['showCheckboxes'])
210
-		echo '
221
+	if ($context['showCheckboxes']) {
222
+			echo '
211 223
 		</form>';
224
+	}
212 225
 
213 226
 	echo '
214 227
 	</div>';
215 228
 
216
-	if (empty($context['no_topic_listing']))
217
-		template_topic_legend();
218
-}
229
+	if (empty($context['no_topic_listing'])) {
230
+			template_topic_legend();
231
+	}
232
+	}
219 233
 
220 234
 /**
221 235
  * Template for showing unread replies (eg new replies to topics you've posted in)
@@ -227,12 +241,13 @@  discard block
 block discarded – undo
227 241
 	echo '
228 242
 	<div id="recent">';
229 243
 
230
-	if ($context['showCheckboxes'])
231
-		echo '
244
+	if ($context['showCheckboxes']) {
245
+			echo '
232 246
 		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
233 247
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
234 248
 			<input type="hidden" name="qaction" value="markread">
235 249
 			<input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
250
+	}
236 251
 
237 252
 	if (!empty($context['topics']))
238 253
 	{
@@ -258,11 +273,12 @@  discard block
 block discarded – undo
258 273
 					</div>';
259 274
 
260 275
 		// Show a "select all" box for quick moderation?
261
-		if ($context['showCheckboxes'])
262
-				echo '
276
+		if ($context['showCheckboxes']) {
277
+						echo '
263 278
 					<div class="moderation">
264 279
 						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">
265 280
 					</div>';
281
+		}
266 282
 
267 283
 		echo '
268 284
 				</div>
@@ -281,15 +297,18 @@  discard block
 block discarded – undo
281 297
 			// Now we handle the icons
282 298
 			echo '
283 299
 								<div class="icons floatright">';
284
-			if ($topic['is_locked'])
285
-				echo '
300
+			if ($topic['is_locked']) {
301
+							echo '
286 302
 									<span class="generic_icons lock"></span>';
287
-			if ($topic['is_sticky'])
288
-				echo '
303
+			}
304
+			if ($topic['is_sticky']) {
305
+							echo '
289 306
 									<span class="generic_icons sticky"></span>';
290
-			if ($topic['is_poll'])
291
-				echo '
307
+			}
308
+			if ($topic['is_poll']) {
309
+							echo '
292 310
 									<span class="generic_icons poll"></span>';
311
+			}
293 312
 			echo '
294 313
 								</div>';
295 314
 
@@ -314,11 +333,12 @@  discard block
 block discarded – undo
314 333
 								', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '
315 334
 							</div>';
316 335
 
317
-			if ($context['showCheckboxes'])
318
-				echo '
336
+			if ($context['showCheckboxes']) {
337
+							echo '
319 338
 							<div class="moderation">
320 339
 								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">
321 340
 							</div>';
341
+			}
322 342
 			echo '
323 343
 						</div>';
324 344
 		}
@@ -331,24 +351,26 @@  discard block
 block discarded – undo
331 351
 				', $context['menu_separator'], '<a href="#recent" class="topbottom floatleft">', $txt['go_up'], '</a>
332 352
 				<div class="pagelinks">', $context['page_index'], '</div>
333 353
 			</div>';
334
-	}
335
-	else
336
-		echo '
354
+	} else {
355
+			echo '
337 356
 			<div class="cat_bar">
338 357
 				<h3 class="catbg centertext">
339 358
 					', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '
340 359
 				</h3>
341 360
 			</div>';
361
+	}
342 362
 
343
-	if ($context['showCheckboxes'])
344
-		echo '
363
+	if ($context['showCheckboxes']) {
364
+			echo '
345 365
 		</form>';
366
+	}
346 367
 
347 368
 	echo '
348 369
 	</div>';
349 370
 
350
-	if (empty($context['no_topic_listing']))
351
-		template_topic_legend();
352
-}
371
+	if (empty($context['no_topic_listing'])) {
372
+			template_topic_legend();
373
+	}
374
+	}
353 375
 
354 376
 ?>
355 377
\ No newline at end of file
Please login to merge, or discard this patch.
Themes/default/Reports.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 	<head>
149 149
 		<meta charset="', $context['character_set'], '">
150 150
 		<title>', $context['page_title'], '</title>
151
-		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/report.css', $modSettings['browser_cache'] ,'">
151
+		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/report.css', $modSettings['browser_cache'], '">
152 152
 	</head>
153 153
 	<body>';
154 154
 }
Please login to merge, or discard this patch.
Braces   +32 added lines, -24 removed lines patch added patch discarded remove patch
@@ -29,9 +29,10 @@  discard block
 block discarded – undo
29 29
 	// Go through each type of report they can run.
30 30
 	foreach ($context['report_types'] as $type)
31 31
 	{
32
-		if (isset($type['description']))
33
-			echo '
32
+		if (isset($type['description'])) {
33
+					echo '
34 34
 					<dt>', $type['description'], '</dt>';
35
+		}
35 36
 		echo '
36 37
 					<dd>
37 38
 						<input type="radio" id="rt_', $type['id'], '" name="rt" value="', $type['id'], '"', $type['is_first'] ? ' checked' : '', ' class="input_radio">
@@ -61,8 +62,9 @@  discard block
 block discarded – undo
61 62
 		</div>
62 63
 		<div id="report_buttons">';
63 64
 
64
-	if (!empty($context['report_buttons']))
65
-		template_button_strip($context['report_buttons'], 'right');
65
+	if (!empty($context['report_buttons'])) {
66
+			template_button_strip($context['report_buttons'], 'right');
67
+	}
66 68
 
67 69
 	echo '
68 70
 		</div>';
@@ -73,25 +75,27 @@  discard block
 block discarded – undo
73 75
 		echo '
74 76
 		<table class="table_grid report_results">';
75 77
 
76
-		if (!empty($table['title']))
77
-			echo '
78
+		if (!empty($table['title'])) {
79
+					echo '
78 80
 			<thead>
79 81
 				<tr class="title_bar">
80 82
 					<th scope="col" colspan="', $table['column_count'], '">', $table['title'], '</th>
81 83
 				</tr>
82 84
 			</thead>
83 85
 			<tbody>';
86
+		}
84 87
 
85 88
 		// Now do each row!
86 89
 		$row_number = 0;
87 90
 		foreach ($table['data'] as $row)
88 91
 		{
89
-			if ($row_number == 0 && !empty($table['shading']['top']))
90
-				echo '
92
+			if ($row_number == 0 && !empty($table['shading']['top'])) {
93
+							echo '
91 94
 				<tr class="windowbg table_caption">';
92
-			else
93
-				echo '
95
+			} else {
96
+							echo '
94 97
 				<tr class="', !empty($row[0]['separator']) ? 'title_bar' : 'windowbg', '">';
98
+			}
95 99
 
96 100
 			// Now do each column.
97 101
 			$column_number = 0;
@@ -109,16 +113,17 @@  discard block
 block discarded – undo
109 113
 				}
110 114
 
111 115
 				// Shaded?
112
-				if ($column_number == 0 && !empty($table['shading']['left']))
113
-					echo '
116
+				if ($column_number == 0 && !empty($table['shading']['left'])) {
117
+									echo '
114 118
 					<td class="table_caption ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '>
115 119
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
116 120
 					</td>';
117
-				else
118
-					echo '
121
+				} else {
122
+									echo '
119 123
 					<td class="smalltext centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '>
120 124
 						', $data['v'], '
121 125
 					</td>';
126
+				}
122 127
 
123 128
 				$column_number++;
124 129
 			}
@@ -167,24 +172,26 @@  discard block
 block discarded – undo
167 172
 		<div style="overflow: visible;', $table['max_width'] != 'auto' ? ' width: ' . $table['max_width'] . 'px;' : '', '">
168 173
 			<table class="bordercolor">';
169 174
 
170
-		if (!empty($table['title']))
171
-			echo '
175
+		if (!empty($table['title'])) {
176
+					echo '
172 177
 				<tr class="title_bar">
173 178
 					<td colspan="', $table['column_count'], '">
174 179
 						', $table['title'], '
175 180
 					</td>
176 181
 				</tr>';
182
+		}
177 183
 
178 184
 		// Now do each row!
179 185
 		$row_number = 0;
180 186
 		foreach ($table['data'] as $row)
181 187
 		{
182
-			if ($row_number == 0 && !empty($table['shading']['top']))
183
-				echo '
188
+			if ($row_number == 0 && !empty($table['shading']['top'])) {
189
+							echo '
184 190
 				<tr class="titlebg">';
185
-			else
186
-				echo '
191
+			} else {
192
+							echo '
187 193
 				<tr class="windowbg">';
194
+			}
188 195
 
189 196
 			// Now do each column!!
190 197
 			$column_number = 0;
@@ -201,16 +208,17 @@  discard block
 block discarded – undo
201 208
 				}
202 209
 
203 210
 				// Shaded?
204
-				if ($column_number == 0 && !empty($table['shading']['left']))
205
-					echo '
211
+				if ($column_number == 0 && !empty($table['shading']['left'])) {
212
+									echo '
206 213
 					<td class="titlebg ', $table['align']['shaded'], 'text"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '>
207 214
 						', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
208 215
 					</td>';
209
-				else
210
-					echo '
216
+				} else {
217
+									echo '
211 218
 					<td class="centertext" ', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '>
212 219
 						', $data['v'], '
213 220
 					</td>';
221
+				}
214 222
 
215 223
 				$column_number++;
216 224
 			}
Please login to merge, or discard this patch.