@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | // Set a list of common functions. |
99 | 99 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
100 | 100 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
101 | - { |
|
101 | + { |
|
102 | 102 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
103 | 103 | return $string; |
104 | 104 | } : function($string) |
@@ -2147,7 +2147,6 @@ discard block |
||
2147 | 2147 | loadLanguage('index+Modifications'); |
2148 | 2148 | $context['template_layers'] = array(); |
2149 | 2149 | } |
2150 | - |
|
2151 | 2150 | else |
2152 | 2151 | { |
2153 | 2152 | // Custom templates to load, or just default? |
@@ -2525,14 +2524,12 @@ discard block |
||
2525 | 2524 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
2526 | 2525 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
2527 | 2526 | } |
2528 | - |
|
2529 | 2527 | else |
2530 | 2528 | { |
2531 | 2529 | $fileUrl = false; |
2532 | 2530 | $filePath = false; |
2533 | 2531 | } |
2534 | 2532 | } |
2535 | - |
|
2536 | 2533 | else |
2537 | 2534 | { |
2538 | 2535 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2639,14 +2636,12 @@ discard block |
||
2639 | 2636 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
2640 | 2637 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
2641 | 2638 | } |
2642 | - |
|
2643 | 2639 | else |
2644 | 2640 | { |
2645 | 2641 | $fileUrl = false; |
2646 | 2642 | $filePath = false; |
2647 | 2643 | } |
2648 | 2644 | } |
2649 | - |
|
2650 | 2645 | else |
2651 | 2646 | { |
2652 | 2647 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -420,7 +420,7 @@ |
||
420 | 420 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
421 | 421 | } |
422 | 422 | } |
423 | - else |
|
423 | + else |
|
424 | 424 | foreach ($this_category as &$board) |
425 | 425 | { |
426 | 426 | if (!empty($moderators[$board['id']])) |
@@ -3205,7 +3205,9 @@ |
||
3205 | 3205 | return $string; |
3206 | 3206 | |
3207 | 3207 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
3208 | - $new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function ($matches) {return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";';}, $string); |
|
3208 | + $new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function ($matches) |
|
3209 | + { |
|
3210 | +return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";';}, $string); |
|
3209 | 3211 | |
3210 | 3212 | // @todo Add more possible fixes here. For example, fix incorrect array lengths, try to handle truncated strings gracefully, etc. |
3211 | 3213 |