Completed
Pull Request — release-2.1 (#4446)
by Mathias
12:43
created
Themes/default/Admin.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -945,7 +945,7 @@
 block discarded – undo
945 945
 				}
946 946
 
947 947
 				echo isset($config_var['postinput']) ? '
948
-											' . $config_var['postinput'] : '','
948
+											' . $config_var['postinput'] : '', '
949 949
 									</dd>';
950 950
 			}
951 951
 		}
Please login to merge, or discard this patch.
Sources/Errors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	$error_call++;
40 40
 
41 41
 	// are we in a loop?
42
-	if($error_call > 2)
42
+	if ($error_call > 2)
43 43
 	{
44 44
 		if (!isset($db_show_debug) || $db_show_debug === false)
45 45
 			$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3078,8 +3078,7 @@
 block discarded – undo
3078 3078
 			<div class="roundframe">
3079 3079
 				<div>
3080 3080
 		', !empty($context['tfa_backup']) ? '
3081
-					<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' :
3082
-			($modSettings['tfa_mode'] == 2 ? '
3081
+					<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? '
3083 3082
 									<div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), '
3084 3083
 									<div class="smalltext">', $txt['tfa_desc'], '</div>
3085 3084
 									<div class="floatleft">
Please login to merge, or discard this patch.
Themes/default/Post.template.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
 									</div><!-- .attached_BBC -->
418 418
 									<div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
419 419
 									<div class="attach-ui">
420
-										<a data-dz-remove class="button cancel">', $txt['modify_cancel'] ,'</a>
421
-										<a class="button upload">', $txt['upload'] ,'</a>
420
+										<a data-dz-remove class="button cancel">', $txt['modify_cancel'], '</a>
421
+										<a class="button upload">', $txt['upload'], '</a>
422 422
 									</div>
423 423
 								</div><!-- .attach-info -->
424 424
 							</div><!-- #au-template -->
@@ -433,10 +433,10 @@  discard block
 block discarded – undo
433 433
 							</dt>
434 434
 							<dd class="smalltext fallback">
435 435
 								<div id="attachUpload" class="descbox">
436
-									<h5>', $txt['attach_drop_zone'] ,'</h5>
437
-									<a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a>
438
-									<a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a>
439
-									<a class="button fileinput-button">', $txt['attach_add'] ,'</a>
436
+									<h5>', $txt['attach_drop_zone'], '</h5>
437
+									<a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a>
438
+									<a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a>
439
+									<a class="button fileinput-button">', $txt['attach_add'], '</a>
440 440
 									<div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
441 441
 									<div class="fallback">
442 442
 										<input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 	// Option to delete an event if user is editing one.
542 542
 	if ($context['make_event'] && !$context['event']['new'])
543 543
 		echo '
544
-						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">';
544
+						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button you_sure">';
545 545
 
546 546
 	echo '
547 547
 					</span>
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 			});';
796 796
 
797 797
 	echo '
798
-			var oEditorID = "', $context['post_box_name'] ,'";
798
+			var oEditorID = "', $context['post_box_name'], '";
799 799
 			var oEditorObject = oEditorHandle_', $context['post_box_name'], ';
800 800
 		</script>';
801 801
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 			if ($context['can_quote'])
828 828
 				echo '
829 829
 					<ul class="quickbuttons" id="msg_', $post['id'], '_quote">
830
-						<li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'] ,'</a></li>
830
+						<li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'], '</a></li>
831 831
 						<li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li>
832 832
 					</ul>';
833 833
 
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 	<head>
912 912
 		<meta charset="', $context['character_set'], '">
913 913
 		<title>', $txt['spell_check'], '</title>
914
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
914
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
915 915
 		<style>
