Completed
Pull Request — release-2.1 (#4470)
by Fran
10:39
created
Sources/Display.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -899,13 +899,13 @@
 block discarded – undo
899 899
 		if ($start_char === 'C')
900 900
 			$limit_seek = $limit;
901 901
 		else
902
-			$limit_seek  = $limit + 1;
902
+			$limit_seek = $limit + 1;
903 903
 
904 904
 		$request = $smcFunc['db_query']('', '
905 905
 			SELECT id_msg, id_member, approved
906 906
 			FROM {db_prefix}messages
907 907
 			WHERE id_topic = {int:current_topic}
908
-			AND id_msg '. $page_operator . ' {int:page_id}'. (!$modSettings['postmod_active'] || $approve_posts ? '' : '
908
+			AND id_msg '. $page_operator . ' {int:page_id}' . (!$modSettings['postmod_active'] || $approve_posts ? '' : '
909 909
 			AND (approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR id_member = {int:current_member}') . ')') . '
910 910
 			ORDER BY id_msg ' . ($ascending_seek ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : '
911 911
 			LIMIT {int:limit}'),
Please login to merge, or discard this patch.
Sources/Logging.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return array The truncated array
25 25
  */
26
-function truncateArray($arr, $max_length=1900)
26
+function truncateArray($arr, $max_length = 1900)
27 27
 {
28 28
 	$curr_length = 0;
29 29
 	foreach ($arr as $key => $value)
30 30
 		if (is_array($value))
31 31
 			foreach ($value as $key2 => $value2)
32
-				$curr_length += strlen ($value2);
32
+				$curr_length += strlen($value2);
33 33
 		else
34
-			$curr_length += strlen ($value);
34
+			$curr_length += strlen($value);
35 35
 	if ($curr_length <= $max_length)
36 36
 		return $arr;
37 37
 	else
38 38
 	{
39 39
 		// Truncate each element's value to a reasonable length
40
-		$param_max = floor($max_length/count($arr));
40
+		$param_max = floor($max_length / count($arr));
41 41
 		foreach ($arr as $key => &$value)
42 42
 			if (is_array($value))
43 43
 				foreach ($value as $key2 => &$value2)
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	if (filemtime($cachedir . '/db_last_error.php') === $last_db_error_change)
208 208
 	{
209 209
 		// Write the change
210
-		$write_db_change =  '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
210
+		$write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
211 211
 		$written_bytes = file_put_contents($cachedir . '/db_last_error.php', $write_db_change, LOCK_EX);
212 212
 
213 213
 		// survey says ...
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br>
281 281
 	', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br>
282 282
 	', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br>
283
-	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),'
283
+	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), '
284 284
 	', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>';
285 285
 
286 286
 	if (function_exists('memory_get_peak_usage'))
Please login to merge, or discard this patch.
Sources/ManageMembers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 			// INET.
361 361
 			elseif ($param_info['type'] == 'inet')
362 362
 			{
363
-				if(count($search_params[$param_name]) === 1)
363
+				if (count($search_params[$param_name]) === 1)
364 364
 				{
365 365
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' = {inet:' . $param_name . '})';
366 366
 					$where_params[$param_name] = $search_params[$param_name][0];
@@ -368,8 +368,8 @@  discard block
 block discarded – undo
368 368
 				elseif (count($search_params[$param_name]) === 2)
369 369
 				{
370 370
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' <= {inet:' . $param_name . '_high} and ' . $param_info['db_fields'][0] . ' >= {inet:' . $param_name . '_low})';
371
-					$where_params[$param_name.'_low'] = $search_params[$param_name]['low'];
372
-					$where_params[$param_name.'_high'] = $search_params[$param_name]['high'];
371
+					$where_params[$param_name . '_low'] = $search_params[$param_name]['low'];
372
+					$where_params[$param_name . '_high'] = $search_params[$param_name]['high'];
373 373
 				}
374 374
 				
375 375
 			}
Please login to merge, or discard this patch.
Sources/Who.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 						'Jessica "Suki" Gonz&aacute;lez',
593 593
 						'Karl "RegularExpression" Benson',
594 594
 						'Matthew "Labradoodle-360" Kerle',
595
-						$user_info['is_admin'] ? 'Matt "Grudge" Wolf': 'Grudge',
595
+						$user_info['is_admin'] ? 'Matt "Grudge" Wolf' : 'Grudge',
596 596
 						'Michael "Thantos" Miller',
597 597
 						'Norv',
598 598
 						'Peter "Arantor" Spicer',
@@ -824,13 +824,13 @@  discard block
 block discarded – undo
824 824
 			$credit_info = $smcFunc['json_decode']($row['credits'], true);
825 825
 
826 826
 			$copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' &copy; ' . $smcFunc['htmlspecialchars']($credit_info['copyright']);
827
-			$license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="'. $smcFunc['htmlspecialchars']($credit_info['licenseurl']) .'">'. $smcFunc['htmlspecialchars']($credit_info['license']) .'</a>' : $smcFunc['htmlspecialchars']($credit_info['license']));
827
+			$license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="' . $smcFunc['htmlspecialchars']($credit_info['licenseurl']) . '">' . $smcFunc['htmlspecialchars']($credit_info['license']) . '</a>' : $smcFunc['htmlspecialchars']($credit_info['license']));
828 828
 			$version = $txt['credits_version'] . ' ' . $row['version'];
829 829
 			$title = (empty($credit_info['title']) ? $row['name'] : $smcFunc['htmlspecialchars']($credit_info['title'])) . ': ' . $version;
830 830
 
831 831
 			// build this one out and stash it away
832 832
 			$mod_name = empty($credit_info['url']) ? $title : '<a href="' . $credit_info['url'] . '">' . $title . '</a>';
833
-			$mods[] = $mod_name . (!empty($license) ? ' | ' . $license  : '') . (!empty($copyright) ? ' | ' . $copyright  : '');
833
+			$mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : '');
834 834
 		}
835 835
 		cache_put_data('mods_credits', $mods, 86400);
836 836
 	}
Please login to merge, or discard this patch.
Sources/Subscriptions-PayPal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
 			$header = 'POST /cgi-bin/webscr HTTP/1.1' . "\r\n";
237 237
 			$header .= 'content-type: application/x-www-form-urlencoded' . "\r\n";
238 238
 			$header .= 'Host: www.' . (!empty($modSettings['paidsubs_test']) ? 'sandbox.' : '') . 'paypal.com' . "\r\n";
239
-			$header .= 'content-length: ' . strlen ($requestString) . "\r\n";
239
+			$header .= 'content-length: ' . strlen($requestString) . "\r\n";
240 240
 			$header .= 'connection: close' . "\r\n\r\n";
241 241
 
242 242
 			// Open the connection.
Please login to merge, or discard this patch.
Sources/Attachments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		// Just send a generic message.
77 77
 		else
78 78
 			$this->setResponse(array(
79
-				'text' => $this->_sa == 'add' ? 'attach_error_title' :   'attached_file_deleted_error',
79
+				'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error',
80 80
 				'type' => 'error',
81 81
 				'data' => false,
82 82
 			));
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 			// Gotta urlencode the filename.
411 411
 			if ($this->_attachResults)
412 412
 				foreach ($this->_attachResults as $k => $v)
413
-					$this->_attachResults[$k]['name'] =  urlencode($this->_attachResults[$k]['name']);
413
+					$this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']);
414 414
 
415 415
 			$this->_response = array(
416 416
 				'files' => $this->_attachResults ? $this->_attachResults : false,
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 			ob_start();
438 438
 
439 439
 		// Set the header.
440
-		header('content-type: application/json; charset='. $context['character_set'] .'');
440
+		header('content-type: application/json; charset=' . $context['character_set'] . '');
441 441
 
442 442
 		echo $smcFunc['json_encode']($this->_response ? $this->_response : array());
443 443
 
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 			{
387 387
 				$val = 'CASE ';
388 388
 				foreach ($members as $k => $v)
389
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. count(fetch_alerts($v, false, 0, array(), false)) . ' ';
389
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . count(fetch_alerts($v, false, 0, array(), false)) . ' ';
390 390
 				$val = $val . ' END';
391 391
 				$type = 'raw';
392 392
 			}
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 			$unsupportedFormats = (array) cache_get_data('unsupportedtimeformats', 86400);
818 818
 		if (empty($unsupportedFormats))
819 819
 		{
820
-			foreach($strftimeFormatSubstitutions as $format => $substitution)
820
+			foreach ($strftimeFormatSubstitutions as $format => $substitution)
821 821
 			{
822 822
 				$value = @strftime('%' . $format);
823 823
 
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
 					'height' => array('optional' => true, 'match' => '(\d+)'),
1183 1183
 				),
1184 1184
 				'content' => '$1',
1185
-				'validate' => function (&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1185
+				'validate' => function(&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1186 1186
 				{
1187 1187
 					$returnContext = '';
1188 1188
 
@@ -1217,7 +1217,7 @@  discard block
 block discarded – undo
1217 1217
 						}
1218 1218
 
1219 1219
 						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}']))
1220
-							$returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '" class="atc_img"></a>';
1220
+							$returnContext .= '<a href="' . $currentAttachment['href'] . ';image" id="link_' . $currentAttachment['id'] . '" onclick="' . $currentAttachment['thumbnail']['javascript'] . '"><img src="' . $currentAttachment['thumbnail']['href'] . '"' . $alt . $title . ' id="thumb_' . $currentAttachment['id'] . '" class="atc_img"></a>';
1221 1221
 						else
1222 1222
 							$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>';
1223 1223
 					}
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 				'type' => 'unparsed_content',
1247 1247
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1248 1248
 				// @todo Maybe this can be simplified?
1249
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1249
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1250 1250
 				{
1251 1251
 					if (!isset($disabled['code']))
1252 1252
 					{
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 				'type' => 'unparsed_equals_content',
1284 1284
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> ($2) <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1285 1285
 				// @todo Maybe this can be simplified?
1286
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1286
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1287 1287
 				{
1288 1288
 					if (!isset($disabled['code']))
1289 1289
 					{
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 				'type' => 'unparsed_content',
1328 1328
 				'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
1329 1329
 				// @todo Should this respect guest_hideContacts?
1330
-				'validate' => function (&$tag, &$data, $disabled)
1330
+				'validate' => function(&$tag, &$data, $disabled)
1331 1331
 				{
1332 1332
 					$data = strtr($data, array('<br>' => ''));
1333 1333
 				},
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
 				'type' => 'unparsed_commas_content',
1347 1347
 				'test' => '\d+,\d+\]',
1348 1348
 				'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
1349
-				'validate' => function (&$tag, &$data, $disabled)
1349
+				'validate' => function(&$tag, &$data, $disabled)
1350 1350
 				{
1351 1351
 					if (isset($disabled['url']))
1352 1352
 						$tag['content'] = '$1';
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
 				'test' => '(left|right)(\s+max=\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)?\]',
1363 1363
 				'before' => '<div $1>',
1364 1364
 				'after' => '</div>',
1365
-				'validate' => function (&$tag, &$data, $disabled)
1365
+				'validate' => function(&$tag, &$data, $disabled)
1366 1366
 				{
1367 1367
 					$class = 'class="bbc_float float' . (strpos($data, 'left') === 0 ? 'left' : 'right') . '"';
1368 1368
 
@@ -1411,7 +1411,7 @@  discard block
 block discarded – undo
1411 1411
 					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1412 1412
 				),
1413 1413
 				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1414
-				'validate' => function (&$tag, &$data, $disabled)
1414
+				'validate' => function(&$tag, &$data, $disabled)
1415 1415
 				{
1416 1416
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl, $user_info;
1417 1417
 
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
 				'tag' => 'img',
1438 1438
 				'type' => 'unparsed_content',
1439 1439
 				'content' => '<img src="$1" alt="" class="bbc_img">',
1440
-				'validate' => function (&$tag, &$data, $disabled)
1440
+				'validate' => function(&$tag, &$data, $disabled)
1441 1441
 				{
1442 1442
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl, $user_info;
1443 1443
 
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 				'tag' => 'iurl',
1464 1464
 				'type' => 'unparsed_content',
1465 1465
 				'content' => '<a href="$1" class="bbc_link">$1</a>',
1466
-				'validate' => function (&$tag, &$data, $disabled)
1466
+				'validate' => function(&$tag, &$data, $disabled)
1467 1467
 				{
1468 1468
 					$data = strtr($data, array('<br>' => ''));
1469 1469
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
 				'quoted' => 'optional',
1478 1478
 				'before' => '<a href="$1" class="bbc_link">',
1479 1479
 				'after' => '</a>',
1480
-				'validate' => function (&$tag, &$data, $disabled)
1480
+				'validate' => function(&$tag, &$data, $disabled)
1481 1481
 				{
1482 1482
 					if (substr($data, 0, 1) == '#')
1483 1483
 						$data = '#post_' . substr($data, 1);
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
 				'tag' => 'php',
1558 1558
 				'type' => 'unparsed_content',
1559 1559
 				'content' => '<span class="phpcode">$1</span>',
1560
-				'validate' => isset($disabled['php']) ? null : function (&$tag, &$data, $disabled)
1560
+				'validate' => isset($disabled['php']) ? null : function(&$tag, &$data, $disabled)
1561 1561
 				{
1562 1562
 					if (!isset($disabled['php']))
1563 1563
 					{
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
 				'test' => '[1-7]\]',
1656 1656
 				'before' => '<span style="font-size: $1;" class="bbc_size">',
1657 1657
 				'after' => '</span>',
1658
-				'validate' => function (&$tag, &$data, $disabled)
1658
+				'validate' => function(&$tag, &$data, $disabled)
1659 1659
 				{
1660 1660
 					$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
1661 1661
 					$data = $sizes[$data] . 'em';
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
 				'tag' => 'time',
1694 1694
 				'type' => 'unparsed_content',
1695 1695
 				'content' => '$1',
1696
-				'validate' => function (&$tag, &$data, $disabled)
1696
+				'validate' => function(&$tag, &$data, $disabled)
1697 1697
 				{
1698 1698
 					if (is_numeric($data))
1699 1699
 						$data = timeformat($data);
@@ -1721,7 +1721,7 @@  discard block
 block discarded – undo
1721 1721
 				'tag' => 'url',
1722 1722
 				'type' => 'unparsed_content',
1723 1723
 				'content' => '<a href="$1" class="bbc_link" target="_blank" rel="noopener">$1</a>',
1724
-				'validate' => function (&$tag, &$data, $disabled)
1724
+				'validate' => function(&$tag, &$data, $disabled)
1725 1725
 				{
1726 1726
 					$data = strtr($data, array('<br>' => ''));
1727 1727
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1735,7 +1735,7 @@  discard block
 block discarded – undo
1735 1735
 				'quoted' => 'optional',
1736 1736
 				'before' => '<a href="$1" class="bbc_link" target="_blank" rel="noopener">',
1737 1737
 				'after' => '</a>',
1738
-				'validate' => function (&$tag, &$data, $disabled)
1738
+				'validate' => function(&$tag, &$data, $disabled)
1739 1739
 				{
1740 1740
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1741 1741
 					if (empty($scheme))
@@ -1761,7 +1761,7 @@  discard block
 block discarded – undo
1761 1761
 		{
1762 1762
 			if (isset($temp_bbc))
1763 1763
 				$bbc_codes = $temp_bbc;
1764
-			usort($codes, function ($a, $b) {
1764
+			usort($codes, function($a, $b) {
1765 1765
 				return strcmp($a['tag'], $b['tag']);
1766 1766
 			});
1767 1767
 			return $codes;
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
 										# a run of Unicode domain name characters and a dot
1999 1999
 										[\p{L}\p{M}\p{N}\-.:@]+\.
2000 2000
 										# and then a TLD valid in the DNS or the reserved "local" TLD
2001
-										(?:'. $modSettings['tld_regex'] .'|local)
2001
+										(?:'. $modSettings['tld_regex'] . '|local)
2002 2002
 									)
2003 2003
 									# followed by a non-domain character or end of line
2004 2004
 									(?=[^\p{L}\p{N}\-.]|$)
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
 						)?
2067 2067
 						';
2068 2068
 
2069
-						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) {
2069
+						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) {
2070 2070
 							$url = array_shift($matches);
2071 2071
 
2072 2072
 							$scheme = parse_url($url, PHP_URL_SCHEME);
@@ -2147,7 +2147,7 @@  discard block
 block discarded – undo
2147 2147
 			$look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2));
2148 2148
 
2149 2149
 			// A closing tag that doesn't match any open tags? Skip it.
2150
-			if (!in_array($look_for, array_map(function($code){return $code['tag'];}, $open_tags)))
2150
+			if (!in_array($look_for, array_map(function($code) {return $code['tag']; }, $open_tags)))
2151 2151
 				continue;
2152 2152
 
2153 2153
 			$to_close = array();
@@ -2814,7 +2814,7 @@  discard block
 block discarded – undo
2814 2814
 		for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2815 2815
 		{
2816 2816
 			$specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES);
2817
-			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')). '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2817
+			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2818 2818
 
2819 2819
 			$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2820 2820
 
@@ -2831,7 +2831,7 @@  discard block
 block discarded – undo
2831 2831
 
2832 2832
 	// Replace away!
2833 2833
 	$message = preg_replace_callback($smileyPregSearch,
2834
-		function ($matches) use ($smileyPregReplacements)
2834
+		function($matches) use ($smileyPregReplacements)
2835 2835
 		{
2836 2836
 			return $smileyPregReplacements[$matches[1]];
2837 2837
 		}, $message);
@@ -2897,13 +2897,13 @@  discard block
 block discarded – undo
2897 2897
 	{
2898 2898
 		if (defined('SID') && SID != '')
2899 2899
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2900
-				function ($m) use ($scripturl)
2900
+				function($m) use ($scripturl)
2901 2901
 				{
2902
-					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2902
+					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : "");
2903 2903
 				}, $setLocation);
2904 2904
 		else
2905 2905
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2906
-				function ($m) use ($scripturl)
2906
+				function($m) use ($scripturl)
2907 2907
 				{
2908 2908
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2909 2909
 				}, $setLocation);
@@ -3226,7 +3226,7 @@  discard block
 block discarded – undo
3226 3226
 
3227 3227
 	// Add a generic "Are you sure?" confirmation message.
3228 3228
 	addInlineJavaScript('
3229
-	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3229
+	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';');
3230 3230
 
3231 3231
 	// Now add the capping code for avatars.
3232 3232
 	if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize')
@@ -3675,7 +3675,7 @@  discard block
 block discarded – undo
3675 3675
 	if (!empty($normal))
3676 3676
 		foreach ($normal as $nf)
3677 3677
 			echo '
3678
-	<link rel="stylesheet" href="', $nf ,'">';
3678
+	<link rel="stylesheet" href="', $nf, '">';
3679 3679
 
3680 3680
 	if ($db_show_debug === true)
3681 3681
 	{
@@ -3691,7 +3691,7 @@  discard block
 block discarded – undo
3691 3691
 	<style>';
3692 3692
 
3693 3693
 		foreach ($context['css_header'] as $css)
3694
-			echo $css .'
3694
+			echo $css . '
3695 3695
 	';
3696 3696
 
3697 3697
 		echo'
@@ -3730,7 +3730,7 @@  discard block
 block discarded – undo
3730 3730
 		return true;
3731 3731
 
3732 3732
 	// No namespaces, sorry!
3733
-	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
3733
+	$classType = 'MatthiasMullie\\Minify\\' . strtoupper($type);
3734 3734
 
3735 3735
 	// Temp path.
3736 3736
 	$cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/';
@@ -3856,7 +3856,7 @@  discard block
 block discarded – undo
3856 3856
 	else
3857 3857
 		$path = $modSettings['attachmentUploadDir'];
3858 3858
 
3859
-	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3859
+	return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
3860 3860
 }
3861 3861
 
3862 3862
 /**
@@ -3900,10 +3900,10 @@  discard block
 block discarded – undo
3900 3900
 		$valid_low = isValidIP($ip_parts[0]);
3901 3901
 		$valid_high = isValidIP($ip_parts[1]);
3902 3902
 		$count = 0;
3903
-		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3903
+		$mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.');
3904 3904
 		$max = ($mode == ':' ? 'ffff' : '255');
3905 3905
 		$min = 0;
3906
-		if(!$valid_low)
3906
+		if (!$valid_low)
3907 3907
 		{
3908 3908
 			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3909 3909
 			$valid_low = isValidIP($ip_parts[0]);
@@ -3917,7 +3917,7 @@  discard block
 block discarded – undo
3917 3917
 		}
3918 3918
 
3919 3919
 		$count = 0;
3920
-		if(!$valid_high)
3920
+		if (!$valid_high)
3921 3921
 		{
3922 3922
 			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3923 3923
 			$valid_high = isValidIP($ip_parts[1]);
@@ -3930,7 +3930,7 @@  discard block
 block discarded – undo
3930 3930
 			}
3931 3931
 		}
3932 3932
 
3933
-		if($valid_high && $valid_low)
3933
+		if ($valid_high && $valid_low)
3934 3934
 		{
3935 3935
 			$ip_array['low'] = $ip_parts[0];
3936 3936
 			$ip_array['high'] = $ip_parts[1];
@@ -4112,7 +4112,7 @@  discard block
 block discarded – undo
4112 4112
 		addInlineJavaScript('
4113 4113
 	var user_menus = new smc_PopupMenu();
4114 4114
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
4115
-	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
4115
+	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true);
4116 4116
 		if ($context['allow_pm'])
4117 4117
 			addInlineJavaScript('
4118 4118
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
@@ -4748,7 +4748,7 @@  discard block
 block discarded – undo
4748 4748
 		// No? try a fallback to $sourcedir
4749 4749
 		else
4750 4750
 		{
4751
-			$absPath = $sourcedir .'/'. $file;
4751
+			$absPath = $sourcedir . '/' . $file;
4752 4752
 
4753 4753
 			if (file_exists($absPath))
4754 4754
 				require_once($absPath);
@@ -4829,15 +4829,15 @@  discard block
 block discarded – undo
4829 4829
 
4830 4830
 	// UTF-8 occurences of MS special characters
4831 4831
 	$findchars_utf8 = array(
4832
-		"\xe2\x80\x9a",	// single low-9 quotation mark
4833
-		"\xe2\x80\x9e",	// double low-9 quotation mark
4834
-		"\xe2\x80\xa6",	// horizontal ellipsis
4835
-		"\xe2\x80\x98",	// left single curly quote
4836
-		"\xe2\x80\x99",	// right single curly quote
4837
-		"\xe2\x80\x9c",	// left double curly quote
4838
-		"\xe2\x80\x9d",	// right double curly quote
4839
-		"\xe2\x80\x93",	// en dash
4840
-		"\xe2\x80\x94",	// em dash
4832
+		"\xe2\x80\x9a", // single low-9 quotation mark
4833
+		"\xe2\x80\x9e", // double low-9 quotation mark
4834
+		"\xe2\x80\xa6", // horizontal ellipsis
4835
+		"\xe2\x80\x98", // left single curly quote
4836
+		"\xe2\x80\x99", // right single curly quote
4837
+		"\xe2\x80\x9c", // left double curly quote
4838
+		"\xe2\x80\x9d", // right double curly quote
4839
+		"\xe2\x80\x93", // en dash
4840
+		"\xe2\x80\x94", // em dash
4841 4841
 	);
4842 4842
 
4843 4843
 	// windows 1252 / iso equivalents
@@ -4855,15 +4855,15 @@  discard block
 block discarded – undo
4855 4855
 
4856 4856
 	// safe replacements
4857 4857
 	$replacechars = array(
4858
-		',',	// &sbquo;
4859
-		',,',	// &bdquo;
4860
-		'...',	// &hellip;
4861
-		"'",	// &lsquo;
4862
-		"'",	// &rsquo;
4863
-		'"',	// &ldquo;
4864
-		'"',	// &rdquo;
4865
-		'-',	// &ndash;
4866
-		'--',	// &mdash;
4858
+		',', // &sbquo;
4859
+		',,', // &bdquo;
4860
+		'...', // &hellip;
4861
+		"'", // &lsquo;
4862
+		"'", // &rsquo;
4863
+		'"', // &ldquo;
4864
+		'"', // &rdquo;
4865
+		'-', // &ndash;
4866
+		'--', // &mdash;
4867 4867
 	);
4868 4868
 
4869 4869
 	if ($context['utf8'])
@@ -5281,7 +5281,7 @@  discard block
 block discarded – undo
5281 5281
  */
5282 5282
 function inet_dtop($bin)
5283 5283
 {
5284
-	if(empty($bin))
5284
+	if (empty($bin))
5285 5285
 		return '';
5286 5286
 
5287 5287
 	global $db_type;
@@ -5312,28 +5312,28 @@  discard block
 block discarded – undo
5312 5312
  */
5313 5313
 function _safe_serialize($value)
5314 5314
 {
5315
-	if(is_null($value))
5315
+	if (is_null($value))
5316 5316
 		return 'N;';
5317 5317
 
5318
-	if(is_bool($value))
5319
-		return 'b:'. (int) $value .';';
5318
+	if (is_bool($value))
5319
+		return 'b:' . (int) $value . ';';
5320 5320
 
5321
-	if(is_int($value))
5322
-		return 'i:'. $value .';';
5321
+	if (is_int($value))
5322
+		return 'i:' . $value . ';';
5323 5323
 
5324
-	if(is_float($value))
5325
-		return 'd:'. str_replace(',', '.', $value) .';';
5324
+	if (is_float($value))
5325
+		return 'd:' . str_replace(',', '.', $value) . ';';
5326 5326
 
5327
-	if(is_string($value))
5328
-		return 's:'. strlen($value) .':"'. $value .'";';
5327
+	if (is_string($value))
5328
+		return 's:' . strlen($value) . ':"' . $value . '";';
5329 5329
 
5330
-	if(is_array($value))
5330
+	if (is_array($value))
5331 5331
 	{
5332 5332
 		$out = '';
5333
-		foreach($value as $k => $v)
5333
+		foreach ($value as $k => $v)
5334 5334
 			$out .= _safe_serialize($k) . _safe_serialize($v);
5335 5335
 
5336
-		return 'a:'. count($value) .':{'. $out .'}';
5336
+		return 'a:' . count($value) . ':{' . $out . '}';
5337 5337
 	}
5338 5338
 
5339 5339
 	// safe_serialize cannot serialize resources or objects.
@@ -5375,7 +5375,7 @@  discard block
 block discarded – undo
5375 5375
 function _safe_unserialize($str)
5376 5376
 {
5377 5377
 	// Input  is not a string.
5378
-	if(empty($str) || !is_string($str))
5378
+	if (empty($str) || !is_string($str))
5379 5379
 		return false;
5380 5380
 
5381 5381
 	$stack = array();
@@ -5389,40 +5389,40 @@  discard block
 block discarded – undo
5389 5389
 	 *   3 - in array, expecting value or another array
5390 5390
 	 */
5391 5391
 	$state = 0;
5392
-	while($state != 1)
5392
+	while ($state != 1)
5393 5393
 	{
5394 5394
 		$type = isset($str[0]) ? $str[0] : '';
5395
-		if($type == '}')
5395
+		if ($type == '}')
5396 5396
 			$str = substr($str, 1);
5397 5397
 
5398
-		else if($type == 'N' && $str[1] == ';')
5398
+		else if ($type == 'N' && $str[1] == ';')
5399 5399
 		{
5400 5400
 			$value = null;
5401 5401
 			$str = substr($str, 2);
5402 5402
 		}
5403
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5403
+		else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5404 5404
 		{
5405 5405
 			$value = $matches[1] == '1' ? true : false;
5406 5406
 			$str = substr($str, 4);
5407 5407
 		}
5408
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5408
+		else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5409 5409
 		{
5410
-			$value = (int)$matches[1];
5410
+			$value = (int) $matches[1];
5411 5411
 			$str = $matches[2];
5412 5412
 		}
5413
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5413
+		else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5414 5414
 		{
5415
-			$value = (float)$matches[1];
5415
+			$value = (float) $matches[1];
5416 5416
 			$str = $matches[3];
5417 5417
 		}
5418
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5418
+		else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";')
5419 5419
 		{
5420
-			$value = substr($matches[2], 0, (int)$matches[1]);
5421
-			$str = substr($matches[2], (int)$matches[1] + 2);
5420
+			$value = substr($matches[2], 0, (int) $matches[1]);
5421
+			$str = substr($matches[2], (int) $matches[1] + 2);
5422 5422
 		}
5423
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5423
+		else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5424 5424
 		{
5425
-			$expectedLength = (int)$matches[1];
5425
+			$expectedLength = (int) $matches[1];
5426 5426
 			$str = $matches[2];
5427 5427
 		}
5428 5428
 
@@ -5430,10 +5430,10 @@  discard block
 block discarded – undo
5430 5430
 		else
5431 5431
 			return false;
5432 5432
 
5433
-		switch($state)
5433
+		switch ($state)
5434 5434
 		{
5435 5435
 			case 3: // In array, expecting value or another array.
5436
-				if($type == 'a')
5436
+				if ($type == 'a')
5437 5437
 				{
5438 5438
 					$stack[] = &$list;
5439 5439
 					$list[$key] = array();
@@ -5442,7 +5442,7 @@  discard block
 block discarded – undo
5442 5442
 					$state = 2;
5443 5443
 					break;
5444 5444
 				}
5445
-				if($type != '}')
5445
+				if ($type != '}')
5446 5446
 				{
5447 5447
 					$list[$key] = $value;
5448 5448
 					$state = 2;
@@ -5453,29 +5453,29 @@  discard block
 block discarded – undo
5453 5453
 				return false;
5454 5454
 
5455 5455
 			case 2: // in array, expecting end of array or a key
5456
-				if($type == '}')
5456
+				if ($type == '}')
5457 5457
 				{
5458 5458
 					// Array size is less than expected.
5459
-					if(count($list) < end($expected))
5459
+					if (count($list) < end($expected))
5460 5460
 						return false;
5461 5461
 
5462 5462
 					unset($list);
5463
-					$list = &$stack[count($stack)-1];
5463
+					$list = &$stack[count($stack) - 1];
5464 5464
 					array_pop($stack);
5465 5465
 
5466 5466
 					// Go to terminal state if we're at the end of the root array.
5467 5467
 					array_pop($expected);
5468 5468
 
5469
-					if(count($expected) == 0)
5469
+					if (count($expected) == 0)
5470 5470
 						$state = 1;
5471 5471
 
5472 5472
 					break;
5473 5473
 				}
5474 5474
 
5475
-				if($type == 'i' || $type == 's')
5475
+				if ($type == 'i' || $type == 's')
5476 5476
 				{
5477 5477
 					// Array size exceeds expected length.
5478
-					if(count($list) >= end($expected))
5478
+					if (count($list) >= end($expected))
5479 5479
 						return false;
5480 5480
 
5481 5481
 					$key = $value;
@@ -5488,7 +5488,7 @@  discard block
 block discarded – undo
5488 5488
 
5489 5489
 			// Expecting array or value.
5490 5490
 			case 0:
5491
-				if($type == 'a')
5491
+				if ($type == 'a')
5492 5492
 				{
5493 5493
 					$data = array();
5494 5494
 					$list = &$data;
@@ -5497,7 +5497,7 @@  discard block
 block discarded – undo
5497 5497
 					break;
5498 5498
 				}
5499 5499
 
5500
-				if($type != '}')
5500
+				if ($type != '}')
5501 5501
 				{
5502 5502
 					$data = $value;
5503 5503
 					$state = 1;
@@ -5510,7 +5510,7 @@  discard block
 block discarded – undo
5510 5510
 	}
5511 5511
 
5512 5512
 	// Trailing data in input.
5513
-	if(!empty($str))
5513
+	if (!empty($str))
5514 5514
 		return false;
5515 5515
 
5516 5516
 	return $data;
@@ -5564,7 +5564,7 @@  discard block
 block discarded – undo
5564 5564
 	// Set different modes.
5565 5565
 	$chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
5566 5566
 
5567
-	foreach($chmodValues as $val)
5567
+	foreach ($chmodValues as $val)
5568 5568
 	{
5569 5569
 		// If it's writable, break out of the loop.
5570 5570
 		if (is_writable($file))
@@ -5599,13 +5599,13 @@  discard block
 block discarded – undo
5599 5599
 	$returnArray = @json_decode($json, $returnAsArray);
5600 5600
 
5601 5601
 	// PHP 5.3 so no json_last_error_msg()
5602
-	switch(json_last_error())
5602
+	switch (json_last_error())
5603 5603
 	{
5604 5604
 		case JSON_ERROR_NONE:
5605 5605
 			$jsonError = false;
5606 5606
 			break;
5607 5607
 		case JSON_ERROR_DEPTH:
5608
-			$jsonError =  'JSON_ERROR_DEPTH';
5608
+			$jsonError = 'JSON_ERROR_DEPTH';
5609 5609
 			break;
5610 5610
 		case JSON_ERROR_STATE_MISMATCH:
5611 5611
 			$jsonError = 'JSON_ERROR_STATE_MISMATCH';
@@ -5633,10 +5633,10 @@  discard block
 block discarded – undo
5633 5633
 		loadLanguage('Errors');
5634 5634
 
5635 5635
 		if (!empty($jsonDebug))
5636
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5636
+			log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5637 5637
 
5638 5638
 		else
5639
-			log_error($txt['json_'. $jsonError], 'critical');
5639
+			log_error($txt['json_' . $jsonError], 'critical');
5640 5640
 
5641 5641
 		// Everyone expects an array.
5642 5642
 		return array();
@@ -5748,7 +5748,7 @@  discard block
 block discarded – undo
5748 5748
 		});
5749 5749
 
5750 5750
 		// Convert Punycode to Unicode
5751
-		$tlds = array_map(function ($input) {
5751
+		$tlds = array_map(function($input) {
5752 5752
 			$prefix = 'xn--';
5753 5753
 			$safe_char = 0xFFFC;
5754 5754
 			$base = 36;
@@ -5764,7 +5764,7 @@  discard block
 block discarded – undo
5764 5764
 
5765 5765
 			foreach ($enco_parts as $encoded)
5766 5766
 			{
5767
-				if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0)
5767
+				if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0)
5768 5768
 				{
5769 5769
 					$output_parts[] = $encoded;
5770 5770
 					continue;
@@ -5775,7 +5775,7 @@  discard block
 block discarded – undo
5775 5775
 				$idx = 0;
5776 5776
 				$char = 0x80;
5777 5777
 				$decoded = array();
5778
-				$output='';
5778
+				$output = '';
5779 5779
 				$delim_pos = strrpos($encoded, '-');
5780 5780
 
5781 5781
 				if ($delim_pos > strlen($prefix))
@@ -5791,7 +5791,7 @@  discard block
 block discarded – undo
5791 5791
 
5792 5792
 				for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len)
5793 5793
 				{
5794
-					for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base)
5794
+					for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base)
5795 5795
 					{
5796 5796
 						$cp = ord($encoded{$enco_idx++});
5797 5797
 						$digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
@@ -5832,15 +5832,15 @@  discard block
 block discarded – undo
5832 5832
 
5833 5833
 					// 2 bytes
5834 5834
 					elseif ($v < (1 << 11))
5835
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
5835
+						$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
5836 5836
 
5837 5837
 					// 3 bytes
5838 5838
 					elseif ($v < (1 << 16))
5839
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5839
+						$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5840 5840
 
5841 5841
 					// 4 bytes
5842 5842
 					elseif ($v < (1 << 21))
5843
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5843
+						$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5844 5844
 
5845 5845
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5846 5846
 					else
@@ -5945,7 +5945,7 @@  discard block
 block discarded – undo
5945 5945
 	}
5946 5946
 
5947 5947
 	// This recursive function creates the index array from the strings
5948
-	$add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5948
+	$add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5949 5949
 	{
5950 5950
 		static $depth = 0;
5951 5951
 		$depth++;
@@ -5972,7 +5972,7 @@  discard block
 block discarded – undo
5972 5972
 	};
5973 5973
 
5974 5974
 	// This recursive function turns the index array into a regular expression
5975
-	$index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex)
5975
+	$index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex)
5976 5976
 	{
5977 5977
 		static $depth = 0;
5978 5978
 		$depth++;
@@ -5996,11 +5996,11 @@  discard block
 block discarded – undo
5996 5996
 
5997 5997
 				if (count(array_keys($value)) == 1)
5998 5998
 				{
5999
-					$new_key_array = explode('(?'.'>', $sub_regex);
5999
+					$new_key_array = explode('(?' . '>', $sub_regex);
6000 6000
 					$new_key .= $new_key_array[0];
6001 6001
 				}
6002 6002
 				else
6003
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
6003
+					$sub_regex = '(?' . '>' . $sub_regex . ')';
6004 6004
 			}
6005 6005
 
6006 6006
 			if ($depth > 1)
@@ -6043,10 +6043,10 @@  discard block
 block discarded – undo
6043 6043
 	{
6044 6044
 		$regex = array();
6045 6045
 		while (!empty($index))
6046
-			$regex[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
6046
+			$regex[] = '(?' . '>' . $index_to_regex($index, $delim) . ')';
6047 6047
 	}
6048 6048
 	else
6049
-		$regex = '(?'.'>' . $index_to_regex($index, $delim) . ')';
6049
+		$regex = '(?' . '>' . $index_to_regex($index, $delim) . ')';
6050 6050
 
6051 6051
 	// Restore PHP's internal character encoding to whatever it was originally
6052 6052
 	if (!empty($current_encoding))
Please login to merge, or discard this patch.
Sources/Subs-Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -704,7 +704,7 @@
 block discarded – undo
704 704
 					$mail_result = false;
705 705
 				}
706 706
 			}
707
-			catch(ErrorException $e)
707
+			catch (ErrorException $e)
708 708
 			{
709 709
 				log_error($e->getMessage(), 'general', $e->getFile(), $e->getLine());
710 710
 				log_error(sprintf($txt['mail_send_unable'], $to));
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Spacing   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -1745,7 +1745,7 @@  discard block
 block discarded – undo
1745 1745
 
1746 1746
 	// Our custom error handler - does nothing but does stop public errors from XML!
1747 1747
 	set_error_handler(
1748
-		function ($errno, $errstr, $errfile, $errline) use ($support_js)
1748
+		function($errno, $errstr, $errfile, $errline) use ($support_js)
1749 1749
 		{
1750 1750
 			if ($support_js)
1751 1751
 				return true;
@@ -2735,94 +2735,94 @@  discard block
 block discarded – undo
2735 2735
 		// Translation table for the character sets not native for MySQL.
2736 2736
 		$translation_tables = array(
2737 2737
 			'windows-1255' => array(
2738
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
2739
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
2740
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
2741
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
2742
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
2743
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
2744
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '0xD792',
2745
-				'0xFC' => '0xE282AC',		'0xFF' => '0xD6B2',		'0xC2' => '0xFF',
2746
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
2747
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
2748
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2749
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2750
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2751
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
2752
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
2753
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2754
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
2755
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
2756
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
2757
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
2758
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
2759
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
2760
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
2761
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
2762
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
2763
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2764
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
2765
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2766
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
2767
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
2768
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
2769
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
2770
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
2771
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
2772
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
2773
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
2774
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
2775
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
2776
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
2777
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
2778
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
2779
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
2738
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
2739
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
2740
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
2741
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
2742
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
2743
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
2744
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792',
2745
+				'0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF',
2746
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
2747
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
2748
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2749
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2750
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2751
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
2752
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
2753
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2754
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
2755
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
2756
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
2757
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
2758
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
2759
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
2760
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
2761
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
2762
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
2763
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2764
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
2765
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2766
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
2767
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
2768
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
2769
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
2770
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
2771
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
2772
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
2773
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
2774
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
2775
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
2776
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
2777
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
2778
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
2779
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
2780 2780
 				'0xFA' => '0xD7AA',
2781 2781
 			),
2782 2782
 			'windows-1253' => array(
2783
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
2784
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
2785
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
2786
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
2787
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
2788
-				'0xD2' => '0xE282AC',			'0xFF' => '0xCE92',			'0xCE' => '0xCE9E',
2789
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
2790
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
2791
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
2792
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
2793
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
2794
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
2795
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
2796
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
2797
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2798
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2799
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2800
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
2801
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2802
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
2803
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2804
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
2805
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
2806
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
2807
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2808
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
2809
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
2810
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
2811
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
2812
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
2813
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
2814
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
2815
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
2816
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
2817
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
2818
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
2819
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
2820
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
2821
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
2822
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
2823
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
2824
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
2825
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',
2783
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
2784
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
2785
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
2786
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
2787
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
2788
+				'0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E',
2789
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
2790
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
2791
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
2792
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
2793
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
2794
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
2795
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
2796
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
2797
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2798
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2799
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2800
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
2801
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2802
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
2803
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2804
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
2805
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
2806
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
2807
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2808
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
2809
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
2810
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
2811
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
2812
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
2813
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
2814
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
2815
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
2816
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
2817
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
2818
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
2819
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
2820
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
2821
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
2822
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
2823
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
2824
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
2825
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E',
2826 2826
 			),
2827 2827
 		);
2828 2828
 
@@ -3683,8 +3683,8 @@  discard block
 block discarded – undo
3683 3683
 {
3684 3684
 	global $upcontext, $disable_security, $settings, $txt;
3685 3685
 
3686
-	$smf_url='https://www.simplemachines.org';
3687
-	$formatted_url='<a href=" '. $smf_url .' ">Simple Machines Website</a>';
3686
+	$smf_url = 'https://www.simplemachines.org';
3687
+	$formatted_url = '<a href=" ' . $smf_url . ' ">Simple Machines Website</a>';
3688 3688
 
3689 3689
 	echo '
3690 3690
 		<script src="https://www.simplemachines.org/smf/current-version.js?version=' . SMF_VERSION . '"></script>
@@ -3762,7 +3762,7 @@  discard block
 block discarded – undo
3762 3762
 
3763 3763
 		if ($active < 600)
3764 3764
 			echo '
3765
-				', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'],' ', $txt['upgrade_run_script2'], '';
3765
+				', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'], ' ', $txt['upgrade_run_script2'], '';
3766 3766
 
3767 3767
 		if ($active > $upcontext['inactive_timeout'])
3768 3768
 			echo '
@@ -3866,8 +3866,8 @@  discard block
 block discarded – undo
3866 3866
 {
3867 3867
 	global $upcontext, $modSettings, $db_prefix, $mmessage, $mtitle, $txt;
3868 3868
 
3869
-	$smf_url='https://www.simplemachines.org/about/stats.php';
3870
-	$formatted_url='<a href=" '. $smf_url .' " target="_blank" rel="noopener">info page</a>';
3869
+	$smf_url = 'https://www.simplemachines.org/about/stats.php';
3870
+	$formatted_url = '<a href=" ' . $smf_url . ' " target="_blank" rel="noopener">info page</a>';
3871 3871
 	echo '
3872 3872
 			<h3>', $txt['upgrade_areyouready'], '</h3>
3873 3873
 			<form action="', $upcontext['form_url'], '" method="post" name="upform" id="upform">';
@@ -3966,7 +3966,7 @@  discard block
 block discarded – undo
3966 3966
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
3967 3967
 			<input type="hidden" name="backup_done" id="backup_done" value="0">
3968 3968
 			<strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong>
3969
-			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;">
3969
+			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;">
3970 3970
 			<span id="debuginfo"></span>
3971 3971
 			</div>';
3972 3972
 
@@ -4467,7 +4467,7 @@  discard block
 block discarded – undo
4467 4467
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
4468 4468
 			<input type="hidden" name="utf8_done" id="utf8_done" value="0">
4469 4469
 			<strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong>
4470
-			<div id="debug_section" style="height: ', ($is_debug ? '97' : '12') , 'px; overflow: auto;">
4470
+			<div id="debug_section" style="height: ', ($is_debug ? '97' : '12'), 'px; overflow: auto;">
4471 4471
 			<span id="debuginfo"></span>
4472 4472
 			</div>';
4473 4473
 
@@ -4568,7 +4568,7 @@  discard block
 block discarded – undo
4568 4568
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
4569 4569
 			<input type="hidden" name="json_done" id="json_done" value="0">
4570 4570
 			<strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong>
4571
-			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;">
4571
+			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;">
4572 4572
 			<span id="debuginfo"></span>
4573 4573
 			</div>';
4574 4574
 
@@ -4656,7 +4656,7 @@  discard block
 block discarded – undo
4656 4656
 	global $upcontext, $upgradeurl, $settings, $boardurl, $is_debug, $txt;
4657 4657
 
4658 4658
 	$smf_url = 'https://www.simplemachines.org';
4659
-	$formatted_url = '<a href=" '. $smf_url .' ">look to us for assistance</a>.';
4659
+	$formatted_url = '<a href=" ' . $smf_url . ' ">look to us for assistance</a>.';
4660 4660
 
4661 4661
 	echo '
4662 4662
 	<h3>', $txt['upgrade_done'], ' <a href="', $boardurl, '/index.php">', $txt['upgrade_done2'], '</a>.  ', $txt['upgrade_done3'], '</h3>
Please login to merge, or discard this patch.