@@ -345,7 +345,7 @@ |
||
| 345 | 345 | } |
| 346 | 346 | else |
| 347 | 347 | { |
| 348 | - list ($context['login_token_var'], , , $context['login_token']) = $_SESSION['token']['post-login']; |
|
| 348 | + list ($context['login_token_var'],,, $context['login_token']) = $_SESSION['token']['post-login']; |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | // Do we perhaps think this is a search robot? |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | ORDER BY m.icon_order', |
| 45 | 45 | [] |
| 46 | 46 | )->fetch_callback( |
| 47 | - function ($row) use (&$icons, &$last_icon, &$trueOrder) { |
|
| 47 | + function($row) use (&$icons, &$last_icon, &$trueOrder) { |
|
| 48 | 48 | global $settings, $txt; |
| 49 | 49 | |
| 50 | 50 | $icons[$row['id_icon']] = [ |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | 'type' => 'callback', |
| 458 | 458 | 'callback_func' => 'birthdate', |
| 459 | 459 | 'permission' => 'profile_extra', |
| 460 | - 'preload' => function () { |
|
| 460 | + 'preload' => function() { |
|
| 461 | 461 | global $cur_profile, $context; |
| 462 | 462 | |
| 463 | 463 | // Split up the birth date.... |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | |
| 471 | 471 | return true; |
| 472 | 472 | }, |
| 473 | - 'input_validate' => function (&$value) { |
|
| 473 | + 'input_validate' => function(&$value) { |
|
| 474 | 474 | global $profile_vars, $cur_profile; |
| 475 | 475 | |
| 476 | 476 | if (isset($_POST['bday2'], $_POST['bday3']) && $value > 0 && $_POST['bday2'] > 0) |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | 'birthdate' => array( |
| 501 | 501 | 'type' => 'hidden', |
| 502 | 502 | 'permission' => 'profile_extra', |
| 503 | - 'input_validate' => function (&$value) { |
|
| 503 | + 'input_validate' => function(&$value) { |
|
| 504 | 504 | global $cur_profile; |
| 505 | 505 | |
| 506 | 506 | // @todo Should we check for this year and tell them they made a mistake :P? (based on coppa at least?) |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | 'label' => $txt['date_registered'], |
| 525 | 525 | 'log_change' => true, |
| 526 | 526 | 'permission' => 'moderate_forum', |
| 527 | - 'input_validate' => function (&$value) { |
|
| 527 | + 'input_validate' => function(&$value) { |
|
| 528 | 528 | global $txt, $modSettings, $cur_profile; |
| 529 | 529 | |
| 530 | 530 | // Bad date! Go try again - please? |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | 'subtext' => $txt['valid_email'], |
| 554 | 554 | 'log_change' => true, |
| 555 | 555 | 'permission' => 'profile_identity', |
| 556 | - 'input_validate' => function (&$value) { |
|
| 556 | + 'input_validate' => function(&$value) { |
|
| 557 | 557 | global $context, $old_profile, $profile_vars, $modSettings; |
| 558 | 558 | |
| 559 | 559 | if (strtolower($value) === strtolower($old_profile['email_address'])) |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | 'value' => empty($cur_profile['hide_email']), |
| 583 | 583 | 'label' => $txt['allow_user_email'], |
| 584 | 584 | 'permission' => 'profile_identity', |
| 585 | - 'input_validate' => function (&$value) { |
|
| 585 | + 'input_validate' => function(&$value) { |
|
| 586 | 586 | $value = $value == 0 ? 1 : 0; |
| 587 | 587 | |
| 588 | 588 | return true; |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | 'callback_func' => 'theme_pick', |
| 603 | 603 | 'permission' => 'profile_extra', |
| 604 | 604 | 'enabled' => empty($settings['disable_user_variant']) || !empty($modSettings['theme_allow']) || allowedTo('admin_forum'), |
| 605 | - 'preload' => function () { |
|
| 605 | + 'preload' => function() { |
|
| 606 | 606 | global $context, $cur_profile, $txt; |
| 607 | 607 | |
| 608 | 608 | $db = database(); |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | |
| 628 | 628 | return true; |
| 629 | 629 | }, |
| 630 | - 'input_validate' => function (&$value) { |
|
| 630 | + 'input_validate' => function(&$value) { |
|
| 631 | 631 | $value = (int) $value; |
| 632 | 632 | |
| 633 | 633 | return true; |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | 'callback_func' => 'karma_modify', |
| 639 | 639 | 'permission' => 'admin_forum', |
| 640 | 640 | // Set karma_bad too! |
| 641 | - 'input_validate' => function (&$value) { |
|
| 641 | + 'input_validate' => function(&$value) { |
|
| 642 | 642 | global $profile_vars, $cur_profile; |
| 643 | 643 | |
| 644 | 644 | $value = (int) $value; |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | return true; |
| 652 | 652 | }, |
| 653 | - 'preload' => function () { |
|
| 653 | + 'preload' => function() { |
|
| 654 | 654 | global $context, $cur_profile; |
| 655 | 655 | |
| 656 | 656 | $context['member']['karma'] = array( |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | 'preload' => 'profileLoadLanguages', |
| 671 | 671 | 'enabled' => !empty($modSettings['userLanguage']), |
| 672 | 672 | 'value' => empty($cur_profile['lngfile']) ? $language : $cur_profile['lngfile'], |
| 673 | - 'input_validate' => function (&$value) { |
|
| 673 | + 'input_validate' => function(&$value) { |
|
| 674 | 674 | global $context, $cur_profile; |
| 675 | 675 | |
| 676 | 676 | // Load the languages. |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | 'log_change' => true, |
| 702 | 702 | 'permission' => 'profile_identity', |
| 703 | 703 | 'prehtml' => allowedTo('admin_forum') && isset($_GET['changeusername']) ? '<div class="warningbox">' . $txt['username_warning'] . '</div>' : '', |
| 704 | - 'input_validate' => function (&$value) { |
|
| 704 | + 'input_validate' => function(&$value) { |
|
| 705 | 705 | global $context, $cur_profile; |
| 706 | 706 | |
| 707 | 707 | if (allowedTo('admin_forum')) |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | 'permission' => 'profile_identity', |
| 759 | 759 | 'save_key' => 'passwd', |
| 760 | 760 | // Note this will only work if passwrd2 also exists! |
| 761 | - 'input_validate' => function (&$value) { |
|
| 761 | + 'input_validate' => function(&$value) { |
|
| 762 | 762 | global $cur_profile; |
| 763 | 763 | |
| 764 | 764 | // If we didn't try it then ignore it! |
@@ -827,7 +827,7 @@ discard block |
||
| 827 | 827 | ), |
| 828 | 828 | 'subtext' => $txt['receive_from_description'], |
| 829 | 829 | 'value' => empty($cur_profile['receive_from']) ? 0 : $cur_profile['receive_from'], |
| 830 | - 'input_validate' => function (&$value) { |
|
| 830 | + 'input_validate' => function(&$value) { |
|
| 831 | 831 | global $cur_profile, $profile_vars; |
| 832 | 832 | |
| 833 | 833 | // Simple validate and apply the two "sub settings" |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | 'callback_func' => 'pm_settings', |
| 845 | 845 | 'permission' => 'pm_read', |
| 846 | 846 | 'save_key' => 'pm_prefs', |
| 847 | - 'preload' => function () { |
|
| 847 | + 'preload' => function() { |
|
| 848 | 848 | global $context, $cur_profile; |
| 849 | 849 | |
| 850 | 850 | $context['display_mode'] = $cur_profile['pm_prefs'] & 3; |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | |
| 853 | 853 | return true; |
| 854 | 854 | }, |
| 855 | - 'input_validate' => function (&$value) { |
|
| 855 | + 'input_validate' => function(&$value) { |
|
| 856 | 856 | global $cur_profile, $profile_vars; |
| 857 | 857 | |
| 858 | 858 | // Simple validate and apply the two "sub settings" |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | 'log_change' => true, |
| 870 | 870 | 'size' => 7, |
| 871 | 871 | 'permission' => 'moderate_forum', |
| 872 | - 'input_validate' => function (&$value) { |
|
| 872 | + 'input_validate' => function(&$value) { |
|
| 873 | 873 | // Account for comma_format presentation up front |
| 874 | 874 | $check = strtr($value, array(',' => '', '.' => '', ' ' => '')); |
| 875 | 875 | if (!is_numeric($check)) |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | 'input_attr' => array('maxlength="60"'), |
| 891 | 891 | 'permission' => 'profile_identity', |
| 892 | 892 | 'enabled' => !empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum'), |
| 893 | - 'input_validate' => function (&$value) { |
|
| 893 | + 'input_validate' => function(&$value) { |
|
| 894 | 894 | global $context, $cur_profile; |
| 895 | 895 | |
| 896 | 896 | $value = trim(preg_replace('~[\s]~u', ' ', $value)); |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | 'postinput' => '<span class="smalltext" style="margin-left: 4ex;">[<a href="' . $scripturl . '?action=quickhelp;help=secret_why_blank" onclick="return reqOverlayDiv(this.href);">' . $txt['secret_why_blank'] . '</a>]</span>', |
| 931 | 931 | 'value' => '', |
| 932 | 932 | 'permission' => 'profile_identity', |
| 933 | - 'input_validate' => function (&$value) { |
|
| 933 | + 'input_validate' => function(&$value) { |
|
| 934 | 934 | global $cur_profile; |
| 935 | 935 | |
| 936 | 936 | if (empty($value)) |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | 'callback_func' => 'theme_settings', |
| 978 | 978 | 'permission' => 'profile_extra', |
| 979 | 979 | 'is_dummy' => true, |
| 980 | - 'preload' => function () { |
|
| 980 | + 'preload' => function() { |
|
| 981 | 981 | global $context; |
| 982 | 982 | |
| 983 | 983 | Txt::load('Settings'); |
@@ -996,7 +996,7 @@ discard block |
||
| 996 | 996 | 'type' => 'callback', |
| 997 | 997 | 'callback_func' => 'timeformat_modify', |
| 998 | 998 | 'permission' => 'profile_extra', |
| 999 | - 'preload' => function () { |
|
| 999 | + 'preload' => function() { |
|
| 1000 | 1000 | global $context, $txt, $cur_profile, $modSettings; |
| 1001 | 1001 | |
| 1002 | 1002 | $context['easy_timeformats'] = array( |
@@ -1020,14 +1020,14 @@ discard block |
||
| 1020 | 1020 | 'type' => 'callback', |
| 1021 | 1021 | 'callback_func' => 'timeoffset_modify', |
| 1022 | 1022 | 'permission' => 'profile_extra', |
| 1023 | - 'preload' => function () { |
|
| 1023 | + 'preload' => function() { |
|
| 1024 | 1024 | global $context, $cur_profile; |
| 1025 | 1025 | |
| 1026 | 1026 | $context['member']['time_offset'] = $cur_profile['time_offset']; |
| 1027 | 1027 | |
| 1028 | 1028 | return true; |
| 1029 | 1029 | }, |
| 1030 | - 'input_validate' => function (&$value) { |
|
| 1030 | + 'input_validate' => function(&$value) { |
|
| 1031 | 1031 | // Validate the time_offset... |
| 1032 | 1032 | $value = (float) strtr($value, ',', '.'); |
| 1033 | 1033 | |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | 'size' => 50, |
| 1048 | 1048 | 'permission' => 'profile_title', |
| 1049 | 1049 | 'enabled' => !empty($modSettings['titlesEnable']), |
| 1050 | - 'input_validate' => function (&$value) { |
|
| 1050 | + 'input_validate' => function(&$value) { |
|
| 1051 | 1051 | if (Util::strlen($value) > 50) |
| 1052 | 1052 | { |
| 1053 | 1053 | return 'user_title_too_long'; |
@@ -1071,7 +1071,7 @@ discard block |
||
| 1071 | 1071 | 'size' => 50, |
| 1072 | 1072 | 'permission' => 'profile_extra', |
| 1073 | 1073 | // Fix the URL... |
| 1074 | - 'input_validate' => function (&$value) { |
|
| 1074 | + 'input_validate' => function(&$value) { |
|
| 1075 | 1075 | |
| 1076 | 1076 | $value = addProtocol($value, array('http://', 'https://', 'ftp://', 'ftps://')); |
| 1077 | 1077 | if (strlen($value) < 8) |
@@ -1505,7 +1505,7 @@ discard block |
||
| 1505 | 1505 | 'is_active' => 1, |
| 1506 | 1506 | ) |
| 1507 | 1507 | )->fetch_callback( |
| 1508 | - function ($row) use (&$custom_fields) { |
|
| 1508 | + function($row) use (&$custom_fields) { |
|
| 1509 | 1509 | $custom_fields[] = $row['col_name']; |
| 1510 | 1510 | } |
| 1511 | 1511 | ); |
@@ -1660,7 +1660,7 @@ discard block |
||
| 1660 | 1660 | 'id_board' => 0, |
| 1661 | 1661 | ) |
| 1662 | 1662 | )->fetch_callback( |
| 1663 | - function ($row) use (&$notification_current) { |
|
| 1663 | + function($row) use (&$notification_current) { |
|
| 1664 | 1664 | $notification_current[] = $row['id_board']; |
| 1665 | 1665 | } |
| 1666 | 1666 | ); |
@@ -2523,7 +2523,7 @@ discard block |
||
| 2523 | 2523 | 'is_protected' => 1, |
| 2524 | 2524 | ) |
| 2525 | 2525 | )->fetch_callback( |
| 2526 | - function ($row) use (&$protected_groups) { |
|
| 2526 | + function($row) use (&$protected_groups) { |
|
| 2527 | 2527 | $protected_groups[] = $row['id_group']; |
| 2528 | 2528 | } |
| 2529 | 2529 | ); |
@@ -2649,7 +2649,7 @@ discard block |
||
| 2649 | 2649 | 'warning' => 'warning', |
| 2650 | 2650 | ) |
| 2651 | 2651 | )->fetch_callback( |
| 2652 | - function ($row) use (&$previous_warnings) { |
|
| 2652 | + function($row) use (&$previous_warnings) { |
|
| 2653 | 2653 | $previous_warnings[] = array( |
| 2654 | 2654 | 'issuer' => array( |
| 2655 | 2655 | 'id' => $row['id_member'], |
@@ -2753,7 +2753,7 @@ discard block |
||
| 2753 | 2753 | 'limit' => $items_per_page, |
| 2754 | 2754 | ) |
| 2755 | 2755 | )->fetch_callback( |
| 2756 | - function ($row) use (&$attachments) { |
|
| 2756 | + function($row) use (&$attachments) { |
|
| 2757 | 2757 | global $txt, $settings, $modSettings; |
| 2758 | 2758 | |
| 2759 | 2759 | $row['subject'] = censor($row['subject']); |
@@ -2868,7 +2868,7 @@ discard block |
||
| 2868 | 2868 | 'limit' => $items_per_page, |
| 2869 | 2869 | ) |
| 2870 | 2870 | )->fetch_callback( |
| 2871 | - function ($row) use (&$topics) { |
|
| 2871 | + function($row) use (&$topics) { |
|
| 2872 | 2872 | $topics[] = $row['id_topic']; |
| 2873 | 2873 | } |
| 2874 | 2874 | ); |
@@ -2890,7 +2890,7 @@ discard block |
||
| 2890 | 2890 | 'topics' => $topics, |
| 2891 | 2891 | ) |
| 2892 | 2892 | )->fetch_callback( |
| 2893 | - function ($row) use (&$topicsInfo) { |
|
| 2893 | + function($row) use (&$topicsInfo) { |
|
| 2894 | 2894 | $topicsInfo[] = $row; |
| 2895 | 2895 | } |
| 2896 | 2896 | ); |
@@ -3251,7 +3251,7 @@ discard block |
||
| 3251 | 3251 | 'newbie_group' => 4, |
| 3252 | 3252 | ) |
| 3253 | 3253 | )->fetch_callback( |
| 3254 | - function ($row) use (&$general_permission) { |
|
| 3254 | + function($row) use (&$general_permission) { |
|
| 3255 | 3255 | global $txt; |
| 3256 | 3256 | |
| 3257 | 3257 | // We don't know about this permission, it doesn't exist :P. |
@@ -3335,7 +3335,7 @@ discard block |
||
| 3335 | 3335 | 'moderator_group' => 3, |
| 3336 | 3336 | ) |
| 3337 | 3337 | )->fetch_callback( |
| 3338 | - function ($row) use (&$board_permission, $board) { |
|
| 3338 | + function($row) use (&$board_permission, $board) { |
|
| 3339 | 3339 | global $txt; |
| 3340 | 3340 | |
| 3341 | 3341 | // We don't know about this permission, it doesn't exist :P. |
@@ -3434,7 +3434,7 @@ discard block |
||
| 3434 | 3434 | 'max_msg_member' => $max_msg_member ?? 0, |
| 3435 | 3435 | ) |
| 3436 | 3436 | )->fetch_callback( |
| 3437 | - function ($row) use (&$ips) { |
|
| 3437 | + function($row) use (&$ips) { |
|
| 3438 | 3438 | $ips[] = $row['poster_ip']; |
| 3439 | 3439 | } |
| 3440 | 3440 | ); |
@@ -3451,7 +3451,7 @@ discard block |
||
| 3451 | 3451 | 'current_member' => $memID, |
| 3452 | 3452 | ) |
| 3453 | 3453 | )->fetch_callback( |
| 3454 | - function ($row) use (&$error_ips) { |
|
| 3454 | + function($row) use (&$error_ips) { |
|
| 3455 | 3455 | $error_ips[] = $row['ip']; |
| 3456 | 3456 | } |
| 3457 | 3457 | ); |
@@ -3487,7 +3487,7 @@ discard block |
||
| 3487 | 3487 | 'ip_list' => $ips, |
| 3488 | 3488 | ) |
| 3489 | 3489 | )->fetch_callback( |
| 3490 | - function ($row) use (&$message_members) { |
|
| 3490 | + function($row) use (&$message_members) { |
|
| 3491 | 3491 | $message_members[] = $row['id_member']; |
| 3492 | 3492 | } |
| 3493 | 3493 | ); |
@@ -3504,7 +3504,7 @@ discard block |
||
| 3504 | 3504 | 'ip_list' => $ips, |
| 3505 | 3505 | ) |
| 3506 | 3506 | )->fetch_callback( |
| 3507 | - function ($row) use (&$message_members) { |
|
| 3507 | + function($row) use (&$message_members) { |
|
| 3508 | 3508 | $message_members[] = $row['id_member']; |
| 3509 | 3509 | } |
| 3510 | 3510 | ); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | 'empty' => '', |
| 156 | 156 | ) |
| 157 | 157 | )->fetch_callback( |
| 158 | - function ($row) use (&$credits) { |
|
| 158 | + function($row) use (&$credits) { |
|
| 159 | 159 | global $txt; |
| 160 | 160 | |
| 161 | 161 | $credit_info = Util::unserialize($row['credits']); |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | '<a href="https://github.com/googlefonts/noto-emoji">Noto Emoji</a> | © Googlefonts | Licensed under <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>', |
| 552 | 552 | '<a href="https://openmoji.org">OpenMoji</a> | © OpenMoji | Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0</a>', |
| 553 | 553 | '<a href="http://www.oxygen-icons.org/">Oxygen Icons</a> | These icons are licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a>', |
| 554 | - '<a href="https://github.com/twitter/twemoji">Twitter Emoji</a> | © Twitter, Inc and other contributors | Licensed under <a href="https://github.com/twitter/twemoji/blob/master/LICENSE/">MIT</a>', ), |
|
| 554 | + '<a href="https://github.com/twitter/twemoji">Twitter Emoji</a> | © Twitter, Inc and other contributors | Licensed under <a href="https://github.com/twitter/twemoji/blob/master/LICENSE/">MIT</a>',), |
|
| 555 | 555 | 'fonts' => array( |
| 556 | 556 | '<a href="http://openfontlibrary.org/en/font/architect-s-daughter">Architect\'s Daughter</a> | © 2010 <a href="http://kimberlygeswein.com/">Kimberly Geswein</a> | This font is licensed under the SIL Open Font License, Version 1.1', |
| 557 | 557 | '<a href="http://openfontlibrary.org/en/font/klaudia-and-berenika">Berenika</a> | © 2011 wmk69 | This font is licensed under the SIL Open Font License, Version 1.1', |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'admin_group' => 1, |
| 108 | 108 | ) |
| 109 | 109 | )->fetch_callback( |
| 110 | - function ($row) use (&$admins, &$emails, &$user_log_details) { |
|
| 110 | + function($row) use (&$admins, &$emails, &$user_log_details) { |
|
| 111 | 111 | if ($row['is_admin']) |
| 112 | 112 | { |
| 113 | 113 | $admins[] = $row['id_member']; |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | 'buddy_list' => implode(', buddy_list) != 0 OR FIND_IN_SET(', $users), |
| 463 | 463 | ) |
| 464 | 464 | )->fetch_callback( |
| 465 | - function ($row) use ($users) { |
|
| 465 | + function($row) use ($users) { |
|
| 466 | 466 | updateMemberData($row['id_member'], array( |
| 467 | 467 | 'pm_ignore_list' => implode(',', array_diff(explode(',', $row['pm_ignore_list']), $users)), |
| 468 | 468 | 'buddy_list' => implode(',', array_diff(explode(',', $row['buddy_list']), $users)) |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | 'permission' => $permission, |
| 1058 | 1058 | ) |
| 1059 | 1059 | )->fetch_callback( |
| 1060 | - function ($row) use (&$member_groups) { |
|
| 1060 | + function($row) use (&$member_groups) { |
|
| 1061 | 1061 | $member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group']; |
| 1062 | 1062 | } |
| 1063 | 1063 | ); |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | 'permission' => $permission, |
| 1098 | 1098 | ) |
| 1099 | 1099 | )->fetch_callback( |
| 1100 | - function ($row) use (&$member_groups) { |
|
| 1100 | + function($row) use (&$member_groups) { |
|
| 1101 | 1101 | $member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group']; |
| 1102 | 1102 | } |
| 1103 | 1103 | ); |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | 'member_group_denied_implode' => implode(', mem.additional_groups) != 0 OR FIND_IN_SET(', $member_groups['denied']), |
| 1150 | 1150 | ) |
| 1151 | 1151 | )->fetch_callback( |
| 1152 | - function ($row) { |
|
| 1152 | + function($row) { |
|
| 1153 | 1153 | return $row['id_member']; |
| 1154 | 1154 | } |
| 1155 | 1155 | ); |
@@ -1415,7 +1415,7 @@ discard block |
||
| 1415 | 1415 | 'ips' => $ips, |
| 1416 | 1416 | ) |
| 1417 | 1417 | )->fetch_callback( |
| 1418 | - function ($row) use (&$had_ips, &$duplicate_members) { |
|
| 1418 | + function($row) use (&$had_ips, &$duplicate_members) { |
|
| 1419 | 1419 | // Don't collect lots of the same. |
| 1420 | 1420 | if (isset($had_ips[$row['poster_ip']]) && in_array($row['id_member'], $had_ips[$row['poster_ip']])) |
| 1421 | 1421 | { |
@@ -1596,7 +1596,7 @@ discard block |
||
| 1596 | 1596 | ORDER BY {raw:order}' : ''), |
| 1597 | 1597 | $query_params |
| 1598 | 1598 | )->fetch_callback( |
| 1599 | - function ($row) use (&$members, $details) { |
|
| 1599 | + function($row) use (&$members, $details) { |
|
| 1600 | 1600 | // Return all the details for each member found |
| 1601 | 1601 | if ($details) |
| 1602 | 1602 | { |
@@ -1664,7 +1664,7 @@ discard block |
||
| 1664 | 1664 | { |
| 1665 | 1665 | $allowed_conditions = array( |
| 1666 | 1666 | 'member_ids' => 'id_member IN ({array_int:member_ids})', |
| 1667 | - 'member_names' => function (&$members) { |
|
| 1667 | + 'member_names' => function(&$members) { |
|
| 1668 | 1668 | $mem_query = array(); |
| 1669 | 1669 | |
| 1670 | 1670 | foreach ($members['member_names'] as $key => $param) |
@@ -1777,7 +1777,7 @@ discard block |
||
| 1777 | 1777 | 'specific_admin' => isset($id_admin) ? (int) $id_admin : 0, |
| 1778 | 1778 | ) |
| 1779 | 1779 | )->fetch_callback( |
| 1780 | - function ($row) use (&$admins) { |
|
| 1780 | + function($row) use (&$admins) { |
|
| 1781 | 1781 | $admins[$row['id_member']] = array($row['real_name'], $row['lngfile']); |
| 1782 | 1782 | } |
| 1783 | 1783 | ); |
@@ -1871,7 +1871,7 @@ discard block |
||
| 1871 | 1871 | 'sort' => $options['sort'] ?? '', |
| 1872 | 1872 | ) |
| 1873 | 1873 | )->fetch_callback( |
| 1874 | - function ($row) use (&$members, $language, $single) { |
|
| 1874 | + function($row) use (&$members, $language, $single) { |
|
| 1875 | 1875 | if (empty($row['lngfile'])) |
| 1876 | 1876 | { |
| 1877 | 1877 | $row['lngfile'] = $language; |
@@ -1913,7 +1913,7 @@ discard block |
||
| 1913 | 1913 | 'is_activated' => 1, |
| 1914 | 1914 | ) |
| 1915 | 1915 | )->fetch_callback( |
| 1916 | - function ($row) use (&$inactive_members) { |
|
| 1916 | + function($row) use (&$inactive_members) { |
|
| 1917 | 1917 | $inactive_members[$row['is_activated']] = $row['total_members']; |
| 1918 | 1918 | } |
| 1919 | 1919 | ); |
@@ -1993,7 +1993,7 @@ discard block |
||
| 1993 | 1993 | 'limit' => Util::strlen($search) <= 2 ? 100 : 200, |
| 1994 | 1994 | ) |
| 1995 | 1995 | )->fetch_callback( |
| 1996 | - function ($row) { |
|
| 1996 | + function($row) { |
|
| 1997 | 1997 | $row['real_name'] = strtr($row['real_name'], array('&' => '&', '<' => '<', '>' => '>', '"' => '"')); |
| 1998 | 1998 | |
| 1999 | 1999 | return array( |
@@ -2083,7 +2083,7 @@ discard block |
||
| 2083 | 2083 | ORDER BY {raw:order_by}' . $limit, |
| 2084 | 2084 | $conditions |
| 2085 | 2085 | )->fetch_callback( |
| 2086 | - function ($row) use (&$data) { |
|
| 2086 | + function($row) use (&$data) { |
|
| 2087 | 2087 | global $modSettings, $language; |
| 2088 | 2088 | |
| 2089 | 2089 | $data['members'][] = $row['id_member']; |
@@ -2389,7 +2389,7 @@ discard block |
||
| 2389 | 2389 | 'request_list' => $groups, |
| 2390 | 2390 | ) |
| 2391 | 2391 | )->fetch_callback( |
| 2392 | - function ($row) use (&$email_details, &$group_changes, $change_groups) { |
|
| 2392 | + function($row) use (&$email_details, &$group_changes, $change_groups) { |
|
| 2393 | 2393 | global $modSettings, $language; |
| 2394 | 2394 | |
| 2395 | 2395 | $row['lngfile'] = empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile']; |
@@ -2708,7 +2708,7 @@ discard block |
||
| 2708 | 2708 | WHERE ' . $condition, |
| 2709 | 2709 | $parameters |
| 2710 | 2710 | )->fetch_callback( |
| 2711 | - function ($row) { |
|
| 2711 | + function($row) { |
|
| 2712 | 2712 | return $row['member_name']; |
| 2713 | 2713 | } |
| 2714 | 2714 | ); |
@@ -2822,7 +2822,7 @@ discard block |
||
| 2822 | 2822 | 'ip_address' => $ip_var, |
| 2823 | 2823 | ) |
| 2824 | 2824 | )->fetch_callback( |
| 2825 | - function ($row) use (&$ips) { |
|
| 2825 | + function($row) use (&$ips) { |
|
| 2826 | 2826 | $ips[$row['member_ip']][] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['display_name']]) . '">' . $row['display_name'] . '</a>'; |
| 2827 | 2827 | } |
| 2828 | 2828 | ); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | 'smiley_list' => $smileys, |
| 44 | 44 | ] |
| 45 | 45 | )->fetch_callback( |
| 46 | - function ($row) use (&$found) { |
|
| 46 | + function($row) use (&$found) { |
|
| 47 | 47 | $found[] = $row['filename']; |
| 48 | 48 | } |
| 49 | 49 | ); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | 'current_smiley' => $id, |
| 213 | 213 | ] |
| 214 | 214 | )->fetch_callback( |
| 215 | - function ($row) use (&$current_smiley) |
|
| 215 | + function($row) use (&$current_smiley) |
|
| 216 | 216 | { |
| 217 | 217 | $current_smiley = [ |
| 218 | 218 | 'id' => $row['id'], |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | 'hidden' => 1, |
| 381 | 381 | ] |
| 382 | 382 | )->fetch_callback( |
| 383 | - function ($row) use (&$smileys) { |
|
| 383 | + function($row) use (&$smileys) { |
|
| 384 | 384 | global $context; |
| 385 | 385 | |
| 386 | 386 | $location = empty($row['hidden']) ? 'postform' : 'popup'; |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | { |
| 630 | 630 | global $modSettings; |
| 631 | 631 | |
| 632 | - $smiley_types = ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg']; |
|
| 632 | + $smiley_types = ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg']; |
|
| 633 | 633 | $smileys_dir = empty($modSettings['smileys_dir']) ? BOARDDIR . '/smileys' : $modSettings['smileys_dir']; |
| 634 | 634 | $fileFunc = FileFunctions::instance(); |
| 635 | 635 | $extensionTypes = []; |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | ORDER BY smiley_row, smiley_order', |
| 688 | 688 | [] |
| 689 | 689 | )->fetch_callback( |
| 690 | - function ($row) use (&$smileys, $context) { |
|
| 690 | + function($row) use (&$smileys, $context) { |
|
| 691 | 691 | $filename = $row['filename'] . '.' . $context['smiley_extension']; |
| 692 | 692 | if (possibleSmileEmoji($row)) |
| 693 | 693 | { |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | if ($test !== $row['filename'] && preg_match('~data-emoji-code=["\'](.*?)["\']~', $test, $result)) |
| 739 | 739 | { |
| 740 | 740 | // Valid emoji, set the filename to the proper emoji file and type |
| 741 | - $row['emoji'] = $result[1]; |
|
| 741 | + $row['emoji'] = $result[1]; |
|
| 742 | 742 | return true; |
| 743 | 743 | } |
| 744 | 744 | } |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
| 599 | 599 | ] |
| 600 | 600 | )->fetch_callback( |
| 601 | - function ($row) use (&$removals, &$permissions) { |
|
| 601 | + function($row) use (&$removals, &$permissions) { |
|
| 602 | 602 | if (empty($row['add_deny'])) |
| 603 | 603 | { |
| 604 | 604 | $removals[] = $row['permission']; |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
| 639 | 639 | ) |
| 640 | 640 | )->fetch_callback( |
| 641 | - function ($row) use (&$removals, &$permissions) { |
|
| 641 | + function($row) use (&$removals, &$permissions) { |
|
| 642 | 642 | if (empty($row['add_deny'])) |
| 643 | 643 | { |
| 644 | 644 | $removals[] = $row['permission']; |
@@ -1387,7 +1387,7 @@ discard block |
||
| 1387 | 1387 | // TODO: This should be incorporated into the theme. |
| 1388 | 1388 | $avatar = [ |
| 1389 | 1389 | 'name' => '', |
| 1390 | - 'image' => '<img class="avatar avatarresize" src="' . $href .'" alt="' . $alt . '" loading="lazy" />', |
|
| 1390 | + 'image' => '<img class="avatar avatarresize" src="' . $href . '" alt="' . $alt . '" loading="lazy" />', |
|
| 1391 | 1391 | 'href' => $href, |
| 1392 | 1392 | 'url' => 'https://', |
| 1393 | 1393 | ]; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | (' . implode(' OR ', $ban_query) . ')', |
| 354 | 354 | $ban_query_vars |
| 355 | 355 | )->fetch_callback( |
| 356 | - function ($row) use ($restrictions, &$flag_is_activated) { |
|
| 356 | + function($row) use ($restrictions, &$flag_is_activated) { |
|
| 357 | 357 | // Store every type of ban that applies to you in your session. |
| 358 | 358 | foreach ($restrictions as $restriction) |
| 359 | 359 | { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | 'current_time' => time(), |
| 416 | 416 | ) |
| 417 | 417 | )->fetch_callback( |
| 418 | - function ($row) { |
|
| 418 | + function($row) { |
|
| 419 | 419 | $_SESSION['ban']['cannot_access']['ids'][] = $row['id_ban']; |
| 420 | 420 | $_SESSION['ban']['cannot_access']['reason'] = $row['reason']; |
| 421 | 421 | } |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | 'now' => time(), |
| 702 | 702 | ) |
| 703 | 703 | )->fetch_callback( |
| 704 | - function ($row) use (&$ban_ids, &$ban_reason, $restriction) { |
|
| 704 | + function($row) use (&$ban_ids, &$ban_reason, $restriction) { |
|
| 705 | 705 | if (!empty($row['cannot_access'])) |
| 706 | 706 | { |
| 707 | 707 | $_SESSION['ban']['cannot_access']['ids'][] = $row['id_ban']; |
@@ -1345,7 +1345,7 @@ discard block |
||
| 1345 | 1345 | 'permissions' => $permissions, |
| 1346 | 1346 | ) |
| 1347 | 1347 | )->fetch_callback( |
| 1348 | - function ($row) use ($simple, &$deny_boards, &$boards) { |
|
| 1348 | + function($row) use ($simple, &$deny_boards, &$boards) { |
|
| 1349 | 1349 | if ($simple) |
| 1350 | 1350 | { |
| 1351 | 1351 | if (empty($row['add_deny'])) |
@@ -1550,7 +1550,7 @@ discard block |
||
| 1550 | 1550 | |
| 1551 | 1551 | // How deep is this from our boarddir |
| 1552 | 1552 | $tree = explode(DIRECTORY_SEPARATOR, $path); |
| 1553 | - $root = explode(DIRECTORY_SEPARATOR,BOARDDIR); |
|
| 1553 | + $root = explode(DIRECTORY_SEPARATOR, BOARDDIR); |
|
| 1554 | 1554 | $count = max(count($tree) - count($root), 0); |
| 1555 | 1555 | |
| 1556 | 1556 | $errors = array(); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | private function _merge_all_icons() |
| 78 | 78 | { |
| 79 | 79 | // Merge in additional ones |
| 80 | - $custom_icons = array_map(static function ($element) { |
|
| 80 | + $custom_icons = array_map(static function($element) { |
|
| 81 | 81 | return $element['value']; |
| 82 | 82 | }, $this->_custom_icons); |
| 83 | 83 | |