Passed
Pull Request — release-2.1 (#6842)
by Mathias
04:40 queued 10s
created
Themes/default/ModerationCenter.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -393,18 +393,18 @@  discard block
 block discarded – undo
393 393
 		$quickbuttons = array(
394 394
 			'approve' => array(
395 395
 				'label' => $txt['approve'],
396
-				'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'],
396
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'],
397 397
 				'icon' => 'approve',
398 398
 			),
399 399
 			'delete' => array(
400 400
 				'label' => $txt['remove'],
401
-				'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'],
401
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'],
402 402
 				'icon' => 'remove_button',
403 403
 				'show' => $item['can_delete']
404 404
 			),
405 405
 			'quickmod' => array(
406 406
 				'class' => 'inline_mod_check',
407
-				'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>',
407
+				'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>',
408 408
 				'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1
409 409
 			),
410 410
 		);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	$quickbuttons = array(
470 470
 		'delete' => array(
471 471
 			'label' => $txt['remove_message'],
472
-			'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
472
+			'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
473 473
 			'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"',
474 474
 			'class' => 'you_sure',
475 475
 			'icon' => 'remove_button',
Please login to merge, or discard this patch.
Sources/ReportedContent.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 				),
94 94
 				'ignore' => array(
95 95
 					'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'],
96
-					'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'],
96
+					'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'],
97 97
 					'javascript' => !$report['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '',
98 98
 					'class' => 'you_sure',
99 99
 					'icon' => 'ignore'
100 100
 				),
101 101
 				'close' => array(
102 102
 					'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'],
103
-					'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'],
103
+					'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'],
104 104
 					'icon' => $context['view_closed'] ? 'folder' : 'close',
105 105
 				),
106 106
 			);
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 			if ($context['report_type'] == 'posts')
110 110
 				$context['reports'][$key]['quickbuttons']['delete'] = array(
111 111
 					'label' => $txt['mc_reportedp_delete'],
112
-					'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'],
113
-					'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'"',
112
+					'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'],
113
+					'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '"',
114 114
 					'class' => 'you_sure',
115 115
 					'icon' => 'delete',
116 116
 					'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 
119 119
 			// Ban reported member/post author link
120 120
 			if ($context['report_type'] == 'members')
121
-				$ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id'];
121
+				$ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'];
122 122
 			else
123
-				$ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id'];
123
+				$ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id'];
124 124
 
125 125
 			$context['reports'][$key]['quickbuttons'] += array(
126 126
 				'ban' => array(
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 				),
132 132
 				'quickmod' => array(
133 133
 					'class' => 'inline_mod_check',
134
-					'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">',
134
+					'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">',
135 135
 					'show' => !$context['view_closed']
136 136
 				)
137 137
 			);
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
@@ -1535,14 +1535,14 @@  discard block
 block discarded – undo
1535 1535
 	$output['quickbuttons'] = array(
1536 1536
 		'quote' => array(
1537 1537
 			'label' => $txt['quote_action'],
1538
-			'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'],
1539
-			'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"',
1538
+			'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'],
1539
+			'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"',
1540 1540
 			'icon' => 'quote',
1541 1541
 			'show' => $context['can_quote']
1542 1542
 		),
1543 1543
 		'quote_selected' => array(
1544 1544
 			'label' => $txt['quote_selected_action'],
1545
-			'id' => 'quoteSelected_'. $output['id'],
1545
+			'id' => 'quoteSelected_' . $output['id'],
1546 1546
 			'href' => 'javascript:void(0)',
1547 1547
 			'custom' => 'style="display:none"',
1548 1548
 			'icon' => 'quote_selected',
@@ -1551,74 +1551,74 @@  discard block
 block discarded – undo
1551 1551
 		'quick_edit' => array(
1552 1552
 			'label' => $txt['quick_edit'],
1553 1553
 			'class' => 'quick_edit',
1554
-			'id' => 'modify_button_'. $output['id'],
1555
-			'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"',
1554
+			'id' => 'modify_button_' . $output['id'],
1555
+			'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"',
1556 1556
 			'icon' => 'quick_edit_button',
1557 1557
 			'show' => $output['can_modify']
1558 1558
 		),
1559 1559
 		'more' => array(
1560 1560
 			'modify' => array(
1561 1561
 				'label' => $txt['modify'],
1562
-				'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'],
1562
+				'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'],
1563 1563
 				'icon' => 'modify_button',
1564 1564
 				'show' => $output['can_modify']
1565 1565
 			),
