Completed
Pull Request — release-2.1 (#4597)
by Michael
08:14
created
Sources/CacheAPI-postgres.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	{
166 166
 		global $db_connection, $db_prefix;
167 167
 		
168
-		pg_query($db_connection, 'CREATE LOCAL TEMP TABLE IF NOT EXISTS ' . $db_prefix . 'cache_tmp AS SELECT * FROM ' . $db_prefix . 'cache WHERE ttl >= ' . time() );
168
+		pg_query($db_connection, 'CREATE LOCAL TEMP TABLE IF NOT EXISTS ' . $db_prefix . 'cache_tmp AS SELECT * FROM ' . $db_prefix . 'cache WHERE ttl >= ' . time());
169 169
 	}
170 170
 	
171 171
 	/**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	{
190 190
 		global $db_connection, $db_prefix;
191 191
 		
192
-		pg_query($db_connection, 'INSERT INTO ' . $db_prefix . 'cache SELECT * FROM '. $db_prefix . 'cache_tmp ON CONFLICT DO NOTHING');
192
+		pg_query($db_connection, 'INSERT INTO ' . $db_prefix . 'cache SELECT * FROM ' . $db_prefix . 'cache_tmp ON CONFLICT DO NOTHING');
193 193
 	}
194 194
 }
195 195
 
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
@@ -349,7 +349,7 @@
 block discarded – undo
349 349
 			SELECT
350 350
 				t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board,
351 351
 				' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from,
352
-				' . ( $enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
352
+				' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in,
353 353
 				'	: '') . '
354 354
 				t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic,
355 355
 				ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon,
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Spacing   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -1661,7 +1661,7 @@  discard block
 block discarded – undo
1661 1661
 
1662 1662
 	// Our custom error handler - does nothing but does stop public errors from XML!
1663 1663
 	set_error_handler(
1664
-		function ($errno, $errstr, $errfile, $errline) use ($support_js)
1664
+		function($errno, $errstr, $errfile, $errline) use ($support_js)
1665 1665
 		{
1666 1666
 			if ($support_js)
1667 1667
 				return true;
@@ -2651,94 +2651,94 @@  discard block
 block discarded – undo
2651 2651
 		// Translation table for the character sets not native for MySQL.
2652 2652
 		$translation_tables = array(
2653 2653
 			'windows-1255' => array(
2654
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
2655
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
2656
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
2657
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
2658
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
2659
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
2660
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '0xD792',
2661
-				'0xFC' => '0xE282AC',		'0xFF' => '0xD6B2',		'0xC2' => '0xFF',
2662
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
2663
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
2664
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2665
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2666
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2667
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
2668
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
2669
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2670
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
2671
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
2672
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
2673
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
2674
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
2675
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
2676
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
2677
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
2678
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
2679
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2680
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
2681
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2682
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
2683
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
2684
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
2685
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
2686
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
2687
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
2688
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
2689
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
2690
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
2691
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
2692
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
2693
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
2694
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
2695
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
2654
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
2655
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
2656
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
2657
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
2658
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
2659
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
2660
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792',
2661
+				'0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF',
2662
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
2663
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
2664
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2665
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2666
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2667
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
2668
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
2669
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2670
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
2671
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
2672
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
2673
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
2674
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
2675
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
2676
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
2677
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
2678
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
2679
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2680
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
2681
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2682
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
2683
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
2684
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
2685
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
2686
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
2687
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
2688
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
2689
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
2690
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
2691
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
2692
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
2693
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
2694
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
2695
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
2696 2696
 				'0xFA' => '0xD7AA',
2697 2697
 			),
2698 2698
 			'windows-1253' => array(
2699
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
2700
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
2701
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
2702
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
2703
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
2704
-				'0xD2' => '0xE282AC',			'0xFF' => '0xCE92',			'0xCE' => '0xCE9E',
2705
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
2706
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
2707
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
2708
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
2709
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
2710
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
2711
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
2712
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
2713
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2714
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2715
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2716
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
2717
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2718
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
2719
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2720
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
2721
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
2722
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
2723
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2724
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
2725
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
2726
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
2727
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
2728
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
2729
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
2730
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
2731
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
2732
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
2733
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
2734
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
2735
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
2736
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
2737
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
2738
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
2739
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
2740
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
2741
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',
2699
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
2700
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
2701
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
2702
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
2703
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
2704
+				'0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E',
2705
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
2706
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
2707
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
2708
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
2709
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
2710
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
2711
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
2712
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
2713
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2714
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2715
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2716
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
2717
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2718
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
2719
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2720
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
2721
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
2722
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
2723
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2724
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
2725
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
2726
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
2727
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
2728
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
2729
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
2730
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
2731
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
2732
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
2733
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
2734
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
2735
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
2736
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
2737
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
2738
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
2739
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
2740
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
2741
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E',
2742 2742
 			),
2743 2743
 		);
2744 2744
 
@@ -3638,7 +3638,7 @@  discard block
 block discarded – undo
3638 3638
 
3639 3639
 		if ($active < 600)
3640 3640
 			echo '
3641
-				', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'],' ', $txt['upgrade_run_script2'], '';
3641
+				', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'], ' ', $txt['upgrade_run_script2'], '';
3642 3642
 
3643 3643
 		if ($active > $upcontext['inactive_timeout'])
3644 3644
 			echo '
@@ -3840,7 +3840,7 @@  discard block
 block discarded – undo
3840 3840
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
3841 3841
 			<input type="hidden" name="backup_done" id="backup_done" value="0">
3842 3842
 			<strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong>
3843
-			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;">
3843
+			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;">
3844 3844
 			<span id="debuginfo"></span>
3845 3845
 			</div>';
3846 3846
 
@@ -4341,7 +4341,7 @@  discard block
 block discarded – undo
4341 4341
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
4342 4342
 			<input type="hidden" name="utf8_done" id="utf8_done" value="0">
4343 4343
 			<strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong>
4344
-			<div id="debug_section" style="height: ', ($is_debug ? '97' : '12') , 'px; overflow: auto;">
4344
+			<div id="debug_section" style="height: ', ($is_debug ? '97' : '12'), 'px; overflow: auto;">
4345 4345
 			<span id="debuginfo"></span>
4346 4346
 			</div>';
4347 4347
 
@@ -4442,7 +4442,7 @@  discard block
 block discarded – undo
4442 4442
 			<form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post">
4443 4443
 			<input type="hidden" name="json_done" id="json_done" value="0">
4444 4444
 			<strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong>
4445
-			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;">
4445
+			<div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;">
4446 4446
 			<span id="debuginfo"></span>
4447 4447
 			</div>';
4448 4448
 
Please login to merge, or discard this patch.
Sources/Subs-Db-postgresql.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -199,22 +199,22 @@  discard block
 block discarded – undo
199 199
 
200 200
 		case 'date':
201 201
 			if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d)$~', $replacement, $date_matches) === 1)
202
-				return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]).'::date';
202
+				return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]) . '::date';
203 203
 			else
204 204
 				smf_db_error_backtrace('Wrong value type sent to the database. Date expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
205 205
 		break;
206 206
 
207 207
 		case 'time':
208 208
 			if (preg_match('~^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $time_matches) === 1)
209
-				return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]).'::time';
209
+				return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]) . '::time';
210 210
 			else
211 211
 				smf_db_error_backtrace('Wrong value type sent to the database. Time expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
212 212
 		break;
213 213
 
214 214
 		case 'datetime':
215 215
 			if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1)
216
-				return 'to_timestamp('.
217
-					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]).
216
+				return 'to_timestamp(' .
217
+					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) .
218 218
 					',\'YYYY-MM-DD HH24:MI:SS\')';
219 219
 			else
220 220
 				smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 		$old_pos = 0;
425 425
 		$pos = -1;
426 426
 		// Remove the string escape for better runtime
427
-		$db_string_1 = str_replace('\'\'','',$db_string);
427
+		$db_string_1 = str_replace('\'\'', '', $db_string);
428 428
 		while (true)
429 429
 		{
430 430
 			$pos = strpos($db_string_1, '\'', $pos + 1);
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 	if (!empty($keys) && (count($keys) > 0) && $returnmode > 0)
803 803
 	{
804 804
 		// we only take the first key
805
-		$returning = ' RETURNING '.$keys[0];
805
+		$returning = ' RETURNING ' . $keys[0];
806 806
 		$with_returning = true;
807 807
 	}
808 808
 
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 			INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '")
834 834
 			VALUES
835 835
 				' . implode(',
836
-				', $insertRows).$replace.$returning,
836
+				', $insertRows) . $replace . $returning,
837 837
 			array(
838 838
 				'security_override' => true,
839 839
 				'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors',
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 			if ($returnmode === 2)
847 847
 				$return_var = array();
848 848
 
849
-			while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning)
849
+			while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning)
850 850
 			{
851 851
 				if (is_numeric($row[0])) // try to emulate mysql limitation
852 852
 				{
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
  */
1010 1010
 function smf_db_custom_order($field, $array_values, $desc = false)
1011 1011
 {
1012
-	$return = 'CASE '. $field . ' ';
1012
+	$return = 'CASE ' . $field . ' ';
1013 1013
 	$count = count($array_values);
1014 1014
 	$then = ($desc ? ' THEN -' : ' THEN ');
1015 1015
 
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1697,8 +1697,7 @@  discard block
 block discarded – undo
1697 1697
 	updateStats('topic');
1698 1698
 
1699 1699
 	// This function is needed to do the updateStats('subject') call.
1700
-	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' :
1701
-		function($string){
1700
+	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) {
1702 1701
 			global $sourcedir;
1703 1702
 			if (function_exists('mb_strtolower'))
1704 1703
 				return mb_strtolower($string, 'UTF-8');
@@ -1767,7 +1766,7 @@  discard block
 block discarded – undo
1767 1766
 		if (trim($settingsArray[$i]) == 'if (file_exists(dirname(__FILE__) . \'/install.php\'))' && trim($settingsArray[$i + 1]) == '{' && trim($settingsArray[$i + 9]) == '}')
1768 1767
 		{
1769 1768
 			// Set the ten lines to nothing.
1770
-			for ($j=0; $j < 10; $j++)
1769
+			for ($j = 0; $j < 10; $j++)
1771 1770
 				$settingsArray[$i++] = '';
1772 1771
 
1773 1772
 			continue;
Please login to merge, or discard this patch.
Themes/default/GenericControls.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@
 block discarded – undo
300 300
 				echo '
301 301
 				<div class="g-recaptcha centertext" data-sitekey="' . $verify_context['recaptcha_site_key'] . '" data-theme="' . $verify_context['recaptcha_theme'] . '"></div>
302 302
 				<br>
303
-				<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang.'"></script>';
303
+				<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang . '"></script>';
304 304
 			}
305 305
 		}
306 306
 		else
Please login to merge, or discard this patch.
Sources/Subs-Db-mysql.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
 
256 256
 		case 'datetime':
257 257
 			if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1)
258
-				return 'str_to_date('.
259
-					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]).
258
+				return 'str_to_date(' .
259
+					sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) .
260 260
 					',\'%Y-%m-%d %h:%i:%s\')';
