Passed
Pull Request — release-2.1 (#5778)
by Fran
05:03
created
Sources/Packages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1155,7 +1155,7 @@
 block discarded – undo
1155 1155
 				// We're really just checking for entries which are create table AND add columns (etc).
1156 1156
 				$tables = array();
1157 1157
 
1158
-				usort($db_package_log, function ($a, $b)
1158
+				usort($db_package_log, function($a, $b)
1159 1159
 				{
1160 1160
 					if ($a[0] == $b[0])
1161 1161
 						return 0;
Please login to merge, or discard this patch.
Themes/default/GenericControls.template.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,18 +100,22 @@
 block discarded – undo
100 100
 	$tempTab++;
101 101
 	$context['tabindex'] = $tempTab;
102 102
 
103
-	foreach ($context['richedit_buttons'] as $name => $button) {
104
-		if ($name == 'spell_check') {
103
+	foreach ($context['richedit_buttons'] as $name => $button)
104
+	{
105
+		if ($name == 'spell_check')
106
+		{
105 107
 			$button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();';
106 108
 		}
107 109
 
108
-		if ($name == 'preview') {
110
+		if ($name == 'preview')
111
+		{
109 112
 			$button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value'];
110 113
 			$button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);';
111 114
 			$button['show'] = $editor_context['preview_type'];
112 115
 		}
113 116
 
114
-		if ($button['show']) {
117
+		if ($button['show'])
118
+		{
115 119
 			echo '
116 120
 		<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
117 121
 		}
Please login to merge, or discard this patch.
Sources/Subs.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -7082,32 +7082,32 @@  discard block
 block discarded – undo
7082 7082
  */
7083 7083
 function truncate_array($array, $max_length = 1900, $deep = 3)
7084 7084
 {
7085
-    $array = (array) $array;
7085
+	$array = (array) $array;
7086 7086
 
7087
-    $curr_length = array_length($array, $deep);
7087
+	$curr_length = array_length($array, $deep);
7088 7088
 
7089
-    if ($curr_length <= $max_length)
7090
-        return $array;
7089
+	if ($curr_length <= $max_length)
7090
+		return $array;
7091 7091
 
7092
-    else
7093
-    {
7094
-        // Truncate each element's value to a reasonable length
7095
-        $param_max = floor($max_length / count($array));
7092
+	else
7093
+	{
7094
+		// Truncate each element's value to a reasonable length
7095
+		$param_max = floor($max_length / count($array));
7096 7096
 
7097
-        $current_deep = $deep - 1;
7097
+		$current_deep = $deep - 1;
7098 7098
 
7099
-        foreach ($array as $key => &$value)
7100
-        {
7101
-            if (is_array($value))
7102
-                if ($current_deep > 0)
7103
-                    $value = truncate_array($value, $current_deep);
7099
+		foreach ($array as $key => &$value)
7100
+		{
7101
+			if (is_array($value))
7102
+				if ($current_deep > 0)
7103
+					$value = truncate_array($value, $current_deep);
7104 7104
 
7105
-            else
7106
-                $value = substr($value, 0, $param_max - strlen($key) - 5);
7107
-        }
7105
+			else
7106
+				$value = substr($value, 0, $param_max - strlen($key) - 5);
7107
+		}
7108 7108
 
7109
-        return $array;
7110
-    }
7109
+		return $array;
7110
+	}
7111 7111
 }
7112 7112
 
7113 7113
 /**
@@ -7118,29 +7118,29 @@  discard block
 block discarded – undo
7118 7118
  */
7119 7119
 function array_length($array, $deep = 3)
7120 7120
 {
7121
-    // Work with arrays
7122
-    $array = (array) $array;
7123
-    $length = 0;
7121
+	// Work with arrays
7122
+	$array = (array) $array;
7123
+	$length = 0;
7124 7124
 
7125
-    $deep_count = $deep - 1;
7125
+	$deep_count = $deep - 1;
7126 7126
 
7127
-    foreach ($array as $value)
7128
-    {
7129
-        // Recursive?
7130
-        if (is_array($value))
7131
-        {
7132
-            // No can't do
7133
-            if ($deep_count <= 0)
7134
-                continue;
7127
+	foreach ($array as $value)
7128
+	{
7129
+		// Recursive?
7130
+		if (is_array($value))
7131
+		{
7132
+			// No can't do
7133
+			if ($deep_count <= 0)
7134
+				continue;
7135 7135
 
7136
-            $length += array_length($value, $deep_count);
7137
-        }
7136
+			$length += array_length($value, $deep_count);
7137
+		}
7138 7138
 
7139
-        else
7140
-            $length += strlen($value);
7141
-    }
7139
+		else
7140
+			$length += strlen($value);
7141
+	}
7142 7142
 
7143
-    return $length;
7143
+	return $length;
7144 7144
 }
7145 7145
 
7146 7146
 ?>
7147 7147
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -302,7 +302,6 @@  discard block
 block discarded – undo
302 302
 		$condition = 'id_member IN ({array_int:members})';
303 303
 		$parameters['members'] = $members;
304 304
 	}
305
-
306 305
 	elseif ($members === null)
307 306
 		$condition = '1=1';
308 307
 
@@ -2156,7 +2155,7 @@  discard block
 block discarded – undo
2156 2155
 			'tag' => 'cowsay',
2157 2156
 			'parameters' => array(
2158 2157
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2159
-					{
2158
+				{
2160 2159
 						static $css_added;
2161 2160
 
2162 2161
 						if (empty($css_added))
@@ -2173,7 +2172,7 @@  discard block
 block discarded – undo
2173 2172
 					},
2174 2173
 				),
2175 2174
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2176
-					{
2175
+				{
2177 2176
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2178 2177
 					},
2179 2178
 				),
@@ -3280,7 +3279,7 @@  discard block
 block discarded – undo
3280 3279
 
3281 3280
 	// Replace away!
3282 3281
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3283
-		{
3282
+	{
3284 3283
 			return $smileyPregReplacements[$matches[1]];
3285 3284
 		}, $message);
3286 3285
 }
@@ -4067,7 +4066,6 @@  discard block
 block discarded – undo
4067 4066
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4068 4067
 					$minSeed = $js_file['options']['seed'];
4069 4068
 			}
4070
-
4071 4069
 			else
4072 4070
 			{
4073 4071
 				echo '
@@ -6255,7 +6253,6 @@  discard block
 block discarded – undo
6255 6253
 			$isWritable = true;
6256 6254
 			break;
6257 6255
 		}
6258
-
6259 6256
 		else
6260 6257
 			@chmod($file, $val);
6261 6258
 	}
@@ -7135,7 +7132,6 @@  discard block
 block discarded – undo
7135 7132
 
7136 7133
             $length += array_length($value, $deep_count);
7137 7134
         }
7138
-
7139 7135
         else
7140 7136
             $length += strlen($value);
7141 7137
     }
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			{
396 396
 				$val = 'CASE ';
397 397
 				foreach ($members as $k => $v)
398
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
398
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
399 399
 				$val = $val . ' END';
400 400
 				$type = 'raw';
401 401
 			}
@@ -1055,11 +1055,11 @@  discard block
 block discarded – undo
1055 1055
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1056 1056
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1057 1057
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1058
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1058
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1059 1059
 			// Unwanted trailing punctuation and whitespace.
1060
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1060
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1061 1061
 			// Unwanted opening punctuation and whitespace.
1062
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1062
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1063 1063
 		),
1064 1064
 		array(
1065 1065
 			'',
@@ -1469,7 +1469,7 @@  discard block
 block discarded – undo
1469 1469
 							$width = !empty($width) ? ' width="' . $width . '"' : '';
1470 1470
 							$height = !empty($height) ? ' height="' . $height . '"' : '';
1471 1471
 
1472
-							$returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1472
+							$returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1473 1473
 						}
1474 1474
 						// Audio.
1475 1475
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
 							$width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;';
1478 1478
 							$height = !empty($height) ? 'height: ' . $height . 'px;' : '';
1479 1479
 
1480
-							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1480
+							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1481 1481
 						}
1482 1482
 						// Anything else.
1483 1483
 						else
@@ -1640,7 +1640,7 @@  discard block
 block discarded – undo
1640 1640
 				'type' => 'unparsed_commas_content',
1641 1641
 				'test' => '\d+,\d+\]',
1642 1642
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1643
-				'validate' => function (&$tag, &$data, $disabled)
1643
+				'validate' => function(&$tag, &$data, $disabled)
1644 1644
 				{
1645 1645
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1646 1646
 					if (empty($scheme))
@@ -2200,7 +2200,7 @@  discard block
 block discarded – undo
2200 2200
 		$codes[] = array(
2201 2201
 			'tag' => 'cowsay',
2202 2202
 			'parameters' => array(
2203
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2203
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2204 2204
 					{
2205 2205
 						static $css_added;
2206 2206
 
@@ -2217,7 +2217,7 @@  discard block
 block discarded – undo
2217 2217
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2218 2218
 					},
2219 2219
 				),
2220
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2220
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2221 2221
 					{
2222 2222
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2223 2223
 					},
@@ -4181,7 +4181,7 @@  discard block
 block discarded – undo
4181 4181
 	$toMinify = array();
4182 4182
 	$normal = array();
4183 4183
 
4184
-	usort($context['css_files'], function ($a, $b)
4184
+	usort($context['css_files'], function($a, $b)
4185 4185
 	{
4186 4186
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4187 4187
 	});
@@ -5646,13 +5646,13 @@  discard block
 block discarded – undo
5646 5646
 
5647 5647
 	// UTF-8 occurences of MS special characters
5648 5648
 	$findchars_utf8 = array(
5649
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5650
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5651
-		"\xe2\x80\xa6",	// horizontal ellipsis
5652
-		"\xe2\x80\x98",	// left single curly quote
5653
-		"\xe2\x80\x99",	// right single curly quote
5654
-		"\xe2\x80\x9c",	// left double curly quote
5655
-		"\xe2\x80\x9d",	// right double curly quote
5649
+		"\xe2\x80\x9a", // single low-9 quotation mark
5650
+		"\xe2\x80\x9e", // double low-9 quotation mark
5651
+		"\xe2\x80\xa6", // horizontal ellipsis
5652
+		"\xe2\x80\x98", // left single curly quote
5653
+		"\xe2\x80\x99", // right single curly quote
5654
+		"\xe2\x80\x9c", // left double curly quote
5655
+		"\xe2\x80\x9d", // right double curly quote
5656 5656
 	);
5657 5657
 
5658 5658
 	// windows 1252 / iso equivalents
@@ -5668,13 +5668,13 @@  discard block
 block discarded – undo
5668 5668
 
5669 5669
 	// safe replacements
5670 5670
 	$replacechars = array(
5671
-		',',	// &sbquo;
5672
-		',,',	// &bdquo;
5673
-		'...',	// &hellip;
5674
-		"'",	// &lsquo;
5675
-		"'",	// &rsquo;
5676
-		'"',	// &ldquo;
5677
-		'"',	// &rdquo;
5671
+		',', // &sbquo;
5672
+		',,', // &bdquo;
5673
+		'...', // &hellip;
5674
+		"'", // &lsquo;
5675
+		"'", // &rsquo;
5676
+		'"', // &ldquo;
5677
+		'"', // &rdquo;
5678 5678
 	);
5679 5679
 
5680 5680
 	if ($context['utf8'])
@@ -6848,7 +6848,7 @@  discard block
 block discarded – undo
6848 6848
 			EXISTS (
6849 6849
 				SELECT bpv.id_board
6850 6850
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6851
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
6851
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
6852 6852
 					AND bpv.deny = 0
6853 6853
 					AND bpv.id_board = b.id_board
6854 6854
 			)';
@@ -6858,7 +6858,7 @@  discard block
 block discarded – undo
6858 6858
 			AND NOT EXISTS (
6859 6859
 				SELECT bpv.id_board
6860 6860
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6861
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
6861
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
6862 6862
 					AND bpv.deny = 1
6863 6863
 					AND bpv.id_board = b.id_board
6864 6864
 			)';
@@ -7129,8 +7129,8 @@  discard block
 block discarded – undo
7129 7129
 	$i = 0;
7130 7130
 	while (empty($done))
7131 7131
 	{
7132
-		if (strpos($format, '{'. --$i . '}') !== false)
7133
-			$replacements['{'. $i . '}'] = array_pop($list);
7132
+		if (strpos($format, '{' . --$i . '}') !== false)
7133
+			$replacements['{' . $i . '}'] = array_pop($list);
7134 7134
 		else
7135 7135
 			$done = true;
7136 7136
 	}
@@ -7140,8 +7140,8 @@  discard block
 block discarded – undo
7140 7140
 	$i = 0;
7141 7141
 	while (empty($done))
7142 7142
 	{
7143
-		if (strpos($format, '{'. ++$i . '}') !== false)
7144
-			$replacements['{'. $i . '}'] = array_shift($list);
7143
+		if (strpos($format, '{' . ++$i . '}') !== false)
7144
+			$replacements['{' . $i . '}'] = array_shift($list);
7145 7145
 		else
7146 7146
 			$done = true;
7147 7147
 	}
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1707,7 +1707,7 @@
 block discarded – undo
1707 1707
 		{
1708 1708
 			// Avoid double separators and empty titled sections
1709 1709
 			$empty_section = true;
1710
-			for ($j=$i+1; $j < count($context['theme_options']); $j++)
1710
+			for ($j = $i + 1; $j < count($context['theme_options']); $j++)
1711 1711
 			{
1712 1712
 				// Found another separator, so we're done
1713 1713
 				if (!is_array($context['theme_options'][$j]))
Please login to merge, or discard this patch.
Sources/Profile-View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			AND a.is_read = 0' : '') . (!empty($alertIDs) ? '
263 263
 			AND a.id_alert IN ({array_int:alertIDs})' : '') . '
264 264
 		ORDER BY id_alert DESC' . (!empty($limit) ? '
265
-		LIMIT {int:limit}' : '') . (!empty($offset) ?'
265
+		LIMIT {int:limit}' : '') . (!empty($offset) ? '
266 266
 		OFFSET {int:offset}' : ''),
267 267
 		array(
268 268
 			'id_member' => $memID,
@@ -1101,20 +1101,20 @@  discard block
 block discarded – undo
1101 1101
 		$context['posts'][$key]['quickbuttons'] = array(
1102 1102
 			'reply' => array(
1103 1103
 				'label' => $txt['reply'],
1104
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1104
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1105 1105
 				'icon' => 'reply_button',
1106 1106
 				'show' => $post['can_reply']
1107 1107
 			),
1108 1108
 			'quote' => array(
1109 1109
 				'label' => $txt['quote_action'],
1110
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1110
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1111 1111
 				'icon' => 'quote',
1112 1112
 				'show' => $post['can_quote']
1113 1113
 			),
1114 1114
 			'remove' => array(
1115 1115
 				'label' => $txt['remove'],
1116
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1117
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"',
1116
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1117
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"',
1118 1118
 				'icon' => 'remove_button',
1119 1119
 				'show' => $post['can_delete']
1120 1120
 			)
Please login to merge, or discard this patch.
Sources/Security.php 1 patch
Braces   -4 removed lines patch added patch discarded remove patch
@@ -1257,7 +1257,6 @@  discard block
 block discarded – undo
1257 1257
 
1258 1258
 			continue;
1259 1259
 		}
1260
-
1261 1260
 		else
1262 1261
 		{
1263 1262
 			$fh = @fopen($path . '/.htaccess', 'w');
@@ -1269,7 +1268,6 @@  discard block
 block discarded – undo
1269 1268
 	Deny from all' . $close);
1270 1269
 				fclose($fh);
1271 1270
 			}
1272
-
1273 1271
 			else
1274 1272
 				$errors[] = 'htaccess_cannot_create_file';
1275 1273
 		}
@@ -1280,7 +1278,6 @@  discard block
 block discarded – undo
1280 1278
 
1281 1279
 			continue;
1282 1280
 		}
1283
-
1284 1281
 		else
1285 1282
 		{
1286 1283
 			$fh = @fopen($path . '/index.php', 'w');
@@ -1307,7 +1304,6 @@  discard block
 block discarded – undo
1307 1304
 ?' . '>');
1308 1305
 				fclose($fh);
1309 1306
 			}
1310
-
1311 1307
 			else
1312 1308
 				$errors[] = 'index-php_cannot_create_file';
1313 1309
 		}
Please login to merge, or discard this patch.
other/install.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -959,7 +959,7 @@
 block discarded – undo
959 959
 	$incontext['continue'] = 1;
960 960
 
961 961
 	// Check Postgres setting
962
-	if ( $db_type === 'postgresql')
962
+	if ($db_type === 'postgresql')
963 963
 	{
964 964
 		load_database();
965 965
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -973,7 +973,7 @@
 block discarded – undo
973 973
 		{
974 974
 			$row = $smcFunc['db_fetch_assoc']($result);
975 975
 			if ($row['standard_conforming_strings'] !== 'on')
976
-				{
976
+			{
977 977
 					$incontext['continue'] = 0;
978 978
 					$incontext['error'] = $txt['error_pg_scs'];
979 979
 				}
Please login to merge, or discard this patch.
Sources/Display.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1631,14 +1631,14 @@  discard block
 block discarded – undo
1631 1631
 	$output['quickbuttons'] = array(
1632 1632
 		'quote' => array(
1633 1633
 			'label' => $txt['quote_action'],
1634
-			'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'],
1635
-			'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"',
1634
+			'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'],
1635
+			'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"',
1636 1636
 			'icon' => 'quote',
1637 1637
 			'show' => $context['can_quote']
1638 1638
 		),
1639 1639
 		'quote_selected' => array(
1640 1640
 			'label' => $txt['quote_selected_action'],
1641
-			'id' => 'quoteSelected_'. $output['id'],
1641
+			'id' => 'quoteSelected_' . $output['id'],
1642 1642
 			'href' => 'javascript:void(0)',
1643 1643
 			'custom' => 'style="display:none"',
1644 1644
 			'icon' => 'quote_selected',
@@ -1647,71 +1647,71 @@  discard block
 block discarded – undo
1647 1647
 		'quick_edit' => array(
1648 1648
 			'label' => $txt['quick_edit'],
1649 1649
 			'class' => 'quick_edit',
1650
-			'id' =>' modify_button_'. $output['id'],
1651
-			'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"',
1650
+			'id' =>' modify_button_' . $output['id'],
1651
+			'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"',
1652 1652
 			'icon' => 'quick_edit_button',
1653 1653
 			'show' => $output['can_modify']
1654 1654
 		),
1655 1655
 		'more' => array(
1656 1656
 			'modify' => array(
1657 1657
 				'label' => $txt['modify'],
1658
-				'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'],
1658
+				'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'],
1659 1659
 				'icon' => 'modify_button',
1660 1660
 				'show' => $output['can_modify']
1661 1661
 			),
1662 1662
 			'remove_topic' => array(
1663 1663
 				'label' => $txt['remove_topic'],
1664
-				'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1665
-				'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'" class="you_sure"',
1664
+				'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1665
+				'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '" class="you_sure"',
1666 1666
 				'icon' => 'remove_button',
1667 1667
 				'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id'])
1668 1668
 			),
1669 1669
 			'remove' => array(
1670 1670
 				'label' => $txt['remove'],
1671
-				'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1672
-				'javascript' => 'data-confirm="'.$txt['remove_message_question'].'" class="you_sure"',
1671
+				'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1672
+				'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '" class="you_sure"',
1673 1673
 				'icon' => 'remove_button',
1674 1674
 				'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id'])
1675 1675
 			),
1676 1676
 			'split' => array(
1677 1677
 				'label' => $txt['split'],
1678
-				'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'],
1678
+				'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'],
1679 1679
 				'icon' => 'split_button',
1680 1680
 				'show' => $context['can_split'] && !empty($context['real_num_replies'])
1681 1681
 			),
