Completed
Pull Request — release-2.1 (#3761)
by Rick
07:38
created
Sources/CacheAPI-memcached.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 			$server = trim($servers[array_rand($servers)]);
62 62
 
63 63
 			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
-			if (strpos($server,'/') !== false)
64
+			if (strpos($server, '/') !== false)
65 65
 				$host = $server;
66 66
 			else
67 67
 			{
Please login to merge, or discard this patch.
Sources/Calendar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,8 +240,8 @@
 block discarded – undo
240 240
 		$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
241 241
 
242 242
 	$js_time_string = str_replace(
243
-		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
244
-		array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
243
+		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
244
+		array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
245 245
 		$time_string
246 246
 	);
247 247
 
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1622,8 +1622,7 @@
 block discarded – undo
1622 1622
 	updateStats('topic');
1623 1623
 
1624 1624
 	// This function is needed to do the updateStats('subject') call.
1625
-	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' :
1626
-		function($string){
1625
+	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) {
1627 1626
 			global $sourcedir;
1628 1627
 			if (function_exists('mb_strtolower'))
1629 1628
 				return mb_strtolower($string, 'UTF-8');
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3031,8 +3031,7 @@
 block discarded – undo
3031 3031
 							<div class="roundframe">
3032 3032
 								<div>
3033 3033
 		', !empty($context['tfa_backup']) ? '
3034
-									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' :
3035
-			($modSettings['tfa_mode'] == 2 ? '
3034
+									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? '
3036 3035
 									<div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), '
3037 3036
 									<div class="smalltext">', $txt['tfa_desc'], '</div>
3038 3037
 									<div id="basicinfo" style="width: 60%">
Please login to merge, or discard this patch.
Themes/default/Recent.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	<div id="recent" class="main_section">
22 22
 		<div class="cat_bar">
23 23
 			<h3 class="catbg">
24
-				<span class="xx"></span>',$txt['recent_posts'],'
24
+				<span class="xx"></span>',$txt['recent_posts'], '
25 25
 			</h3>
26 26
 		</div>
27 27
 		<div class="pagesection">', $context['page_index'], '</div>';
Please login to merge, or discard this patch.
Sources/Post.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,8 +259,8 @@
 block discarded – undo
259 259
 			$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
260 260
 
261 261
 		$js_time_string = str_replace(
262
-			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
263
-			array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
262
+			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
263
+			array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
264 264
 			$time_string
265 265
 		);
266 266
 
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Spacing   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -3122,94 +3122,94 @@
 block discarded – undo
3122 3122
 		// Translation table for the character sets not native for MySQL.
3123 3123
 		$translation_tables = array(
3124 3124
 			'windows-1255' => array(
3125
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
3126
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
3127
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
3128
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
3129
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
3130
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
3131
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '0xD792',
3132
-				'0xFC' => '0xE282AC',		'0xFF' => '0xD6B2',		'0xC2' => '0xFF',
3133
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
3134
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
3135
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
3136
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
3137
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
3138
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
3139
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
3140
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
3141
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
3142
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
3143
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
3144
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
3145
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
3146
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
3147
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
3148
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
3149
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
3150
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
3151
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
3152
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
3153
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
3154
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
3155
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
3156
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
3157
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
3158
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
3159
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
3160
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
3161
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
3162
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
3163
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
3164
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
3165
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
3166
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
3125
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
3126
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
3127
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
3128
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
3129
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
3130
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
3131
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792',
3132
+				'0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF',
3133
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
3134
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
3135
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
3136
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
3137
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
3138
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
3139
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
3140
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
3141
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
3142
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
3143
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
3144
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
3145
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
3146
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
3147
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
3148
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
3149
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
3150
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
3151
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
3152
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
3153
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
3154
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
3155
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
3156
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
3157
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
3158
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
3159
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
3160
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
3161
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
3162
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
3163
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
3164
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
3165
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
3166
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
3167 3167
 				'0xFA' => '0xD7AA',
3168 3168
 			),
3169 3169
 			'windows-1253' => array(
3170
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
3171
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
3172
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
3173
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
3174
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
3175
-				'0xD2' => '0xE282AC',			'0xFF' => '0xCE92',			'0xCE' => '0xCE9E',
3176
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
3177
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
3178
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
3179
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
3180
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
3181
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
3182
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
3183
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
3184
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
3185
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
3186
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
3187
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
3188
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
3189
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
3190
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
3191
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
3192
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
3193
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
3194
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
3195
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
3196
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
3197
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
3198
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
3199
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
3200
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
3201
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
3202
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
3203
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
3204
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
3205
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
3206
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
3207
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
3208
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
3209
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
3210
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
3211
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
3212
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',
3170
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
3171
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
3172
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
3173
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
3174
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
3175
+				'0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E',
3176
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
3177
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
3178
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
3179
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
3180
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
3181
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
3182
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
3183
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
3184
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
3185
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
3186
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
3187
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
3188
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
3189
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
3190
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
3191
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
3192
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
3193
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
3194
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
3195
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
3196
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
3197
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
3198
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
3199
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
3200
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
3201
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
3202
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
3203
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
3204
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
3205
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
3206
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
3207
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
3208
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
3209
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
3210
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
3211
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
3212
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E',
3213 3213
 			),
3214 3214
 		);
3215 3215
 
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 					'height' => array('optional' => true, 'match' => '(\d+)'),
1098 1098
 				),
1099 1099
 				'content' => '$1',
1100
-				'validate' => function (&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1100
+				'validate' => function(&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1101 1101
 				{
1102 1102
 					$returnContext = '';
1103 1103
 
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 						}
1133 1133
 
1134 1134
 						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}']))
1135
-							$returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '"></a>';
1135
+							$returnContext .= '<a href="' . $currentAttachment['href'] . ';image" id="link_' . $currentAttachment['id'] . '" onclick="' . $currentAttachment['thumbnail']['javascript'] . '"><img src="' . $currentAttachment['thumbnail']['href'] . '"' . $alt . $title . ' id="thumb_' . $currentAttachment['id'] . '"></a>';
1136 1136
 						else
1137 1137
 							$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . '/>';
1138 1138
 					}
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 				'type' => 'unparsed_content',
1162 1162
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1163 1163
 				// @todo Maybe this can be simplified?
1164
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1164
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1165 1165
 				{
1166 1166
 					if (!isset($disabled['code']))
1167 1167
 					{
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
 				'type' => 'unparsed_equals_content',
1199 1199
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> ($2) <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1200 1200
 				// @todo Maybe this can be simplified?
1201
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1201
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1202 1202
 				{
1203 1203
 					if (!isset($disabled['code']))
1204 1204
 					{
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 				'type' => 'unparsed_content',
1243 1243
 				'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
1244 1244
 				// @todo Should this respect guest_hideContacts?
1245
-				'validate' => function (&$tag, &$data, $disabled)
1245
+				'validate' => function(&$tag, &$data, $disabled)
1246 1246
 				{
1247 1247
 					$data = strtr($data, array('<br>' => ''));
1248 1248
 				},
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
 				'type' => 'unparsed_commas_content',
1262 1262
 				'test' => '\d+,\d+\]',
1263 1263
 				'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
1264
-				'validate' => function (&$tag, &$data, $disabled)
1264
+				'validate' => function(&$tag, &$data, $disabled)
1265 1265
 				{
1266 1266
 					if (isset($disabled['url']))
1267 1267
 						$tag['content'] = '$1';
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1307 1307
 				),
1308 1308
 				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1309
-				'validate' => function (&$tag, &$data, $disabled)
1309
+				'validate' => function(&$tag, &$data, $disabled)
1310 1310
 				{
1311 1311
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1312 1312
 
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
 				'tag' => 'img',
1330 1330
 				'type' => 'unparsed_content',
1331 1331
 				'content' => '<img src="$1" alt="" class="bbc_img">',
1332
-				'validate' => function (&$tag, &$data, $disabled)
1332
+				'validate' => function(&$tag, &$data, $disabled)
1333 1333
 				{
1334 1334
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1335 1335
 
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
 				'tag' => 'iurl',
1353 1353
 				'type' => 'unparsed_content',
1354 1354
 				'content' => '<a href="$1" class="bbc_link">$1</a>',
1355
-				'validate' => function (&$tag, &$data, $disabled)
1355
+				'validate' => function(&$tag, &$data, $disabled)
1356 1356
 				{
1357 1357
 					$data = strtr($data, array('<br>' => ''));
1358 1358
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
 				'quoted' => 'optional',
1367 1367
 				'before' => '<a href="$1" class="bbc_link">',
1368 1368
 				'after' => '</a>',
1369
-				'validate' => function (&$tag, &$data, $disabled)
1369
+				'validate' => function(&$tag, &$data, $disabled)
1370 1370
 				{
1371 1371
 					if (substr($data, 0, 1) == '#')
1372 1372
 						$data = '#post_' . substr($data, 1);
@@ -1446,7 +1446,7 @@  discard block
 block discarded – undo
1446 1446
 				'tag' => 'php',
1447 1447
 				'type' => 'unparsed_content',
1448 1448
 				'content' => '<span class="phpcode">$1</span>',
1449
-				'validate' => isset($disabled['php']) ? null : function (&$tag, &$data, $disabled)
1449
+				'validate' => isset($disabled['php']) ? null : function(&$tag, &$data, $disabled)
1450 1450
 				{
1451 1451
 					if (!isset($disabled['php']))
1452 1452
 					{
@@ -1544,7 +1544,7 @@  discard block
 block discarded – undo
1544 1544
 				'test' => '[1-7]\]',
1545 1545
 				'before' => '<span style="font-size: $1;" class="bbc_size">',
1546 1546
 				'after' => '</span>',
1547
-				'validate' => function (&$tag, &$data, $disabled)
1547
+				'validate' => function(&$tag, &$data, $disabled)
1548 1548
 				{
1549 1549
 					$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
1550 1550
 					$data = $sizes[$data] . 'em';
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
 				'tag' => 'time',
1583 1583
 				'type' => 'unparsed_content',
1584 1584
 				'content' => '$1',
1585
-				'validate' => function (&$tag, &$data, $disabled)
1585
+				'validate' => function(&$tag, &$data, $disabled)
1586 1586
 				{
1587 1587
 					if (is_numeric($data))
1588 1588
 						$data = timeformat($data);
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
 				'tag' => 'url',
1611 1611
 				'type' => 'unparsed_content',
1612 1612
 				'content' => '<a href="$1" class="bbc_link" target="_blank">$1</a>',
1613
-				'validate' => function (&$tag, &$data, $disabled)
1613
+				'validate' => function(&$tag, &$data, $disabled)
1614 1614
 				{
1615 1615
 					$data = strtr($data, array('<br>' => ''));
1616 1616
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
 				'quoted' => 'optional',
1625 1625
 				'before' => '<a href="$1" class="bbc_link" target="_blank">',
1626 1626
 				'after' => '</a>',
1627
-				'validate' => function (&$tag, &$data, $disabled)
1627
+				'validate' => function(&$tag, &$data, $disabled)
1628 1628
 				{
1629 1629
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1630 1630
 					if (empty($scheme))
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
 		{
1651 1651
 			if (isset($temp_bbc))
1652 1652
 				$bbc_codes = $temp_bbc;
1653
-			usort($codes, function ($a, $b) {
1653
+			usort($codes, function($a, $b) {
1654 1654
 				return strcmp($a['tag'], $b['tag']);
1655 1655
 			});
1656 1656
 			return $codes;
@@ -1890,7 +1890,7 @@  discard block
 block discarded – undo
1890 1890
 										# a run of Unicode domain name characters and a dot
1891 1891
 										[\p{L}\p{M}\p{N}\-.:@]+\.
1892 1892
 										# and then a TLD valid in the DNS or the reserved "local" TLD
1893
-										(?:'. $modSettings['tld_regex'] .'|local)
1893
+										(?:'. $modSettings['tld_regex'] . '|local)
1894 1894
 									)
1895 1895
 									# followed by a non-domain character or end of line
1896 1896
 									(?=[^\p{L}\p{N}\-.]|$)
@@ -1958,7 +1958,7 @@  discard block
 block discarded – undo
1958 1958
 						)?
1959 1959
 						';
1960 1960
 
1961
-						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) {
1961
+						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) {
1962 1962
 							$url = array_shift($matches);
1963 1963
 
1964 1964
 							$scheme = parse_url($url, PHP_URL_SCHEME);
@@ -2687,7 +2687,7 @@  discard block
 block discarded – undo
2687 2687
 		for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2688 2688
 		{
2689 2689
 			$specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES);
2690
-			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')). '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2690
+			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2691 2691
 
2692 2692
 			$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2693 2693
 
@@ -2704,7 +2704,7 @@  discard block
 block discarded – undo
2704 2704
 
2705 2705
 	// Replace away!
2706 2706
 	$message = preg_replace_callback($smileyPregSearch,
2707
-		function ($matches) use ($smileyPregReplacements)
2707
+		function($matches) use ($smileyPregReplacements)
2708 2708
 		{
2709 2709
 			return $smileyPregReplacements[$matches[1]];
2710 2710
 		}, $message);
@@ -2770,13 +2770,13 @@  discard block
 block discarded – undo
2770 2770
 	{
2771 2771
 		if (defined('SID') && SID != '')
2772 2772
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2773
-				function ($m) use ($scripturl)
2773
+				function($m) use ($scripturl)
2774 2774
 				{
2775
-					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2775
+					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : "");
2776 2776
 				}, $setLocation);
2777 2777
 		else
2778 2778
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2779
-				function ($m) use ($scripturl)
2779
+				function($m) use ($scripturl)
2780 2780
 				{
2781 2781
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2782 2782
 				}, $setLocation);
@@ -3099,7 +3099,7 @@  discard block
 block discarded – undo
3099 3099
 
3100 3100
 	// Add a generic "Are you sure?" confirmation message.
3101 3101
 	addInlineJavaScript('
3102
-	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3102
+	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';');
3103 3103
 
3104 3104
 	// Now add the capping code for avatars.
3105 3105
 	if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize')
@@ -3463,7 +3463,7 @@  discard block
 block discarded – undo
3463 3463
 
3464 3464
 		else
3465 3465
 			echo '
3466
-	<script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>';
3466
+	<script src="', $settings['theme_url'], '/scripts/minified', ($do_deferred ? '_deferred' : ''), '.js', $minSeed, '"></script>';
3467 3467
 	}
3468 3468
 
3469 3469
 	// Inline JavaScript - Actually useful some times!
@@ -3541,14 +3541,14 @@  discard block
 block discarded – undo
3541 3541
 
3542 3542
 		else
3543 3543
 			echo '
3544
-	<link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">';
3544
+	<link rel="stylesheet" href="', $settings['theme_url'], '/css/minified.css', $minSeed, '">';
3545 3545
 	}
3546 3546
 
3547 3547
 	// Print the rest after the minified files.
3548 3548
 	if (!empty($normal))
3549 3549
 		foreach ($normal as $nf)
3550 3550
 			echo '
3551
-	<link rel="stylesheet" href="', $nf ,'">';
3551
+	<link rel="stylesheet" href="', $nf, '">';
3552 3552
 
3553 3553
 	if ($db_show_debug === true)
3554 3554
 	{
@@ -3564,7 +3564,7 @@  discard block
 block discarded – undo
3564 3564
 	<style>';
3565 3565
 
3566 3566
 		foreach ($context['css_header'] as $css)
3567
-			echo $css .'
3567
+			echo $css . '
3568 3568
 	';
3569 3569
 
3570 3570
 		echo'
@@ -3594,7 +3594,7 @@  discard block
 block discarded – undo
3594 3594
 		return false;
3595 3595
 
3596 3596
 	// Did we already did this?
3597
-	$toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400);
3597
+	$toCache = cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type, 86400);
3598 3598
 
3599 3599
 	// Already done?
3600 3600
 	if (!empty($toCache))
@@ -3602,25 +3602,25 @@  discard block
 block discarded – undo
3602 3602
 
3603 3603
 	// Yep, need a bunch of files.
3604 3604
 	require_once($sourcedir . '/minify/src/Minify.php');
3605
-	require_once($sourcedir . '/minify/src/'. strtoupper($type) .'.php');
3605
+	require_once($sourcedir . '/minify/src/' . strtoupper($type) . '.php');
3606 3606
 	require_once($sourcedir . '/minify/src/Exception.php');
3607 3607
 	require_once($sourcedir . '/minify/src/Converter.php');
3608 3608
 
3609 3609
 	// No namespaces, sorry!
3610
-	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
3610
+	$classType = 'MatthiasMullie\\Minify\\' . strtoupper($type);
3611 3611
 
3612 3612
 	// Temp path.
3613
-	$cTempPath = $settings['theme_dir'] .'/'. ($type == 'css' ? 'css' : 'scripts') .'/';
3613
+	$cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/';
3614 3614
 
3615 3615
 	// What kind of file are we going to create?
3616
-	$toCreate = $cTempPath .'minified'. ($do_deferred ? '_deferred' : '') .'.'. $type;
3616
+	$toCreate = $cTempPath . 'minified' . ($do_deferred ? '_deferred' : '') . '.' . $type;
3617 3617
 
3618 3618
 	// File has to exists, if it isn't try to create it.
3619 3619
 	if ((!file_exists($toCreate) && @fopen($toCreate, 'w') === false) || !smf_chmod($toCreate))
3620 3620
 	{
3621 3621
 		loadLanguage('Errors');
3622 3622
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3623
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3623
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3624 3624
 
3625 3625
 		// The process failed so roll back to print each individual file.
3626 3626
 		return $data;
@@ -3655,14 +3655,14 @@  discard block
 block discarded – undo
3655 3655
 	{
3656 3656
 		loadLanguage('Errors');
3657 3657
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3658
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3658
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3659 3659
 
3660 3660
 		// The process failed so roll back to print each individual file.
3661 3661
 		return $data;
3662 3662
 	}
3663 3663
 
3664 3664
 	// And create a long lived cache entry.
3665
-	cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, $toCreate, 86400);
3665
+	cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, $toCreate, 86400);
3666 3666
 
3667 3667
 	return true;
3668 3668
 }
@@ -3719,7 +3719,7 @@  discard block
 block discarded – undo
3719 3719
 	else
3720 3720
 		$path = $modSettings['attachmentUploadDir'];
3721 3721
 
3722
-	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3722
+	return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
3723 3723
 }
3724 3724
 
3725 3725
 /**
@@ -3763,10 +3763,10 @@  discard block
 block discarded – undo
3763 3763
 		$valid_low = isValidIP($ip_parts[0]);
3764 3764
 		$valid_high = isValidIP($ip_parts[1]);
3765 3765
 		$count = 0;
3766
-		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3766
+		$mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.');
3767 3767
 		$max = ($mode == ':' ? 'ffff' : '255');
3768 3768
 		$min = 0;
3769
-		if(!$valid_low)
3769
+		if (!$valid_low)
3770 3770
 		{
3771 3771
 			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3772 3772
 			$valid_low = isValidIP($ip_parts[0]);
@@ -3780,7 +3780,7 @@  discard block
 block discarded – undo
3780 3780
 		}
3781 3781
 
3782 3782
 		$count = 0;
3783
-		if(!$valid_high)
3783
+		if (!$valid_high)
3784 3784
 		{
3785 3785
 			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3786 3786
 			$valid_high = isValidIP($ip_parts[1]);
@@ -3793,7 +3793,7 @@  discard block
 block discarded – undo
3793 3793
 			}
3794 3794
 		}
3795 3795
 
3796
-		if($valid_high && $valid_low)
3796
+		if ($valid_high && $valid_low)
3797 3797
 		{
3798 3798
 			$ip_array['low'] = $ip_parts[0];
3799 3799
 			$ip_array['high'] = $ip_parts[1];
@@ -3975,7 +3975,7 @@  discard block
 block discarded – undo
3975 3975
 		addInlineJavaScript('
3976 3976
 	var user_menus = new smc_PopupMenu();
3977 3977
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
3978
-	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
3978
+	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true);
3979 3979
 		if ($context['allow_pm'])
3980 3980
 			addInlineJavaScript('
3981 3981
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
@@ -4603,7 +4603,7 @@  discard block
 block discarded – undo
4603 4603
 		// No? try a fallback to $sourcedir
4604 4604
 		else
4605 4605
 		{
4606
-			$absPath = $sourcedir .'/'. $file;
4606
+			$absPath = $sourcedir . '/' . $file;
4607 4607
 
4608 4608
 			if (file_exists($absPath))
4609 4609
 				require_once($absPath);
@@ -4684,15 +4684,15 @@  discard block
 block discarded – undo
4684 4684
 
4685 4685
 	// UTF-8 occurences of MS special characters
4686 4686
 	$findchars_utf8 = array(
4687
-		"\xe2\80\x9a",	// single low-9 quotation mark
4688
-		"\xe2\80\x9e",	// double low-9 quotation mark
4689
-		"\xe2\80\xa6",	// horizontal ellipsis
4690
-		"\xe2\x80\x98",	// left single curly quote
4691
-		"\xe2\x80\x99",	// right single curly quote
4692
-		"\xe2\x80\x9c",	// left double curly quote
4693
-		"\xe2\x80\x9d",	// right double curly quote
4694
-		"\xe2\x80\x93",	// en dash
4695
-		"\xe2\x80\x94",	// em dash
4687
+		"\xe2\80\x9a", // single low-9 quotation mark
4688
+		"\xe2\80\x9e", // double low-9 quotation mark
4689
+		"\xe2\80\xa6", // horizontal ellipsis
4690
+		"\xe2\x80\x98", // left single curly quote
4691
+		"\xe2\x80\x99", // right single curly quote
4692
+		"\xe2\x80\x9c", // left double curly quote
4693
+		"\xe2\x80\x9d", // right double curly quote
4694
+		"\xe2\x80\x93", // en dash
4695
+		"\xe2\x80\x94", // em dash
4696 4696
 	);
4697 4697
 
4698 4698
 	// windows 1252 / iso equivalents
@@ -4710,15 +4710,15 @@  discard block
 block discarded – undo
4710 4710
 
4711 4711
 	// safe replacements
4712 4712
 	$replacechars = array(
4713
-		',',	// &sbquo;
4714
-		',,',	// &bdquo;
4715
-		'...',	// &hellip;
4716
-		"'",	// &lsquo;
4717
-		"'",	// &rsquo;
4718
-		'"',	// &ldquo;
4719
-		'"',	// &rdquo;
4720
-		'-',	// &ndash;
4721
-		'--',	// &mdash;
4713
+		',', // &sbquo;
4714
+		',,', // &bdquo;
4715
+		'...', // &hellip;
4716
+		"'", // &lsquo;
4717
+		"'", // &rsquo;
4718
+		'"', // &ldquo;
4719
+		'"', // &rdquo;
4720
+		'-', // &ndash;
4721
+		'--', // &mdash;
4722 4722
 	);
4723 4723
 
4724 4724
 	if ($context['utf8'])
@@ -5081,7 +5081,7 @@  discard block
 block discarded – undo
5081 5081
  */
5082 5082
 function inet_dtop($bin)
5083 5083
 {
5084
-	if(empty($bin))
5084
+	if (empty($bin))
5085 5085
 		return '';
5086 5086
 
5087 5087
 	global $db_type;
@@ -5112,28 +5112,28 @@  discard block
 block discarded – undo
5112 5112
  */
5113 5113
 function _safe_serialize($value)
5114 5114
 {
5115
-	if(is_null($value))
5115
+	if (is_null($value))
5116 5116
 		return 'N;';
5117 5117
 
5118
-	if(is_bool($value))
5119
-		return 'b:'. (int) $value .';';
5118
+	if (is_bool($value))
5119
+		return 'b:' . (int) $value . ';';
5120 5120
 
5121
-	if(is_int($value))
5122
-		return 'i:'. $value .';';
5121
+	if (is_int($value))
5122
+		return 'i:' . $value . ';';
5123 5123
 
5124
-	if(is_float($value))
5125
-		return 'd:'. str_replace(',', '.', $value) .';';
5124
+	if (is_float($value))
5125
+		return 'd:' . str_replace(',', '.', $value) . ';';
5126 5126
 
5127
-	if(is_string($value))
5128
-		return 's:'. strlen($value) .':"'. $value .'";';
5127
+	if (is_string($value))
5128
+		return 's:' . strlen($value) . ':"' . $value . '";';
5129 5129
 
5130
-	if(is_array($value))
5130
+	if (is_array($value))
5131 5131
 	{
5132 5132
 		$out = '';
5133
-		foreach($value as $k => $v)
5133
+		foreach ($value as $k => $v)
5134 5134
 			$out .= _safe_serialize($k) . _safe_serialize($v);
5135 5135
 
5136
-		return 'a:'. count($value) .':{'. $out .'}';
5136
+		return 'a:' . count($value) . ':{' . $out . '}';
5137 5137
 	}
5138 5138
 
5139 5139
 	// safe_serialize cannot serialize resources or objects.
@@ -5175,7 +5175,7 @@  discard block
 block discarded – undo
5175 5175
 function _safe_unserialize($str)
5176 5176
 {
5177 5177
 	// Input  is not a string.
5178
-	if(empty($str) || !is_string($str))
5178
+	if (empty($str) || !is_string($str))
5179 5179
 		return false;
5180 5180
 
5181 5181
 	$stack = array();
@@ -5189,40 +5189,40 @@  discard block
 block discarded – undo
5189 5189
 	 *   3 - in array, expecting value or another array
5190 5190
 	 */
5191 5191
 	$state = 0;
5192
-	while($state != 1)
5192
+	while ($state != 1)
5193 5193
 	{
5194 5194
 		$type = isset($str[0]) ? $str[0] : '';
5195
-		if($type == '}')
5195
+		if ($type == '}')
5196 5196
 			$str = substr($str, 1);
5197 5197
 
5198
-		else if($type == 'N' && $str[1] == ';')
5198
+		else if ($type == 'N' && $str[1] == ';')
5199 5199
 		{
5200 5200
 			$value = null;
5201 5201
 			$str = substr($str, 2);
5202 5202
 		}
5203
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5203
+		else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5204 5204
 		{
5205 5205
 			$value = $matches[1] == '1' ? true : false;
5206 5206
 			$str = substr($str, 4);
5207 5207
 		}
5208
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5208
+		else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5209 5209
 		{
5210
-			$value = (int)$matches[1];
5210
+			$value = (int) $matches[1];
5211 5211
 			$str = $matches[2];
5212 5212
 		}
5213
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5213
+		else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5214 5214
 		{
5215
-			$value = (float)$matches[1];
5215
+			$value = (float) $matches[1];
5216 5216
 			$str = $matches[3];
5217 5217
 		}
5218
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5218
+		else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";')
5219 5219
 		{
5220
-			$value = substr($matches[2], 0, (int)$matches[1]);
5221
-			$str = substr($matches[2], (int)$matches[1] + 2);
5220
+			$value = substr($matches[2], 0, (int) $matches[1]);
5221
+			$str = substr($matches[2], (int) $matches[1] + 2);
5222 5222
 		}
5223
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5223
+		else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5224 5224
 		{
5225
-			$expectedLength = (int)$matches[1];
5225
+			$expectedLength = (int) $matches[1];
5226 5226
 			$str = $matches[2];
5227 5227
 		}
5228 5228
 
@@ -5230,10 +5230,10 @@  discard block
 block discarded – undo
5230 5230
 		else
5231 5231
 			return false;
5232 5232
 
5233
-		switch($state)
5233
+		switch ($state)
5234 5234
 		{
5235 5235
 			case 3: // In array, expecting value or another array.
5236
-				if($type == 'a')
5236
+				if ($type == 'a')
5237 5237
 				{
5238 5238
 					$stack[] = &$list;
5239 5239
 					$list[$key] = array();
@@ -5242,7 +5242,7 @@  discard block
 block discarded – undo
5242 5242
 					$state = 2;
5243 5243
 					break;
5244 5244
 				}
5245
-				if($type != '}')
5245
+				if ($type != '}')
5246 5246
 				{
5247 5247
 					$list[$key] = $value;
5248 5248
 					$state = 2;
@@ -5253,29 +5253,29 @@  discard block
 block discarded – undo
5253 5253
 				return false;
5254 5254
 
5255 5255
 			case 2: // in array, expecting end of array or a key
5256
-				if($type == '}')
5256
+				if ($type == '}')
5257 5257
 				{
5258 5258
 					// Array size is less than expected.
5259
-					if(count($list) < end($expected))
5259
+					if (count($list) < end($expected))
5260 5260
 						return false;
5261 5261
 
5262 5262
 					unset($list);
5263
-					$list = &$stack[count($stack)-1];
5263
+					$list = &$stack[count($stack) - 1];
5264 5264
 					array_pop($stack);
5265 5265
 
5266 5266
 					// Go to terminal state if we're at the end of the root array.
5267 5267
 					array_pop($expected);
5268 5268
 
5269
-					if(count($expected) == 0)
5269
+					if (count($expected) == 0)
5270 5270
 						$state = 1;
5271 5271
 
5272 5272
 					break;
5273 5273
 				}
5274 5274
 
5275
-				if($type == 'i' || $type == 's')
5275
+				if ($type == 'i' || $type == 's')
5276 5276
 				{
5277 5277
 					// Array size exceeds expected length.
5278
-					if(count($list) >= end($expected))
5278
+					if (count($list) >= end($expected))
5279 5279
 						return false;
5280 5280
 
5281 5281
 					$key = $value;
@@ -5288,7 +5288,7 @@  discard block
 block discarded – undo
5288 5288
 
5289 5289
 			// Expecting array or value.
5290 5290
 			case 0:
5291
-				if($type == 'a')
5291
+				if ($type == 'a')
5292 5292
 				{
5293 5293
 					$data = array();
5294 5294
 					$list = &$data;
@@ -5297,7 +5297,7 @@  discard block
 block discarded – undo
5297 5297
 					break;
5298 5298
 				}
5299 5299
 
5300
-				if($type != '}')
5300
+				if ($type != '}')
5301 5301
 				{
5302 5302
 					$data = $value;
5303 5303
 					$state = 1;
@@ -5310,7 +5310,7 @@  discard block
 block discarded – undo
5310 5310
 	}
5311 5311
 
5312 5312
 	// Trailing data in input.
5313
-	if(!empty($str))
5313
+	if (!empty($str))
5314 5314
 		return false;
5315 5315
 
5316 5316
 	return $data;
@@ -5364,7 +5364,7 @@  discard block
 block discarded – undo
5364 5364
 	// Set different modes.
5365 5365
 	$chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
5366 5366
 
5367
-	foreach($chmodValues as $val)
5367
+	foreach ($chmodValues as $val)
5368 5368
 	{
5369 5369
 		// If it's writable, break out of the loop.
5370 5370
 		if (is_writable($file))
@@ -5402,13 +5402,13 @@  discard block
 block discarded – undo
5402 5402
 	$returnArray = @json_decode($json, $returnAsArray);
5403 5403
 
5404 5404
 	// PHP 5.3 so no json_last_error_msg()
5405
-	switch(json_last_error())
5405
+	switch (json_last_error())
5406 5406
 	{
5407 5407
 		case JSON_ERROR_NONE:
5408 5408
 			$jsonError = false;
5409 5409
 			break;
5410 5410
 		case JSON_ERROR_DEPTH:
5411
-			$jsonError =  'JSON_ERROR_DEPTH';
5411
+			$jsonError = 'JSON_ERROR_DEPTH';
5412 5412
 			break;
5413 5413
 		case JSON_ERROR_STATE_MISMATCH:
5414 5414
 			$jsonError = 'JSON_ERROR_STATE_MISMATCH';
@@ -5436,10 +5436,10 @@  discard block
 block discarded – undo
5436 5436
 		loadLanguage('Errors');
5437 5437
 
5438 5438
 		if (!empty($jsonDebug))
5439
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5439
+			log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5440 5440
 
5441 5441
 		else
5442
-			log_error($txt['json_'. $jsonError], 'critical');
5442
+			log_error($txt['json_' . $jsonError], 'critical');
5443 5443
 
5444 5444
 		// Everyone expects an array.
5445 5445
 		return array();
@@ -5543,7 +5543,7 @@  discard block
 block discarded – undo
5543 5543
 		});
5544 5544
 
5545 5545
 		// Convert Punycode to Unicode
5546
-		$tlds = array_map(function ($input) {
5546
+		$tlds = array_map(function($input) {
5547 5547
 			$prefix = 'xn--';
5548 5548
 			$safe_char = 0xFFFC;
5549 5549
 			$base = 36;
@@ -5559,7 +5559,7 @@  discard block
 block discarded – undo
5559 5559
 
5560 5560
 			foreach ($enco_parts as $encoded)
5561 5561
 			{
5562
-				if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0)
5562
+				if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0)
5563 5563
 				{
5564 5564
 					$output_parts[] = $encoded;
5565 5565
 					continue;
@@ -5570,7 +5570,7 @@  discard block
 block discarded – undo
5570 5570
 				$idx = 0;
5571 5571
 				$char = 0x80;
5572 5572
 				$decoded = array();
5573
-				$output='';
5573
+				$output = '';
5574 5574
 				$delim_pos = strrpos($encoded, '-');
5575 5575
 
5576 5576
 				if ($delim_pos > strlen($prefix))
@@ -5586,7 +5586,7 @@  discard block
 block discarded – undo
5586 5586
 
5587 5587
 				for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len)
5588 5588
 				{
5589
-					for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base)
5589
+					for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base)
5590 5590
 					{
5591 5591
 						$cp = ord($encoded{$enco_idx++});
5592 5592
 						$digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
@@ -5627,15 +5627,15 @@  discard block
 block discarded – undo
5627 5627
 
5628 5628
 					// 2 bytes
5629 5629
 					elseif ($v < (1 << 11))
5630
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
5630
+						$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
5631 5631
 
5632 5632
 					// 3 bytes
5633 5633
 					elseif ($v < (1 << 16))
5634
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5634
+						$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5635 5635
 
5636 5636
 					// 4 bytes
5637 5637
 					elseif ($v < (1 << 21))
5638
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5638
+						$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5639 5639
 
5640 5640
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5641 5641
 					else
@@ -5742,7 +5742,7 @@  discard block
 block discarded – undo
5742 5742
 	}
5743 5743
 
5744 5744
 	// This recursive function creates the index array from the strings
5745
-	$add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5745
+	$add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5746 5746
 	{
5747 5747
 		static $depth = 0;
5748 5748
 		$depth++;
@@ -5769,7 +5769,7 @@  discard block
 block discarded – undo
5769 5769
 	};
5770 5770
 
5771 5771
 	// This recursive function turns the index array into a regular expression
5772
-	$index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex)
5772
+	$index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex)
5773 5773
 	{
5774 5774
 		static $depth = 0;
5775 5775
 		$depth++;
@@ -5793,11 +5793,11 @@  discard block
 block discarded – undo
5793 5793
 
5794 5794
 				if (count(array_keys($value)) == 1)
5795 5795
 				{
5796
-					$new_key_array = explode('(?'.'>', $sub_regex);
5796
+					$new_key_array = explode('(?' . '>', $sub_regex);
5797 5797
 					$new_key .= $new_key_array[0];
5798 5798
 				}
5799 5799
 				else
5800
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
5800
+					$sub_regex = '(?' . '>' . $sub_regex . ')';
5801 5801
 			}
5802 5802
 
5803 5803
 			if ($depth > 1)
@@ -5837,7 +5837,7 @@  discard block
 block discarded – undo
5837 5837
 		$index = $add_string_to_index($string, $index);
5838 5838
 
5839 5839
 	while (!empty($index))
5840
-		$regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
5840
+		$regexes[] = '(?' . '>' . $index_to_regex($index, $delim) . ')';
5841 5841
 
5842 5842
 	// Restore PHP's internal character encoding to whatever it was originally
5843 5843
 	if (!empty($current_encoding))
Please login to merge, or discard this patch.