916 916
 			body, td {
917 917
 				font-size: small;
@@ -941,8 +941,8 @@  discard block
 block discarded – undo
941 941
 			var spell_formname = window.opener.spell_formname;
942 942
 			var spell_fieldname = window.opener.spell_fieldname;
943 943
 		</script>
944
-		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script>
945
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
944
+		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script>
945
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
946 946
 		<script>
947 947
 			', $context['spell_js'], '
948 948
 		</script>
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 	<head>
987 987
 		<meta charset="', $context['character_set'], '">
988 988
 		<title>', $txt['retrieving_quote'], '</title>
989
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
989
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
990 990
 	</head>
991 991
 	<body>
992 992
 		', $txt['retrieving_quote'], '
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 				foreach ($message['custom_fields']['above_member'] as $custom)
233 233
 					echo '
234
-							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
234
+							<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
235 235
 
236 236
 				echo '
237 237
 						</ul>
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			if (!empty($message['custom_fields']['below_avatar']))
267 267
 				foreach ($message['custom_fields']['below_avatar'] as $custom)
268 268
 					echo '
269
-						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
269
+						<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
270 270
 
271 271
 			if (!$message['member']['is_guest'])
272 272
 				echo '
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
 					foreach ($message['custom_fields']['icons'] as $custom)
310 310
 						echo '
311
-								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
311
+								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
312 312
 
313 313
 					echo '
314 314
 							</ol>
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 				if (!empty($message['custom_fields']['standard']))
373 373
 					foreach ($message['custom_fields']['standard'] as $custom)
374 374
 						echo '
375
-						<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
375
+						<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
376 376
 
377 377
 				// Are we showing the warning status?
378 378
 				if ($message['member']['can_see_warning'])
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 				if (!empty($message['custom_fields']['bottom_poster']))
384 384
 					foreach ($message['custom_fields']['bottom_poster'] as $custom)
385 385
 						echo '
386
-						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
386
+						<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
387 387
 			}
388 388
 
389 389
 			// Done with the information about the poster... on to the post itself.
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 
485 485
 				foreach ($message['custom_fields']['above_signature'] as $custom)
486 486
 					echo '
487
-								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
487
+								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
488 488
 
489 489
 				echo '
490 490
 							</ul>
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
 				foreach ($message['custom_fields']['below_signature'] as $custom)
509 509
 					echo '
510
-								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
510
+								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
511 511
 
512 512
 				echo '
513 513
 							</ul>
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 	while ($message = $context['get_pmessage']('subject'))
644 644
 	{
645 645
 		echo '
646
-			<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '','">
646
+			<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '', '">
647 647
 				<td class="table_icon">
648 648
 					<script>
649 649
 						currentLabels[', $message['id'], '] = {';
@@ -922,13 +922,13 @@  discard block
 block discarded – undo
922 922
 				// You can only reply if they are not a guest...
923 923
 				if (!$message['member']['is_guest'])
924 924
 					echo '
925
-					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], '
926
-					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button , '</a> ', $context['menu_separator'];
925
+					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], '
926
+					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator'];
927 927
 
928 928
 				// This is for "forwarding" - even if the member is gone.
929 929
 				else
930 930
 					echo '
931
-					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator'];
931
+					<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button, '</a>', $context['menu_separator'];
932 932
 			}
933 933
 
934 934
 			echo '
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 				<div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
1032 1032
 					<dl>
1033 1033
 						<dt>
1034
-							<strong id="error_serious">', $txt['error_while_submitting'] , '</strong>
1034
+							<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
1035 1035
 						</dt>
1036 1036
 						<dd class="error" id="error_list">
1037 1037
 							', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), '
@@ -1087,7 +1087,7 @@  discard block
 block discarded – undo
1087 1087
 						<span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span>
1088 1088
 					</dt>
1089 1089
 					<dd id="pm_subject">
1090
-						<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"',isset($context['post_error']['no_subject']) ? ' class="error"' : '', '>
1090
+						<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', '>
1091 1091
 					</dd>
1092 1092
 				</dl>
1093 1093
 				<hr>';
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
 		echo '
1453 1453
 		<div class="padding">
1454 1454
 			<input type="submit" name="save" value="', $txt['save'], '" class="button">
1455
-			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button you_sure">
1455
+			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'], '" class="button you_sure">
1456 1456
 		</div>';
1457 1457
 
1458 1458
 	echo '
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
 	if (!empty($context['rules']))
1618 1618
 		echo '
1619 1619
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1620
-			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button smalltext you_sure">';
1620
+			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'], '" class="button smalltext you_sure">';
1621 1621
 
1622 1622
 	echo '
1623 1623
 		</div>
@@ -1860,9 +1860,9 @@  discard block
 block discarded – undo
1860 1860
 
1861 1861
 		echo '
1862 1862
 				<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
1863
-					<option value="">', $txt['pm_rule_sel_action'] , ':</option>
1864
-					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option>
1865
-					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option>
1863
+					<option value="">', $txt['pm_rule_sel_action'], ':</option>
1864
+					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'], '</option>
1865
+					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'], '</option>
1866 1866
 				</select>