1682 1682
 			'report' => array(
1683 1683
 				'label' => $txt['report_to_mod'],
1684
-				'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'],
1684
+				'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'],
1685 1685
 				'icon' => 'error',
1686 1686
 				'show' => $context['can_report_moderator']
1687 1687
 			),
1688 1688
 			'warn' => array(
1689 1689
 				'label' => $txt['issue_warning'],
1690
-				'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'],
1690
+				'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'],
1691 1691
 				'icon' => 'warn_button',
1692 1692
 				'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest']
1693 1693
 			),
1694 1694
 			'restore' => array(
1695 1695
 				'label' => $txt['restore_message'],
1696
-				'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1696
+				'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1697 1697
 				'icon' => 'restore_button',
1698 1698
 				'show' => $context['can_restore_msg']
1699 1699
 			),
1700 1700
 			'approve' => array(
1701 1701
 				'label' => $txt['approve'],
1702
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1702
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1703 1703
 				'icon' => 'approve_button',
1704 1704
 				'show' => $output['can_approve']
1705 1705
 			),
1706 1706
 			'unapprove' => array(
1707 1707
 				'label' => $txt['unapprove'],
1708
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1708
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1709 1709
 				'icon' => 'unapprove_button',
1710 1710
 				'show' => $output['can_unapprove']
1711 1711
 			),
1712 1712
 		),
1713 1713
 		'quickmod' => array(
1714
-			'id' => 'in_topic_mod_check_'. $output['id'],
1714
+			'id' => 'in_topic_mod_check_' . $output['id'],
1715 1715
 			'custom' => 'style="display: none;"',
1716 1716
 			'content' => '',
1717 1717
 			'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'],
Please login to merge, or discard this patch.