Passed
Push — patch_1-1-9 ( d927f0...e2616d )
by Spuds
01:06 queued 27s
created
themes/default/GenericMenu.template.php 1 patch
Braces   +73 added lines, -28 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@  discard block
 block discarded – undo
42 42
 		{
43 43
 			// Not supposed to be printed?
44 44
 			if (empty($area['label']))
45
-				continue;
45
+			{
46
+							continue;
47
+			}
46 48
 
47 49
 			echo '
48 50
 				<li class="listlevel1', !empty($area['subsections']) ? ' subsections"  aria-haspopup="true"' : '"', ' ', ($i == $menu_context['current_area']) ? 'id="menu_current_area"' : '', '>';
@@ -54,11 +56,14 @@  discard block
 block discarded – undo
54 56
 					<strong><a class="linklevel1" href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a></strong>';
55 57
 
56 58
 				if (empty($context['tabs']))
57
-					$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
59
+				{
60
+									$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
61
+				}
58 62
 			}
59
-			else
60
-				echo '
63
+			else {
64
+							echo '
61 65
 					<a class="linklevel1" href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a>';
66
+			}
62 67
 
63 68
 			// Are there any subsections?
64 69
 			if (!empty($area['subsections']))
@@ -69,7 +74,9 @@  discard block
 block discarded – undo
69 74
 				foreach ($area['subsections'] as $sa => $sub)
70 75
 				{
71 76
 					if (!empty($sub['disabled']))
72
-						continue;
77
+					{
78
+											continue;
79
+					}
73 80
 
74 81
 					$url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa;
75 82
 
@@ -98,8 +105,10 @@  discard block
 block discarded – undo
98 105
 
99 106
 	// If there are any "tabs" setup, this is the place to shown them.
100 107
 	if (empty($context['force_disable_tabs']))
101
-		template_generic_menu_tabs($menu_context);
102
-}
108
+	{
109
+			template_generic_menu_tabs($menu_context);
110
+	}
111
+	}
103 112
 
