Failed Conditions
Branch release-2.1 (74931e)
by Rick
05:07
created
Themes/default/index.template.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 				$value['id'] = $key;
564 564
 
565 565
 			$button = '
566
-				<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>';
566
+				<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>';
567 567
 
568 568
 			if (!empty($value['sub_buttons']))
569 569
 			{
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 	global $txt;
614 614
 
615 615
 	// Enable manipulation with hooks
616
-	if(!empty($list_id))
616
+	if (!empty($list_id))
617 617
 		call_integration_hook('integrate_' . $list_id . '_quickbuttons', array(&$list_items));
618 618
 
619 619
 	// Make sure the list has at least one shown item
@@ -640,20 +640,20 @@  discard block
 block discarded – undo
640 640
 
641 641
 	// Print the quickbuttons
642 642
 	$output = '
643
-		<ul' . (!empty($list_id) ? ' id="quickbuttons_'.$list_id.'"' : '') . ' class="quickbuttons">';
643
+		<ul' . (!empty($list_id) ? ' id="quickbuttons_' . $list_id . '"' : '') . ' class="quickbuttons">';
644 644
 
645 645
 	// This is used for a list item or a sublist item
646 646
 	$list_item_format = function($li)
647 647
 	{
648 648
 		$html = '
649
-			<li' . (!empty($li['class']) ? ' class="'.$li['class'].'"' : '') . (!empty($li['id']) ? ' id="'.$li['id'].'"' : '') . (!empty($li['custom']) ? $li['custom'] : '') . '>';
649
+			<li' . (!empty($li['class']) ? ' class="' . $li['class'] . '"' : '') . (!empty($li['id']) ? ' id="' . $li['id'] . '"' : '') . (!empty($li['custom']) ? $li['custom'] : '') . '>';
650 650
 
651
-		if(isset($li['content']))
651
+		if (isset($li['content']))
652 652
 			$html .= $li['content'];
653 653
 		else
654 654
 			$html .= '
655
-				<a' . (!empty($li['href']) ? ' href="'.$li['href'].'"' : '') . (!empty($li['javascript']) ? $li['javascript'] : '') . '>
656
-					' . (!empty($li['icon']) ? '<span class="main_icons '.$li['icon'].'"></span>' : '') . (!empty($li['label']) ? $li['label'] : '') . '
655
+				<a' . (!empty($li['href']) ? ' href="' . $li['href'] . '"' : '') . (!empty($li['javascript']) ? $li['javascript'] : '') . '>
656
+					' . (!empty($li['icon']) ? '<span class="main_icons ' . $li['icon'] . '"></span>' : '') . (!empty($li['label']) ? $li['label'] : '') . '
657 657
 				</a>';
658 658
 
659 659
 		$html .= '
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 	foreach ($list_items as $key => $li)
666 666
 	{
667 667
 		// Handle the sublist
668
-		if($key == 'more')
668
+		if ($key == 'more')
669 669
 		{
670 670
 			$output .= '
671 671
 			<li class="post_options">' . $txt['post_options'] . '
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 		</ul><!-- .quickbuttons -->';
688 688
 
689 689
 	// There are a few spots where the result needs to be returned
690
-	if($output_method == 'echo')
690
+	if ($output_method == 'echo')
691 691
 		echo $output;
692 692
 	else
693 693
 		return $output;
Please login to merge, or discard this patch.
Themes/default/ModerationCenter.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -393,17 +393,17 @@  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
-				'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>',
406
+				'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>',
407 407
 				'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1
408 408
 			),
409 409
 		);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	$quickbuttons = array(
469 469
 		'delete' => array(
470 470
 			'label' => $txt['remove_message'],
471
-			'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
471
+			'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
472 472
 			'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure"',
473 473
 			'icon' => 'remove_button',
474 474
 			'show' => $post['can_delete']
Please login to merge, or discard this patch.
Themes/default/BoardIndex.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 					</div>';
108 108
 
109 109
 			// Show the last post if there is one.
110
-			if(!empty($board['last_post']['id']))
110
+			if (!empty($board['last_post']['id']))
111 111
 				echo'
112 112
 					<div class="lastpost lpr_border">
113 113
 						', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
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/random_compat/byte_safe_strings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
                 }
181 181
 
182 182
                 return (string) substr(
183
-                    (string )$binary_string,
183
+                    (string) $binary_string,
184 184
                     (int) $start,
185 185
                     (int) $length
186 186
                 );
Please login to merge, or discard this patch.
Sources/ManageSmileys.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1997,7 +1997,7 @@
 block discarded – undo
1997 1997
 	// Remove anything that isn't actually new from our list of files
1998 1998
 	foreach ($to_unset as $key => $ids)
1999 1999
 	{
2000
-		if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true)
2000
+		if (array_reduce($ids, function($carry, $item) { return $carry * $item; }, true) == true)
2001 2001
 			unset($smiley_files[$key]);
2002 2002
 	}
2003 2003
 
Please login to merge, or discard this patch.
Sources/Subs-Db-mysql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -982,7 +982,7 @@
 block discarded – undo
982 982
 	else
983 983
 	{
984 984
 		$return = array();
985
-		while($row = mysqli_fetch_assoc($request))
985
+		while ($row = mysqli_fetch_assoc($request))
986 986
 			$return[] = $row;
987 987
 	}
988 988
 	return !empty($return) ? $return : array();
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 			{
392 392
 				$val = 'CASE ';
393 393
 				foreach ($members as $k => $v)
394
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
394
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
395 395
 				$val = $val . ' END';
396 396
 				$type = 'raw';
397 397
 			}
@@ -1051,11 +1051,11 @@  discard block
 block discarded – undo
1051 1051
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1052 1052
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1053 1053
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1054
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1054
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1055 1055
 			// Unwanted trailing punctuation and whitespace.
1056
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1056
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1057 1057
 			// Unwanted opening punctuation and whitespace.
1058
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1058
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1059 1059
 		),
1060 1060
 		array(
1061 1061
 			'',
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 				'type' => 'unparsed_commas_content',
1596 1596
 				'test' => '\d+,\d+\]',
1597 1597
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1598
-				'validate' => function (&$tag, &$data, $disabled)
1598
+				'validate' => function(&$tag, &$data, $disabled)
1599 1599
 				{
1600 1600
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1601 1601
 					if (empty($scheme))
@@ -2155,7 +2155,7 @@  discard block
 block discarded – undo
2155 2155
 		$codes[] = array(
2156 2156
 			'tag' => 'cowsay',
2157 2157
 			'parameters' => array(
2158
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2158
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2159 2159
 					{
2160 2160
 						static $css_added;
2161 2161
 
@@ -2172,7 +2172,7 @@  discard block
 block discarded – undo
2172 2172
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2173 2173
 					},
2174 2174
 				),
2175
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2175
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2176 2176
 					{
2177 2177
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2178 2178
 					},
@@ -4145,7 +4145,7 @@  discard block
 block discarded – undo
4145 4145
 	$toMinify = array();
4146 4146
 	$normal = array();
4147 4147
 
4148
-	usort($context['css_files'], function ($a, $b)
4148
+	usort($context['css_files'], function($a, $b)
4149 4149
 	{
4150 4150
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4151 4151
 	});
@@ -5610,15 +5610,15 @@  discard block
 block discarded – undo
5610 5610
 
5611 5611
 	// UTF-8 occurences of MS special characters
5612 5612
 	$findchars_utf8 = array(
5613
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5614
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5615
-		"\xe2\x80\xa6",	// horizontal ellipsis
5616
-		"\xe2\x80\x98",	// left single curly quote
5617
-		"\xe2\x80\x99",	// right single curly quote
5618
-		"\xe2\x80\x9c",	// left double curly quote
5619
-		"\xe2\x80\x9d",	// right double curly quote
5620
-		"\xe2\x80\x93",	// en dash
5621
-		"\xe2\x80\x94",	// em dash
5613
+		"\xe2\x80\x9a", // single low-9 quotation mark
5614
+		"\xe2\x80\x9e", // double low-9 quotation mark
5615
+		"\xe2\x80\xa6", // horizontal ellipsis
5616
+		"\xe2\x80\x98", // left single curly quote
5617
+		"\xe2\x80\x99", // right single curly quote
5618
+		"\xe2\x80\x9c", // left double curly quote
5619
+		"\xe2\x80\x9d", // right double curly quote
5620
+		"\xe2\x80\x93", // en dash
5621
+		"\xe2\x80\x94", // em dash
5622 5622
 	);
5623 5623
 
5624 5624
 	// windows 1252 / iso equivalents
@@ -5636,15 +5636,15 @@  discard block
 block discarded – undo
5636 5636
 
5637 5637
 	// safe replacements
5638 5638
 	$replacechars = array(
5639
-		',',	// &sbquo;
5640
-		',,',	// &bdquo;
5641
-		'...',	// &hellip;
5642
-		"'",	// &lsquo;
5643
-		"'",	// &rsquo;
5644
-		'"',	// &ldquo;
5645
-		'"',	// &rdquo;
5646
-		'-',	// &ndash;
5647
-		'--',	// &mdash;
5639
+		',', // &sbquo;
5640
+		',,', // &bdquo;
5641
+		'...', // &hellip;
5642
+		"'", // &lsquo;
5643
+		"'", // &rsquo;
5644
+		'"', // &ldquo;
5645
+		'"', // &rdquo;
5646
+		'-', // &ndash;
5647
+		'--', // &mdash;
5648 5648
 	);
5649 5649
 
5650 5650
 	if ($context['utf8'])
@@ -6774,7 +6774,7 @@  discard block
 block discarded – undo
6774 6774
 			EXISTS (
6775 6775
 				SELECT bpv.id_board
6776 6776
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6777
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
6777
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
6778 6778
 					AND bpv.deny = 0
6779 6779
 					AND bpv.id_board = b.id_board
6780 6780
 			)';
@@ -6784,7 +6784,7 @@  discard block
 block discarded – undo
6784 6784
 			AND NOT EXISTS (
6785 6785
 				SELECT bpv.id_board
6786 6786
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6787
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
6787
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
6788 6788
 					AND bpv.deny = 1
6789 6789
 					AND bpv.id_board = b.id_board
6790 6790
 			)';
@@ -7047,8 +7047,8 @@  discard block
 block discarded – undo
7047 7047
 	$i = 0;
7048 7048
 	while (empty($done))
7049 7049
 	{
7050
-		if (strpos($format, '{'. --$i . '}') !== false)
7051
-			$replacements['{'. $i . '}'] = array_pop($list);
7050
+		if (strpos($format, '{' . --$i . '}') !== false)
7051
+			$replacements['{' . $i . '}'] = array_pop($list);
7052 7052
 		else
7053 7053
 			$done = true;
7054 7054
 	}
@@ -7058,8 +7058,8 @@  discard block
 block discarded – undo
7058 7058
 	$i = 0;
7059 7059
 	while (empty($done))
7060 7060
 	{
7061
-		if (strpos($format, '{'. ++$i . '}') !== false)
7062
-			$replacements['{'. $i . '}'] = array_shift($list);
7061
+		if (strpos($format, '{' . ++$i . '}') !== false)
7062
+			$replacements['{' . $i . '}'] = array_shift($list);
7063 7063
 		else
7064 7064
 			$done = true;
7065 7065
 	}
Please login to merge, or discard this patch.
Sources/Class-Punycode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 				}
146 146
 				if ($c === $n) {
147 147
 					$q = $delta;
148
-					for ($k = static::BASE;; $k += static::BASE) {
148
+					for ($k = static::BASE; ; $k += static::BASE) {
149 149
 						$t = $this->calculateThreshold($k, $bias);
150 150
 						if ($q < $t) {
151 151
 							break;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			$oldi = $i;
228 228
 			$w = 1;
229 229
 
230
-			for ($k = static::BASE;; $k += static::BASE)
230
+			for ($k = static::BASE; ; $k += static::BASE)
231 231
 			{
232 232
 				$digit = static::$decodeTable[$input[$pos++]];
233 233
 				$i = $i + ($digit * $w);
Please login to merge, or discard this patch.