1867 1867
 				<span id="labdiv', $k, '">
1868 1868
 					<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
 			</div>
1975 1975
 			<ul class="quickbuttons">
1976 1976
 				<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;id_draft=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons modifybutton"></span>', $txt['draft_edit'], '</a></li>
1977
-				<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'] ,'?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
1977
+				<li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'], '?" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li>
1978 1978
 			</ul>
1979 1979
 		</div><!-- .windowbg -->';
1980 1980
 		}
Please login to merge, or discard this patch.
Sources/ManageSmileys.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 					'class' => 'centercol',
394 394
 				),
395 395
 				'data' => array(
396
-					'function' => function ($rowData)
396
+					'function' => function($rowData)
397 397
 					{
398 398
 						return $rowData['selected'] ? '<span class="generic_icons valid"></span>' : '';
399 399
 					},
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 					'class' => 'centercol',
454 454
 				),
455 455
 				'data' => array(
456
-					'function' => function ($rowData)
456
+					'function' => function($rowData)
457 457
 					{
458 458
 						return $rowData['selected'] ? '' : sprintf('<input type="checkbox" name="smiley_set[%1$d]">', $rowData['id']);
459 459
 					},
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 						'value' => $txt['smileys_location'],
998 998
 					),
999 999
 					'data' => array(
1000
-						'function' => function ($rowData) use ($txt)
1000
+						'function' => function($rowData) use ($txt)
1001 1001
 						{
1002 1002
 							if (empty($rowData['hidden']))
1003 1003
 								return $txt['smileys_location_form'];
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
 						},
1009 1009
 					),
1010 1010
 					'sort' => array(
1011
-						'default' => $smcFunc['db_custom_order']('hidden', array_keys($smiley_locations)) ,
1011
+						'default' => $smcFunc['db_custom_order']('hidden', array_keys($smiley_locations)),
1012 1012
 						'reverse' => $smcFunc['db_custom_order']('hidden', array_keys($smiley_locations), true),
1013 1013
 					),
1014 1014
 				),
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
 						'value' => $txt['smileys_description'],
1018 1018
 					),