1566 1566
 			'remove_topic' => array(
1567 1567
 				'label' => $txt['remove_topic'],
1568
-				'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1569
-				'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'"',
1568
+				'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1569
+				'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '"',
1570 1570
 				'class' => 'you_sure',
1571 1571
 				'icon' => 'remove_button',
1572 1572
 				'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id'])
1573 1573
 			),
1574 1574
 			'remove' => array(
1575 1575
 				'label' => $txt['remove'],
1576
-				'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1577
-				'javascript' => 'data-confirm="'.$txt['remove_message_question'].'"',
1576
+				'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1577
+				'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '"',
1578 1578
 				'class' => 'you_sure',
1579 1579
 				'icon' => 'remove_button',
1580 1580
 				'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id'])
1581 1581
 			),
1582 1582
 			'split' => array(
1583 1583
 				'label' => $txt['split'],
1584
-				'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'],
1584
+				'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'],
1585 1585
 				'icon' => 'split_button',
1586 1586
 				'show' => $context['can_split'] && !empty($context['real_num_replies'])
1587 1587
 			),
1588 1588
 			'report' => array(
1589 1589
 				'label' => $txt['report_to_mod'],
1590
-				'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'],
1590
+				'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'],
1591 1591
 				'icon' => 'error',
1592 1592
 				'show' => $context['can_report_moderator']
1593 1593
 			),
1594 1594
 			'warn' => array(
1595 1595
 				'label' => $txt['issue_warning'],
1596
-				'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'],
1596
+				'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'],
1597 1597
 				'icon' => 'warn_button',
1598 1598
 				'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest']
1599 1599
 			),
1600 1600
 			'restore' => array(
1601 1601
 				'label' => $txt['restore_message'],
1602
-				'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1602
+				'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1603 1603
 				'icon' => 'restore_button',
1604 1604
 				'show' => $context['can_restore_msg']
1605 1605
 			),
1606 1606
 			'approve' => array(
1607 1607
 				'label' => $txt['approve'],
1608
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1608
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1609 1609
 				'icon' => 'approve_button',
1610 1610
 				'show' => $output['can_approve']
1611 1611
 			),
1612 1612
 			'unapprove' => array(
1613 1613
 				'label' => $txt['unapprove'],
1614
-				'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'],
1614
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1615 1615
 				'icon' => 'unapprove_button',
1616 1616
 				'show' => $output['can_unapprove']
1617 1617
 			),
1618 1618
 		),
1619 1619
 		'quickmod' => array(
1620 1620
 			'class' => 'inline_mod_check',
1621
-			'id' => 'in_topic_mod_check_'. $output['id'],
1621
+			'id' => 'in_topic_mod_check_' . $output['id'],
1622 1622
 			'custom' => 'style="display: none;"',
1623 1623
 			'content' => '',
1624 1624
 			'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove']
