Passed
Pull Request — release-2.1 (#6068)
by Michael
03:55
created
Sources/Security.php 1 patch
Braces   -4 removed lines patch added patch discarded remove patch
@@ -1257,7 +1257,6 @@  discard block
 block discarded – undo
1257 1257
 
1258 1258
 			continue;
1259 1259
 		}
1260
-
1261 1260
 		else
1262 1261
 		{
1263 1262
 			$fh = @fopen($path . '/.htaccess', 'w');
@@ -1269,7 +1268,6 @@  discard block
 block discarded – undo
1269 1268
 	Deny from all' . $close);
1270 1269
 				fclose($fh);
1271 1270
 			}
1272
-
1273 1271
 			else
1274 1272
 				$errors[] = 'htaccess_cannot_create_file';
1275 1273
 		}
@@ -1280,7 +1278,6 @@  discard block
 block discarded – undo
1280 1278
 
1281 1279
 			continue;
1282 1280
 		}
1283
-
1284 1281
 		else
1285 1282
 		{
1286 1283
 			$fh = @fopen($path . '/index.php', 'w');
@@ -1307,7 +1304,6 @@  discard block
 block discarded – undo
1307 1304
 ?' . '>');
1308 1305
 				fclose($fh);
1309 1306
 			}
1310
-
1311 1307
 			else
1312 1308
 				$errors[] = 'index-php_cannot_create_file';
1313 1309
 		}
Please login to merge, or discard this patch.
Sources/Stats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -816,7 +816,7 @@
 block discarded – undo
816 816
 
817 817
 			$out = 'POST /smf/stats/collect_stats.php HTTP/1.1' . "\r\n";
818 818
 			$out .= 'Host: www.simplemachines.org' . "\r\n";
819
-			$out .= 'user-agent: '. SMF_USER_AGENT . "\r\n";
819
+			$out .= 'user-agent: ' . SMF_USER_AGENT . "\r\n";
820 820
 			$out .= 'content-type: application/x-www-form-urlencoded' . "\r\n";
821 821
 			$out .= 'connection: Close' . "\r\n";
822 822
 			$out .= 'content-length: ' . $length . "\r\n\r\n";
Please login to merge, or discard this patch.
Sources/Subs-Sound.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 		$sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8);
68 68
 		switch ($word[$i] === 's' ? 0 : mt_rand(0, 2))
69 69
 		{
70
-			case 0 :
71
-				for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++)
70
+			case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++)
72 71
 					for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++)
73 72
 						$sound_word .= $word[$i] === 's' ? $sound_letter[$j] : chr(mt_rand(max(ord($sound_letter[$j]) - 1, 0x00), min(ord($sound_letter[$j]) + 1, 0xFF)));
74 73
 				break;
Please login to merge, or discard this patch.
other/install.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -959,7 +959,7 @@
 block discarded – undo
959 959
 	$incontext['continue'] = 1;
960 960
 
961 961
 	// Check Postgres setting
962
-	if ( $db_type === 'postgresql')
962
+	if ($db_type === 'postgresql')
963 963
 	{
964 964
 		load_database();
965 965
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -973,7 +973,7 @@
 block discarded – undo
973 973
 		{
974 974
 			$row = $smcFunc['db_fetch_assoc']($result);
975 975
 			if ($row['standard_conforming_strings'] !== 'on')
976
-				{
976
+			{
977 977
 					$incontext['continue'] = 0;
978 978
 					$incontext['error'] = $txt['error_pg_scs'];
979 979
 				}
Please login to merge, or discard this patch.
Sources/Display.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1631,14 +1631,14 @@  discard block
 block discarded – undo
1631 1631
 	$output['quickbuttons'] = array(
1632 1632
 		'quote' => array(
1633 1633
 			'label' => $txt['quote_action'],
1634
-			'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'],
1635
-			'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"',
1634
+			'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'],
1635
+			'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"',
1636 1636
 			'icon' => 'quote',
1637 1637
 			'show' => $context['can_quote']
1638 1638
 		),
1639 1639
 		'quote_selected' => array(
1640 1640
 			'label' => $txt['quote_selected_action'],
1641
-			'id' => 'quoteSelected_'. $output['id'],
1641
+			'id' => 'quoteSelected_' . $output['id'],
1642 1642
 			'href' => 'javascript:void(0)',
1643 1643
 			'custom' => 'style="display:none"',
1644 1644
 			'icon' => 'quote_selected',
@@ -1647,71 +1647,71 @@  discard block
 block discarded – undo
1647 1647
 		'quick_edit' => array(
1648 1648
 			'label' => $txt['quick_edit'],
1649 1649
 			'class' => 'quick_edit',
1650
-			'id' =>' modify_button_'. $output['id'],
1651
-			'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"',
1650
+			'id' =>' modify_button_' . $output['id'],
1651
+			'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"',
1652 1652
 			'icon' => 'quick_edit_button',
1653 1653
 			'show' => $output['can_modify']
1654 1654
 		),
1655 1655
 		'more' => array(
1656 1656
 			'modify' => array(
1657 1657
 				'label' => $txt['modify'],
1658
-				'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'],
1658
+				'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'],
1659 1659
 				'icon' => 'modify_button',
1660 1660
 				'show' => $output['can_modify']
1661 1661
 			),
1662 1662
 			'remove_topic' => array(
1663 1663
 				'label' => $txt['remove_topic'],
1664
-				'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1665
-				'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'" class="you_sure"',
1664
+				'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1665
+				'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '" class="you_sure"',
1666 1666
 				'icon' => 'remove_button',
1667 1667
 				'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id'])
1668 1668
 			),