261 261
 			else
262 262
 				smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		$old_pos = 0;
461 461
 		$pos = -1;
462 462
 		// Remove the string escape for better runtime
463
-		$db_string_1 = str_replace('\\\'','',$db_string);
463
+		$db_string_1 = str_replace('\\\'', '', $db_string);
464 464
 		while (true)
465 465
 		{
466 466
 			$pos = strpos($db_string_1, '\'', $pos + 1);
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 	{
843 843
 		$count = count($insertRows);
844 844
 		$ai = 0;
845
-		for($i = 0; $i < $count; $i++)
845
+		for ($i = 0; $i < $count; $i++)
846 846
 		{
847 847
 			$old_id = $smcFunc['db_insert_id']();
848 848
 
@@ -868,13 +868,13 @@  discard block
 block discarded – undo
868 868
 				$count2 = count($indexed_columns);
869 869
 				for ($x = 0; $x < $count2; $x++)
870 870
 				{
871
-					$where_string += key($indexed_columns[$x]) . ' = '. $insertRows[$i][$x];
871
+					$where_string += key($indexed_columns[$x]) . ' = ' . $insertRows[$i][$x];
872 872
 					if (($x + 1) < $count2)
873 873
 						$where_string += ' AND ';
874 874
 				}
875 875
 
876
-				$request = $smcFunc['db_query']('','
877
-					SELECT `'. $keys[0] . '` FROM ' . $table .'
876
+				$request = $smcFunc['db_query']('', '
877
+					SELECT `'. $keys[0] . '` FROM ' . $table . '
878 878
 					WHERE ' . $where_string . ' LIMIT 1',
879 879
 					array()
880 880
 				);
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
 			$return_var = array();
904 904
 			$count = count($insertRows);
905 905
 			$start = smf_db_insert_id($table, $keys[0]);
906
-			for ($i = 0; $i < $count; $i++ )
906
+			for ($i = 0; $i < $count; $i++)
907 907
 				$return_var[] = $start + $i;
908 908
 		}
909 909
 		return $return_var;
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
 	mysqli_stmt_bind_param($mysql_error_data_prep, 'iissssssi',
1037 1037
 		$error_array[0], $error_array[1], $error_array[2], $error_array[3], $error_array[4], $error_array[5], $error_array[6],
1038 1038
 		$error_array[7], $error_array[8]);
1039
-	mysqli_stmt_execute ($mysql_error_data_prep);
1039
+	mysqli_stmt_execute($mysql_error_data_prep);
1040 1040
 }
1041 1041
 
1042 1042
 /**
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
  */
1051 1051
 function smf_db_custom_order($field, $array_values, $desc = false)
1052 1052
 {
1053
-	$return = 'CASE '. $field . ' ';
1053
+	$return = 'CASE ' . $field . ' ';
1054 1054
 	$count = count($array_values);
1055 1055
 	$then = ($desc ? ' THEN -' : ' THEN ');
1056 1056
 
Please login to merge, or discard this patch.
Sources/DbPackages-mysql.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 		{
127 127
 			$smcFunc['db_transaction']('begin');
128 128
 			$db_trans = true;
129
-			$smcFunc['db_drop_table']($table_name.'_old');
130
-			$smcFunc['db_query']('','
131
-				RENAME TABLE '. $table_name .' TO ' . $table_name . '_old',
129
+			$smcFunc['db_drop_table']($table_name . '_old');
130
+			$smcFunc['db_query']('', '
131
+				RENAME TABLE '. $table_name . ' TO ' . $table_name . '_old',
132 132
 				array(
133 133
 					'security_override' => true,
134 134
 				)
@@ -202,15 +202,15 @@  discard block
 block discarded – undo
202 202
 	{
203 203
 		$same_col = array();
204 204
 
205
-		$request = $smcFunc['db_query']('','
205
+		$request = $smcFunc['db_query']('', '
206 206
 			SELECT count(*), column_name
207 207
 			FROM information_schema.columns
208 208
 			WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema}
209 209
 			GROUP BY column_name
210 210
 			HAVING count(*) > 1',
211
-			array (
211
+			array(
212 212
 				'table1' => $table_name,
213
-				'table2' => $table_name.'_old',
213
+				'table2' => $table_name . '_old',
214 214
 				'schema' => $db_name,
215 215
 			)
216 216
 		);
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 			$same_col[] = $row['column_name'];
221 221
 		}
222 222
 
223
-		$smcFunc['db_query']('','
224
-			INSERT INTO ' . $table_name .'('
223
+		$smcFunc['db_query']('', '
224
+			INSERT INTO ' . $table_name . '('
225 225
 			. implode($same_col, ',') .
226 226
 			')
227 227
 			SELECT '. implode($same_col, ',') . '
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1746,7 +1746,7 @@  discard block
 block discarded – undo
1746 1746
 		$id_theme = $modSettings['theme_guests'];
1747 1747
 
1748 1748
 	// We already load the basic stuff?
1749
-	if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme )
1749
+	if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme)
1750 1750
 	{
1751 1751
 		// Verify the id_theme... no foul play.
1752 1752
 		// Always allow the board specific theme, if they are overriding.
@@ -2018,7 +2018,7 @@  discard block
 block discarded – undo
2018 2018
 	if (!isset($context['javascript_vars']))
2019 2019
 		$context['javascript_vars'] = array();
2020 2020
 
2021
-	$context['login_url'] =  $scripturl . '?action=login2';
2021
+	$context['login_url'] = $scripturl . '?action=login2';
2022 2022
 	$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | ';
2023 2023
 	$context['session_var'] = $_SESSION['session_var'];
2024 2024
 	$context['session_id'] = $_SESSION['session_value'];
Please login to merge, or discard this patch.