Please login to merge, or discard this patch.
Sources/Cache/APIs/MemcacheImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
 	{
150 150
 		global $context, $txt;
151 151
 
152
-		if (!in_array($txt[self::CLASS_KEY .'_settings'], $config_vars))
152
+		if (!in_array($txt[self::CLASS_KEY . '_settings'], $config_vars))
153 153
 		{
154
-			$config_vars[] = $txt[self::CLASS_KEY .'_settings'];
154
+			$config_vars[] = $txt[self::CLASS_KEY . '_settings'];
155 155
 			$config_vars[] = array(
156 156
 				self::CLASS_KEY,
157
-				$txt[self::CLASS_KEY .'_servers'],
157
+				$txt[self::CLASS_KEY . '_servers'],
158 158
 				'file',
159 159
 				'text',
160 160
 				0,
161
-				'subtext' => $txt[self::CLASS_KEY .'_servers_subtext']);
161
+				'subtext' => $txt[self::CLASS_KEY . '_servers_subtext']);
162 162
 		}
163 163
 
164 164
 		if (!isset($context['settings_post_javascript']))
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$context['settings_post_javascript'] .= '
168 168
 			$("#cache_accelerator").change(function (e) {
169 169
 				var cache_type = e.currentTarget.value;
170
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation");
170
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation");
171 171
 			});';
172 172
 	}
173 173
 
Please login to merge, or discard this patch.
Sources/Cache/APIs/MemcachedImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
 	{
150 150
 		global $context, $txt;
151 151
 
152
-		if (!in_array($txt[self::CLASS_KEY .'_settings'], $config_vars))
152
+		if (!in_array($txt[self::CLASS_KEY . '_settings'], $config_vars))
153 153
 		{
154
-			$config_vars[] = $txt[self::CLASS_KEY .'_settings'];
154
+			$config_vars[] = $txt[self::CLASS_KEY . '_settings'];
155 155
 			$config_vars[] = array(
156 156
 				self::CLASS_KEY,
157
-				$txt[self::CLASS_KEY .'_servers'],
157
+				$txt[self::CLASS_KEY . '_servers'],
158 158
 				'file',
159 159
 				'text',
160 160
 				0,
161
-				'subtext' => $txt[self::CLASS_KEY .'_servers_subtext']);
161
+				'subtext' => $txt[self::CLASS_KEY . '_servers_subtext']);
162 162
 		}
163 163
 
164 164
 		if (!isset($context['settings_post_javascript']))
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$context['settings_post_javascript'] .= '
168 168
 			$("#cache_accelerator").change(function (e) {
169 169
 				var cache_type = e.currentTarget.value;
170
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation");
170
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation");
171 171
 			});';
172 172
 	}
173 173
 
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1721,7 +1721,7 @@  discard block
 block discarded – undo
1721 1721
 		{
1722 1722
 			// Avoid double separators and empty titled sections
1723 1723
 			$empty_section = true;
1724
-			for ($j=$i+1; $j < count($context['theme_options']); $j++)
1724
+			for ($j = $i + 1; $j < count($context['theme_options']); $j++)
1725 1725
 			{
1726 1726
 				// Found another separator, so we're done
1727 1727
 				if (!is_array($context['theme_options'][$j]))
@@ -2700,8 +2700,7 @@  discard block
 block discarded – undo
2700 2700
 		foreach ($context['post_errors'] as $error)
2701 2701
 		{
2702 2702
 			$text_key_error = $error == 'password_short' ?
2703
-				sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) :
2704
-				(isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : '');
2703
+				sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : (isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : '');
2705 2704
 
2706 2705
 			echo '
2707 2706
 				<li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>';
Please login to merge, or discard this patch.
Sources/ManageSearchEngines.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -807,7 +807,8 @@
 block discarded – undo
807 807
 			{
808 808
 				$context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $txt[$new_url['label']];
809 809
 				$context['spider_logs']['rows'][$k]['data']['viewing']['class'] = $new_url['class'];
810
-			} else
810
+			}
811
+			else
811 812
 				$context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $new_url;
812 813
 		}
813 814
 	}
Please login to merge, or discard this patch.
Sources/Subs.php 2 patches
Braces   +9 added lines, -11 removed lines patch added patch discarded remove patch
@@ -280,7 +280,6 @@  discard block
 block discarded – undo
