@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | // Set a list of common functions. |
105 | 105 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
106 | 106 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
107 | - { |
|
107 | + { |
|
108 | 108 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
109 | 109 | return $string; |
110 | 110 | } : function($string) |
@@ -929,7 +929,6 @@ discard block |
||
929 | 929 | $user_info_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) - |
930 | 930 | $tz_system->getOffset($time_system)) / 3600; |
931 | 931 | } |
932 | - |
|
933 | 932 | else |
934 | 933 | $user_info_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset']; |
935 | 934 | } |
@@ -1657,7 +1656,6 @@ discard block |
||
1657 | 1656 | $time_user = new DateTime('now', $tz_user); |
1658 | 1657 | $profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600; |
1659 | 1658 | } |
1660 | - |
|
1661 | 1659 | else |
1662 | 1660 | { |
1663 | 1661 | // !!! Compatibility. |
@@ -2322,7 +2320,6 @@ discard block |
||
2322 | 2320 | loadLanguage('index+Modifications'); |
2323 | 2321 | $context['template_layers'] = array(); |
2324 | 2322 | } |
2325 | - |
|
2326 | 2323 | else |
2327 | 2324 | { |
2328 | 2325 | // Custom templates to load, or just default? |
@@ -2703,14 +2700,12 @@ discard block |
||
2703 | 2700 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
2704 | 2701 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
2705 | 2702 | } |
2706 | - |
|
2707 | 2703 | else |
2708 | 2704 | { |
2709 | 2705 | $fileUrl = false; |
2710 | 2706 | $filePath = false; |
2711 | 2707 | } |
2712 | 2708 | } |
2713 | - |
|
2714 | 2709 | else |
2715 | 2710 | { |
2716 | 2711 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2818,14 +2813,12 @@ discard block |
||
2818 | 2813 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
2819 | 2814 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
2820 | 2815 | } |
2821 | - |
|
2822 | 2816 | else |
2823 | 2817 | { |
2824 | 2818 | $fileUrl = false; |
2825 | 2819 | $filePath = false; |
2826 | 2820 | } |
2827 | 2821 | } |
2828 | - |
|
2829 | 2822 | else |
2830 | 2823 | { |
2831 | 2824 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -393,17 +393,17 @@ discard block |
||
393 | 393 | $quickbuttons = array( |
394 | 394 | 'approve' => array( |
395 | 395 | 'label' => $txt['approve'], |
396 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], |
|
396 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'], |
|
397 | 397 | 'icon' => 'approve', |
398 | 398 | ), |
399 | 399 | 'delete' => array( |
400 | 400 | 'label' => $txt['remove'], |
401 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], |
|
401 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'], |
|
402 | 402 | 'icon' => 'remove_button', |
403 | 403 | 'show' => $item['can_delete'] |
404 | 404 | ), |
405 | 405 | 'quickmod' => array( |
406 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
406 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
407 | 407 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
408 | 408 | ), |
409 | 409 | ); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $quickbuttons = array( |
469 | 469 | 'delete' => array( |
470 | 470 | 'label' => $txt['remove_message'], |
471 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
471 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
472 | 472 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', |
473 | 473 | 'class' => 'you_sure', |
474 | 474 | 'icon' => 'remove_button', |
@@ -1721,7 +1721,7 @@ discard block |
||
1721 | 1721 | { |
1722 | 1722 | // Avoid double separators and empty titled sections |
1723 | 1723 | $empty_section = true; |
1724 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
1724 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
1725 | 1725 | { |
1726 | 1726 | // Found another separator, so we're done |
1727 | 1727 | if (!is_array($context['theme_options'][$j])) |
@@ -2700,8 +2700,7 @@ discard block |
||
2700 | 2700 | foreach ($context['post_errors'] as $error) |
2701 | 2701 | { |
2702 | 2702 | $text_key_error = $error == 'password_short' ? |
2703 | - printf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : |
|
2704 | - $txt['profile_error_' . $error]; |
|
2703 | + printf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : $txt['profile_error_' . $error]; |
|
2705 | 2704 | |
2706 | 2705 | echo ' |
2707 | 2706 | <li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>'; |