104 113
 /**
105 114
  * Part of the sidebar layer - closes off the main bit.
@@ -139,7 +148,9 @@  discard block
 block discarded – undo
139 148
 		{
140 149
 			// Not supposed to be printed?
141 150
 			if (empty($area['label']))
142
-				continue;
151
+			{
152
+							continue;
153
+			}
143 154
 
144 155
 			echo '
145 156
 							<li class="listlevel2', !empty($area['subsections']) ? ' subsections" aria-haspopup="true"' : '"', '>';
@@ -149,7 +160,9 @@  discard block
 block discarded – undo
149 160
 
150 161
 			// Is this the current area, or just some area?
151 162
 			if (!empty($area['selected']) && empty($context['tabs']))
152
-				$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
163
+			{
164
+							$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
165
+			}
153 166
 
154 167
 			// Are there any subsections?
155 168
 			if (!empty($area['subsections']))
@@ -160,7 +173,9 @@  discard block
 block discarded – undo
160 173
 				foreach ($area['subsections'] as $sa => $sub)
161 174
 				{
162 175
 					if (!empty($sub['disabled']))
163
-						continue;
176
+					{
177
+											continue;
178
+					}
164 179
 
165 180
 					$url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa;
166 181
 
@@ -234,29 +249,43 @@  discard block
 block discarded – undo
234 249
 
235 250
 				// Did this not even exist - or do we not have a label?
236 251
 				if (!isset($tab_context['tabs'][$id]))
237
-					$tab_context['tabs'][$id] = array('label' => $tab['label']);
252
+				{
253
+									$tab_context['tabs'][$id] = array('label' => $tab['label']);
254
+				}
238 255
 				elseif (!isset($tab_context['tabs'][$id]['label']))
239
-					$tab_context['tabs'][$id]['label'] = $tab['label'];
256
+				{
257
+									$tab_context['tabs'][$id]['label'] = $tab['label'];
258
+				}
240 259
 
241 260
 				// Has a custom URL defined in the main admin structure?
242 261
 				if (isset($tab['url']) && !isset($tab_context['tabs'][$id]['url']))
243
-					$tab_context['tabs'][$id]['url'] = $tab['url'];
262
+				{
263
+									$tab_context['tabs'][$id]['url'] = $tab['url'];
264
+				}
244 265
 
245 266
 				// Any additional parameters for the url?
246 267
 				if (isset($tab['add_params']) && !isset($tab_context['tabs'][$id]['add_params']))
247
-					$tab_context['tabs'][$id]['add_params'] = $tab['add_params'];
268
+				{
269
+									$tab_context['tabs'][$id]['add_params'] = $tab['add_params'];
270
+				}
248 271
 
249 272
 				// Has it been deemed selected?
250 273
 				if (!empty($tab['is_selected']))
251
-					$tab_context['tabs'][$id]['is_selected'] = true;
274
+				{
275
+									$tab_context['tabs'][$id]['is_selected'] = true;
276
+				}
252 277
 
253 278
 				// Does it have its own help?
254 279
 				if (!empty($tab['help']))
255
-					$tab_context['tabs'][$id]['help'] = $tab['help'];
280
+				{
281
+									$tab_context['tabs'][$id]['help'] = $tab['help'];
282
+				}
256 283
 
257 284
 				// Is this the last one?
258 285
 				if (!empty($tab['is_last']) && !isset($tab_context['override_last']))
259
-					$tab_context['tabs'][$id]['is_last'] = true;
286
+				{
287
+									$tab_context['tabs'][$id]['is_last'] = true;
288
+				}
260 289
 			}
261 290
 
262 291
 			// Find the selected tab
@@ -277,22 +306,29 @@  discard block
 block discarded – undo
277 306
 		if (!empty($selected_tab['icon']) || !empty($tab_context['icon']) || !empty($selected_tab['help']) || !empty($tab_context['help']) || !empty($selected_tab['class']) || !empty($tab_context['class']))
278 307
 		{
279 308
 			if (!empty($selected_tab['icon']) || !empty($tab_context['icon']))
280
-				echo '
309
+			{
310
+							echo '
281 311
 						<img src="', $settings['images_url'], '/icons/', !empty($selected_tab['icon']) ? $selected_tab['icon'] : $tab_context['icon'], '" alt="" class="icon" />';
312
+			}
282 313
 			elseif (!empty($selected_tab['class']) || !empty($tab_context['class']))
283
-				echo '
314
+			{
315
+							echo '
284 316
 						<span class="hdicon cat_img_', !empty($selected_tab['class']) ? $selected_tab['class'] : $tab_context['class'], '"></span>';
317
+			}
285 318
 
286 319
 			if (!empty($selected_tab['help']) || !empty($tab_context['help']))
287
-				echo '
320
+			{
321
+							echo '
288 322
 						<a class="hdicon cat_img_helptopics help" href="', $scripturl, '?action=quickhelp;help=', !empty($selected_tab['help']) ? $selected_tab['help'] : $tab_context['help'], '" onclick="return reqOverlayDiv(this.href);" title="', $txt['help'], '"></a>';
323
+			}
289 324
 
290 325
 			echo '
291 326
 						', $tab_context['title'];
292 327
 		}
293
-		else
294
-			echo '
328
+		else {
329
+					echo '
295 330
 						', $tab_context['title'];
331
+		}
296 332
 
297 333
 		echo '
298 334
 						</h3>';
@@ -300,17 +336,21 @@  discard block
 block discarded – undo
300 336
 		// The function is in Admin.template.php, but since this template is used elsewhere,
301 337
 		// we need to check if the function is available.
302 338
 		if (function_exists('template_admin_quick_search'))
303
-			template_admin_quick_search();
339
+		{
340
+					template_admin_quick_search();
341
+		}
304 342
 		echo '
305 343
 					</div>';
306 344
 	}
307 345
 
308 346
 	// Shall we use the tabs? Yes, it's the only known way!
309 347
 	if (!empty($selected_tab['description']) || !empty($tab_context['description']))
310
-		echo '
348
+	{
349
+			echo '
311 350
 					<p class="description">
312 351
 						', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], '
313 352
 					</p>';
353
+	}
314 354
 
315 355
 	// Print out all the items in this tab (if any).
316 356
 	if (!empty($tab_context['tabs']))
@@ -322,18 +362,23 @@  discard block
 block discarded – undo
322 362
 		foreach ($tab_context['tabs'] as $sa => $tab)
323 363
 		{
324 364
 			if (!empty($tab['disabled']))
325
-				continue;
365
+			{
366
+							continue;
367
+			}
326 368
 
327 369
 			if (!empty($tab['is_selected']))
328
-				echo '
370
+			{
371
+							echo '
329 372
 						<li class="listlevel1">
330 373
 							<a class="linklevel1 active" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a>
331 374
 						</li>';
332
-			else
333
-				echo '
375
+			}
376
+			else {
377
+							echo '
334 378
 						<li class="listlevel1">
335 379
 							<a class="linklevel1" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a>
336 380
 						</li>';
381
+			}
337 382
 		}
338 383
 
339 384
 		// the end of tabs
Please login to merge, or discard this patch.
themes/default/ManageSmileys.template.php 1 patch
Braces   +55 added lines, -20 removed lines patch added patch discarded remove patch
@@ -74,20 +74,26 @@  discard block
 block discarded – undo
74 74
 						', $modSettings['smileys_url'], '/';
75 75
 
76 76
 	if ($context['current_set']['id'] == 'default')
77
-		echo '
77
+	{
78
+			echo '
78 79
 						<strong>default</strong>
79 80
 						<input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default" />';
81
+	}
80 82
 	elseif (empty($context['smiley_set_dirs']))
81
-		echo '
83
+	{
84
+			echo '
82 85
 						<input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text" /> ';
86
+	}
83 87
 	else
84 88
 	{
85 89
 		echo '
86 90
 						<select name="smiley_sets_path" id="smiley_sets_path">';
87 91
 
88 92
 		foreach ($context['smiley_set_dirs'] as $smiley_set_dir)
89
-			echo '
93
+		{
94
+					echo '
90 95
 							<option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected="selected"' : '', $smiley_set_dir['selectable'] ? '' : ' disabled="disabled"', '>', $smiley_set_dir['id'], '</option>';
96
+		}
91 97
 
92 98
 		echo '
93 99
 						</select>';
@@ -105,13 +111,15 @@  discard block
 block discarded – undo
105 111
 
106 112
 	// If this is a new smiley set they have the option to import smileys already in the directory.
107 113
 	if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable']))
108
-		echo '
114
+	{
115
+			echo '
109 116
 					<dt>
110 117
 						<label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>:
111 118
 					</dt>
112 119
 					<dd>
113 120
 						<input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" />
114 121
 					</dd>';
122
+	}
115 123
 
116 124
 	echo '
117 125
 				</dl>
@@ -146,8 +154,10 @@  discard block
 block discarded – undo
146 154
 						<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt="" /> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">';
147 155
 
148 156
 	foreach ($context['smiley_sets'] as $smiley_set)
149
-		echo '
157
+	{
158
+			echo '
150 159
 							<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>';
160
+	}
151 161
 
152 162
 	echo '
153 163
 						</select>)
@@ -164,16 +174,20 @@  discard block
 block discarded – undo
164 174
 					<dd>';
165 175
 
166 176
 	if (empty($context['filenames']))
167
-		echo '
177
+	{
178
+			echo '
168 179
 						<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" class="input_text" />';
180
+	}
169 181
 	else
170 182
 	{
171 183
 		echo '
172 184
 						<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">';
173 185
 
174 186
 		foreach ($context['filenames'] as $filename)
175
-			echo '
187
+		{
188
+					echo '
176 189
 							<option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>';
190
+		}
177 191
 
178 192
 		echo '
179 193
 						</select>';
@@ -248,8 +262,10 @@  discard block
 block discarded – undo
248 262
 						';
249 263
 
250 264
 	foreach ($context['smiley_sets'] as $smiley_set)
251
-		echo '
265
+	{
266
+			echo '
252 267
 									<option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected="selected"' : '', '>', $smiley_set['name'], '</option>';
268
+	}
253 269
 
254 270
 	echo '
255 271
 							</select>
@@ -260,16 +276,20 @@  discard block
 block discarded – undo
260 276
 						<dd>';
261 277
 
262 278
 	if (empty($context['filenames']))
263
-		echo '
279
+	{
280
+			echo '
264 281
 							<input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text" />';
282
+	}
265 283
 	else
266 284
 	{
267 285
 		echo '
268 286
 							<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">';
269 287
 
270 288
 		foreach ($context['filenames'] as $filename)
271
-			echo '
289
+		{
290
+					echo '
272 291
 								<option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>';
292
+		}
273 293
 
274 294
 		echo '
275 295
 							</select>';
@@ -299,13 +319,15 @@  discard block
 block discarded – undo
299 319
 				<dl id="uploadMore" class="settings hide">';
300 320
 
301 321
 	foreach ($context['smiley_sets'] as $smiley_set)
302
-		echo '
322
+	{
323
+			echo '
303 324
 					<dt>
304 325
 						', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ':
305 326
 					</dt>
306 327
 					<dd>
307 328
 						<input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file" />
308 329
 					</dd>';
330
+	}
309 331
 
310 332
 	echo '
311 333
 				</dl>
@@ -390,18 +412,21 @@  discard block
 block discarded – undo
390 412
 			foreach ($row as $smiley)
391 413
 			{
392 414
 				if (empty($context['move_smiley']))
393
-					echo '
415
+				{
416
+									echo '
394 417
 					<li id="smile_' . $smiley['id'] . '">
395 418
 						<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '">
396 419
 							<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '" />
397 420
 						</a>
398 421
 					</li>';
399
-				else
400
-					echo '
422
+				}
423
+				else {
424
+									echo '
401 425
 					<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: ', $smiley['selected'] ? '2px solid red' : '0px solid black', ';" alt="', $smiley['description'], '" />
402 426
 					<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '">
403 427
 						<img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" />
404 428
 					</a>';
429
+				}
405 430
 			}
406 431
 
407 432
 			echo '
@@ -413,8 +438,10 @@  discard block
 block discarded – undo
413 438
 				<ul id="smiley_' . $location['id'] . '|' . ($key + 1) . '" class="sortable_smiley"><li></li></ul>';
414 439
 
415 440
 		if (!empty($context['move_smiley']))
416
-			echo '
441
+		{
442
+					echo '
417 443
 				<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/smiley_select_spot.png" alt="', $txt['smileys_move_here'], '" /></a>';
444
+		}
418 445
 
419 446
 		echo '
420 447
 			</div>
@@ -426,7 +453,8 @@  discard block
 block discarded – undo
426 453
 	</div>';
427 454
 
428 455
 	if (empty($context['move_smiley']))
429
-		echo '
456
+	{
457
+			echo '
430 458
 	<script>
431 459
 		$().elkSortable({
432 460
 			sa: "smileyorder",
@@ -441,7 +469,8 @@  discard block
 block discarded – undo
441 469
 			token: {token_var: "' . $context['admin-sort_token_var'] . '", token_id: "' . $context['admin-sort_token'] . '"}
442 470
 		});
443 471
 	</script>';
444
-}
472
+	}
473
+	}
445 474
 
446 475
 /**
447 476
  * Editing an individual message icon.
@@ -460,13 +489,15 @@  discard block
 block discarded – undo
460 489
 				<dl class="settings">';
461 490
 
462 491
 	if (!$context['new_icon'])
463
-		echo '
492
+	{
493
+			echo '
464 494
 					<dt>
465 495
 						<label>', $txt['smiley_preview'], ': </label>
466 496
 					</dt>
467 497
 					<dd>
468 498
 						<img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '" />
469 499
 					</dd>';
500
+	}
470 501
 
471 502
 	echo '
472 503
 					<dt>
@@ -495,9 +526,11 @@  discard block
 block discarded – undo
495 526
 
496 527
 	// Print the list of all the icons it can be put after...
497 528
 	foreach ($context['icons'] as $id => $data)
498
-		if (empty($context['icon']['id']) || $id != $context['icon']['id'])
529
+	{
530
+			if (empty($context['icon']['id']) || $id != $context['icon']['id'])
499 531
 			echo '
500 532
 							<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected="selected"' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
533
+	}
501 534
 
502 535
 	echo '
503 536
 						</select>
@@ -505,8 +538,10 @@  discard block
 block discarded – undo
505 538
 				</dl>';
506 539
 
507 540
 	if (!$context['new_icon'])
508
-		echo '
541
+	{
542
+			echo '
509 543
 					<input type="hidden" name="icon" value="', $context['icon']['id'], '" />';
544
+	}
510 545
 
511 546
 	echo '
512 547
 				<div class="submitbutton">
Please login to merge, or discard this patch.
themes/default/Stats.template.php 1 patch
Braces   +24 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,9 +73,12 @@  discard block
 block discarded – undo
73 73
 		if (is_array($value))
74 74
 		{
75 75
 			if (isset($settings[$key]))
76
-				$value = strtr($settings[$key], $value);
77
-			else
78
-				continue;
76
+			{
77
+							$value = strtr($settings[$key], $value);
78
+			}
79
+			else {
80
+							continue;
81
+			}
79 82
 		}
80 83
 
81 84
 		echo '
@@ -92,9 +95,12 @@  discard block
 block discarded – undo
92 95
 		if (is_array($value))
93 96
 		{
94 97
 			if (isset($settings[$key]))
95
-				$value = strtr($settings[$key], $value);
96
-			else
97
-				continue;
98
+			{
99
+							$value = strtr($settings[$key], $value);
100
+			}
101
+			else {
102
+							continue;
103
+			}
98 104
 		}
99 105
 
100 106
 		echo '
@@ -262,8 +268,10 @@  discard block
 block discarded – undo
262 268
 						<th class="history_head">', $txt['most_online'], '</th>';
263 269
 
264 270
 		if (!empty($modSettings['hitStats']))
265
-			echo '
271
+		{
272
+					echo '
266 273
 						<th class="history_head">', $txt['page_views'], '</th>';
274
+		}
267 275
 
268 276
 		echo '
269 277
 					</tr>
@@ -283,8 +291,10 @@  discard block
 block discarded – undo
283 291
 						<th>', $year['most_members_online'], '</th>';
284 292
 
285 293
 			if (!empty($modSettings['hitStats']))
286
-				echo '
294
+			{
295
+							echo '
287 296
 						<th>', $year['hits'], '</th>';
297
+			}
288 298
 
289 299
 			echo '
290 300
 					</tr>';
@@ -302,8 +312,10 @@  discard block
 block discarded – undo
302 312
 						<th>', $month['most_members_online'], '</th>';
303 313
 
304 314
 				if (!empty($modSettings['hitStats']))
305
-					echo '
315
+				{
316
+									echo '
306 317
 						<th>', $month['hits'], '</th>';
318
+				}
307 319
 
308 320
 				echo '
309 321
 					</tr>';
@@ -321,8 +333,10 @@  discard block
 block discarded – undo
321 333
 						<td>', $day['most_members_online'], '</td>';
322 334
 
323 335
 						if (!empty($modSettings['hitStats']))
324
-							echo '
336
+						{
337
+													echo '
325 338
 						<td>', $day['hits'], '</td>';
339
+						}
326 340
 
327 341
 						echo '
328 342
 					</tr>';
Please login to merge, or discard this patch.
themes/default/Calendar.template.php 1 patch
Braces   +102 added lines, -37 removed lines patch added patch discarded remove patch
@@ -49,8 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
 	// Show a select box with all the months.
51 51
 	foreach ($txt['months'] as $number => $month)
52
-		echo '
52
+	{
53
+			echo '
53 54
 						<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
55
+	}
54 56
 
55 57
 	echo '
56 58
 					</select>
@@ -58,8 +60,10 @@  discard block
 block discarded – undo
58 60
 
59 61
 	// Show a link for every year.....
60 62
 	for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++)
61
-		echo '
63
+	{
64
+			echo '
62 65
 						<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
66
+	}
63 67
 
64 68
 	echo '
65 69
 					</select>
@@ -81,8 +85,10 @@  discard block
 block discarded – undo
81 85
 		<form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="UTF-8" onsubmit="submitonce(this);smc_saveEntities(\'postevent\', [\'evtitle\']);">';
82 86
 
83 87
 	if (!empty($context['event']['new']))
84
-		echo '
88
+	{
89
+			echo '
85 90
 			<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />';
91
+	}
86 92
 
87 93
 	// Start the main table.
88 94
 	echo '
@@ -114,8 +120,10 @@  discard block
 block discarded – undo
114 120
 
115 121
 	// Show a list of all the years we allow...
116 122
 	for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++)
117
-		echo '
123
+	{
124
+			echo '
118 125
 							<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
126
+	}
119 127
 
120 128
 	echo '
121 129
 						</select>
@@ -124,8 +132,10 @@  discard block
 block discarded – undo
124 132
 
125 133
 	// There are 12 months per year - ensure that they all get listed.
126 134
 	for ($month = 1; $month <= 12; $month++)
127
-		echo '
135
+	{
136
+			echo '
128 137
 							<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
138
+	}
129 139
 
130 140
 	echo '
131 141
 						</select>
@@ -134,16 +144,20 @@  discard block
 block discarded – undo
134 144
 
135 145
 	// This prints out all the days in the current month - this changes dynamically as we switch months.
136 146
 	for ($day = 1; $day <= $context['event']['last_day']; $day++)
137
-		echo '
147
+	{
148
+			echo '
138 149
 							<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
150
+	}
139 151
 
140 152
 	echo '
141 153
 						</select>
142 154
 					</div>';
143 155
 
144 156
 	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
145
-		echo '
157
+	{
158
+			echo '
146 159
 					<ul class="event_options">';
160
+	}
147 161
 
148 162
 	// If events can span more than one day then allow the user to select how long it should last.
149 163
 	if (!empty($modSettings['cal_allowspan']))
@@ -154,8 +168,10 @@  discard block
 block discarded – undo
154 168
 							<select id="span" name="span">';
155 169
 
156 170
 		for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++)
157
-			echo '
171
+		{
172
+					echo '
158 173
 								<option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '</option>';
174
+		}
159 175
 
160 176
 		echo '
161 177
 							</select>
@@ -176,8 +192,10 @@  discard block
 block discarded – undo
176 192
 	}
177 193
 
178 194
 	if (!empty($modSettings['cal_allowspan']) || $context['event']['new'])
179
-		echo '
195
+	{
196
+			echo '
180 197
 					</ul>';
198
+	}
181 199
 
182 200
 	echo '
183 201
 					<div class="submitbutton">
@@ -185,8 +203,10 @@  discard block
 block discarded – undo
185 203
 
186 204
 	// Delete button?
187 205
 	if (empty($context['event']['new']))
188
-		echo '
206
+	{
207
+			echo '
189 208
 						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['calendar_confirm_delete'], '\');" />';
209
+	}
190 210
 
191 211
 	echo '
192 212
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -207,7 +227,9 @@  discard block
 block discarded – undo
207 227
 	global $context, $txt, $scripturl, $modSettings;
208 228
 
209 229
 	if (!isset($context['calendar_grid_' . $grid_name]))
210
-		return false;
230
+	{
231
+			return false;
232
+	}
211 233
 
212 234
 	$calendar_data = &$context['calendar_grid_' . $grid_name];
213 235
 
@@ -217,25 +239,32 @@  discard block
 block discarded – undo
217 239
 				<h2 class="category_header">';
218 240
 
219 241
 		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'])
220
-			echo '
242
+		{
243
+					echo '
221 244
 					<a href="', $calendar_data['previous_calendar']['href'], '" class="previous_month">
222 245
 						<i class="icon icon-lg i-chevron-circle-left"></i>
223 246
 					</a>';
247
+		}
224 248
 
225 249
 		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'])
226
-			echo '
250
+		{
251
+					echo '
227 252
 					<a href="', $calendar_data['next_calendar']['href'], '" class="next_month">
228 253
 						<i class="icon icon-lg i-chevron-circle-right"></i>
229 254
 					</a>';
255
+		}
230 256
 
231 257
 		if ($calendar_data['show_next_prev'])
232
-			echo '
258
+		{
259
+					echo '
233 260
 					', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'];
234
-		else
235
-			echo '
261
+		}
262
+		else {
263
+					echo '
236 264
 					<a href="', $scripturl, '?action=calendar;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], '">
237 265
 						<i class="icon icon-small i-calendar"></i> ', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'], '
238 266
 					</a>';
267
+		}
239 268
 
240 269
 		echo '
241 270
 				</h2>';
@@ -252,12 +281,16 @@  discard block
 block discarded – undo
252 281
 					<tr class="table_head">';
253 282
 
254 283
 		if (!empty($calendar_data['show_week_links']))
255
-			echo '
284
+		{
285
+					echo '
256 286
 						<th>&nbsp;</th>';
287
+		}
257 288
 
258 289
 		foreach ($calendar_data['week_days'] as $day)
259
-			echo '
290
+		{
291
+					echo '
260 292
 						<th scope="col" class="days">', !empty($calendar_data['short_day_titles']) ? (Util::substr($txt['days'][$day], 0, 1)) : $txt['days'][$day], '</th>';
293
+		}
261 294
 
262 295
 		echo '
263 296
 					</tr>';
@@ -271,12 +304,14 @@  discard block
 block discarded – undo
271 304
 					<tr>';
272 305
 
273 306
 		if (!empty($calendar_data['show_week_links']))
274
-			echo '
307
+		{
308
+					echo '
275 309
 						<td class="weeks">
276 310
 							<a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $week['days'][0]['day'], '">
277 311
 								<i class="icon i-eye-plus"></i>
278 312
 							</a>
279 313
 						</td>';
314
+		}
280 315
 
281 316
 		// Every day has the following:
282 317
 		// day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?),
@@ -292,20 +327,27 @@  discard block
 block discarded – undo
292 327
 			{
293 328
 				// Should the day number be a link?
294 329
 				if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
295
-					echo '
330
+				{
331
+									echo '
296 332
 							<a href="', $scripturl, '?action=calendar;sa=post;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $day['day'], '</a>';
297
-				else
298
-					echo '
333
+				}
334
+				else {
335
+									echo '
299 336
 							', $day['day'];
337
+				}
300 338
 
301 339
 				// Is this the first day of the week? (and are we showing week numbers?)
302 340
 				if ($day['is_first_day'] && $calendar_data['size'] != 'small')
303
-					echo ' - <a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $day['day'], '">', $txt['calendar_week'], ' ', $week['number'], '</a>';
341
+				{
342
+									echo ' - <a href="', $scripturl, '?action=calendar;viewweek;year=', $calendar_data['current_year'], ';month=', $calendar_data['current_month'], ';day=', $day['day'], '">', $txt['calendar_week'], ' ', $week['number'], '</a>';
343
+				}
304 344
 
305 345
 				// Are there any holidays?
306 346
 				if (!empty($day['holidays']))
307
-					echo '
347
+				{
348
+									echo '
308 349
 							<div class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
350
+				}
309 351
 
310 352
 				// Show any birthdays...
311 353
 				if (!empty($day['birthdays']))
@@ -325,18 +367,22 @@  discard block
 block discarded – undo
325 367
 
326 368
 						// Stop at ten?
327 369
 						if ($count == 10 && $use_js_hide)
328
-							echo '
370
+						{
371
+													echo '
329 372
 									<span class="hidelink" id="bdhidelink_', $day['day'], '">...<br />
330 373
 										<a href="', $scripturl, '?action=calendar;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';showbd" onclick="document.getElementById(\'bdhide_', $day['day'], '\').style.display = \'block\'; document.getElementById(\'bdhidelink_', $day['day'], '\').style.display = \'none\'; return false;">(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')</a>
331 374
 									</span>
332 375
 									<span id="bdhide_', $day['day'], '" class="hide">, ';
376
+						}
333 377
 
334 378
 						$count++;
335 379
 					}
336 380
 
337 381
 					if ($use_js_hide)
338
-						echo '
382
+					{
383
+											echo '
339 384
 								</span>';
385
+					}
340 386
 
341 387
 					echo '
342 388
 							</div>';
@@ -355,16 +401,20 @@  discard block
 block discarded – undo
355 401
 					{
356 402
 						// If they can edit the event, show an icon they can click on....
357 403
 						if ($event['can_edit'])
358
-							echo '
404
+						{
405
+													echo '
359 406
 								<a class="modify_event" href="', $event['modify_href'], '">
360 407
 									<i class="icon i-modify" title="' . $txt['modify'] . '"></i>
361 408
 								</a>';
409
+						}
362 410
 
363 411
 						if ($event['can_export'])
364
-							echo '
412
+						{
413
+													echo '
365 414
 								<a class="modify_event" href="', $event['export_href'], '">
366 415
 									<i class="icon i-download" title="' . $txt['save'] . '"></i>
367 416
 								</a>';
417
+						}
368 418
 
369 419
 						echo '
370 420
 								', $event['link'], $event['is_last'] ? '' : '<br />';
@@ -397,7 +447,9 @@  discard block
 block discarded – undo
397 447
 	global $context, $txt, $scripturl, $modSettings;
398 448
 
399 449
 	if (!isset($context['calendar_grid_' . $grid_name]))
400
-		return false;
450
+	{
451
+			return false;
452
+	}
401 453
 
402 454
 	$calendar_data = &$context['calendar_grid_' . $grid_name];
403 455
 	$done_title = false;
@@ -409,20 +461,24 @@  discard block
 block discarded – undo
409 461
 				<h2 class="category_header">';
410 462
 
411 463
 		if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
412
-			echo '
464
+		{
465
+					echo '
413 466
 					<span class="previous_month">
414 467
 						<a href="', $calendar_data['previous_week']['href'], '">
415 468
 							<i class="icon icon-lg i-chevron-circle-left"></i>
416 469
 						</a>
417 470
 					</span>';
471
+		}
418 472
 
419 473
 		if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'] && empty($done_title))
420
-			echo '
474
+		{
475
+					echo '
421 476
 					<span class="next_month">
422 477
 						<a href="', $calendar_data['next_week']['href'], '">
423 478
 							<i class="icon icon-lg i-chevron-circle-right"></i>
424 479
 						</a>
425 480
 					</span>';
481
+		}
426 482
 
427 483
 		echo '
428 484
 					<a href="', $scripturl, '?action=calendar;month=', $month_data['current_month'], ';year=', $month_data['current_year'], '">', $txt['months_titles'][$month_data['current_month']], ' ', $month_data['current_year'], '</a>', empty($done_title) && !empty($calendar_data['week_number']) ? (' - ' . $txt['calendar_week'] . ' ' . $calendar_data['week_number']) : '', '
@@ -441,11 +497,14 @@  discard block
 block discarded – undo
441 497
 
442 498
 			// Should the day number be a link?
443 499
 			if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
444
-				echo '
500
+			{
501
+							echo '
445 502
 							<a href="', $scripturl, '?action=calendar;sa=post;month=', $month_data['current_month'], ';year=', $month_data['current_year'], ';day=', $day['day'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['days'][$day['day_of_week']], ' - ', $day['day'], '</a>';
446
-			else
447
-				echo '
503
+			}
504
+			else {
505
+							echo '
448 506
 							', $txt['days'][$day['day_of_week']], ' - ', $day['day'];
507
+			}
449 508
 
450 509
 			echo '
451 510
 						</h4>
@@ -453,8 +512,10 @@  discard block
 block discarded – undo
453 512
 
454 513
 			// Are there any holidays?
455 514
 			if (!empty($day['holidays']))
456
-				echo '
515
+			{
516
+							echo '
457 517
 							<div class="smalltext holiday">', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), '</div>';
518
+			}
458 519
 
459 520
 			// Show any birthdays...
460 521
 			if (!empty($day['birthdays']))
@@ -466,8 +527,10 @@  discard block
 block discarded – undo
466 527
 				// Each of the birthdays has:
467 528
 				// id, name (person), age (if they have one set?), and is_last. (last in list?)
468 529
 				foreach ($day['birthdays'] as $member)
469
-					echo '
530
+				{
531
+									echo '
470 532
 								<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
533
+				}
471 534
 
472 535
 				echo '
473 536
 							</div>';
@@ -486,10 +549,12 @@  discard block
 block discarded – undo
486 549
 				{
487 550
 					// If they can edit the event, show a star they can click on....
488 551
 					if ($event['can_edit'])
489
-						echo '
552
+					{
553
+											echo '
490 554
 								<a href="', $event['modify_href'], '">
491 555
 									<i class="icon i-modify" title="' . $txt['modify'] . '"></i>
492 556
 								</a> ';
557
+					}
493 558
 
494 559
 					echo '
495 560
 								', $event['link'], $event['is_last'] ? '' : ', ';
Please login to merge, or discard this patch.
themes/default/Packages.template.php 1 patch
Braces   +115 added lines, -43 removed lines patch added patch discarded remove patch
@@ -27,11 +27,13 @@  discard block
 block discarded – undo
27 27
 		<div class="information">';
28 28
 
29 29
 	if ($context['is_installed'])
30
-		echo '
30
+	{
31
+			echo '
31 32
 			<strong>', $txt['package_installed_warning1'], '</strong><br />
32 33
 			<br />
33 34
 			', $txt['package_installed_warning2'], '<br />
34 35
 			<br />';
36
+	}
35 37
 
36 38
 	echo $txt['package_installed_warning3'], '
37 39
 		</div>';
@@ -58,8 +60,10 @@  discard block
 block discarded – undo
58 60
 					<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = elk_prepareScriptUrl(elk_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">';
59 61
 
60 62
 		foreach ($context['readmes'] as $a => $b)
61
-			echo '
63
+		{
64
+					echo '
62 65
 						<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
66
+		}
63 67
 
64 68
 		echo '
65 69
 					</select>
@@ -79,8 +83,10 @@  discard block
 block discarded – undo
79 83
 					<select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = elk_prepareScriptUrl(elk_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">';
80 84
 
81 85
 		foreach ($context['licenses'] as $a => $b)
82
-			echo '
86
+		{
87
+					echo '
83 88
 						<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
89
+		}
84 90
 
85 91
 		echo '
86 92
 					</select>
@@ -90,8 +96,10 @@  discard block
 block discarded – undo
90 96
 	}
91 97
 
92 98
 	if (!empty($context['post_url']))
93
-		echo '
99
+	{
100
+			echo '
94 101
 		<form action="', $context['post_url'], '" onsubmit="submitonce(this);" method="post" accept-charset="UTF-8">';
102
+	}
95 103
 	echo '
96 104
 			<h2 class="category_header">
97 105
 				', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package_install_actions'], ' &quot;', $context['package_name'], '&quot;
@@ -108,8 +116,10 @@  discard block
 block discarded – undo
108 116
 					<ul>';
109 117
 
110 118
 		foreach ($context['database_changes'] as $change)
111
-			echo '
119
+		{
120
+					echo '
112 121
 						<li>', $change, '</li>';
122
+		}
113 123
 
114 124
 		echo '
115 125
 					</ul>
@@ -121,12 +131,14 @@  discard block
 block discarded – undo
121 131
 			<div class="information">';
122 132
 
123 133
 	if (empty($context['actions']) && empty($context['database_changes']))
124
-		echo '
134
+	{
135
+			echo '
125 136
 				<br />
126 137
 				<div class="errorbox">
127 138
 					', $txt['corrupt_compatible'], '
128 139
 				</div>
129 140
 			</div>';
141
+	}
130 142
 	else
131 143
 	{
132 144
 		echo '
@@ -234,8 +246,10 @@  discard block
 block discarded – undo
234 246
 						<td class="centertext">';
235 247
 
236 248
 				if (!empty($context['themes_locked']))
237
-					echo '
249
+				{
250
+									echo '
238 251
 							<input type="hidden" name="custom_theme[]" value="', $id, '" />';
252
+				}
239 253
 
240 254
 				echo '
241 255
 							<input type="checkbox" name="custom_theme[]" id="custom_theme_', $id, '" value="', $id, '" onclick="', (!empty($theme['has_failure']) ? 'if (this.form.custom_theme_' . $id . '.checked && !confirm(\'' . $txt['package_theme_failure_warning'] . '\')) return false;' : ''), 'invertAll(this, this.form, \'dummy_theme_', $id, '\', true);" ', !empty($context['themes_locked']) ? 'disabled="disabled" checked="checked"' : '', '/>
@@ -325,10 +339,12 @@  discard block
 block discarded – undo
325 339
 	}
326 340
 
327 341
 	if (!empty($context['post_url']))
328
-		echo '
342
+	{
343
+			echo '
329 344
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />', (isset($context['form_sequence_number']) && !$context['ftp_needed']) ? '
330 345
 			<input type="hidden" name="seqnum" value="' . $context['form_sequence_number'] . '" />' : '', '
331 346
 		</form>';
347
+	}
332 348
 	echo '
333 349
 	</div>';
334 350
 
@@ -382,14 +398,16 @@  discard block
 block discarded – undo
382 398
 
383 399
 	// And a bit more for database changes.
384 400
 	if ($context['uninstalling'] && !empty($context['database_changes']))
385
-		echo '
401
+	{
402
+			echo '
386 403
 	<script>
387 404
 		var database_changes_area = document.getElementById(\'db_changes_div\'),
388 405
 			db_vis = false;
389 406
 
390 407
 		database_changes_area.style.display = "none";
391 408
 	</script>';
392
-}
409
+	}
410
+	}
393 411
 
394 412
 /**
395 413
  * Show after the package has been installed, redirects / permissions
@@ -415,11 +433,14 @@  discard block
 block discarded – undo
415 433
 	<div id="admincenter">';
416 434
 
417 435
 	if (empty($context['redirect_url']))
418
-		echo '
436
+	{
437
+			echo '
419 438
 			<h2 class="category_header">', ($context['uninstalling'] ? $txt['uninstall'] : $txt['extracting']), '</h2>', ($context['uninstalling'] ? '' : '<div class="information">' . $txt['package_installed_extract'] . '</div>');
420
-	else
421
-		echo '
439
+	}
440
+	else {
441
+			echo '
422 442
 			<h2 class="category_header">', $txt['package_installed_redirecting'], '</h2>';
443
+	}
423 444
 
424 445
 	echo '
425 446
 		<div class="generic_list_wrapper">
@@ -433,23 +454,31 @@  discard block
 block discarded – undo
433 454
 				<a href="', $context['redirect_url'], '">', $txt['package_installed_redirect_go_now'], '</a> | <a href="', $scripturl, '?action=admin;area=packages;sa=browse">', $txt['package_installed_redirect_cancel'], '</a>';
434 455
 	}
435 456
 	elseif ($context['uninstalling'])
436
-		echo '
457
+	{
458
+			echo '
437 459
 				', $txt['package_uninstall_done'];
460
+	}
438 461
 	elseif ($context['install_finished'])
439 462
 	{
440 463
 		if ($context['extract_type'] == 'avatar')
441
-			echo '
464
+		{
465
+					echo '
442 466
 				', $txt['avatars_extracted'];
467
+		}
443 468
 		elseif ($context['extract_type'] == 'language')
444
-			echo '
469
+		{
470
+					echo '
445 471
 				', $txt['language_extracted'];
446
-		else
447
-			echo '
472
+		}
473
+		else {
474
+					echo '
448 475
 				', $txt['package_installed_done'];
476
+		}
449 477
 	}
450
-	else
451
-		echo '
478
+	else {
479
+			echo '
452 480
 				', $txt['corrupt_compatible'];
481
+	}
453 482
 
454 483
 	echo '
455 484
 			</div>
@@ -481,8 +510,10 @@  discard block
 block discarded – undo
481 510
 			<ol>';
482 511
 
483 512
 	foreach ($context['files'] as $fileinfo)
484
-		echo '
513
+	{
514
+			echo '
485 515
 				<li><a href="', $scripturl, '?action=admin;area=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], '" title="', $txt['view'], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>';
516
+	}
486 517
 
487 518
 	echo '
488 519
 			</ol>
@@ -531,8 +562,10 @@  discard block
 block discarded – undo
531 562
 	}
532 563
 
533 564
 	if (!$adds_available)
534
-		echo '
565
+	{
566
+			echo '
535 567
 		<div class="infobox">', $context['sub_action'] == 'browse' ? $txt['no_packages'] : $txt['no_adds_installed'], '</div>';
568
+	}
536 569
 
537 570
 	echo '
538 571
 	</div>';
@@ -601,7 +634,9 @@  discard block
 block discarded – undo
601 634
 
602 635
 	// Nothing to do? Brilliant!
603 636
 	if (empty($context['package_ftp']))
604
-		return false;
637
+	{
638
+			return false;
639
+	}
605 640
 
606 641
 	if (empty($context['package_ftp']['form_elements_only']))
607 642
 	{
@@ -612,9 +647,11 @@  discard block
 block discarded – undo
612 647
 					<ul style="display: inline;">';
613 648
 
614 649
 		if (!empty($context['notwritable_files']))
615
-			foreach ($context['notwritable_files'] as $file)
650
+		{
651
+					foreach ($context['notwritable_files'] as $file)
616 652
 				echo '
617 653
 						<li>', $file, '</li>';
654
+		}
618 655
 
619 656
 		echo '
620 657
 					</ul>
@@ -627,8 +664,10 @@  discard block
 block discarded – undo
627 664
 				</div>';
628 665
 
629 666
 	if (!empty($context['package_ftp']['destination']))
630
-		echo '
667
+	{
668
+			echo '
631 669
 				<form action="', $context['package_ftp']['destination'], '" method="post" accept-charset="UTF-8">';
670
+	}
632 671
 
633 672
 	echo '
634 673
 					<fieldset>
@@ -662,23 +701,29 @@  discard block
 block discarded – undo
662 701
 					</fieldset>';
663 702
 
664 703
 	if (empty($context['package_ftp']['form_elements_only']))
665
-		echo '
704
+	{
705
+			echo '
666 706
 					<div class="submitbutton">
667 707
 						<span id="test_ftp_placeholder_full"></span>
668 708
 						<input type="submit" value="', $txt['package_proceed'], '" class="right_submit" />
669 709
 					</div>';
710
+	}
670 711
 
671 712
 	if (!empty($context['package_ftp']['destination']))
672
-		echo '
713
+	{
714
+			echo '
673 715
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
674 716
 				</form>';
717
+	}
675 718
 
676 719
 	// Hide the details of the list.
677 720
 	if (empty($context['package_ftp']['form_elements_only']))
678
-		echo '
721
+	{
722
+			echo '
679 723
 		<script>
680 724
 			document.getElementById(\'need_writable_list\').style.display = \'none\';
681 725
 		</script>';
726
+	}
682 727
 
683 728
 	// Set up to generate the FTP test button.
684 729
 	echo '
@@ -987,8 +1032,10 @@  discard block
 block discarded – undo
987 1032
 					<td class="grid30"><strong>';
988 1033
 
989 1034
 		if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive'))
990
-			echo '
1035
+		{
1036
+					echo '
991 1037
 						<img src="', $settings['default_images_url'], '/board.png" alt="*" />';
1038
+		}
992 1039
 
993 1040
 		echo '
994 1041
 						', $name, '</strong>
@@ -1006,7 +1053,9 @@  discard block
 block discarded – undo
1006 1053
 			';
1007 1054
 
1008 1055
 		if (!empty($dir['contents']))
1009
-			template_permission_show_contents($name, $dir['contents'], 1);
1056
+		{
1057
+					template_permission_show_contents($name, $dir['contents'], 1);
1058
+		}
1010 1059
 	}
1011 1060
 
1012 1061
 	echo '
@@ -1041,12 +1090,14 @@  discard block
 block discarded – undo
1041 1090
 
1042 1091
 	// Likely to need FTP?
1043 1092
 	if (empty($context['ftp_connected']))
1044
-		echo '
1093
+	{
1094
+			echo '
1045 1095
 			<p>
1046 1096
 				', $txt['package_file_perms_ftp_details'], ':
1047 1097
 			</p>
1048 1098
 			', template_control_chmod(), '
1049 1099
 			<div class="information">', $txt['package_file_perms_ftp_retain'], '</div>';
1100
+	}
1050 1101
 
1051 1102
 	echo '
1052 1103
 			<div class="submitbutton">
@@ -1058,8 +1109,10 @@  discard block
 block discarded – undo
1058 1109
 
1059 1110
 	// Any looks fors we've already done?
1060 1111
 	foreach ($context['look_for'] as $path)
1061
-		echo '
1112
+	{
1113
+			echo '
1062 1114
 			<input type="hidden" name="back_look[]" value="', $path, '" />';
1115
+	}
1063 1116
 	echo '
1064 1117
 	</form>';
1065 1118
 }
@@ -1102,8 +1155,10 @@  discard block
 block discarded – undo
1102 1155
 						', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '<a id="link_' . $cur_ident . '" href="' . $scripturl . '?action=admin;area=packages;sa=perms;find=' . base64_encode($ident . '/' . $name) . ';back_look=' . $context['back_look_data'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '#fol_' . $cur_ident . '" onclick="return expandFolder(\'' . $cur_ident . '\', \'' . addcslashes($ident . '/' . $name, "'\\") . '\');">' : '';
1103 1156
 
1104 1157
 			if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive'))
1105
-				echo '
1158
+			{
1159
+							echo '
1106 1160
 						<img src="', $settings['default_images_url'], '/board.png" alt="*" />';
1161
+			}
1107 1162
 
1108 1163
 			echo '
1109 1164
 						', $name, '
@@ -1124,19 +1179,23 @@  discard block
 block discarded – undo
1124 1179
 				</tr>';
1125 1180
 
1126 1181
 			if (!empty($dir['contents']))
1127
-				template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files']));
1182
+			{
1183
+							template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files']));
1184
+			}
1128 1185
 		}
1129 1186
 	}
1130 1187
 
1131 1188
 	// We have more files to show?
1132 1189
 	if ($has_more)
1133
-		echo '
1190
+	{
1191
+			echo '
1134 1192
 	<tr id="content_', $js_ident, '_more">
1135 1193
 		<td class="smalltext" style="width: 40%;">', str_repeat('&nbsp;', $level * 5), '
1136 1194
 			&#171; <a href="', $scripturl, '?action=admin;area=packages;sa=perms;find=', base64_encode($ident), ';fileoffset=', ($context['file_offset'] + $context['file_limit']), ';', $context['session_var'], '=', $context['session_id'], '#fol_', preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident), '">', $txt['package_file_perms_more_files'], '</a> &#187;
1137 1195
 		</td>
1138 1196
 		<td colspan="6"></td>
1139 1197
 	</tr>';
1198
+	}
1140 1199
 
1141 1200
 	if ($drawn_div)
1142 1201
 	{
@@ -1145,11 +1204,14 @@  discard block
 block discarded – undo
1145 1204
 		foreach ($context['look_for'] as $tree)
1146 1205
 		{
1147 1206
 			if (substr($tree, 0, strlen($ident)) == $ident)
1148
-				$isFound = true;
1207
+			{
1208
+							$isFound = true;
1209
+			}
1149 1210
 		}
1150 1211
 
1151 1212
 		if ($level > 1 && !$isFound)
1152
-			echo '
1213
+		{
1214
+					echo '
1153 1215
 		</tbody>
1154 1216
 		</table><script>
1155 1217
 			expandFolder(\'', $js_ident, '\', \'\');
@@ -1159,6 +1221,7 @@  discard block
 block discarded – undo
1159 1221
 			<tr class="hide">
1160 1222
 				<td colspan="7"></td>
1161 1223
 			</tr>';
1224
+		}
1162 1225
 	}
1163 1226
 }
1164 1227
 
@@ -1177,10 +1240,12 @@  discard block
 block discarded – undo
1177 1240
 		<h2 class="category_header">', $txt['package_file_perms_applying'], '</h2>';
1178 1241
 
1179 1242
 	if (!empty($context['skip_ftp']))
1180
-		echo '
1243
+	{
1244
+			echo '
1181 1245
 		<div class="errorbox">
1182 1246
 			', $txt['package_file_perms_skipping_ftp'], '
1183 1247
 		</div>';
1248
+	}
1184 1249
 
1185 1250
 	// First progress bar for the number of directories we are working
1186 1251
 	echo '
@@ -1213,27 +1278,34 @@  discard block
 block discarded – undo
1213 1278
 
1214 1279
 	// Put out the right hidden data.
1215 1280
 	if ($context['method'] === 'individual')
1216
-		echo '
1281
+	{
1282
+			echo '
1217 1283
 					<input type="hidden" name="custom_value" value="', $context['custom_value'], '" />
1218 1284
 					<input type="hidden" name="totalItems" value="', $context['total_items'], '" />
1219 1285
 					<input type="hidden" name="toProcess" value="', base64_encode(serialize($context['to_process'])), '" />';
1220
-	else
1221
-		echo '
1286
+	}
1287
+	else {
1288
+			echo '
1222 1289
 					<input type="hidden" name="predefined" value="', $context['predefined_type'], '" />
1223 1290
 					<input type="hidden" name="fileOffset" value="', $context['file_offset'], '" />
1224 1291
 					<input type="hidden" name="totalItems" value="', $context['total_items'], '" />
1225 1292
 					<input type="hidden" name="dirList" value="', base64_encode(serialize($context['directory_list'])), '" />
1226 1293
 					<input type="hidden" name="specialFiles" value="', base64_encode(serialize($context['special_files'])), '" />';
1294
+	}
1227 1295
 
1228 1296
 	// Are we not using FTP for whatever reason.
1229 1297
 	if (!empty($context['skip_ftp']))
1230
-		echo '
1298
+	{
1299
+			echo '
1231 1300
 					<input type="hidden" name="skip_ftp" value="1" />';
1301
+	}
1232 1302
 
1233 1303
 	// Retain state.
1234 1304
 	foreach ($context['back_look_data'] as $path)
1235
-		echo '
1305
+	{
1306
+			echo '
1236 1307
 					<input type="hidden" name="back_look[]" value="', $path, '" />';
1308
+	}
1237 1309
 
1238 1310
 	// Standard fields
1239 1311
 	echo '
Please login to merge, or discard this patch.
themes/default/ManageFeatures.template.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,8 +258,10 @@
 block discarded – undo
258 258
 					<input type="submit" name="save" value="', $txt['save'], '" />';
259 259
 
260 260
 	if ($context['fid'])
261
-		echo '
261
+	{
262
+			echo '
262 263
 					<input type="submit" name="delete" value="', $txt['delete'], '" onclick="return confirm(\'', $txt['custom_edit_delete_sure'], '\');" />';
264
+	}
263 265
 
264 266
 	echo '
265 267
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Please login to merge, or discard this patch.
themes/default/PackageServers.template.php 1 patch
Braces   +39 added lines, -13 removed lines patch added patch discarded remove patch
@@ -21,17 +21,21 @@  discard block
 block discarded – undo
21 21
 	global $context, $txt, $scripturl;
22 22
 
23 23
 	if (!empty($context['package_ftp']['error']))
24
-		echo '
24
+	{
25
+			echo '
25 26
 					<div class="errorbox">
26 27
 						<span class="tt">', $context['package_ftp']['error'], '</span>
27 28
 					</div>';
29
+	}
28 30
 
29 31
 	echo '
30 32
 	<div id="admin_form_wrapper">
31 33
 		<h2 class="category_header">', $txt['package_servers'], '</h2>';
32 34
 
33 35
 	if ($context['package_download_broken'])
34
-		template_ftp_form_required();
36
+	{
37
+			template_ftp_form_required();
38
+	}
35 39
 
36 40
 	echo '
37 41
 		<div class="content">
@@ -40,7 +44,8 @@  discard block
 block discarded – undo
40 44
 				<ul class="package_servers">';
41 45
 
42 46
 	foreach ($context['servers'] as $server)
43
-		echo '
47
+	{
48
+			echo '
44 49
 					<li class="flow_auto">
45 50
 						<strong>' . $server['name'] . '</strong>
46 51
 						<span class="package_server floatright">
@@ -48,6 +53,7 @@  discard block
 block discarded – undo
48 53
 							&nbsp;<a class="linkbutton" href="' . $scripturl . '?action=admin;area=packageservers;sa=remove;server=' . $server['id'] . ';', $context['session_var'], '=', $context['session_id'], '">' . $txt['delete'] . '</a>
49 54
 						</span>
50 55
 					</li>';
56
+	}
51 57
 
52 58
 	echo '
53 59
 				</ul>
@@ -136,10 +142,12 @@  discard block
 block discarded – undo
136 142
 
137 143
 	// No packages, as yet.
138 144
 	if (empty($context['package_list']))
139
-		echo '
145
+	{
146
+			echo '
140 147
 				<ul>
141 148
 					<li>', $txt['no_packages'], '</li>
142 149
 				</ul>';
150
+	}
143 151
 	// List out the packages...
144 152
 	else
145 153
 	{
@@ -156,8 +164,10 @@  discard block
 block discarded – undo
156 164
 						</p>';
157 165
 
158 166
 			if (!empty($packageSection['text']))
159
-				echo '
167
+			{
168
+							echo '
160 169
 						<div class="content">', $packageSection['text'], '</div>';
170
+			}
161 171
 
162 172
 			// List of addons available in this section
163 173
 			echo '
@@ -210,28 +220,38 @@  discard block
 block discarded – undo
210 220
 
211 221
 				// Show the addon type?
212 222
 				if ($package['type'] != '')
213
-					echo '
223
+				{
224
+									echo '
214 225
 								<li>', $txt['package_type'], ':&nbsp; ', Util::ucwords(Util::strtolower($package['type'])), '</li>';
226
+				}
215 227
 
216 228
 				// Show the version number?
217 229
 				if ($package['version'] != '')
218
-					echo '
230
+				{
231
+									echo '
219 232
 								<li>', $txt['mod_version'], ':&nbsp; ', $package['version'], '</li>';
233
+				}
220 234
 
221 235
 				// Show the last date?
222 236
 				if ($package['date'] != '')
223
-					echo '
237
+				{
238
+									echo '
224 239
 								<li>', $txt['mod_date'], ':&nbsp; ', $package['date'], '</li>';
240
+				}
225 241
 
226 242
 				// How 'bout the author?
227 243
 				if (!empty($package['author']))
228
-					echo '
244
+				{
245
+									echo '
229 246
 								<li>', $txt['mod_author'], ':&nbsp; ', $package['author'], '</li>';
247
+				}
230 248
 
231 249
 				// Nothing but hooks ?
232 250
 				if ($package['hooks'] != '' && in_array($package['hooks'], array('yes', 'true')))
233
-					echo '
251
+				{
252
+									echo '
234 253
 								<li>', $txt['mod_hooks'], ' <i class="icon i-check"></i></li>';
254
+				}
235 255
 
236 256
 				// Location of file: http://someplace/.
237 257
 				echo '
@@ -241,13 +261,17 @@  discard block
 block discarded – undo
241 261
 
242 262
 				// Location of issues?
243 263
 				if (!empty($package['server']['bugs']))
244
-					echo '
264
+				{
265
+									echo '
245 266
 										<li><i class="icon i-bug"></i> ', $txt['bug_location'], ':&nbsp; <a href="', $package['server']['bugs'], '">', $package['server']['bugs'], '</a></li>';
267
+				}
246 268
 
247 269
 				// Location of support?
248 270
 				if (!empty($package['server']['support']))
249
-					echo '
271
+				{
272
+									echo '
250 273
 										<li><i class="icon i-support"></i> ', $txt['support_location'], ':&nbsp; <a href="', $package['server']['support'], '">', $package['server']['support'], '</a></li>';
274
+				}
251 275
 
252 276
 				// Description: bleh bleh!
253 277
 				echo '
@@ -380,10 +404,12 @@  discard block
 block discarded – undo
380 404
 	global $context, $txt, $scripturl;
381 405
 
382 406
 	if (!empty($context['package_ftp']['error']))
383
-		echo '
407
+	{
408
+			echo '
384 409
 	<div class="errorbox">
385 410
 		', $context['package_ftp']['error'], '
386 411
 	</div>';
412
+	}
387 413
 
388 414
 	echo '
389 415
 	<div id="admin_form_wrapper">
Please login to merge, or discard this patch.
themes/default/languages/english/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,6 +2,9 @@
 block discarded – undo
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4 4
 if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
5
+{
5 6
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
7
-	exit;
8 7
\ No newline at end of file
8
+}
9
+else {
10
+	exit;
11
+}
Please login to merge, or discard this patch.
themes/default/languages/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,6 +2,9 @@
 block discarded – undo
2 2
 
3 3
 // Try to handle it with the upper level index.php. (it should know what to do.)
4 4
 if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
5
+{
5 6
 	include (dirname(dirname(__FILE__)) . '/index.php');
6
-else
7
-	exit;
8 7
\ No newline at end of file
8
+}
9
+else {
10
+	exit;
11
+}
Please login to merge, or discard this patch.