280 280
 		$condition = 'id_member IN ({array_int:members})';
281 281
 		$parameters['members'] = $members;
282 282
 	}
283
-
284 283
 	elseif ($members === null)
285 284
 		$condition = '1=1';
286 285
 
@@ -383,11 +382,9 @@  discard block
 block discarded – undo
383 382
 				$val = $val . ' END';
384 383
 				$type = 'raw';
385 384
 			}
386
-
387 385
 			else
388 386
 				$val = alert_count($members, true);
389 387
 		}
390
-
391 388
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
392 389
 		{
393 390
 			$val = $var . ' ' . $val . ' 1';
@@ -2174,12 +2171,12 @@  discard block
 block discarded – undo
2174 2171
 			'tag' => 'cowsay',
2175 2172
 			'parameters' => array(
2176 2173
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2177
-					{
2174
+				{
2178 2175
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2179 2176
 					},
2180 2177
 				),
2181 2178
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2182
-					{
2179
+				{
2183 2180
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2184 2181
 					},
2185 2182
 				),
@@ -2504,7 +2501,8 @@  discard block
 block discarded – undo
2504 2501
 
2505 2502
 							foreach (array('path', 'query', 'fragment') as $part)
2506 2503
 							{
2507
-								switch ($part) {
2504
+								switch ($part)
2505
+								{
2508 2506
 									case 'path':
2509 2507
 										$part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&';
2510 2508
 										$part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars);
@@ -3534,7 +3532,7 @@  discard block
 block discarded – undo
3534 3532
 
3535 3533
 	// Replace away!
3536 3534
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3537
-		{
3535
+	{
3538 3536
 			return $smileyPregReplacements[$matches[1]];
3539 3537
 		}, $message);
3540 3538
 }
@@ -4345,7 +4343,6 @@  discard block
 block discarded – undo
4345 4343
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4346 4344
 					$minSeed = $js_file['options']['seed'];
4347 4345
 			}
4348
-
4349 4346
 			else
4350 4347
 			{
4351 4348
 				echo '
@@ -6268,7 +6265,8 @@  discard block
 block discarded – undo
6268 6265
 			$zones[$tzkey]['tzid'] = $tzid;
6269 6266
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6270 6267
 
6271
-			foreach ($tzinfo as $transition) {
6268
+			foreach ($tzinfo as $transition)
6269
+			{
6272 6270
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6273 6271
 			}
6274 6272
 
@@ -6353,7 +6351,8 @@  discard block
 block discarded – undo
6353 6351
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6354 6352
 
6355 6353
 		// We don't want abbreviations like '+03' or '-11'.
6356
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6354
+		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr)
6355
+		{
6357 6356
 			return !strspn($abbr, '+-');
6358 6357
 		});
6359 6358
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -6754,7 +6753,6 @@  discard block
 block discarded – undo
6754 6753
 			$isWritable = true;
6755 6754
 			break;
6756 6755
 		}
6757
-
6758 6756
 		else
6759 6757
 			@chmod($file, $val);
6760 6758
 	}
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 			{
379 379
 				$val = 'CASE ';
380 380
 				foreach ($members as $k => $v)
381
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
381
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
382 382
 
383 383
 				$val = $val . ' END';
384 384
 				$type = 'raw';
@@ -1041,11 +1041,11 @@  discard block
 block discarded – undo
1041 1041
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1042 1042
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1043 1043
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1044
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1044
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1045 1045
 			// Unwanted trailing punctuation and whitespace.
1046
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1046
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1047 1047
 			// Unwanted opening punctuation and whitespace.
1048
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1048
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1049 1049
 		),
1050 1050
 		array(
1051 1051
 			'',
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
 								$returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img"></a>';
1444 1444
 							else
1445 1445
 							{
1446
-								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': '';
1446
+								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1447 1447
 								$height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : '';
1448 1448
 								$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>';
1449 1449
 							}
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
 							$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1455 1455
 							$height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : '';
1456 1456
 
1457
-							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1457
+							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1458 1458
 						}