1669 1669
 			'remove' => array(
1670 1670
 				'label' => $txt['remove'],
1671
-				'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1672
-				'javascript' => 'data-confirm="'.$txt['remove_message_question'].'" class="you_sure"',
1671
+				'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1672
+				'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '" class="you_sure"',
1673 1673
 				'icon' => 'remove_button',
1674 1674
 				'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id'])
1675 1675
 			),
1676 1676
 			'split' => array(
1677 1677
 				'label' => $txt['split'],
1678
-				'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'],
1678
+				'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'],
1679 1679
 				'icon' => 'split_button',
1680 1680
 				'show' => $context['can_split'] && !empty($context['real_num_replies'])
1681 1681
 			),
1682 1682
 			'report' => array(
1683 1683
 				'label' => $txt['report_to_mod'],
1684
-				'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'],
1684
+				'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'],
1685 1685
 				'icon' => 'error',
1686 1686
 				'show' => $context['can_report_moderator']
1687 1687
 			),
1688 1688
 			'warn' => array(
1689 1689
 				'label' => $txt['issue_warning'],
1690
-				'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'],
1690
+				'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'],
1691 1691
 				'icon' => 'warn_button',
1692 1692
 				'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest']
1693 1693
 			),
1694 1694
 			'restore' => array(
1695 1695
 				'label' => $txt['restore_message'],
1696
-				'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1696
+				'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1697 1697
 				'icon' => 'restore_button',
1698 1698
 				'show' => $context['can_restore_msg']
1699 1699
 			),
1700 1700
 			'approve' => array(
1701 1701
 				'label' => $txt['approve'],
1702
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1702
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1703 1703
 				'icon' => 'approve_button',
1704 1704
 				'show' => $output['can_approve']
1705 1705
 			),
1706 1706
 			'unapprove' => array(
1707 1707
 				'label' => $txt['unapprove'],
1708
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1708
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1709 1709
 				'icon' => 'unapprove_button',
1710 1710
 				'show' => $output['can_unapprove']
1711 1711
 			),
1712 1712
 		),
1713 1713
 		'quickmod' => array(
1714
-			'id' => 'in_topic_mod_check_'. $output['id'],
1714
+			'id' => 'in_topic_mod_check_' . $output['id'],
1715 1715
 			'custom' => 'style="display: none;"',
1716 1716
 			'content' => '',
1717 1717
 			'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'],
Please login to merge, or discard this patch.
Sources/MessageIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 		WHERE t.id_board = {int:current_board} '
331 331
 			. (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
332 332
 			AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' 
333
-			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). '
333
+			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . '
334 334
 		ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . '
335 335
 		LIMIT {int:maxindex}
336 336
 			OFFSET {int:start} ';
Please login to merge, or discard this patch.
Themes/default/index.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -574,7 +574,7 @@
 block discarded – undo
574 574
 				$value['id'] = $key;
575 575
 
576 576
 			$button = '
577
-				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>';
577
+				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>';
578 578
 
579 579
 			if (!empty($value['sub_buttons']))
580 580
 			{
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1931,7 +1931,7 @@
 block discarded – undo
1931 1931
 				<div class="floatright smalltext righttext">
1932 1932
 					<div class="recipient_to">&#171;&nbsp;<strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '&nbsp;&#187;</div>';
1933 1933
 
1934
-			if(!empty($draft['recipients']['bcc']))
1934
+			if (!empty($draft['recipients']['bcc']))
1935 1935
 				echo'
1936 1936
 					<div class="pm_bbc">&#171;&nbsp;<strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '&nbsp;&#187;</div>';
1937 1937
 
Please login to merge, or discard this patch.
Sources/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1241,7 +1241,7 @@
 block discarded – undo
1241 1241
 	// File Upload.
1242 1242
 	if ($context['can_post_attachment'])
1243 1243
 	{
1244
-		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function ($val) use ($smcFunc)
1244
+		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function($val) use ($smcFunc)
1245 1245
 		{
1246 1246
 			return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : '';
1247 1247
 		}, explode(',', $context['allowed_extensions'])));
Please login to merge, or discard this patch.