Completed
Pull Request — release-2.1 (#4029)
by Mert
09:24 queued 21s
created
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.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
  *
105 105
  * @param string $class The fully-qualified class name.
106 106
  */
107
-spl_autoload_register(function ($class) use ($sourcedir)
107
+spl_autoload_register(function($class) use ($sourcedir)
108 108
 {
109 109
 	$classMap = array(
110 110
 		'ReCaptcha\\' => 'ReCaptcha/',
Please login to merge, or discard this patch.
Sources/minify/path-converter/src/Converter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
             // when both paths have nothing in common, one of them is probably
40 40
             // absolute while the other is relative
41 41
             $cwd = getcwd();
42
-            $from = strpos($from, $cwd) === 0 ? $from : $cwd.'/'.$from;
43
-            $to = strpos($to, $cwd) === 0 ? $to : $cwd.'/'.$to;
42
+            $from = strpos($from, $cwd) === 0 ? $from : $cwd . '/' . $from;
43
+            $to = strpos($to, $cwd) === 0 ? $to : $cwd . '/' . $to;
44 44
 
45 45
             // or traveling the tree via `..`
46 46
             // attempt to resolve path, or assume it's fine if it doesn't exist
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         }
148 148
 
149 149
         // normalize paths
150
-        $path = $this->normalize($this->from.'/'.$path);
150
+        $path = $this->normalize($this->from . '/' . $path);
151 151
 
152 152
         // strip shared ancestor paths
153 153
         $shared = $this->shared($path, $this->to);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         // add .. for every directory that needs to be traversed to new path
158 158
         $to = str_repeat('../', mb_substr_count($to, '/'));
159 159
 
160
-        return $to.ltrim($path, '/');
160
+        return $to . ltrim($path, '/');
161 161
     }
162 162
 
163 163
     /**
Please login to merge, or discard this patch.
Sources/minify/src/CSS.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             }
83 83
 
84 84
             // add to top
85
-            $content = implode('', $matches[0]).$content;
85
+            $content = implode('', $matches[0]) . $content;
86 86
         }
87 87
 
88 88
         return $content;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         // loop the matches
208 208
         foreach ($matches as $match) {
209 209
             // get the path for the file that will be imported
210
-            $importPath = dirname($source).'/'.$match['path'];
210
+            $importPath = dirname($source) . '/' . $match['path'];
211 211
 
212 212
             // only replace the import with the content if we can grab the
213 213
             // content of the file
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                 // check if current file was not imported previously in the same
216 216
                 // import chain.
217 217
                 if (in_array($importPath, $parents)) {
218
-                    throw new FileImportException('Failed to import file "'.$importPath.'": circular reference detected.');
218
+                    throw new FileImportException('Failed to import file "' . $importPath . '": circular reference detected.');
219 219
                 }
220 220
 
221 221
                 // grab referenced file & minify it (which may include importing
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
                 // check if this is only valid for certain media
227 227
                 if (!empty($match['media'])) {
228
-                    $importContent = '@media '.$match['media'].'{'.$importContent.'}';
228
+                    $importContent = '@media ' . $match['media'] . '{' . $importContent . '}';
229 229
                 }
230 230
 
231 231
                 // add to replacement array
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     protected function importFiles($source, $content)
255 255
     {
256 256
         $extensions = array_keys($this->importExtensions);
257
-        $regex = '/url\((["\']?)((?!["\']?data:).*?\.('.implode('|', $extensions).'))\\1\)/i';
257
+        $regex = '/url\((["\']?)((?!["\']?data:).*?\.(' . implode('|', $extensions) . '))\\1\)/i';
258 258
         if ($extensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) {
259 259
             $search = array();
260 260
             $replace = array();
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             foreach ($matches as $match) {
264 264
                 // get the path for the file that will be imported
265 265
                 $path = $match[2];
266
-                $path = dirname($source).'/'.$path;
266
+                $path = dirname($source) . '/' . $path;
267 267
                 $extension = $match[3];
268 268
 
269 269
                 // only replace the import with the content if we're able to get
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
                     // build replacement
277 277
                     $search[] = $match[0];
278
-                    $replace[] = 'url('.$this->importExtensions[$extension].';base64,'.$importContent.')';
278
+                    $replace[] = 'url(' . $this->importExtensions[$extension] . ';base64,' . $importContent . ')';
279 279
                 }
280 280
             }
281 281
 
@@ -463,9 +463,9 @@  discard block
 block discarded – undo
463 463
             // build replacement
464 464
             $search[] = $match[0];
465 465
             if ($type == 'url') {
466
-                $replace[] = 'url('.$url.')';
466
+                $replace[] = 'url(' . $url . ')';
467 467
             } elseif ($type == 'import') {
468
-                $replace[] = '@import "'.$url.'"';
468
+                $replace[] = '@import "' . $url . '"';
469 469
             }
470 470
         }
471 471
 
@@ -519,8 +519,8 @@  discard block
 block discarded – undo
519 519
         );
520 520
 
521 521
         return preg_replace_callback(
522
-            '/(?<=[: ])('.implode(array_keys($colors), '|').')(?=[; }])/i',
523
-            function ($match) use ($colors) {
522
+            '/(?<=[: ])(' . implode(array_keys($colors), '|') . ')(?=[; }])/i',
523
+            function($match) use ($colors) {
524 524
                 return $colors[strtoupper($match[0])];
525 525
             },
526 526
             $content
@@ -541,11 +541,11 @@  discard block
 block discarded – undo
541 541
             'bold' => 700,
542 542
         );
543 543
 
544
-        $callback = function ($match) use ($weights) {
545
-            return $match[1].$weights[$match[2]];
544
+        $callback = function($match) use ($weights) {
545
+            return $match[1] . $weights[$match[2]];
546 546
         };
547 547
 
548
-        return preg_replace_callback('/(font-weight\s*:\s*)('.implode('|', array_keys($weights)).')(?=[;}])/', $callback, $content);
548
+        return preg_replace_callback('/(font-weight\s*:\s*)(' . implode('|', array_keys($weights)) . ')(?=[;}])/', $callback, $content);
549 549
     }
550 550
 
551 551
     /**
@@ -571,19 +571,19 @@  discard block
 block discarded – undo
571 571
         // practice, Webkit (especially Safari) seems to stumble over at least
572 572
         // 0%, potentially other units as well. Only stripping 'px' for now.
573 573
         // @see https://github.com/matthiasmullie/minify/issues/60
574
-        $content = preg_replace('/'.$before.'(-?0*(\.0+)?)(?<=0)px'.$after.'/', '\\1', $content);
574
+        $content = preg_replace('/' . $before . '(-?0*(\.0+)?)(?<=0)px' . $after . '/', '\\1', $content);
575 575
 
576 576
         // strip 0-digits (.0 -> 0)
577
-        $content = preg_replace('/'.$before.'\.0+'.$units.'?'.$after.'/', '0\\1', $content);
577
+        $content = preg_replace('/' . $before . '\.0+' . $units . '?' . $after . '/', '0\\1', $content);
578 578
         // strip trailing 0: 50.10 -> 50.1, 50.10px -> 50.1px
579
-        $content = preg_replace('/'.$before.'(-?[0-9]+\.[0-9]+)0+'.$units.'?'.$after.'/', '\\1\\2', $content);
579
+        $content = preg_replace('/' . $before . '(-?[0-9]+\.[0-9]+)0+' . $units . '?' . $after . '/', '\\1\\2', $content);
580 580
         // strip trailing 0: 50.00 -> 50, 50.00px -> 50px
581
-        $content = preg_replace('/'.$before.'(-?[0-9]+)\.0+'.$units.'?'.$after.'/', '\\1\\2', $content);
581
+        $content = preg_replace('/' . $before . '(-?[0-9]+)\.0+' . $units . '?' . $after . '/', '\\1\\2', $content);
582 582
         // strip leading 0: 0.1 -> .1, 01.1 -> 1.1
583
-        $content = preg_replace('/'.$before.'(-?)0+([0-9]*\.[0-9]+)'.$units.'?'.$after.'/', '\\1\\2\\3', $content);
583
+        $content = preg_replace('/' . $before . '(-?)0+([0-9]*\.[0-9]+)' . $units . '?' . $after . '/', '\\1\\2\\3', $content);
584 584
 
585 585
         // strip negative zeroes (-0 -> 0) & truncate zeroes (00 -> 0)
586
-        $content = preg_replace('/'.$before.'-?0+'.$units.'?'.$after.'/', '0\\1', $content);
586
+        $content = preg_replace('/' . $before . '-?0+' . $units . '?' . $after . '/', '0\\1', $content);
587 587
 
588 588
         // remove zeroes where they make no sense in calc: e.g. calc(100px - 0)
589 589
         // the 0 doesn't have any effect, and this isn't even valid without unit
Please login to merge, or discard this patch.
Sources/minify/src/JS.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
     {
118 118
         call_user_func_array(array('parent', '__construct'), func_get_args());
119 119
 
120
-        $dataDir = __DIR__.'/../data/js/';
120
+        $dataDir = __DIR__ . '/../data/js/';
121 121
         $options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES;
122
-        $this->keywordsReserved = file($dataDir.'keywords_reserved.txt', $options);
123
-        $this->keywordsBefore = file($dataDir.'keywords_before.txt', $options);
124
-        $this->keywordsAfter = file($dataDir.'keywords_after.txt', $options);
125
-        $this->operators = file($dataDir.'operators.txt', $options);
126
-        $this->operatorsBefore = file($dataDir.'operators_before.txt', $options);
127
-        $this->operatorsAfter = file($dataDir.'operators_after.txt', $options);
122
+        $this->keywordsReserved = file($dataDir . 'keywords_reserved.txt', $options);
123
+        $this->keywordsBefore = file($dataDir . 'keywords_before.txt', $options);
124
+        $this->keywordsAfter = file($dataDir . 'keywords_after.txt', $options);
125
+        $this->operators = file($dataDir . 'operators.txt', $options);
126
+        $this->operatorsBefore = file($dataDir . 'operators_before.txt', $options);
127
+        $this->operatorsAfter = file($dataDir . 'operators_after.txt', $options);
128 128
     }
129 129
 
130 130
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
              * singe-line comment on the last line (in which case it would also
150 150
              * be seen as part of that comment)
151 151
              */
152
-            $content .= $js."\n;";
152
+            $content .= $js . "\n;";
153 153
         }
154 154
 
155 155
         /*
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
     {
215 215
         // PHP only supports $this inside anonymous functions since 5.4
216 216
         $minifier = $this;
217
-        $callback = function ($match) use ($minifier) {
217
+        $callback = function($match) use ($minifier) {
218 218
             $count = count($minifier->extracted);
219
-            $placeholder = '/'.$count.'/';
219
+            $placeholder = '/' . $count . '/';
220 220
             $minifier->extracted[$placeholder] = $match[0];
221 221
 
222 222
             return $placeholder;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         // likely part of a division, not a regex)
230 230
         $after = '[\.,;\)\}]';
231 231
         $methods = '\.(exec|test|match|search|replace|split)\(';
232
-        $this->registerPattern('/'.$pattern.'(?=\s*('.$after.'|'.$methods.'))/', $callback);
232
+        $this->registerPattern('/' . $pattern . '(?=\s*(' . $after . '|' . $methods . '))/', $callback);
233 233
 
234 234
         // 1 more edge case: a regex can be followed by a lot more operators or
235 235
         // keywords if there's a newline (ASI) in between, where the operator
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         // (https://github.com/matthiasmullie/minify/issues/56)
238 238
         $operators = $this->getOperatorsForRegex($this->operatorsBefore, '/');
239 239
         $operators += $this->getOperatorsForRegex($this->keywordsReserved, '/');
240
-        $this->registerPattern('/'.$pattern.'\s*\n(?=\s*('.implode('|', $operators).'))/', $callback);
240
+        $this->registerPattern('/' . $pattern . '\s*\n(?=\s*(' . implode('|', $operators) . '))/', $callback);
241 241
     }
242 242
 
243 243
     /**
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
         unset($operatorsBefore['+'], $operatorsBefore['-'], $operatorsAfter['+'], $operatorsAfter['-']);
282 282
         $content = preg_replace(
283 283
             array(
284
-                '/('.implode('|', $operatorsBefore).')\s+/',
285
-                '/\s+('.implode('|', $operatorsAfter).')/',
284
+                '/(' . implode('|', $operatorsBefore) . ')\s+/',
285
+                '/\s+(' . implode('|', $operatorsAfter) . ')/',
286 286
             ), '\\1', $content
287 287
         );
288 288
 
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
         );
296 296
 
297 297
         // collapse whitespace around reserved words into single space
298
-        $content = preg_replace('/(^|[;\}\s])\K('.implode('|', $keywordsBefore).')\s+/', '\\2 ', $content);
299
-        $content = preg_replace('/\s+('.implode('|', $keywordsAfter).')(?=([;\{\s]|$))/', ' \\1', $content);
298
+        $content = preg_replace('/(^|[;\}\s])\K(' . implode('|', $keywordsBefore) . ')\s+/', '\\2 ', $content);
299
+        $content = preg_replace('/\s+(' . implode('|', $keywordsAfter) . ')(?=([;\{\s]|$))/', ' \\1', $content);
300 300
 
301 301
         /*
302 302
          * We didn't strip whitespace after a couple of operators because they
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
          */
307 307
         $operatorsDiffBefore = array_diff($operators, $operatorsBefore);
308 308
         $operatorsDiffAfter = array_diff($operators, $operatorsAfter);
309
-        $content = preg_replace('/('.implode('|', $operatorsDiffBefore).')[^\S\n]+/', '\\1', $content);
310
-        $content = preg_replace('/[^\S\n]+('.implode('|', $operatorsDiffAfter).')/', '\\1', $content);
309
+        $content = preg_replace('/(' . implode('|', $operatorsDiffBefore) . ')[^\S\n]+/', '\\1', $content);
310
+        $content = preg_replace('/[^\S\n]+(' . implode('|', $operatorsDiffAfter) . ')/', '\\1', $content);
311 311
 
312 312
         /*
313 313
          * Get rid of double semicolons, except where they can be used like:
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 
382 382
         // don't confuse = with other assignment shortcuts (e.g. +=)
383 383
         $chars = preg_quote('+-*\=<>%&|');
384
-        $operators['='] = '(?<!['.$chars.'])\=';
384
+        $operators['='] = '(?<![' . $chars . '])\=';
385 385
 
386 386
         return $operators;
387 387
     }
@@ -402,8 +402,8 @@  discard block
 block discarded – undo
402 402
         $escaped = array_map('preg_quote', $keywords, $delimiter);
403 403
 
404 404
         // add word boundaries
405
-        array_walk($keywords, function ($value) {
406
-            return '\b'.$value.'\b';
405
+        array_walk($keywords, function($value) {
406
+            return '\b' . $value . '\b';
407 407
         });
408 408
 
409 409
         $keywords = array_combine($keywords, $escaped);
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         // PHP only supports $this inside anonymous functions since 5.4
424 424
         $minifier = $this;
425 425
         $keywords = $this->keywordsReserved;
426
-        $callback = function ($match) use ($minifier, $keywords) {
426
+        $callback = function($match) use ($minifier, $keywords) {
427 427
             $property = trim($minifier->extracted[$match[1]], '\'"');
428 428
 
429 429
             /*
@@ -440,11 +440,11 @@  discard block
 block discarded – undo
440 440
              * array['key-here'] can't be replaced by array.key-here since '-'
441 441
              * is not a valid character there.
442 442
              */
443
-            if (!preg_match('/^'.$minifier::REGEX_VARIABLE.'$/u', $property)) {
443
+            if (!preg_match('/^' . $minifier::REGEX_VARIABLE . '$/u', $property)) {
444 444
                 return $match[0];
445 445
             }
446 446
 
447
-            return '.'.$property;
447
+            return '.' . $property;
448 448
         };
449 449
 
450 450
         /*
@@ -465,9 +465,9 @@  discard block
 block discarded – undo
465 465
          * separate look-behind assertions, one for each keyword.
466 466
          */
467 467
         $keywords = $this->getKeywordsForRegex($keywords);
468
-        $keywords = '(?<!'.implode(')(?<!', $keywords).')';
468
+        $keywords = '(?<!' . implode(')(?<!', $keywords) . ')';
469 469
 
470
-        return preg_replace_callback('/(?<='.$previousChar.'|\])'.$keywords.'\[\s*(([\'"])[0-9]+\\2)\s*\]/u', $callback, $content);
470
+        return preg_replace_callback('/(?<=' . $previousChar . '|\])' . $keywords . '\[\s*(([\'"])[0-9]+\\2)\s*\]/u', $callback, $content);
471 471
     }
472 472
 
473 473
     /**
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +116 added lines, -116 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;
@@ -1888,7 +1888,7 @@  discard block
 block discarded – undo
1888 1888
 										# a run of Unicode domain name characters and a dot
1889 1889
 										[\p{L}\p{M}\p{N}\-.:@]+\.
1890 1890
 										# and then a TLD valid in the DNS or the reserved "local" TLD
1891
-										(?:'. $modSettings['tld_regex'] .'|local)
1891
+										(?:'. $modSettings['tld_regex'] . '|local)
1892 1892
 									)
1893 1893
 									# followed by a non-domain character or end of line
1894 1894
 									(?=[^\p{L}\p{N}\-.]|$)
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
 						)?
1957 1957
 						';
1958 1958
 
1959
-						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) {
1959
+						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) {
1960 1960
 							$url = array_shift($matches);
1961 1961
 
1962 1962
 							$scheme = parse_url($url, PHP_URL_SCHEME);
@@ -2685,7 +2685,7 @@  discard block
 block discarded – undo
2685 2685
 		for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2686 2686
 		{
2687 2687
 			$specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES);
2688
-			$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">';
2688
+			$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">';
2689 2689
 
2690 2690
 			$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2691 2691
 
@@ -2702,7 +2702,7 @@  discard block
 block discarded – undo
2702 2702
 
2703 2703
 	// Replace away!
2704 2704
 	$message = preg_replace_callback($smileyPregSearch,
2705
-		function ($matches) use ($smileyPregReplacements)
2705
+		function($matches) use ($smileyPregReplacements)
2706 2706
 		{
2707 2707
 			return $smileyPregReplacements[$matches[1]];
2708 2708
 		}, $message);
@@ -2768,13 +2768,13 @@  discard block
 block discarded – undo
2768 2768
 	{
2769 2769
 		if (defined('SID') && SID != '')
2770 2770
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2771
-				function ($m) use ($scripturl)
2771
+				function($m) use ($scripturl)
2772 2772
 				{
2773
-					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2773
+					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : "");
2774 2774
 				}, $setLocation);
2775 2775
 		else
2776 2776
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2777
-				function ($m) use ($scripturl)
2777
+				function($m) use ($scripturl)
2778 2778
 				{
2779 2779
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2780 2780
 				}, $setLocation);
@@ -3097,7 +3097,7 @@  discard block
 block discarded – undo
3097 3097
 
3098 3098
 	// Add a generic "Are you sure?" confirmation message.
3099 3099
 	addInlineJavaScript('
3100
-	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3100
+	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';');
3101 3101
 
3102 3102
 	// Now add the capping code for avatars.
3103 3103
 	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')
@@ -3458,7 +3458,7 @@  discard block
 block discarded – undo
3458 3458
 
3459 3459
 		else
3460 3460
 			echo '
3461
-	<script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>';
3461
+	<script src="', $settings['theme_url'], '/scripts/minified', ($do_deferred ? '_deferred' : ''), '.js', $minSeed, '"></script>';
3462 3462
 	}
3463 3463
 
3464 3464
 	// Inline JavaScript - Actually useful some times!
@@ -3536,14 +3536,14 @@  discard block
 block discarded – undo
3536 3536
 
3537 3537
 		else
3538 3538
 			echo '
3539
-	<link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">';
3539
+	<link rel="stylesheet" href="', $settings['theme_url'], '/css/minified.css', $minSeed, '">';
3540 3540
 	}
3541 3541
 
3542 3542
 	// Print the rest after the minified files.
3543 3543
 	if (!empty($normal))
3544 3544
 		foreach ($normal as $nf)
3545 3545
 			echo '
3546
-	<link rel="stylesheet" href="', $nf ,'">';
3546
+	<link rel="stylesheet" href="', $nf, '">';
3547 3547
 
3548 3548
 	if ($db_show_debug === true)
3549 3549
 	{
@@ -3559,7 +3559,7 @@  discard block
 block discarded – undo
3559 3559
 	<style>';
3560 3560
 
3561 3561
 		foreach ($context['css_header'] as $css)
3562
-			echo $css .'
3562
+			echo $css . '
3563 3563
 	';
3564 3564
 
3565 3565
 		echo'
@@ -3588,27 +3588,27 @@  discard block
 block discarded – undo
3588 3588
 		return false;
3589 3589
 
3590 3590
 	// Did we already did this?
3591
-	$toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400);
3591
+	$toCache = cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type, 86400);
3592 3592
 
3593 3593
 	// Already done?
3594 3594
 	if (!empty($toCache))
3595 3595
 		return true;
3596 3596
 
3597 3597
 	// No namespaces, sorry!
3598
-	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
3598
+	$classType = 'MatthiasMullie\\Minify\\' . strtoupper($type);
3599 3599
 
3600 3600
 	// Temp path.
3601
-	$cTempPath = $settings['theme_dir'] .'/'. ($type == 'css' ? 'css' : 'scripts') .'/';
3601
+	$cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/';
3602 3602
 
3603 3603
 	// What kind of file are we going to create?
3604
-	$toCreate = $cTempPath .'minified'. ($do_deferred ? '_deferred' : '') .'.'. $type;
3604
+	$toCreate = $cTempPath . 'minified' . ($do_deferred ? '_deferred' : '') . '.' . $type;
3605 3605
 
3606 3606
 	// File has to exists, if it isn't try to create it.
3607 3607
 	if ((!file_exists($toCreate) && @fopen($toCreate, 'w') === false) || !smf_chmod($toCreate))
3608 3608
 	{
3609 3609
 		loadLanguage('Errors');
3610 3610
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3611
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3611
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3612 3612
 
3613 3613
 		// The process failed so roll back to print each individual file.
3614 3614
 		return $data;
@@ -3643,14 +3643,14 @@  discard block
 block discarded – undo
3643 3643
 	{
3644 3644
 		loadLanguage('Errors');
3645 3645
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3646
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3646
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3647 3647
 
3648 3648
 		// The process failed so roll back to print each individual file.
3649 3649
 		return $data;
3650 3650
 	}
3651 3651
 
3652 3652
 	// And create a long lived cache entry.
3653
-	cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, $toCreate, 86400);
3653
+	cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, $toCreate, 86400);
3654 3654
 
3655 3655
 	return true;
3656 3656
 }
@@ -3707,7 +3707,7 @@  discard block
 block discarded – undo
3707 3707
 	else
3708 3708
 		$path = $modSettings['attachmentUploadDir'];
3709 3709
 
3710
-	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3710
+	return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
3711 3711
 }
3712 3712
 
3713 3713
 /**
@@ -3751,10 +3751,10 @@  discard block
 block discarded – undo
3751 3751
 		$valid_low = isValidIP($ip_parts[0]);
3752 3752
 		$valid_high = isValidIP($ip_parts[1]);
3753 3753
 		$count = 0;
3754
-		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3754
+		$mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.');
3755 3755
 		$max = ($mode == ':' ? 'ffff' : '255');
3756 3756
 		$min = 0;
3757
-		if(!$valid_low)
3757
+		if (!$valid_low)
3758 3758
 		{
3759 3759
 			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3760 3760
 			$valid_low = isValidIP($ip_parts[0]);
@@ -3768,7 +3768,7 @@  discard block
 block discarded – undo
3768 3768
 		}
3769 3769
 
3770 3770
 		$count = 0;
3771
-		if(!$valid_high)
3771
+		if (!$valid_high)
3772 3772
 		{
3773 3773
 			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3774 3774
 			$valid_high = isValidIP($ip_parts[1]);
@@ -3781,7 +3781,7 @@  discard block
 block discarded – undo
3781 3781
 			}
3782 3782
 		}
3783 3783
 
3784
-		if($valid_high && $valid_low)
3784
+		if ($valid_high && $valid_low)
3785 3785
 		{
3786 3786
 			$ip_array['low'] = $ip_parts[0];
3787 3787
 			$ip_array['high'] = $ip_parts[1];
@@ -3963,7 +3963,7 @@  discard block
 block discarded – undo
3963 3963
 		addInlineJavaScript('
3964 3964
 	var user_menus = new smc_PopupMenu();
3965 3965
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
3966
-	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
3966
+	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true);
3967 3967
 		if ($context['allow_pm'])
3968 3968
 			addInlineJavaScript('
3969 3969
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
@@ -4588,7 +4588,7 @@  discard block
 block discarded – undo
4588 4588
 		// No? try a fallback to $sourcedir
4589 4589
 		else
4590 4590
 		{
4591
-			$absPath = $sourcedir .'/'. $file;
4591
+			$absPath = $sourcedir . '/' . $file;
4592 4592
 
4593 4593
 			if (file_exists($absPath))
4594 4594
 				require_once($absPath);
@@ -4669,15 +4669,15 @@  discard block
 block discarded – undo
4669 4669
 
4670 4670
 	// UTF-8 occurences of MS special characters
4671 4671
 	$findchars_utf8 = array(
4672
-		"\xe2\80\x9a",	// single low-9 quotation mark
4673
-		"\xe2\80\x9e",	// double low-9 quotation mark
4674
-		"\xe2\80\xa6",	// horizontal ellipsis
4675
-		"\xe2\x80\x98",	// left single curly quote
4676
-		"\xe2\x80\x99",	// right single curly quote
4677
-		"\xe2\x80\x9c",	// left double curly quote
4678
-		"\xe2\x80\x9d",	// right double curly quote
4679
-		"\xe2\x80\x93",	// en dash
4680
-		"\xe2\x80\x94",	// em dash
4672
+		"\xe2\80\x9a", // single low-9 quotation mark
4673
+		"\xe2\80\x9e", // double low-9 quotation mark
4674
+		"\xe2\80\xa6", // horizontal ellipsis
4675
+		"\xe2\x80\x98", // left single curly quote
4676
+		"\xe2\x80\x99", // right single curly quote
4677
+		"\xe2\x80\x9c", // left double curly quote
4678
+		"\xe2\x80\x9d", // right double curly quote
4679
+		"\xe2\x80\x93", // en dash
4680
+		"\xe2\x80\x94", // em dash
4681 4681
 	);
4682 4682
 
4683 4683
 	// windows 1252 / iso equivalents
@@ -4695,15 +4695,15 @@  discard block
 block discarded – undo
4695 4695
 
4696 4696
 	// safe replacements
4697 4697
 	$replacechars = array(
4698
-		',',	// &sbquo;
4699
-		',,',	// &bdquo;
4700
-		'...',	// &hellip;
4701
-		"'",	// &lsquo;
4702
-		"'",	// &rsquo;
4703
-		'"',	// &ldquo;
4704
-		'"',	// &rdquo;
4705
-		'-',	// &ndash;
4706
-		'--',	// &mdash;
4698
+		',', // &sbquo;
4699
+		',,', // &bdquo;
4700
+		'...', // &hellip;
4701
+		"'", // &lsquo;
4702
+		"'", // &rsquo;
4703
+		'"', // &ldquo;
4704
+		'"', // &rdquo;
4705
+		'-', // &ndash;
4706
+		'--', // &mdash;
4707 4707
 	);
4708 4708
 
4709 4709
 	if ($context['utf8'])
@@ -5066,7 +5066,7 @@  discard block
 block discarded – undo
5066 5066
  */
5067 5067
 function inet_dtop($bin)
5068 5068
 {
5069
-	if(empty($bin))
5069
+	if (empty($bin))
5070 5070
 		return '';
5071 5071
 
5072 5072
 	global $db_type;
@@ -5097,28 +5097,28 @@  discard block
 block discarded – undo
5097 5097
  */
5098 5098
 function _safe_serialize($value)
5099 5099
 {
5100
-	if(is_null($value))
5100
+	if (is_null($value))
5101 5101
 		return 'N;';
5102 5102
 
5103
-	if(is_bool($value))
5104
-		return 'b:'. (int) $value .';';
5103
+	if (is_bool($value))
5104
+		return 'b:' . (int) $value . ';';
5105 5105
 
5106
-	if(is_int($value))
5107
-		return 'i:'. $value .';';
5106
+	if (is_int($value))
5107
+		return 'i:' . $value . ';';
5108 5108
 
5109
-	if(is_float($value))
5110
-		return 'd:'. str_replace(',', '.', $value) .';';
5109
+	if (is_float($value))
5110
+		return 'd:' . str_replace(',', '.', $value) . ';';
5111 5111
 
5112
-	if(is_string($value))
5113
-		return 's:'. strlen($value) .':"'. $value .'";';
5112
+	if (is_string($value))
5113
+		return 's:' . strlen($value) . ':"' . $value . '";';
5114 5114
 
5115
-	if(is_array($value))
5115
+	if (is_array($value))
5116 5116
 	{
5117 5117
 		$out = '';
5118
-		foreach($value as $k => $v)
5118
+		foreach ($value as $k => $v)
5119 5119
 			$out .= _safe_serialize($k) . _safe_serialize($v);
5120 5120
 
5121
-		return 'a:'. count($value) .':{'. $out .'}';
5121
+		return 'a:' . count($value) . ':{' . $out . '}';
5122 5122
 	}
5123 5123
 
5124 5124
 	// safe_serialize cannot serialize resources or objects.
@@ -5160,7 +5160,7 @@  discard block
 block discarded – undo
5160 5160
 function _safe_unserialize($str)
5161 5161
 {
5162 5162
 	// Input  is not a string.
5163
-	if(empty($str) || !is_string($str))
5163
+	if (empty($str) || !is_string($str))
5164 5164
 		return false;
5165 5165
 
5166 5166
 	$stack = array();
@@ -5174,40 +5174,40 @@  discard block
 block discarded – undo
5174 5174
 	 *   3 - in array, expecting value or another array
5175 5175
 	 */
5176 5176
 	$state = 0;
5177
-	while($state != 1)
5177
+	while ($state != 1)
5178 5178
 	{
5179 5179
 		$type = isset($str[0]) ? $str[0] : '';
5180
-		if($type == '}')
5180
+		if ($type == '}')
5181 5181
 			$str = substr($str, 1);
5182 5182
 
5183
-		else if($type == 'N' && $str[1] == ';')
5183
+		else if ($type == 'N' && $str[1] == ';')
5184 5184
 		{
5185 5185
 			$value = null;
5186 5186
 			$str = substr($str, 2);
5187 5187
 		}
5188
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5188
+		else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5189 5189
 		{
5190 5190
 			$value = $matches[1] == '1' ? true : false;
5191 5191
 			$str = substr($str, 4);
5192 5192
 		}
5193
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5193
+		else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5194 5194
 		{
5195
-			$value = (int)$matches[1];
5195
+			$value = (int) $matches[1];
5196 5196
 			$str = $matches[2];
5197 5197
 		}
5198
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5198
+		else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5199 5199
 		{
5200
-			$value = (float)$matches[1];
5200
+			$value = (float) $matches[1];
5201 5201
 			$str = $matches[3];
5202 5202
 		}
5203
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5203
+		else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";')
5204 5204
 		{
5205
-			$value = substr($matches[2], 0, (int)$matches[1]);
5206
-			$str = substr($matches[2], (int)$matches[1] + 2);
5205
+			$value = substr($matches[2], 0, (int) $matches[1]);
5206
+			$str = substr($matches[2], (int) $matches[1] + 2);
5207 5207
 		}
5208
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5208
+		else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5209 5209
 		{
5210
-			$expectedLength = (int)$matches[1];
5210
+			$expectedLength = (int) $matches[1];
5211 5211
 			$str = $matches[2];
5212 5212
 		}
5213 5213
 
@@ -5215,10 +5215,10 @@  discard block
 block discarded – undo
5215 5215
 		else
5216 5216
 			return false;
5217 5217
 
5218
-		switch($state)
5218
+		switch ($state)
5219 5219
 		{
5220 5220
 			case 3: // In array, expecting value or another array.
5221
-				if($type == 'a')
5221
+				if ($type == 'a')
5222 5222
 				{
5223 5223
 					$stack[] = &$list;
5224 5224
 					$list[$key] = array();
@@ -5227,7 +5227,7 @@  discard block
 block discarded – undo
5227 5227
 					$state = 2;
5228 5228
 					break;
5229 5229
 				}
5230
-				if($type != '}')
5230
+				if ($type != '}')
5231 5231
 				{
5232 5232
 					$list[$key] = $value;
5233 5233
 					$state = 2;
@@ -5238,29 +5238,29 @@  discard block
 block discarded – undo
5238 5238
 				return false;
5239 5239
 
5240 5240
 			case 2: // in array, expecting end of array or a key
5241
-				if($type == '}')
5241
+				if ($type == '}')
5242 5242
 				{
5243 5243
 					// Array size is less than expected.
5244
-					if(count($list) < end($expected))
5244
+					if (count($list) < end($expected))
5245 5245
 						return false;
5246 5246
 
5247 5247
 					unset($list);
5248
-					$list = &$stack[count($stack)-1];
5248
+					$list = &$stack[count($stack) - 1];
5249 5249
 					array_pop($stack);
5250 5250
 
5251 5251
 					// Go to terminal state if we're at the end of the root array.
5252 5252
 					array_pop($expected);
5253 5253
 
5254
-					if(count($expected) == 0)
5254
+					if (count($expected) == 0)
5255 5255
 						$state = 1;
5256 5256
 
5257 5257
 					break;
5258 5258
 				}
5259 5259
 
5260
-				if($type == 'i' || $type == 's')
5260
+				if ($type == 'i' || $type == 's')
5261 5261
 				{
5262 5262
 					// Array size exceeds expected length.
5263
-					if(count($list) >= end($expected))
5263
+					if (count($list) >= end($expected))
5264 5264
 						return false;
5265 5265
 
5266 5266
 					$key = $value;
@@ -5273,7 +5273,7 @@  discard block
 block discarded – undo
5273 5273
 
5274 5274
 			// Expecting array or value.
5275 5275
 			case 0:
5276
-				if($type == 'a')
5276
+				if ($type == 'a')
5277 5277
 				{
5278 5278
 					$data = array();
5279 5279
 					$list = &$data;
@@ -5282,7 +5282,7 @@  discard block
 block discarded – undo
5282 5282
 					break;
5283 5283
 				}
5284 5284
 
5285
-				if($type != '}')
5285
+				if ($type != '}')
5286 5286
 				{
5287 5287
 					$data = $value;
5288 5288
 					$state = 1;
@@ -5295,7 +5295,7 @@  discard block
 block discarded – undo
5295 5295
 	}
5296 5296
 
5297 5297
 	// Trailing data in input.
5298
-	if(!empty($str))
5298
+	if (!empty($str))
5299 5299
 		return false;
5300 5300
 
5301 5301
 	return $data;
@@ -5349,7 +5349,7 @@  discard block
 block discarded – undo
5349 5349
 	// Set different modes.
5350 5350
 	$chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
5351 5351
 
5352
-	foreach($chmodValues as $val)
5352
+	foreach ($chmodValues as $val)
5353 5353
 	{
5354 5354
 		// If it's writable, break out of the loop.
5355 5355
 		if (is_writable($file))
@@ -5384,13 +5384,13 @@  discard block
 block discarded – undo
5384 5384
 	$returnArray = @json_decode($json, $returnAsArray);
5385 5385
 
5386 5386
 	// PHP 5.3 so no json_last_error_msg()
5387
-	switch(json_last_error())
5387
+	switch (json_last_error())
5388 5388
 	{
5389 5389
 		case JSON_ERROR_NONE:
5390 5390
 			$jsonError = false;
5391 5391
 			break;
5392 5392
 		case JSON_ERROR_DEPTH:
5393
-			$jsonError =  'JSON_ERROR_DEPTH';
5393
+			$jsonError = 'JSON_ERROR_DEPTH';
5394 5394
 			break;
5395 5395
 		case JSON_ERROR_STATE_MISMATCH:
5396 5396
 			$jsonError = 'JSON_ERROR_STATE_MISMATCH';
@@ -5418,10 +5418,10 @@  discard block
 block discarded – undo
5418 5418
 		loadLanguage('Errors');
5419 5419
 
5420 5420
 		if (!empty($jsonDebug))
5421
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5421
+			log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5422 5422
 
5423 5423
 		else
5424
-			log_error($txt['json_'. $jsonError], 'critical');
5424
+			log_error($txt['json_' . $jsonError], 'critical');
5425 5425
 
5426 5426
 		// Everyone expects an array.
5427 5427
 		return array();
@@ -5525,7 +5525,7 @@  discard block
 block discarded – undo
5525 5525
 		});
5526 5526
 
5527 5527
 		// Convert Punycode to Unicode
5528
-		$tlds = array_map(function ($input) {
5528
+		$tlds = array_map(function($input) {
5529 5529
 			$prefix = 'xn--';
5530 5530
 			$safe_char = 0xFFFC;
5531 5531
 			$base = 36;
@@ -5541,7 +5541,7 @@  discard block
 block discarded – undo
5541 5541
 
5542 5542
 			foreach ($enco_parts as $encoded)
5543 5543
 			{
5544
-				if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0)
5544
+				if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0)
5545 5545
 				{
5546 5546
 					$output_parts[] = $encoded;
5547 5547
 					continue;
@@ -5552,7 +5552,7 @@  discard block
 block discarded – undo
5552 5552
 				$idx = 0;
5553 5553
 				$char = 0x80;
5554 5554
 				$decoded = array();
5555
-				$output='';
5555
+				$output = '';
5556 5556
 				$delim_pos = strrpos($encoded, '-');
5557 5557
 
5558 5558
 				if ($delim_pos > strlen($prefix))
@@ -5568,7 +5568,7 @@  discard block
 block discarded – undo
5568 5568
 
5569 5569
 				for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len)
5570 5570
 				{
5571
-					for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base)
5571
+					for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base)
5572 5572
 					{
5573 5573
 						$cp = ord($encoded{$enco_idx++});
5574 5574
 						$digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
@@ -5609,15 +5609,15 @@  discard block
 block discarded – undo
5609 5609
 
5610 5610
 					// 2 bytes
5611 5611
 					elseif ($v < (1 << 11))
5612
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
5612
+						$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
5613 5613
 
5614 5614
 					// 3 bytes
5615 5615
 					elseif ($v < (1 << 16))
5616
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5616
+						$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5617 5617
 
5618 5618
 					// 4 bytes
5619 5619
 					elseif ($v < (1 << 21))
5620
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5620
+						$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5621 5621
 
5622 5622
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5623 5623
 					else
@@ -5724,7 +5724,7 @@  discard block
 block discarded – undo
5724 5724
 	}
5725 5725
 
5726 5726
 	// This recursive function creates the index array from the strings
5727
-	$add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5727
+	$add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5728 5728
 	{
5729 5729
 		static $depth = 0;
5730 5730
 		$depth++;
@@ -5751,7 +5751,7 @@  discard block
 block discarded – undo
5751 5751
 	};
5752 5752
 
5753 5753
 	// This recursive function turns the index array into a regular expression
5754
-	$index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex)
5754
+	$index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex)
5755 5755
 	{
5756 5756
 		static $depth = 0;
5757 5757
 		$depth++;
@@ -5775,11 +5775,11 @@  discard block
 block discarded – undo
5775 5775
 
5776 5776
 				if (count(array_keys($value)) == 1)
5777 5777
 				{
5778
-					$new_key_array = explode('(?'.'>', $sub_regex);
5778
+					$new_key_array = explode('(?' . '>', $sub_regex);
5779 5779
 					$new_key .= $new_key_array[0];
5780 5780
 				}
5781 5781
 				else
5782
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
5782
+					$sub_regex = '(?' . '>' . $sub_regex . ')';
5783 5783
 			}
5784 5784
 
5785 5785
 			if ($depth > 1)
@@ -5819,7 +5819,7 @@  discard block
 block discarded – undo
5819 5819
 		$index = $add_string_to_index($string, $index);
5820 5820
 
5821 5821
 	while (!empty($index))
5822
-		$regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
5822
+		$regexes[] = '(?' . '>' . $index_to_regex($index, $delim) . ')';
5823 5823
 
5824 5824
 	// Restore PHP's internal character encoding to whatever it was originally
5825 5825
 	if (!empty($current_encoding))
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -1594,7 +1594,7 @@  discard block
 block discarded – undo
1594 1594
 
1595 1595
 	// Our custom error handler - does nothing but does stop public errors from XML!
1596 1596
 	set_error_handler(
1597
-		function ($errno, $errstr, $errfile, $errline) use ($support_js)
1597
+		function($errno, $errstr, $errfile, $errline) use ($support_js)
1598 1598
 		{
1599 1599
 			if ($support_js)
1600 1600
 				return true;
@@ -2607,94 +2607,94 @@  discard block
 block discarded – undo
2607 2607
 		// Translation table for the character sets not native for MySQL.
2608 2608
 		$translation_tables = array(
2609 2609
 			'windows-1255' => array(
2610
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
2611
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
2612
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
2613
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
2614
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
2615
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
2616
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '0xD792',
2617
-				'0xFC' => '0xE282AC',		'0xFF' => '0xD6B2',		'0xC2' => '0xFF',
2618
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
2619
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
2620
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2621
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2622
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2623
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
2624
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
2625
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2626
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
2627
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
2628
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
2629
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
2630
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
2631
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
2632
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
2633
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
2634
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
2635
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2636
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
2637
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2638
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
2639
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
2640
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
2641
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
2642
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
2643
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
2644
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
2645
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
2646
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
2647
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
2648
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
2649
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
2650
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
2651
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
2610
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
2611
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
2612
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
2613
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
2614
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
2615
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
2616
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792',
2617
+				'0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF',
2618
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
2619
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
2620
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2621
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2622
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2623
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
2624
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
2625
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2626
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
2627
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
2628
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
2629
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
2630
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
2631
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
2632
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
2633
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
2634
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
2635
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2636
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
2637
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2638
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
2639
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
2640
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
2641
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
2642
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
2643
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
2644
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
2645
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
2646
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
2647
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
2648
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
2649
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
2650
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
2651
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
2652 2652
 				'0xFA' => '0xD7AA',
2653 2653
 			),
2654 2654
 			'windows-1253' => array(
2655
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
2656
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
2657
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
2658
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
2659
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
2660
-				'0xD2' => '0xE282AC',			'0xFF' => '0xCE92',			'0xCE' => '0xCE9E',
2661
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
2662
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
2663
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
2664
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
2665
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
2666
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
2667
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
2668
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
2669
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2670
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2671
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2672
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
2673
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2674
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
2675
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2676
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
2677
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
2678
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
2679
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2680
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
2681
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
2682
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
2683
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
2684
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
2685
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
2686
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
2687
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
2688
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
2689
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
2690
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
2691
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
2692
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
2693
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
2694
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
2695
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
2696
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
2697
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',
2655
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
2656
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
2657
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
2658
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
2659
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
2660
+				'0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E',
2661
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
2662
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
2663
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
2664
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
2665
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
2666
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
2667
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
2668
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
2669
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2670
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2671
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2672
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
2673
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2674
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
2675
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2676
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
2677
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
2678
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
2679
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2680
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
2681
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
2682
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
2683
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
2684
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
2685
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
2686
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
2687
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
2688
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
2689
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
2690
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
2691
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
2692
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
2693
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
2694
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
2695
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
2696
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
2697
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E',
2698 2698
 			),
2699 2699
 		);
2700 2700
 
Please login to merge, or discard this patch.
Sources/News.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@
 block discarded – undo
346 346
 
347 347
 		foreach ($xml as $item)
348 348
 		{
349
-			$link = array_filter($item['content'], function ($e) { return ($e['tag'] == 'link'); });
349
+			$link = array_filter($item['content'], function($e) { return ($e['tag'] == 'link'); });
350 350
 			$link = array_pop($link);
351 351
 
352 352
 			echo '
Please login to merge, or discard this patch.
Themes/default/index.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
 			//In maintenance mode, only login is allowed and don't show OverlayDiv
230 230
 			echo '
231 231
 			<ul class="floatleft welcome">
232
-				<li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl. '?action=login', 'return true;'), '</li>
232
+				<li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl . '?action=login', 'return true;'), '</li>
233 233
 			</ul>';
234 234
 
235 235
 	if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1)
Please login to merge, or discard this patch.