1459 1459
 						// Audio.
1460 1460
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
 							$width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;';
1463 1463
 							$height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : '';
1464 1464
 
1465
-							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1465
+							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1466 1466
 						}
1467 1467
 						// Anything else.
1468 1468
 						else
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
 				'type' => 'unparsed_commas_content',
1632 1632
 				'test' => '\d+,\d+\]',
1633 1633
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1634
-				'validate' => function (&$tag, &$data, $disabled)
1634
+				'validate' => function(&$tag, &$data, $disabled)
1635 1635
 				{
1636 1636
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1637 1637
 					if (empty($scheme))
@@ -1744,8 +1744,8 @@  discard block
 block discarded – undo
1744 1744
 					else
1745 1745
 						$url = get_proxied_url($url);
1746 1746
 
1747
-					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : '';
1748
-					$title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : '';
1747
+					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : '';
1748
+					$title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : '';
1749 1749
 
1750 1750
 					$data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . 'class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">';
1751 1751
 				},
@@ -2159,12 +2159,12 @@  discard block
 block discarded – undo
2159 2159
 		$codes[] = array(
2160 2160
 			'tag' => 'cowsay',
2161 2161
 			'parameters' => array(
2162
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2162
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2163 2163
 					{
2164 2164
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2165 2165
 					},
2166 2166
 				),
2167
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2167
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2168 2168
 					{
2169 2169
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2170 2170
 					},
@@ -3548,7 +3548,7 @@  discard block
 block discarded – undo
3548 3548
 		if ($fp != false)
3549 3549
 		{
3550 3550
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
3551
-			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
3551
+			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
3552 3552
 
3553 3553
 			// Read in the HTTP/1.1 or whatever.
3554 3554
 			$test = substr(fgets($fp, 11), -1);
@@ -4165,7 +4165,7 @@  discard block
 block discarded – undo
4165 4165
 	$toMinify = array();
4166 4166
 	$normal = array();
4167 4167
 
4168
-	uasort($context['css_files'], function ($a, $b)
4168
+	uasort($context['css_files'], function($a, $b)
4169 4169
 	{
4170 4170
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4171 4171
 	});
@@ -5462,7 +5462,7 @@  discard block
 block discarded – undo
5462 5462
 			{
5463 5463
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
5464 5464
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5465
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5465
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5466 5466
 				if ($keep_alive)
5467 5467
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
5468 5468
 				else
@@ -5472,7 +5472,7 @@  discard block
 block discarded – undo
5472 5472
 			{
5473 5473
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
5474 5474
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5475
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5475
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5476 5476
 				if ($keep_alive)
5477 5477
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
5478 5478
 				else
@@ -5721,13 +5721,13 @@  discard block
 block discarded – undo
5721 5721
 
5722 5722
 	// UTF-8 occurences of MS special characters
5723 5723
 	$findchars_utf8 = array(
5724
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5725
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5726
-		"\xe2\x80\xa6",	// horizontal ellipsis
5727
-		"\xe2\x80\x98",	// left single curly quote
5728
-		"\xe2\x80\x99",	// right single curly quote
5729
-		"\xe2\x80\x9c",	// left double curly quote
5730
-		"\xe2\x80\x9d",	// right double curly quote
5724
+		"\xe2\x80\x9a", // single low-9 quotation mark
5725
+		"\xe2\x80\x9e", // double low-9 quotation mark
5726
+		"\xe2\x80\xa6", // horizontal ellipsis
5727
+		"\xe2\x80\x98", // left single curly quote
5728
+		"\xe2\x80\x99", // right single curly quote
5729
+		"\xe2\x80\x9c", // left double curly quote
5730
+		"\xe2\x80\x9d", // right double curly quote
5731 5731
 	);
5732 5732
 
5733 5733
 	// windows 1252 / iso equivalents
@@ -5743,13 +5743,13 @@  discard block
 block discarded – undo
5743 5743
 
5744 5744
 	// safe replacements
5745 5745
 	$replacechars = array(
5746
-		',',	// &sbquo;
5747
-		',,',	// &bdquo;
5748
-		'...',	// &hellip;
5749
-		"'",	// &lsquo;
5750
-		"'",	// &rsquo;
5751
-		'"',	// &ldquo;
5752
-		'"',	// &rdquo;
5746
+		',', // &sbquo;
5747
+		',,', // &bdquo;
5748
+		'...', // &hellip;
5749
+		"'", // &lsquo;
5750
+		"'", // &rsquo;
5751
+		'"', // &ldquo;
5752
+		'"', // &rdquo;
5753 5753
 	);
5754 5754
 
5755 5755
 	if ($context['utf8'])
@@ -6094,7 +6094,7 @@  discard block
 block discarded – undo
6094 6094
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6095 6095
 
6096 6096
 		// We don't want abbreviations like '+03' or '-11'.
6097
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6097
+		$abbrs = array_filter($tzvalue['abbrs'], function($abbr) {
6098 6098
 			return !strspn($abbr, '+-');
6099 6099
 		});
6100 6100
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -7058,7 +7058,7 @@  discard block
 block discarded – undo
7058 7058
 			EXISTS (
7059 7059
 				SELECT bpv.id_board
7060 7060
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7061
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
7061
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
7062 7062
 					AND bpv.deny = 0
7063 7063
 					AND bpv.id_board = b.id_board
7064 7064
 			)';
@@ -7068,7 +7068,7 @@  discard block
 block discarded – undo
7068 7068
 			AND NOT EXISTS (
7069 7069
 				SELECT bpv.id_board
7070 7070
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7071
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
7071
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
7072 7072
 					AND bpv.deny = 1
7073 7073
 					AND bpv.id_board = b.id_board
7074 7074
 			)';
@@ -7344,8 +7344,8 @@  discard block
 block discarded – undo
7344 7344
 	$i = 0;
7345 7345
 	while (empty($done))
7346 7346
 	{
7347
-		if (strpos($format, '{'. --$i . '}') !== false)
7348
-			$replacements['{'. $i . '}'] = array_pop($list);
7347
+		if (strpos($format, '{' . --$i . '}') !== false)
7348
+			$replacements['{' . $i . '}'] = array_pop($list);
7349 7349
 		else
7350 7350
 			$done = true;
7351 7351
 	}
@@ -7355,8 +7355,8 @@  discard block
 block discarded – undo
7355 7355
 	$i = 0;
7356 7356
 	while (empty($done))
7357 7357
 	{
7358
-		if (strpos($format, '{'. ++$i . '}') !== false)
7359
-			$replacements['{'. $i . '}'] = array_shift($list);
7358
+		if (strpos($format, '{' . ++$i . '}') !== false)
7359
+			$replacements['{' . $i . '}'] = array_shift($list);
7360 7360
 		else
7361 7361
 			$done = true;
7362 7362
 	}
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
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 require_once($sourcedir . '/Security.php');
79 79
 
80 80
 // If $maintenance is set specifically to 2, then we're upgrading or something.
81
-if (!empty($maintenance) &&  2 === $maintenance)
81
+if (!empty($maintenance) && 2 === $maintenance)
82 82
 {
83 83
 	display_maintenance_message();
84 84
 }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  *
95 95
  * @param string $class The fully-qualified class name.
96 96
  */
97
-spl_autoload_register(function ($class) use ($sourcedir)
97
+spl_autoload_register(function($class) use ($sourcedir)
98 98
 {
99 99
 	$classMap = array(
100 100
 		'ReCaptcha\\' => 'ReCaptcha/',
Please login to merge, or discard this patch.