1019 1019
 					'data' => array(
1020
-						'function' => function ($rowData) use ($context, $txt, $modSettings, $smcFunc)
1020
+						'function' => function($rowData) use ($context, $txt, $modSettings, $smcFunc)
1021 1021
 						{
1022 1022
 							if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir']))
1023 1023
 								return $smcFunc['htmlspecialchars']($rowData['description']);
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
1555 1555
 			);
1556 1556
 
1557
-			$file =  $packagesdir . '/temp/' . $base_path . $action['filename'];
1557
+			$file = $packagesdir . '/temp/' . $base_path . $action['filename'];
1558 1558
 			if (isset($action['filename']) && (!file_exists($file) || !is_writable(dirname($action['destination']))))
1559 1559
 			{
1560 1560
 				$context['has_failure'] = true;
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
 		{
1600 1600
 			updateSettings(array(
1601 1601
 				'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . basename($action['action']),
1602
-				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' .  (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1602
+				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' . (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1603 1603
 			));
1604 1604
 		}
1605 1605
 
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
 			'{db_prefix}log_packages',
1612 1612
 			array(
1613 1613
 				'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
1614
-				'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int',
1614
+				'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int',
1615 1615
 				'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
1616 1616
 				'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
1617 1617
 			),
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
 		'columns' => array(
1861 1861
 			'icon' => array(
1862 1862
 				'data' => array(
1863
-					'function' => function ($rowData) use ($settings, $smcFunc)
1863
+					'function' => function($rowData) use ($settings, $smcFunc)
1864 1864
 					{
1865 1865
 						$images_url = $settings[file_exists(sprintf('%1$s/images/post/%2$s.png', $settings['theme_dir'], $rowData['filename'])) ? 'actual_images_url' : 'default_images_url'];
1866 1866
 						return sprintf('<img src="%1$s/post/%2$s.png" alt="%3$s">', $images_url, $rowData['filename'], $smcFunc['htmlspecialchars']($rowData['title']));
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
 					'value' => $txt['icons_board'],
1895 1895
 				),
1896 1896
 				'data' => array(
1897
-					'function' => function ($rowData) use ($txt)
1897
+					'function' => function($rowData) use ($txt)
1898 1898
 					{
1899 1899
 						return empty($rowData['board_name']) ? $txt['icons_edit_icons_all_boards'] : $rowData['board_name'];
1900 1900
 					},
Please login to merge, or discard this patch.
Sources/CacheAPI-postgres.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	{
166 166
 		global $db_connection, $db_prefix;
167 167
 		
168
-		pg_query($db_connection, 'CREATE LOCAL TEMP TABLE IF NOT EXISTS ' . $db_prefix . 'cache_tmp AS SELECT * FROM ' . $db_prefix . 'cache WHERE ttl >= ' . time() );
168
+		pg_query($db_connection, 'CREATE LOCAL TEMP TABLE IF NOT EXISTS ' . $db_prefix . 'cache_tmp AS SELECT * FROM ' . $db_prefix . 'cache WHERE ttl >= ' . time());
169 169
 	}
170 170
 	
171 171
 	/**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	{
190 190
 		global $db_connection, $db_prefix;
191 191
 		
192
-		pg_query($db_connection, 'INSERT INTO ' . $db_prefix . 'cache SELECT * FROM '. $db_prefix . 'cache_tmp ON CONFLICT DO NOTHING');
192
+		pg_query($db_connection, 'INSERT INTO ' . $db_prefix . 'cache SELECT * FROM ' . $db_prefix . 'cache_tmp ON CONFLICT DO NOTHING');
193 193
 	}
194 194
 }
195 195
 
Please login to merge, or discard this patch.
Sources/MessageIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@
 block discarded – undo
349 349
 			SELECT
350 350
 				t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board,
351 351
 				' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from,
352
-				' . ( $enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
352
+				' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
353 353
 				'	: '') . '
354 354
 				t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic,
355 355
 				ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon,
Please login to merge, or discard this patch.
Sources/Subs-Db-postgresql.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -199,22 +199,22 @@  discard block
 block discarded – undo
199 199
 
200 200
 		case 'date':
201 201
 			if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d)$~', $replacement, $date_matches) === 1)
202
-				return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]).'::date';
202
+				return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]) . '::date';
203 203
 			else
204 204
 				smf_db_error_backtrace('Wrong value type sent to the database. Date expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
205 205
 		break;
206 206
 
207 207
 		case 'time':
208 208
 			if (preg_match('~^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $time_matches) === 1)
209
-				return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]).'::time';
209
+				return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]) . '::time';
210 210
 			else
211 211
 				smf_db_error_backtrace('Wrong value type sent to the database. Time expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
212 212
 		break;
213 213
 
214 214
 		case 'datetime':
215 215
 			if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1)
216
-				return 'to_timestamp('.
217
-					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]).
216
+				return 'to_timestamp(' .
217
+					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) .
218 218
 					',\'YYYY-MM-DD HH24:MI:SS\')';
219 219
 			else
220 220
 				smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 		$old_pos = 0;
425 425
 		$pos = -1;
426 426
 		// Remove the string escape for better runtime
427
-		$db_string_1 = str_replace('\'\'','',$db_string);
427
+		$db_string_1 = str_replace('\'\'', '', $db_string);
428 428
 		while (true)
429 429
 		{
430 430
 			$pos = strpos($db_string_1, '\'', $pos + 1);
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 	if (!empty($keys) && (count($keys) > 0) && $returnmode > 0)
803 803
 	{
804 804
 		// we only take the first key
805
-		$returning = ' RETURNING '.$keys[0];
805
+		$returning = ' RETURNING ' . $keys[0];
806 806
 		$with_returning = true;
807 807
 	}
808 808
 
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 			INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '")
834 834
 			VALUES
835 835
 				' . implode(',
836
-				', $insertRows).$replace.$returning,
836
+				', $insertRows) . $replace . $returning,
837 837
 			array(
838 838
 				'security_override' => true,
839 839
 				'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors',
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 			if ($returnmode === 2)
847 847
 				$return_var = array();
848 848
 
849
-			while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning)
849
+			while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning)
850 850
 			{
851 851
 				if (is_numeric($row[0])) // try to emulate mysql limitation
852 852
 				{
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
  */
1010 1010
 function smf_db_custom_order($field, $array_values, $desc = false)
1011 1011
 {
1012
-	$return = 'CASE '. $field . ' ';
1012
+	$return = 'CASE ' . $field . ' ';
1013 1013
 	$count = count($array_values);
1014 1014
 	$then = ($desc ? ' THEN -' : ' THEN ');
1015 1015
 
Please login to merge, or discard this patch.