Passed
Pull Request — release-2.1 (#6089)
by Mert
03:52
created
Sources/Profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -619,7 +619,7 @@
 block discarded – undo
619 619
 			if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
620 620
 				fatal_lang_error('login_ssl_required', false);
621 621
 
622
-			$password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] :  '';
622
+			$password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : '';
623 623
 
624 624
 			// You didn't even enter a password!
625 625
 			if (trim($password) == '')
Please login to merge, or discard this patch.
Sources/Packages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1155,7 +1155,7 @@
 block discarded – undo
1155 1155
 				// We're really just checking for entries which are create table AND add columns (etc).
1156 1156
 				$tables = array();
1157 1157
 
1158
-				usort($db_package_log, function ($a, $b)
1158
+				usort($db_package_log, function($a, $b)
1159 1159
 				{
1160 1160
 					if ($a[0] == $b[0])
1161 1161
 						return 0;
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1707,7 +1707,7 @@
 block discarded – undo
1707 1707
 		{
1708 1708
 			// Avoid double separators and empty titled sections
1709 1709
 			$empty_section = true;
1710
-			for ($j=$i+1; $j < count($context['theme_options']); $j++)
1710
+			for ($j = $i + 1; $j < count($context['theme_options']); $j++)
1711 1711
 			{
1712 1712
 				// Found another separator, so we're done
1713 1713
 				if (!is_array($context['theme_options'][$j]))
Please login to merge, or discard this patch.
Sources/Profile-View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			AND a.is_read = 0' : '') . (!empty($alertIDs) ? '
263 263
 			AND a.id_alert IN ({array_int:alertIDs})' : '') . '
264 264
 		ORDER BY id_alert DESC' . (!empty($limit) ? '
265
-		LIMIT {int:limit}' : '') . (!empty($offset) ?'
265
+		LIMIT {int:limit}' : '') . (!empty($offset) ? '
266 266
 		OFFSET {int:offset}' : ''),
267 267
 		array(
268 268
 			'id_member' => $memID,
@@ -1101,20 +1101,20 @@  discard block
 block discarded – undo
1101 1101
 		$context['posts'][$key]['quickbuttons'] = array(
1102 1102
 			'reply' => array(
1103 1103
 				'label' => $txt['reply'],
1104
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1104
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1105 1105
 				'icon' => 'reply_button',
1106 1106
 				'show' => $post['can_reply']
1107 1107
 			),
1108 1108
 			'quote' => array(
1109 1109
 				'label' => $txt['quote_action'],
1110
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1110
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1111 1111
 				'icon' => 'quote',
1112 1112
 				'show' => $post['can_quote']
1113 1113
 			),
1114 1114
 			'remove' => array(
1115 1115
 				'label' => $txt['remove'],
1116
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1117
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"',
1116
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1117
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"',
1118 1118
 				'icon' => 'remove_button',
1119 1119
 				'show' => $post['can_delete']
1120 1120
 			)
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 require_once($sourcedir . '/Load.php');
54 54
 
55 55
 // If $maintenance is set specifically to 2, then we're upgrading or something.
56
-if (!empty($maintenance) &&  2 === $maintenance)
56
+if (!empty($maintenance) && 2 === $maintenance)
57 57
 	display_maintenance_message();
58 58
 
59 59
 // Create a variable to store some SMF specific functions in.
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
  *
105 105
  * @param string $class The fully-qualified class name.
106 106
  */
107
-spl_autoload_register(function ($class) use ($sourcedir)
107
+spl_autoload_register(function($class) use ($sourcedir)
108 108
 {
109 109
 	$classMap = array(
110 110
 		'ReCaptcha\\' => 'ReCaptcha/',
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 1 patch
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.
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.