Completed
Push — release-2.1 ( 6f6d35...dd7040 )
by Michael
11:13
created
Themes/default/MessageIndex.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 				foreach ($board['children'] as $child)
87 87
 				{
88 88
 					if (!$child['is_redirect'])
89
-						$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
89
+						$child['link'] = '' . ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
90 90
 					else
91 91
 						$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
92 92
 
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +119 added lines, -119 removed lines patch added patch discarded remove patch
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 			$unsupportedFormats = (array) cache_get_data('unsupportedtimeformats', 86400);
801 801
 		if (empty($unsupportedFormats))
802 802
 		{
803
-			foreach($strftimeFormatSubstitutions as $format => $substitution)
803
+			foreach ($strftimeFormatSubstitutions as $format => $substitution)
804 804
 			{
805 805
 				$value = @strftime('%' . $format);
806 806
 
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 					'height' => array('optional' => true, 'match' => '(\d+)'),
1166 1166
 				),
1167 1167
 				'content' => '$1',
1168
-				'validate' => function (&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1168
+				'validate' => function(&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1169 1169
 				{
1170 1170
 					$returnContext = '';
1171 1171
 
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
 						}
1201 1201
 
1202 1202
 						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}']))
1203
-							$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>';
1203
+							$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>';
1204 1204
 						else
1205 1205
 							$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>';
1206 1206
 					}
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
 				'type' => 'unparsed_content',
1230 1230
 				'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>',
1231 1231
 				// @todo Maybe this can be simplified?
1232
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1232
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1233 1233
 				{
1234 1234
 					if (!isset($disabled['code']))
1235 1235
 					{
@@ -1266,7 +1266,7 @@  discard block
 block discarded – undo
1266 1266
 				'type' => 'unparsed_equals_content',
1267 1267
 				'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>',
1268 1268
 				// @todo Maybe this can be simplified?
1269
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1269
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1270 1270
 				{
1271 1271
 					if (!isset($disabled['code']))
1272 1272
 					{
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
 				'type' => 'unparsed_content',
1311 1311
 				'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
1312 1312
 				// @todo Should this respect guest_hideContacts?
1313
-				'validate' => function (&$tag, &$data, $disabled)
1313
+				'validate' => function(&$tag, &$data, $disabled)
1314 1314
 				{
1315 1315
 					$data = strtr($data, array('<br>' => ''));
1316 1316
 				},
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
 				'type' => 'unparsed_commas_content',
1330 1330
 				'test' => '\d+,\d+\]',
1331 1331
 				'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
1332
-				'validate' => function (&$tag, &$data, $disabled)
1332
+				'validate' => function(&$tag, &$data, $disabled)
1333 1333
 				{
1334 1334
 					if (isset($disabled['url']))
1335 1335
 						$tag['content'] = '$1';
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 				'test' => '(left|right)(\s+max=\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)?\]',
1346 1346
 				'before' => '<div $1>',
1347 1347
 				'after' => '</div>',
1348
-				'validate' => function (&$tag, &$data, $disabled)
1348
+				'validate' => function(&$tag, &$data, $disabled)
1349 1349
 				{
1350 1350
 					$class = 'class="bbc_float float' . (strpos($data, 'left') === 0 ? 'left' : 'right') . '"';
1351 1351
 
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
 					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1395 1395
 				),
1396 1396
 				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1397
-				'validate' => function (&$tag, &$data, $disabled)
1397
+				'validate' => function(&$tag, &$data, $disabled)
1398 1398
 				{
1399 1399
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1400 1400
 
@@ -1417,7 +1417,7 @@  discard block
 block discarded – undo
1417 1417
 				'tag' => 'img',
1418 1418
 				'type' => 'unparsed_content',
1419 1419
 				'content' => '<img src="$1" alt="" class="bbc_img">',
1420
-				'validate' => function (&$tag, &$data, $disabled)
1420
+				'validate' => function(&$tag, &$data, $disabled)
1421 1421
 				{
1422 1422
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1423 1423
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 				'tag' => 'iurl',
1441 1441
 				'type' => 'unparsed_content',
1442 1442
 				'content' => '<a href="$1" class="bbc_link">$1</a>',
1443
-				'validate' => function (&$tag, &$data, $disabled)
1443
+				'validate' => function(&$tag, &$data, $disabled)
1444 1444
 				{
1445 1445
 					$data = strtr($data, array('<br>' => ''));
1446 1446
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
 				'quoted' => 'optional',
1455 1455
 				'before' => '<a href="$1" class="bbc_link">',
1456 1456
 				'after' => '</a>',
1457
-				'validate' => function (&$tag, &$data, $disabled)
1457
+				'validate' => function(&$tag, &$data, $disabled)
1458 1458
 				{
1459 1459
 					if (substr($data, 0, 1) == '#')
1460 1460
 						$data = '#post_' . substr($data, 1);
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
 				'tag' => 'php',
1535 1535
 				'type' => 'unparsed_content',
1536 1536
 				'content' => '<span class="phpcode">$1</span>',
1537
-				'validate' => isset($disabled['php']) ? null : function (&$tag, &$data, $disabled)
1537
+				'validate' => isset($disabled['php']) ? null : function(&$tag, &$data, $disabled)
1538 1538
 				{
1539 1539
 					if (!isset($disabled['php']))
1540 1540
 					{
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
 				'test' => '[1-7]\]',
1633 1633
 				'before' => '<span style="font-size: $1;" class="bbc_size">',
1634 1634
 				'after' => '</span>',
1635
-				'validate' => function (&$tag, &$data, $disabled)
1635
+				'validate' => function(&$tag, &$data, $disabled)
1636 1636
 				{
1637 1637
 					$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
1638 1638
 					$data = $sizes[$data] . 'em';
@@ -1670,7 +1670,7 @@  discard block
 block discarded – undo
1670 1670
 				'tag' => 'time',
1671 1671
 				'type' => 'unparsed_content',
1672 1672
 				'content' => '$1',
1673
-				'validate' => function (&$tag, &$data, $disabled)
1673
+				'validate' => function(&$tag, &$data, $disabled)
1674 1674
 				{
1675 1675
 					if (is_numeric($data))
1676 1676
 						$data = timeformat($data);
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
 				'tag' => 'url',
1699 1699
 				'type' => 'unparsed_content',
1700 1700
 				'content' => '<a href="$1" class="bbc_link" target="_blank">$1</a>',
1701
-				'validate' => function (&$tag, &$data, $disabled)
1701
+				'validate' => function(&$tag, &$data, $disabled)
1702 1702
 				{
1703 1703
 					$data = strtr($data, array('<br>' => ''));
1704 1704
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1712,7 +1712,7 @@  discard block
 block discarded – undo
1712 1712
 				'quoted' => 'optional',
1713 1713
 				'before' => '<a href="$1" class="bbc_link" target="_blank">',
1714 1714
 				'after' => '</a>',
1715
-				'validate' => function (&$tag, &$data, $disabled)
1715
+				'validate' => function(&$tag, &$data, $disabled)
1716 1716
 				{
1717 1717
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1718 1718
 					if (empty($scheme))
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
 		{
1739 1739
 			if (isset($temp_bbc))
1740 1740
 				$bbc_codes = $temp_bbc;
1741
-			usort($codes, function ($a, $b) {
1741
+			usort($codes, function($a, $b) {
1742 1742
 				return strcmp($a['tag'], $b['tag']);
1743 1743
 			});
1744 1744
 			return $codes;
@@ -1976,7 +1976,7 @@  discard block
 block discarded – undo
1976 1976
 										# a run of Unicode domain name characters and a dot
1977 1977
 										[\p{L}\p{M}\p{N}\-.:@]+\.
1978 1978
 										# and then a TLD valid in the DNS or the reserved "local" TLD
1979
-										(?:'. $modSettings['tld_regex'] .'|local)
1979
+										(?:'. $modSettings['tld_regex'] . '|local)
1980 1980
 									)
1981 1981
 									# followed by a non-domain character or end of line
1982 1982
 									(?=[^\p{L}\p{N}\-.]|$)
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
 						)?
2045 2045
 						';
2046 2046
 
2047
-						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) {
2047
+						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) {
2048 2048
 							$url = array_shift($matches);
2049 2049
 
2050 2050
 							$scheme = parse_url($url, PHP_URL_SCHEME);
@@ -2781,7 +2781,7 @@  discard block
 block discarded – undo
2781 2781
 		for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2782 2782
 		{
2783 2783
 			$specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES);
2784
-			$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">';
2784
+			$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">';
2785 2785
 
2786 2786
 			$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2787 2787
 
@@ -2798,7 +2798,7 @@  discard block
 block discarded – undo
2798 2798
 
2799 2799
 	// Replace away!
2800 2800
 	$message = preg_replace_callback($smileyPregSearch,
2801
-		function ($matches) use ($smileyPregReplacements)
2801
+		function($matches) use ($smileyPregReplacements)
2802 2802
 		{
2803 2803
 			return $smileyPregReplacements[$matches[1]];
2804 2804
 		}, $message);
@@ -2864,13 +2864,13 @@  discard block
 block discarded – undo
2864 2864
 	{
2865 2865
 		if (defined('SID') && SID != '')
2866 2866
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2867
-				function ($m) use ($scripturl)
2867
+				function($m) use ($scripturl)
2868 2868
 				{
2869
-					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2869
+					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : "");
2870 2870
 				}, $setLocation);
2871 2871
 		else
2872 2872
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2873
-				function ($m) use ($scripturl)
2873
+				function($m) use ($scripturl)
2874 2874
 				{
2875 2875
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2876 2876
 				}, $setLocation);
@@ -3193,7 +3193,7 @@  discard block
 block discarded – undo
3193 3193
 
3194 3194
 	// Add a generic "Are you sure?" confirmation message.
3195 3195
 	addInlineJavaScript('
3196
-	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3196
+	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';');
3197 3197
 
3198 3198
 	// Now add the capping code for avatars.
3199 3199
 	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')
@@ -3554,7 +3554,7 @@  discard block
 block discarded – undo
3554 3554
 
3555 3555
 		else
3556 3556
 			echo '
3557
-	<script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>';
3557
+	<script src="', $settings['theme_url'], '/scripts/minified', ($do_deferred ? '_deferred' : ''), '.js', $minSeed, '"></script>';
3558 3558
 	}
3559 3559
 
3560 3560
 	// Inline JavaScript - Actually useful some times!
@@ -3632,14 +3632,14 @@  discard block
 block discarded – undo
3632 3632
 
3633 3633
 		else
3634 3634
 			echo '
3635
-	<link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">';
3635
+	<link rel="stylesheet" href="', $settings['theme_url'], '/css/minified.css', $minSeed, '">';
3636 3636
 	}
3637 3637
 
3638 3638
 	// Print the rest after the minified files.
3639 3639
 	if (!empty($normal))
3640 3640
 		foreach ($normal as $nf)
3641 3641
 			echo '
3642
-	<link rel="stylesheet" href="', $nf ,'">';
3642
+	<link rel="stylesheet" href="', $nf, '">';
3643 3643
 
3644 3644
 	if ($db_show_debug === true)
3645 3645
 	{
@@ -3655,7 +3655,7 @@  discard block
 block discarded – undo
3655 3655
 	<style>';
3656 3656
 
3657 3657
 		foreach ($context['css_header'] as $css)
3658
-			echo $css .'
3658
+			echo $css . '
3659 3659
 	';
3660 3660
 
3661 3661
 		echo'
@@ -3684,27 +3684,27 @@  discard block
 block discarded – undo
3684 3684
 		return false;
3685 3685
 
3686 3686
 	// Did we already did this?
3687
-	$toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400);
3687
+	$toCache = cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type, 86400);
3688 3688
 
3689 3689
 	// Already done?
3690 3690
 	if (!empty($toCache))
3691 3691
 		return true;
3692 3692
 
3693 3693
 	// No namespaces, sorry!
3694
-	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
3694
+	$classType = 'MatthiasMullie\\Minify\\' . strtoupper($type);
3695 3695
 
3696 3696
 	// Temp path.
3697
-	$cTempPath = $settings['theme_dir'] .'/'. ($type == 'css' ? 'css' : 'scripts') .'/';
3697
+	$cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/';
3698 3698
 
3699 3699
 	// What kind of file are we going to create?
3700
-	$toCreate = $cTempPath .'minified'. ($do_deferred ? '_deferred' : '') .'.'. $type;
3700
+	$toCreate = $cTempPath . 'minified' . ($do_deferred ? '_deferred' : '') . '.' . $type;
3701 3701
 
3702 3702
 	// File has to exists, if it isn't try to create it.
3703 3703
 	if ((!file_exists($toCreate) && @fopen($toCreate, 'w') === false) || !smf_chmod($toCreate))
3704 3704
 	{
3705 3705
 		loadLanguage('Errors');
3706 3706
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3707
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3707
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3708 3708
 
3709 3709
 		// The process failed so roll back to print each individual file.
3710 3710
 		return $data;
@@ -3739,14 +3739,14 @@  discard block
 block discarded – undo
3739 3739
 	{
3740 3740
 		loadLanguage('Errors');
3741 3741
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3742
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3742
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3743 3743
 
3744 3744
 		// The process failed so roll back to print each individual file.
3745 3745
 		return $data;
3746 3746
 	}
3747 3747
 
3748 3748
 	// And create a long lived cache entry.
3749
-	cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, $toCreate, 86400);
3749
+	cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, $toCreate, 86400);
3750 3750
 
3751 3751
 	return true;
3752 3752
 }
@@ -3806,7 +3806,7 @@  discard block
 block discarded – undo
3806 3806
 	else
3807 3807
 		$path = $modSettings['attachmentUploadDir'];
3808 3808
 
3809
-	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3809
+	return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
3810 3810
 }
3811 3811
 
3812 3812
 /**
@@ -3850,10 +3850,10 @@  discard block
 block discarded – undo
3850 3850
 		$valid_low = isValidIP($ip_parts[0]);
3851 3851
 		$valid_high = isValidIP($ip_parts[1]);
3852 3852
 		$count = 0;
3853
-		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3853
+		$mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.');
3854 3854
 		$max = ($mode == ':' ? 'ffff' : '255');
3855 3855
 		$min = 0;
3856
-		if(!$valid_low)
3856
+		if (!$valid_low)
3857 3857
 		{
3858 3858
 			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3859 3859
 			$valid_low = isValidIP($ip_parts[0]);
@@ -3867,7 +3867,7 @@  discard block
 block discarded – undo
3867 3867
 		}
3868 3868
 
3869 3869
 		$count = 0;
3870
-		if(!$valid_high)
3870
+		if (!$valid_high)
3871 3871
 		{
3872 3872
 			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3873 3873
 			$valid_high = isValidIP($ip_parts[1]);
@@ -3880,7 +3880,7 @@  discard block
 block discarded – undo
3880 3880
 			}
3881 3881
 		}
3882 3882
 
3883
-		if($valid_high && $valid_low)
3883
+		if ($valid_high && $valid_low)
3884 3884
 		{
3885 3885
 			$ip_array['low'] = $ip_parts[0];
3886 3886
 			$ip_array['high'] = $ip_parts[1];
@@ -4062,7 +4062,7 @@  discard block
 block discarded – undo
4062 4062
 		addInlineJavaScript('
4063 4063
 	var user_menus = new smc_PopupMenu();
4064 4064
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
4065
-	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
4065
+	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true);
4066 4066
 		if ($context['allow_pm'])
4067 4067
 			addInlineJavaScript('
4068 4068
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
@@ -4682,7 +4682,7 @@  discard block
 block discarded – undo
4682 4682
 		// No? try a fallback to $sourcedir
4683 4683
 		else
4684 4684
 		{
4685
-			$absPath = $sourcedir .'/'. $file;
4685
+			$absPath = $sourcedir . '/' . $file;
4686 4686
 
4687 4687
 			if (file_exists($absPath))
4688 4688
 				require_once($absPath);
@@ -4763,15 +4763,15 @@  discard block
 block discarded – undo
4763 4763
 
4764 4764
 	// UTF-8 occurences of MS special characters
4765 4765
 	$findchars_utf8 = array(
4766
-		"\xe2\x80\x9a",	// single low-9 quotation mark
4767
-		"\xe2\x80\x9e",	// double low-9 quotation mark
4768
-		"\xe2\x80\xa6",	// horizontal ellipsis
4769
-		"\xe2\x80\x98",	// left single curly quote
4770
-		"\xe2\x80\x99",	// right single curly quote
4771
-		"\xe2\x80\x9c",	// left double curly quote
4772
-		"\xe2\x80\x9d",	// right double curly quote
4773
-		"\xe2\x80\x93",	// en dash
4774
-		"\xe2\x80\x94",	// em dash
4766
+		"\xe2\x80\x9a", // single low-9 quotation mark
4767
+		"\xe2\x80\x9e", // double low-9 quotation mark
4768
+		"\xe2\x80\xa6", // horizontal ellipsis
4769
+		"\xe2\x80\x98", // left single curly quote
4770
+		"\xe2\x80\x99", // right single curly quote
4771
+		"\xe2\x80\x9c", // left double curly quote
4772
+		"\xe2\x80\x9d", // right double curly quote
4773
+		"\xe2\x80\x93", // en dash
4774
+		"\xe2\x80\x94", // em dash
4775 4775
 	);
4776 4776
 
4777 4777
 	// windows 1252 / iso equivalents
@@ -4789,15 +4789,15 @@  discard block
 block discarded – undo
4789 4789
 
4790 4790
 	// safe replacements
4791 4791
 	$replacechars = array(
4792
-		',',	// &sbquo;
4793
-		',,',	// &bdquo;
4794
-		'...',	// &hellip;
4795
-		"'",	// &lsquo;
4796
-		"'",	// &rsquo;
4797
-		'"',	// &ldquo;
4798
-		'"',	// &rdquo;
4799
-		'-',	// &ndash;
4800
-		'--',	// &mdash;
4792
+		',', // &sbquo;
4793
+		',,', // &bdquo;
4794
+		'...', // &hellip;
4795
+		"'", // &lsquo;
4796
+		"'", // &rsquo;
4797
+		'"', // &ldquo;
4798
+		'"', // &rdquo;
4799
+		'-', // &ndash;
4800
+		'--', // &mdash;
4801 4801
 	);
4802 4802
 
4803 4803
 	if ($context['utf8'])
@@ -5216,7 +5216,7 @@  discard block
 block discarded – undo
5216 5216
  */
5217 5217
 function inet_dtop($bin)
5218 5218
 {
5219
-	if(empty($bin))
5219
+	if (empty($bin))
5220 5220
 		return '';
5221 5221
 
5222 5222
 	global $db_type;
@@ -5247,28 +5247,28 @@  discard block
 block discarded – undo
5247 5247
  */
5248 5248
 function _safe_serialize($value)
5249 5249
 {
5250
-	if(is_null($value))
5250
+	if (is_null($value))
5251 5251
 		return 'N;';
5252 5252
 
5253
-	if(is_bool($value))
5254
-		return 'b:'. (int) $value .';';
5253
+	if (is_bool($value))
5254
+		return 'b:' . (int) $value . ';';
5255 5255
 
5256
-	if(is_int($value))
5257
-		return 'i:'. $value .';';
5256
+	if (is_int($value))
5257
+		return 'i:' . $value . ';';
5258 5258
 
5259
-	if(is_float($value))
5260
-		return 'd:'. str_replace(',', '.', $value) .';';
5259
+	if (is_float($value))
5260
+		return 'd:' . str_replace(',', '.', $value) . ';';
5261 5261
 
5262
-	if(is_string($value))
5263
-		return 's:'. strlen($value) .':"'. $value .'";';
5262
+	if (is_string($value))
5263
+		return 's:' . strlen($value) . ':"' . $value . '";';
5264 5264
 
5265
-	if(is_array($value))
5265
+	if (is_array($value))
5266 5266
 	{
5267 5267
 		$out = '';
5268
-		foreach($value as $k => $v)
5268
+		foreach ($value as $k => $v)
5269 5269
 			$out .= _safe_serialize($k) . _safe_serialize($v);
5270 5270
 
5271
-		return 'a:'. count($value) .':{'. $out .'}';
5271
+		return 'a:' . count($value) . ':{' . $out . '}';
5272 5272
 	}
5273 5273
 
5274 5274
 	// safe_serialize cannot serialize resources or objects.
@@ -5310,7 +5310,7 @@  discard block
 block discarded – undo
5310 5310
 function _safe_unserialize($str)
5311 5311
 {
5312 5312
 	// Input  is not a string.
5313
-	if(empty($str) || !is_string($str))
5313
+	if (empty($str) || !is_string($str))
5314 5314
 		return false;
5315 5315
 
5316 5316
 	$stack = array();
@@ -5324,40 +5324,40 @@  discard block
 block discarded – undo
5324 5324
 	 *   3 - in array, expecting value or another array
5325 5325
 	 */
5326 5326
 	$state = 0;
5327
-	while($state != 1)
5327
+	while ($state != 1)
5328 5328
 	{
5329 5329
 		$type = isset($str[0]) ? $str[0] : '';
5330
-		if($type == '}')
5330
+		if ($type == '}')
5331 5331
 			$str = substr($str, 1);
5332 5332
 
5333
-		else if($type == 'N' && $str[1] == ';')
5333
+		else if ($type == 'N' && $str[1] == ';')
5334 5334
 		{
5335 5335
 			$value = null;
5336 5336
 			$str = substr($str, 2);
5337 5337
 		}
5338
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5338
+		else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5339 5339
 		{
5340 5340
 			$value = $matches[1] == '1' ? true : false;
5341 5341
 			$str = substr($str, 4);
5342 5342
 		}
5343
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5343
+		else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5344 5344
 		{
5345
-			$value = (int)$matches[1];
5345
+			$value = (int) $matches[1];
5346 5346
 			$str = $matches[2];
5347 5347
 		}
5348
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5348
+		else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5349 5349
 		{
5350
-			$value = (float)$matches[1];
5350
+			$value = (float) $matches[1];
5351 5351
 			$str = $matches[3];
5352 5352
 		}
5353
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5353
+		else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";')
5354 5354
 		{
5355
-			$value = substr($matches[2], 0, (int)$matches[1]);
5356
-			$str = substr($matches[2], (int)$matches[1] + 2);
5355
+			$value = substr($matches[2], 0, (int) $matches[1]);
5356
+			$str = substr($matches[2], (int) $matches[1] + 2);
5357 5357
 		}
5358
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5358
+		else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5359 5359
 		{
5360
-			$expectedLength = (int)$matches[1];
5360
+			$expectedLength = (int) $matches[1];
5361 5361
 			$str = $matches[2];
5362 5362
 		}
5363 5363
 
@@ -5365,10 +5365,10 @@  discard block
 block discarded – undo
5365 5365
 		else
5366 5366
 			return false;
5367 5367
 
5368
-		switch($state)
5368
+		switch ($state)
5369 5369
 		{
5370 5370
 			case 3: // In array, expecting value or another array.
5371
-				if($type == 'a')
5371
+				if ($type == 'a')
5372 5372
 				{
5373 5373
 					$stack[] = &$list;
5374 5374
 					$list[$key] = array();
@@ -5377,7 +5377,7 @@  discard block
 block discarded – undo
5377 5377
 					$state = 2;
5378 5378
 					break;
5379 5379
 				}
5380
-				if($type != '}')
5380
+				if ($type != '}')
5381 5381
 				{
5382 5382
 					$list[$key] = $value;
5383 5383
 					$state = 2;
@@ -5388,29 +5388,29 @@  discard block
 block discarded – undo
5388 5388
 				return false;
5389 5389
 
5390 5390
 			case 2: // in array, expecting end of array or a key
5391
-				if($type == '}')
5391
+				if ($type == '}')
5392 5392
 				{
5393 5393
 					// Array size is less than expected.
5394
-					if(count($list) < end($expected))
5394
+					if (count($list) < end($expected))
5395 5395
 						return false;
5396 5396
 
5397 5397
 					unset($list);
5398
-					$list = &$stack[count($stack)-1];
5398
+					$list = &$stack[count($stack) - 1];
5399 5399
 					array_pop($stack);
5400 5400
 
5401 5401
 					// Go to terminal state if we're at the end of the root array.
5402 5402
 					array_pop($expected);
5403 5403
 
5404
-					if(count($expected) == 0)
5404
+					if (count($expected) == 0)
5405 5405
 						$state = 1;
5406 5406
 
5407 5407
 					break;
5408 5408
 				}
5409 5409
 
5410
-				if($type == 'i' || $type == 's')
5410
+				if ($type == 'i' || $type == 's')
5411 5411
 				{
5412 5412
 					// Array size exceeds expected length.
5413
-					if(count($list) >= end($expected))
5413
+					if (count($list) >= end($expected))
5414 5414
 						return false;
5415 5415
 
5416 5416
 					$key = $value;
@@ -5423,7 +5423,7 @@  discard block
 block discarded – undo
5423 5423
 
5424 5424
 			// Expecting array or value.
5425 5425
 			case 0:
5426
-				if($type == 'a')
5426
+				if ($type == 'a')
5427 5427
 				{
5428 5428
 					$data = array();
5429 5429
 					$list = &$data;
@@ -5432,7 +5432,7 @@  discard block
 block discarded – undo
5432 5432
 					break;
5433 5433
 				}
5434 5434
 
5435
-				if($type != '}')
5435
+				if ($type != '}')
5436 5436
 				{
5437 5437
 					$data = $value;
5438 5438
 					$state = 1;
@@ -5445,7 +5445,7 @@  discard block
 block discarded – undo
5445 5445
 	}
5446 5446
 
5447 5447
 	// Trailing data in input.
5448
-	if(!empty($str))
5448
+	if (!empty($str))
5449 5449
 		return false;
5450 5450
 
5451 5451
 	return $data;
@@ -5499,7 +5499,7 @@  discard block
 block discarded – undo
5499 5499
 	// Set different modes.
5500 5500
 	$chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
5501 5501
 
5502
-	foreach($chmodValues as $val)
5502
+	foreach ($chmodValues as $val)
5503 5503
 	{
5504 5504
 		// If it's writable, break out of the loop.
5505 5505
 		if (is_writable($file))
@@ -5534,13 +5534,13 @@  discard block
 block discarded – undo
5534 5534
 	$returnArray = @json_decode($json, $returnAsArray);
5535 5535
 
5536 5536
 	// PHP 5.3 so no json_last_error_msg()
5537
-	switch(json_last_error())
5537
+	switch (json_last_error())
5538 5538
 	{
5539 5539
 		case JSON_ERROR_NONE:
5540 5540
 			$jsonError = false;
5541 5541
 			break;
5542 5542
 		case JSON_ERROR_DEPTH:
5543
-			$jsonError =  'JSON_ERROR_DEPTH';
5543
+			$jsonError = 'JSON_ERROR_DEPTH';
5544 5544
 			break;
5545 5545
 		case JSON_ERROR_STATE_MISMATCH:
5546 5546
 			$jsonError = 'JSON_ERROR_STATE_MISMATCH';
@@ -5568,10 +5568,10 @@  discard block
 block discarded – undo
5568 5568
 		loadLanguage('Errors');
5569 5569
 
5570 5570
 		if (!empty($jsonDebug))
5571
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5571
+			log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5572 5572
 
5573 5573
 		else
5574
-			log_error($txt['json_'. $jsonError], 'critical');
5574
+			log_error($txt['json_' . $jsonError], 'critical');
5575 5575
 
5576 5576
 		// Everyone expects an array.
5577 5577
 		return array();
@@ -5675,7 +5675,7 @@  discard block
 block discarded – undo
5675 5675
 		});
5676 5676
 
5677 5677
 		// Convert Punycode to Unicode
5678
-		$tlds = array_map(function ($input) {
5678
+		$tlds = array_map(function($input) {
5679 5679
 			$prefix = 'xn--';
5680 5680
 			$safe_char = 0xFFFC;
5681 5681
 			$base = 36;
@@ -5691,7 +5691,7 @@  discard block
 block discarded – undo
5691 5691
 
5692 5692
 			foreach ($enco_parts as $encoded)
5693 5693
 			{
5694
-				if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0)
5694
+				if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0)
5695 5695
 				{
5696 5696
 					$output_parts[] = $encoded;
5697 5697
 					continue;
@@ -5702,7 +5702,7 @@  discard block
 block discarded – undo
5702 5702
 				$idx = 0;
5703 5703
 				$char = 0x80;
5704 5704
 				$decoded = array();
5705
-				$output='';
5705
+				$output = '';
5706 5706
 				$delim_pos = strrpos($encoded, '-');
5707 5707
 
5708 5708
 				if ($delim_pos > strlen($prefix))
@@ -5718,7 +5718,7 @@  discard block
 block discarded – undo
5718 5718
 
5719 5719
 				for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len)
5720 5720
 				{
5721
-					for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base)
5721
+					for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base)
5722 5722
 					{
5723 5723
 						$cp = ord($encoded{$enco_idx++});
5724 5724
 						$digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
@@ -5759,15 +5759,15 @@  discard block
 block discarded – undo
5759 5759
 
5760 5760
 					// 2 bytes
5761 5761
 					elseif ($v < (1 << 11))
5762
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
5762
+						$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
5763 5763
 
5764 5764
 					// 3 bytes
5765 5765
 					elseif ($v < (1 << 16))
5766
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5766
+						$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5767 5767
 
5768 5768
 					// 4 bytes
5769 5769
 					elseif ($v < (1 << 21))
5770
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5770
+						$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5771 5771
 
5772 5772
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5773 5773
 					else
@@ -5873,7 +5873,7 @@  discard block
 block discarded – undo
5873 5873
 	}
5874 5874
 
5875 5875
 	// This recursive function creates the index array from the strings
5876
-	$add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5876
+	$add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5877 5877
 	{
5878 5878
 		static $depth = 0;
5879 5879
 		$depth++;
@@ -5900,7 +5900,7 @@  discard block
 block discarded – undo
5900 5900
 	};
5901 5901
 
5902 5902
 	// This recursive function turns the index array into a regular expression
5903
-	$index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex)
5903
+	$index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex)
5904 5904
 	{
5905 5905
 		static $depth = 0;
5906 5906
 		$depth++;
@@ -5924,11 +5924,11 @@  discard block
 block discarded – undo
5924 5924
 
5925 5925
 				if (count(array_keys($value)) == 1)
5926 5926
 				{
5927
-					$new_key_array = explode('(?'.'>', $sub_regex);
5927
+					$new_key_array = explode('(?' . '>', $sub_regex);
5928 5928
 					$new_key .= $new_key_array[0];
5929 5929
 				}
5930 5930
 				else
5931
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
5931
+					$sub_regex = '(?' . '>' . $sub_regex . ')';
5932 5932
 			}
5933 5933
 
5934 5934
 			if ($depth > 1)
@@ -5971,10 +5971,10 @@  discard block
 block discarded – undo
5971 5971
 	{
5972 5972
 		$regex = array();
5973 5973
 		while (!empty($index))
5974
-			$regex[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
5974
+			$regex[] = '(?' . '>' . $index_to_regex($index, $delim) . ')';
5975 5975
 	}
5976 5976
 	else
5977
-		$regex = '(?'.'>' . $index_to_regex($index, $delim) . ')';
5977
+		$regex = '(?' . '>' . $index_to_regex($index, $delim) . ')';
5978 5978
 
5979 5979
 	// Restore PHP's internal character encoding to whatever it was originally
5980 5980
 	if (!empty($current_encoding))
Please login to merge, or discard this patch.
Sources/ManageSettings.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1334,7 +1334,7 @@  discard block
 block discarded – undo
1334 1334
 					'class' => 'centercol',
1335 1335
 				),
1336 1336
 				'data' => array(
1337
-					'function' => function ($rowData)
1337
+					'function' => function($rowData)
1338 1338
 					{
1339 1339
 						$isChecked = $rowData['disabled'] ? '' : ' checked';
1340 1340
 						$onClickHandler = $rowData['can_show_register'] ? sprintf(' onclick="document.getElementById(\'reg_%1$s\').disabled = !this.checked;"', $rowData['id']) : '';
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
 					'class' => 'centercol',
1351 1351
 				),
1352 1352
 				'data' => array(
1353
-					'function' => function ($rowData)
1353
+					'function' => function($rowData)
1354 1354
 					{
1355 1355
 						$isChecked = $rowData['on_register'] && !$rowData['disabled'] ? ' checked' : '';
1356 1356
 						$isDisabled = $rowData['can_show_register'] ? '' : ' disabled';
@@ -1397,15 +1397,15 @@  discard block
 block discarded – undo
1397 1397
 					'value' => $txt['custom_profile_fieldorder'],
1398 1398
 				),
1399 1399
 				'data' => array(
1400
-					'function' => function ($rowData) use ($context, $txt, $scripturl)
1400
+					'function' => function($rowData) use ($context, $txt, $scripturl)
1401 1401
 					{
1402
-						$return = '<p class="centertext bold_text">'. $rowData['field_order'] .'<br>';
1402
+						$return = '<p class="centertext bold_text">' . $rowData['field_order'] . '<br>';
1403 1403
 
1404 1404
 						if ($rowData['field_order'] > 1)
1405
-							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_up'] .'"></span></a>';
1405
+							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_up'] . '"></span></a>';
1406 1406
 
1407 1407
 						if ($rowData['field_order'] < $context['custFieldsMaxOrder'])
1408
-							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_down'] .'"></span></a>';
1408
+							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_down'] . '"></span></a>';
1409 1409
 
1410 1410
 						$return .= '</p>';
1411 1411
 
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
 					'value' => $txt['custom_profile_fieldname'],
1424 1424
 				),
1425 1425
 				'data' => array(
1426
-					'function' => function ($rowData) use ($scripturl)
1426
+					'function' => function($rowData) use ($scripturl)
1427 1427
 					{
1428 1428
 						return sprintf('<a href="%1$s?action=admin;area=featuresettings;sa=profileedit;fid=%2$d">%3$s</a><div class="smalltext">%4$s</div>', $scripturl, $rowData['id_field'], $rowData['field_name'], $rowData['field_desc']);
1429 1429
 					},
@@ -1439,7 +1439,7 @@  discard block
 block discarded – undo
1439 1439
 					'value' => $txt['custom_profile_fieldtype'],
1440 1440
 				),
1441 1441
 				'data' => array(
1442
-					'function' => function ($rowData) use ($txt)
1442
+					'function' => function($rowData) use ($txt)
1443 1443
 					{
1444 1444
 						$textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']);
1445 1445
 						return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
 					'value' => $txt['custom_profile_active'],
1458 1458
 				),
1459 1459
 				'data' => array(
1460
-					'function' => function ($rowData) use ($txt)
1460
+					'function' => function($rowData) use ($txt)
1461 1461
 					{
1462 1462
 						return $rowData['active'] ? $txt['yes'] : $txt['no'];
1463 1463
 					},
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
 					'value' => $txt['custom_profile_placement'],
1475 1475
 				),
1476 1476
 				'data' => array(
1477
-					'function' => function ($rowData)
1477
+					'function' => function($rowData)
1478 1478
 					{
1479 1479
 						global $txt, $context;
1480 1480
 
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
 			redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler
1710 1710
 
1711 1711
 		// All good, proceed.
1712
-		$smcFunc['db_query']('','
1712
+		$smcFunc['db_query']('', '
1713 1713
 			UPDATE {db_prefix}custom_fields
1714 1714
 			SET field_order = {int:old_order}
1715 1715
 			WHERE field_order = {int:new_order}',
@@ -1718,7 +1718,7 @@  discard block
 block discarded – undo
1718 1718
 				'old_order' => $context['field']['order'],
1719 1719
 			)
1720 1720
 		);
1721
-		$smcFunc['db_query']('','
1721
+		$smcFunc['db_query']('', '
1722 1722
 			UPDATE {db_prefix}custom_fields
1723 1723
 			SET field_order = {int:new_order}
1724 1724
 			WHERE id_field = {int:id_field}',
@@ -1820,7 +1820,7 @@  discard block
 block discarded – undo
1820 1820
 			$smcFunc['db_free_result']($request);
1821 1821
 
1822 1822
 			$unique = false;
1823
-			for ($i = 0; !$unique && $i < 9; $i ++)
1823
+			for ($i = 0; !$unique && $i < 9; $i++)
1824 1824
 			{
1825 1825
 				if (!in_array($col_name, $current_fields))
1826 1826
 					$unique = true;
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
 		);
1994 1994
 
1995 1995
 		// Re-arrange the order.
1996
-		$smcFunc['db_query']('','
1996
+		$smcFunc['db_query']('', '
1997 1997
 			UPDATE {db_prefix}custom_fields
1998 1998
 			SET field_order = field_order - 1
1999 1999
 			WHERE field_order > {int:current_order}',
@@ -2257,7 +2257,7 @@  discard block
 block discarded – undo
2257 2257
 	$context['token_check'] = 'noti-admin';
2258 2258
 
2259 2259
 	// Specify our action since we'll want to post back here instead of the profile
2260
-	$context['action'] = 'action=admin;area=featuresettings;sa=alerts;'. $context['session_var'] .'='. $context['session_id'];
2260
+	$context['action'] = 'action=admin;area=featuresettings;sa=alerts;' . $context['session_var'] . '=' . $context['session_id'];
2261 2261
 
2262 2262
 	loadTemplate('Profile');
2263 2263
 	loadLanguage('Profile');
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
@@ -416,8 +416,8 @@  discard block
 block discarded – undo
416 416
 									</div>
417 417
 									<div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
418 418
 									<div class="attach-ui">
419
-										<a data-dz-remove class="button_submit cancel">', $txt['modify_cancel'] ,'</a>
420
-										<a class="button_submit upload">', $txt['upload'] ,'</a>
419
+										<a data-dz-remove class="button_submit cancel">', $txt['modify_cancel'], '</a>
420
+										<a class="button_submit upload">', $txt['upload'], '</a>
421 421
 									</div>
422 422
 								</div>
423 423
 							</div>
@@ -435,10 +435,10 @@  discard block
 block discarded – undo
435 435
 							</dt>
436 436
 							<dd class="smalltext fallback">
437 437
 								<div id="attachUpload" class="descbox">
438
-									<h5>', $txt['attach_drop_zone'] ,'</h5>
439
-									<a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a>
440
-									<a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a>
441
-									<a class="button_submit fileinput-button">', $txt['attach_add'] ,'</a>
438
+									<h5>', $txt['attach_drop_zone'], '</h5>
439
+									<a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a>
440
+									<a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a>
441
+									<a class="button_submit fileinput-button">', $txt['attach_add'], '</a>
442 442
 									<div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div>
443 443
 									<div class="fallback">
444 444
 										<input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 	// Option to delete an event if user is editing one.
546 546
 	if ($context['make_event'] && !$context['event']['new'])
547 547
 		echo '
548
-						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button_submit you_sure">';
548
+						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button_submit you_sure">';
549 549
 
550 550
 	echo '
551 551
 					</span>
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 			});';
800 800
 
801 801
 	echo '
802
-			var oEditorID = "', $context['post_box_name'] ,'";
802
+			var oEditorID = "', $context['post_box_name'], '";
803 803
 			var oEditorObject = oEditorHandle_', $context['post_box_name'], ';
804 804
 		</script>';
805 805
 
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 			{
832 832
 				echo '
833 833
 					<ul class="quickbuttons" id="msg_', $post['id'], '_quote">
834
-						<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>
834
+						<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>
835 835
 						<li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li>
836 836
 					</ul>';
837 837
 			}
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
 	<head>
919 919
 		<meta charset="', $context['character_set'], '">
920 920
 		<title>', $txt['spell_check'], '</title>
921
-		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
921
+		<link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '">
922 922
 		<style>
923 923
 			body, td
924 924
 			{
@@ -951,8 +951,8 @@  discard block
 block discarded – undo
951 951
 			var spell_formname = window.opener.spell_formname;
952 952
 			var spell_fieldname = window.opener.spell_fieldname;
953 953
 		</script>
954
-		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script>
955
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
954
+		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script>
955
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
956 956
 		<script>
957 957
 			', $context['spell_js'], '
958 958
 		</script>
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 	<head>
995 995
 		<meta charset="', $context['character_set'], '">
996 996
 		<title>', $txt['retrieving_quote'], '</title>
997
-		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
997
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script>
998 998
 	</head>
999 999
 	<body>
1000 1000
 		', $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>
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 		if (!empty($message['custom_fields']['below_avatar']))
269 269
 			foreach ($message['custom_fields']['below_avatar'] as $custom)
270 270
 				echo '
271
-				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
271
+				<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
272 272
 
273 273
 			if (!$message['member']['is_guest'])
274 274
 				echo '
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
 					foreach ($message['custom_fields']['icons'] as $custom)
312 312
 						echo '
313
-						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
313
+						<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
314 314
 
315 315
 					echo '
316 316
 					</ol>
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 				if (!empty($message['custom_fields']['standard']))
369 369
 					foreach ($message['custom_fields']['standard'] as $custom)
370 370
 						echo '
371
-				<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
371
+				<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
372 372
 
373 373
 				// Are we showing the warning status?
374 374
 				if ($message['member']['can_see_warning'])
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 				if (!empty($message['custom_fields']['bottom_poster']))
380 380
 					foreach ($message['custom_fields']['bottom_poster'] as $custom)
381 381
 						echo '
382
-				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
382
+				<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
383 383
 			}
384 384
 
385 385
 			// Done with the information about the poster... on to the post itself.
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
 				foreach ($message['custom_fields']['above_signature'] as $custom)
479 479
 					echo '
480
-							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
480
+							<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
481 481
 
482 482
 				echo '
483 483
 						</ul>
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 
499 499
 				foreach ($message['custom_fields']['below_signature'] as $custom)
500 500
 					echo '
501
-							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
501
+							<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
502 502
 
503 503
 				echo '
504 504
 						</ul>
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 	while ($message = $context['get_pmessage']('subject'))
631 631
 	{
632 632
 		echo '
633
-		<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '','">
633
+		<tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '', '">
634 634
 			<td class="table_icon">
635 635
 			<script>
636 636
 				currentLabels[', $message['id'], '] = {';
@@ -902,12 +902,12 @@  discard block
 block discarded – undo
902 902
 					// You can only reply if they are not a guest...
903 903
 					if (!$message['member']['is_guest'])
904 904
 						echo '
905
-							<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'], '
906
-							<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'];
905
+							<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'], '
906
+							<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'];
907 907
 					// This is for "forwarding" - even if the member is gone.
908 908
 					else
909 909
 						echo '
910
-							<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'];
910
+							<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'];
911 911
 				}
912 912
 
913 913
 				echo '
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 			<div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
1008 1008
 				<dl>
1009 1009
 					<dt>
1010
-						<strong id="error_serious">', $txt['error_while_submitting'] , '</strong>
1010
+						<strong id="error_serious">', $txt['error_while_submitting'], '</strong>
1011 1011
 					</dt>
1012 1012
 					<dd class="error" id="error_list">
1013 1013
 						', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), '
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 					<span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span>
1064 1064
 				</dt>
1065 1065
 				<dd id="pm_subject">
1066
-					<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"',isset($context['post_error']['no_subject']) ? ' class="error"' : '', '/>
1066
+					<input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', '/>
1067 1067
 				</dd>
1068 1068
 			</dl><hr>';
1069 1069
 
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
 		echo '
1427 1427
 		<div class="padding">
1428 1428
 			<input type="submit" name="save" value="', $txt['save'], '" class="button_submit">
1429
-			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button_submit you_sure">
1429
+			<input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'], '" class="button_submit you_sure">
1430 1430
 		</div>';
1431 1431
 
1432 1432
 	echo '
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
 	if (!empty($context['rules']))
1591 1591
 		echo '
1592 1592
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
1593
-			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button_submit smalltext you_sure">';
1593
+			<input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'], '" class="button_submit smalltext you_sure">';
1594 1594
 
1595 1595
 	echo '
1596 1596
 		</div>
@@ -1831,9 +1831,9 @@  discard block
 block discarded – undo
1831 1831
 
1832 1832
 		echo '
1833 1833
 				<select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();">
1834
-					<option value="">', $txt['pm_rule_sel_action'] , ':</option>
1835
-					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option>
1836
-					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option>
1834
+					<option value="">', $txt['pm_rule_sel_action'], ':</option>
1835
+					<option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'], '</option>
1836
+					<option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'], '</option>
1837 1837
 				</select>
1838 1838
 				<span id="labdiv', $k, '">
1839 1839
 					<select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();">
@@ -1945,7 +1945,7 @@  discard block
 block discarded – undo
1945 1945
 					</div>
1946 1946
 					<ul class="quickbuttons">
1947 1947
 						<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>
1948
-						<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>
1948
+						<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>
1949 1949
 					</ul>
1950 1950
 				</div>';
1951 1951
 		}
Please login to merge, or discard this patch.
Sources/Post.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 			$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
257 257
 
258 258
 		$js_time_string = str_replace(
259
-			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
260
-			array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
259
+			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
260
+			array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
261 261
 			$time_string
262 262
 		);
263 263
 
@@ -1305,14 +1305,14 @@  discard block
 block discarded – undo
1305 1305
 	if (isset($context['name']) && isset($context['email']))
1306 1306
 	{
1307 1307
 		$context['posting_fields']['guestname'] = array(
1308
-			'dt' => '<span id="caption_guestname"' .  (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '') . '>' . $txt['name'] . '</span>',
1308
+			'dt' => '<span id="caption_guestname"' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '') . '>' . $txt['name'] . '</span>',
1309 1309
 			'dd' => '<input type="text" name="guestname" size="25" value="' . $context['name'] . '" required>',
1310 1310
 		);
1311 1311
 
1312 1312
 		if (empty($modSettings['guest_post_no_email']))
1313 1313
 		{
1314 1314
 			$context['posting_fields']['email'] = array(
1315
-				'dt' => '<span id="caption_email"' .  (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '') . '>' . $txt['email'] . '</span>',
1315
+				'dt' => '<span id="caption_email"' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '') . '>' . $txt['email'] . '</span>',
1316 1316
 				'dd' => '<input type="email" name="email" size="25" value="' . $context['email'] . '" required>',
1317 1317
 			);
1318 1318
 		}
Please login to merge, or discard this patch.
Sources/ManageSmileys.php 1 patch
Spacing   +9 added lines, -9 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'];
@@ -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/Modlog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 					'class' => 'centercol',
257 257
 				),
258 258
 				'data' => array(
259
-					'function' => function ($entry)
259
+					'function' => function($entry)
260 260
 					{
261 261
 						return '<input type="checkbox" name="delete[]" value="' . $entry['id'] . '"' . ($entry['editable'] ? '' : ' disabled') . '>';
262 262
 					},
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 		if (empty($entries[$k]['action_text']))
639 639
 			$entries[$k]['action_text'] = isset($txt['modlog_ac_' . $entry['action']]) ? $txt['modlog_ac_' . $entry['action']] : $entry['action'];
640 640
 		$entries[$k]['action_text'] = preg_replace_callback('~\{([A-Za-z\d_]+)\}~i',
641
-			function ($matches) use ($entries, $k)
641
+			function($matches) use ($entries, $k)
642 642
 			{
643 643
 				return isset($entries[$k]['extra'][$matches[1]]) ? $entries[$k]['extra'][$matches[1]] : '';
644 644
 			}, $entries[$k]['action_text']);
Please login to merge, or discard this patch.