@@ -1482,7 +1482,7 @@ discard block |
||
| 1482 | 1482 | { |
| 1483 | 1483 | if (!empty($options['admin_preferences'])) |
| 1484 | 1484 | { |
| 1485 | - $options['admin_preferences'] = serializeToJson($options['admin_preferences'], static function ($array_form) { |
|
| 1485 | + $options['admin_preferences'] = serializeToJson($options['admin_preferences'], static function($array_form) { |
|
| 1486 | 1486 | global $context; |
| 1487 | 1487 | |
| 1488 | 1488 | $context['admin_preferences'] = $array_form; |
@@ -1509,7 +1509,7 @@ discard block |
||
| 1509 | 1509 | { |
| 1510 | 1510 | if (!empty($options['minmax_preferences'])) |
| 1511 | 1511 | { |
| 1512 | - $minmax_preferences = serializeToJson($options['minmax_preferences'], static function ($array_form) use ($settings) { |
|
| 1512 | + $minmax_preferences = serializeToJson($options['minmax_preferences'], static function($array_form) use ($settings) { |
|
| 1513 | 1513 | // Update the option. |
| 1514 | 1514 | require_once(SUBSDIR . '/Themes.subs.php'); |
| 1515 | 1515 | updateThemeOptions(array($settings['theme_id'], User::$info->id, 'minmax_preferences', json_encode($array_form))); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | 'is_protected' => 1, |
| 70 | 70 | ) |
| 71 | 71 | )->fetch_callback( |
| 72 | - function ($row) use (&$protected_groups) { |
|
| 72 | + function($row) use (&$protected_groups) { |
|
| 73 | 73 | $protected_groups[] = $row['id_group']; |
| 74 | 74 | } |
| 75 | 75 | ); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | 'additional_groups_explode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups), |
| 166 | 166 | ) |
| 167 | 167 | )->fetch_callback( |
| 168 | - function ($row) use (&$updates) { |
|
| 168 | + function($row) use (&$updates) { |
|
| 169 | 169 | // Update each member information. |
| 170 | 170 | $updates[$row['additional_groups']][] = $row['id_member']; |
| 171 | 171 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | 'member_groups_explode' => implode(', member_groups) != 0 OR FIND_IN_SET(', $groups), |
| 189 | 189 | ) |
| 190 | 190 | )->fetch_callback( |
| 191 | - function ($row) use (&$updates) { |
|
| 191 | + function($row) use (&$updates) { |
|
| 192 | 192 | $updates[$row['member_groups']][] = $row['id_board']; |
| 193 | 193 | } |
| 194 | 194 | ); |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | 'is_protected' => 1, |
| 364 | 364 | ) |
| 365 | 365 | )->fetch_callback( |
| 366 | - function ($row) use (&$protected_groups) { |
|
| 366 | + function($row) use (&$protected_groups) { |
|
| 367 | 367 | $protected_groups[] = $row['id_group']; |
| 368 | 368 | } |
| 369 | 369 | ); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | 'member_list' => $members, |
| 391 | 391 | ) |
| 392 | 392 | )->fetch_callback( |
| 393 | - function ($row) use ($group_names) { |
|
| 393 | + function($row) use ($group_names) { |
|
| 394 | 394 | return array('group' => $group_names[$row['id_group']], 'member' => $row['id_member']); |
| 395 | 395 | } |
| 396 | 396 | ); |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | 'additional_groups_implode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups), |
| 422 | 422 | ) |
| 423 | 423 | )->fetch_callback( |
| 424 | - function ($row) use (&$updates, $groups, $group_names) { |
|
| 424 | + function($row) use (&$updates, $groups, $group_names) { |
|
| 425 | 425 | // What log entries must we make for this one, eh? |
| 426 | 426 | foreach (explode(',', $row['additional_groups']) as $group) |
| 427 | 427 | { |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | 'id_group' => $membergroup, |
| 633 | 633 | ) |
| 634 | 634 | )->fetch_callback( |
| 635 | - function ($row) use (&$members) { |
|
| 635 | + function($row) use (&$members) { |
|
| 636 | 636 | $members[$row['id_member']] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>'; |
| 637 | 637 | } |
| 638 | 638 | ); |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | 'blank_string' => '', |
| 674 | 674 | ) |
| 675 | 675 | )->fetch_callback( |
| 676 | - function ($row) { |
|
| 676 | + function($row) { |
|
| 677 | 677 | return '<a href="' . getUrl('group', ['action' => 'groups', 'sa' => 'members', 'group' => $row['id_group'], 'name' => $row['group_name']]) . '" ' . ($row['online_color'] ? 'style="color: ' . $row['online_color'] . '"' : '') . '>' . $row['group_name'] . '</a>'; |
| 678 | 678 | } |
| 679 | 679 | ); |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | 'sort' => $sort, |
| 774 | 774 | ) |
| 775 | 775 | )->fetch_callback( |
| 776 | - function ($row) use (&$parent_groups, &$groups, &$group_ids, &$include_hidden, $count_permissions, $aggregate) { |
|
| 776 | + function($row) use (&$parent_groups, &$groups, &$group_ids, &$include_hidden, $count_permissions, $aggregate) { |
|
| 777 | 777 | global $txt; |
| 778 | 778 | |
| 779 | 779 | // We only list the groups they can see. |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | 'group_list' => $group_ids, |
| 857 | 857 | ) |
| 858 | 858 | )->fetch_callback( |
| 859 | - function ($row) use (&$groups) { |
|
| 859 | + function($row) use (&$groups) { |
|
| 860 | 860 | $groups[$row['id_group']]['moderators'][] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>'; |
| 861 | 861 | } |
| 862 | 862 | ); |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | 'groups' => $parent_groups, |
| 878 | 878 | ) |
| 879 | 879 | )->fetch_callback( |
| 880 | - function ($row) use (&$all_group_names) { |
|
| 880 | + function($row) use (&$all_group_names) { |
|
| 881 | 881 | $all_group_names[$row['id_group']] = $row['group_name']; |
| 882 | 882 | } |
| 883 | 883 | ); |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | 'active_members' => 1, |
| 956 | 956 | ) |
| 957 | 957 | )->fetch_callback( |
| 958 | - function ($row) use (&$groups) { |
|
| 958 | + function($row) use (&$groups) { |
|
| 959 | 959 | $groups[$row['id_group']] = $row['member_count']; |
| 960 | 960 | } |
| 961 | 961 | ); |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | 'active_members' => 1, |
| 977 | 977 | ) |
| 978 | 978 | )->fetch_callback( |
| 979 | - function ($row) use (&$groups) { |
|
| 979 | + function($row) use (&$groups) { |
|
| 980 | 980 | $groups[$row['id_group']] = $row['member_count']; |
| 981 | 981 | } |
| 982 | 982 | ); |
@@ -1001,7 +1001,7 @@ discard block |
||
| 1001 | 1001 | 'blank_string' => '', |
| 1002 | 1002 | ) |
| 1003 | 1003 | )->fetch_callback( |
| 1004 | - function ($row) use (&$groups) { |
|
| 1004 | + function($row) use (&$groups) { |
|
| 1005 | 1005 | if (isset($groups[$row['id_group']])) |
| 1006 | 1006 | { |
| 1007 | 1007 | $groups[$row['id_group']] += $row['member_count']; |
@@ -1073,7 +1073,7 @@ discard block |
||
| 1073 | 1073 | 'limit' => $limit, |
| 1074 | 1074 | ) |
| 1075 | 1075 | )->fetch_callback( |
| 1076 | - function ($row) use (&$groups, $detailed) { |
|
| 1076 | + function($row) use (&$groups, $detailed) { |
|
| 1077 | 1077 | $row['id_group'] = (int) $row['id_group']; |
| 1078 | 1078 | $row['group_type'] = (int) $row['group_type']; |
| 1079 | 1079 | |
@@ -1307,7 +1307,7 @@ discard block |
||
| 1307 | 1307 | 'group_list' => $groupList, |
| 1308 | 1308 | ) |
| 1309 | 1309 | )->fetch_callback( |
| 1310 | - function ($row) use (&$groups) { |
|
| 1310 | + function($row) use (&$groups) { |
|
| 1311 | 1311 | $groups[$row['id_group']] = array( |
| 1312 | 1312 | 'id' => $row['id_group'], |
| 1313 | 1313 | 'name' => $row['group_name'], |
@@ -1393,7 +1393,7 @@ discard block |
||
| 1393 | 1393 | 'copy_from' => $copy_from, |
| 1394 | 1394 | ) |
| 1395 | 1395 | )->fetch_callback( |
| 1396 | - function ($row) use (&$inserts, $illegal_permissions, $id_group) { |
|
| 1396 | + function($row) use (&$inserts, $illegal_permissions, $id_group) { |
|
| 1397 | 1397 | if (empty($illegal_permissions) || !in_array($row['permission'], $illegal_permissions)) |
| 1398 | 1398 | { |
| 1399 | 1399 | $inserts[] = array($id_group, $row['permission'], $row['add_deny']); |
@@ -1432,7 +1432,7 @@ discard block |
||
| 1432 | 1432 | 'copy_from' => $copy_from, |
| 1433 | 1433 | ) |
| 1434 | 1434 | )->fetch_callback( |
| 1435 | - function ($row) use ($id_group) { |
|
| 1435 | + function($row) use ($id_group) { |
|
| 1436 | 1436 | return array($id_group, $row['id_profile'], $row['permission'], $row['add_deny']); |
| 1437 | 1437 | } |
| 1438 | 1438 | ); |
@@ -1582,7 +1582,7 @@ discard block |
||
| 1582 | 1582 | 'column' => $access_list === 'allow' ? 'member_groups' : 'deny_member_groups', |
| 1583 | 1583 | ) |
| 1584 | 1584 | )->fetch_callback( |
| 1585 | - function ($row) use ($id_group, $access_list, $db) { |
|
| 1585 | + function($row) use ($id_group, $access_list, $db) { |
|
| 1586 | 1586 | $db->query('', ' |
| 1587 | 1587 | UPDATE {db_prefix}boards |
| 1588 | 1588 | SET {raw:column} = {string:member_group_access} |
@@ -1657,7 +1657,7 @@ discard block |
||
| 1657 | 1657 | 'current_group' => $id_group, |
| 1658 | 1658 | ) |
| 1659 | 1659 | )->fetch_callback( |
| 1660 | - function ($row) use (&$updates) { |
|
| 1660 | + function($row) use (&$updates) { |
|
| 1661 | 1661 | $updates[$row['additional_groups']][] = $row['id_member']; |
| 1662 | 1662 | } |
| 1663 | 1663 | ); |
@@ -1692,7 +1692,7 @@ discard block |
||
| 1692 | 1692 | 'current_group' => $id_group, |
| 1693 | 1693 | ) |
| 1694 | 1694 | )->fetch_callback( |
| 1695 | - function ($row) use (&$updates) { |
|
| 1695 | + function($row) use (&$updates) { |
|
| 1696 | 1696 | $updates[$row['additional_groups']][] = $row['id_member']; |
| 1697 | 1697 | } |
| 1698 | 1698 | ); |
@@ -1786,7 +1786,7 @@ discard block |
||
| 1786 | 1786 | 'moderators' => $moderators, |
| 1787 | 1787 | ) |
| 1788 | 1788 | )->fetch_callback( |
| 1789 | - function ($row) { |
|
| 1789 | + function($row) { |
|
| 1790 | 1790 | return $row['id_member']; |
| 1791 | 1791 | } |
| 1792 | 1792 | ); |
@@ -1840,7 +1840,7 @@ discard block |
||
| 1840 | 1840 | 'current_group' => $id_group, |
| 1841 | 1841 | ) |
| 1842 | 1842 | )->fetch_callback( |
| 1843 | - function ($row) use (&$moderators) { |
|
| 1843 | + function($row) use (&$moderators) { |
|
| 1844 | 1844 | $moderators[$row['id_member']] = $row['real_name']; |
| 1845 | 1845 | } |
| 1846 | 1846 | ); |
@@ -1882,7 +1882,7 @@ discard block |
||
| 1882 | 1882 | 'is_protected' => 1, |
| 1883 | 1883 | ) |
| 1884 | 1884 | )->fetch_callback( |
| 1885 | - function ($row) use (&$inheritable_groups) { |
|
| 1885 | + function($row) use (&$inheritable_groups) { |
|
| 1886 | 1886 | $inheritable_groups[$row['id_group']] = $row['group_name']; |
| 1887 | 1887 | } |
| 1888 | 1888 | ); |
@@ -1938,7 +1938,7 @@ discard block |
||
| 1938 | 1938 | 'min_posts' => -1, |
| 1939 | 1939 | ) |
| 1940 | 1940 | )->fetch_callback( |
| 1941 | - function ($row) use (&$profile_groups) { |
|
| 1941 | + function($row) use (&$profile_groups) { |
|
| 1942 | 1942 | if ($row['id_parent'] == -2) |
| 1943 | 1943 | { |
| 1944 | 1944 | $profile_groups[$row['id_group']] = array( |
@@ -1995,7 +1995,7 @@ discard block |
||
| 1995 | 1995 | 'not_hidden' => 0, |
| 1996 | 1996 | ) |
| 1997 | 1997 | )->fetch_callback( |
| 1998 | - function ($row) use (&$groups, $show_hidden) { |
|
| 1998 | + function($row) use (&$groups, $show_hidden) { |
|
| 1999 | 1999 | // Hide hidden groups! |
| 2000 | 2000 | if ($show_hidden && $row['hidden'] && !$row['can_moderate']) |
| 2001 | 2001 | { |
@@ -2036,7 +2036,7 @@ discard block |
||
| 2036 | 2036 | 'moderator_group' => 3, |
| 2037 | 2037 | ) |
| 2038 | 2038 | )->fetch_callback( |
| 2039 | - function ($row) use (&$groups) { |
|
| 2039 | + function($row) use (&$groups) { |
|
| 2040 | 2040 | // Hide hidden groups! |
| 2041 | 2041 | if ($row['hidden'] && !$row['can_moderate'] && !allowedTo('manage_membergroups')) |
| 2042 | 2042 | { |
@@ -2116,7 +2116,7 @@ discard block |
||
| 2116 | 2116 | 'sort' => $sort, |
| 2117 | 2117 | )) |
| 2118 | 2118 | )->fetch_callback( |
| 2119 | - function ($row) { |
|
| 2119 | + function($row) { |
|
| 2120 | 2120 | return array( |
| 2121 | 2121 | 'id' => $row['id_request'], |
| 2122 | 2122 | 'member_link' => '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>', |
@@ -2180,7 +2180,7 @@ discard block |
||
| 2180 | 2180 | 'min_posts' => -1, |
| 2181 | 2181 | ) |
| 2182 | 2182 | )->fetch_callback( |
| 2183 | - function ($row) use (&$postgroups) { |
|
| 2183 | + function($row) use (&$postgroups) { |
|
| 2184 | 2184 | $postgroups[$row['id_group']] = $row['min_posts']; |
| 2185 | 2185 | } |
| 2186 | 2186 | ); |
@@ -2241,7 +2241,7 @@ discard block |
||
| 2241 | 2241 | 'is_protected' => 1, |
| 2242 | 2242 | ) |
| 2243 | 2243 | )->fetch_callback( |
| 2244 | - function ($row) { |
|
| 2244 | + function($row) { |
|
| 2245 | 2245 | return $row['id_group']; |
| 2246 | 2246 | }, |
| 2247 | 2247 | array(-1, 3) |
@@ -2286,7 +2286,7 @@ discard block |
||
| 2286 | 2286 | 'newbie_group' => 4, |
| 2287 | 2287 | ) |
| 2288 | 2288 | )->fetch_callback( |
| 2289 | - function ($row) use (&$member_groups) { |
|
| 2289 | + function($row) use (&$member_groups) { |
|
| 2290 | 2290 | // We should skip the administrator group if they don't have the admin_forum permission! |
| 2291 | 2291 | if ($row['id_group'] == 1 && !allowedTo('admin_forum')) |
| 2292 | 2292 | { |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | 'class' => 'grid50', |
| 459 | 459 | ), |
| 460 | 460 | 'data' => array( |
| 461 | - 'function' => static function ($rowData) { |
|
| 461 | + 'function' => static function($rowData) { |
|
| 462 | 462 | global $modSettings, $context; |
| 463 | 463 | |
| 464 | 464 | $link = '<a href="'; |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | 'class' => 'nowrap', |
| 521 | 521 | ), |
| 522 | 522 | 'data' => array( |
| 523 | - 'function' => static function ($rowData) { |
|
| 523 | + 'function' => static function($rowData) { |
|
| 524 | 524 | // In case of an attachment, return the poster of the attachment. |
| 525 | 525 | if (empty($rowData['id_member'])) |
| 526 | 526 | { |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | 'class' => 'nowrap', |
| 542 | 542 | ), |
| 543 | 543 | 'data' => array( |
| 544 | - 'function' => static function ($rowData) { |
|
| 544 | + 'function' => static function($rowData) { |
|
| 545 | 545 | global $txt, $context; |
| 546 | 546 | |
| 547 | 547 | // The date the message containing the attachment was posted or the owner of the avatar was active. |
@@ -1545,7 +1545,7 @@ discard block |
||
| 1545 | 1545 | |
| 1546 | 1546 | // Removed from selection (not disc) |
| 1547 | 1547 | unset($attachmentBaseDirectories[$id]); |
| 1548 | - $update = ['attachment_basedirectories' => empty($attachmentBaseDirectories) ? '' : serialize($attachmentBaseDirectories), 'basedirectory_for_attachments' => $attachmentUploadDir[$current_base_dir] ?? '',]; |
|
| 1548 | + $update = ['attachment_basedirectories' => empty($attachmentBaseDirectories) ? '' : serialize($attachmentBaseDirectories), 'basedirectory_for_attachments' => $attachmentUploadDir[$current_base_dir] ?? '', ]; |
|
| 1549 | 1549 | } |
| 1550 | 1550 | } |
| 1551 | 1551 | } |
@@ -1576,7 +1576,7 @@ discard block |
||
| 1576 | 1576 | } |
| 1577 | 1577 | |
| 1578 | 1578 | ksort($attachmentBaseDirectories); |
| 1579 | - $update = ['attachment_basedirectories' => serialize($attachmentBaseDirectories), 'basedirectory_for_attachments' => $new_base_dir, 'currentAttachmentUploadDir' => $current_dir,]; |
|
| 1579 | + $update = ['attachment_basedirectories' => serialize($attachmentBaseDirectories), 'basedirectory_for_attachments' => $new_base_dir, 'currentAttachmentUploadDir' => $current_dir, ]; |
|
| 1580 | 1580 | } |
| 1581 | 1581 | |
| 1582 | 1582 | $_SESSION['errors']['base'] = $errors ?? null; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'attachment_type' => 0, |
| 55 | 55 | ] |
| 56 | 56 | )->fetch_callback( |
| 57 | - function ($row) use (&$attachments) { |
|
| 57 | + function($row) use (&$attachments) { |
|
| 58 | 58 | // Update the thumbnail too... |
| 59 | 59 | if (!empty($row['id_thumb'])) |
| 60 | 60 | { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | 'attachment_type' => 0, |
| 96 | 96 | ] |
| 97 | 97 | )->fetch_callback( |
| 98 | - function ($row) { |
|
| 98 | + function($row) { |
|
| 99 | 99 | logAction( |
| 100 | 100 | 'approve_attach', |
| 101 | 101 | [ |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | WHERE ' . $condition, |
| 217 | 217 | $query_parameter |
| 218 | 218 | )->fetch_callback( |
| 219 | - function ($row) use (&$attach, &$parents, &$msgs, $return_affected_messages, $autoThumbRemoval) { |
|
| 219 | + function($row) use (&$attach, &$parents, &$msgs, $return_affected_messages, $autoThumbRemoval) { |
|
| 220 | 220 | global $modSettings; |
| 221 | 221 | |
| 222 | 222 | // Figure out the "encrypted" filename and unlink it ;). |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | 'attachment_type' => 0, |
| 286 | 286 | ] |
| 287 | 287 | )->fetch_callback( |
| 288 | - function ($row) { |
|
| 288 | + function($row) { |
|
| 289 | 289 | logAction( |
| 290 | 290 | 'remove_attach', |
| 291 | 291 | [ |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | COUNT(*) |
| 369 | 369 | FROM {db_prefix}attachments |
| 370 | 370 | WHERE attachment_type = {int:attachment_type}' . |
| 371 | - $where, [ |
|
| 371 | + $where, [ |
|
| 372 | 372 | 'attachment_type' => $attachmentType, |
| 373 | 373 | 'guest_id_member' => 0, |
| 374 | 374 | ] |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | 'substep' => $start, |
| 632 | 632 | ] |
| 633 | 633 | )->fetch_callback( |
| 634 | - function ($row) { |
|
| 634 | + function($row) { |
|
| 635 | 635 | return $row['id_attach']; |
| 636 | 636 | } |
| 637 | 637 | ); |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | 'substep' => $start, |
| 838 | 838 | ] |
| 839 | 839 | )->fetch_callback( |
| 840 | - function ($row) use ($fix_errors, $to_fix, $modSettings) { |
|
| 840 | + function($row) use ($fix_errors, $to_fix, $modSettings) { |
|
| 841 | 841 | // If we are repairing remove the file from disk now. |
| 842 | 842 | if ($fix_errors && in_array('avatar_no_member', $to_fix)) |
| 843 | 843 | { |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | 'substep' => $start, |
| 907 | 907 | ] |
| 908 | 908 | )->fetch_callback( |
| 909 | - function ($row) use ($fix_errors, $to_fix) { |
|
| 909 | + function($row) use ($fix_errors, $to_fix) { |
|
| 910 | 910 | // If we are repairing remove the file from disk now. |
| 911 | 911 | if ($fix_errors && in_array('attachment_no_msg', $to_fix)) |
| 912 | 912 | { |
@@ -1008,7 +1008,7 @@ discard block |
||
| 1008 | 1008 | 'attachment_type' => 0, |
| 1009 | 1009 | ] |
| 1010 | 1010 | )->fetch_callback( |
| 1011 | - function ($row) { |
|
| 1011 | + function($row) { |
|
| 1012 | 1012 | return $row['id_attach']; |
| 1013 | 1013 | } |
| 1014 | 1014 | ); |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | 'approve_query' => $approve_query, |
| 1117 | 1117 | ] |
| 1118 | 1118 | )->fetch_callback( |
| 1119 | - function ($row) use ($scripturl, $bbc_parser) { |
|
| 1119 | + function($row) use ($scripturl, $bbc_parser) { |
|
| 1120 | 1120 | return [ |
| 1121 | 1121 | 'id' => $row['id_attach'], |
| 1122 | 1122 | 'filename' => $row['filename'], |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | 'type' => 1, |
| 1216 | 1216 | ] |
| 1217 | 1217 | )->fetch_callback( |
| 1218 | - function ($row) use (&$expected_files, &$expected_size) { |
|
| 1218 | + function($row) use (&$expected_files, &$expected_size) { |
|
| 1219 | 1219 | $expected_files[$row['id_folder']] = $row['num_attach']; |
| 1220 | 1220 | $expected_size[$row['id_folder']] = $row['size_attach']; |
| 1221 | 1221 | } |
@@ -1685,7 +1685,7 @@ discard block |
||
| 1685 | 1685 | 'attachment_type' => 0, |
| 1686 | 1686 | ] |
| 1687 | 1687 | )->fetch_callback( |
| 1688 | - function ($row) { |
|
| 1688 | + function($row) { |
|
| 1689 | 1689 | return $row['id_attach']; |
| 1690 | 1690 | } |
| 1691 | 1691 | ); |
@@ -1825,7 +1825,7 @@ discard block |
||
| 1825 | 1825 | try |
| 1826 | 1826 | { |
| 1827 | 1827 | $dir_iterator = new FilesystemIterator($attach_dir, FilesystemIterator::SKIP_DOTS); |
| 1828 | - $filter_iterator = new CallbackFilterIterator($dir_iterator, function ($file, $key, $iterator) { |
|
| 1828 | + $filter_iterator = new CallbackFilterIterator($dir_iterator, function($file, $key, $iterator) { |
|
| 1829 | 1829 | return $file->getFilename()[0] !== '.'; |
| 1830 | 1830 | }); |
| 1831 | 1831 | $fileCount += iterator_count($filter_iterator); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * - 'miss_rate_user' : The user-defined miss rate, expressed as a percentage (rounded to two decimal places). |
| 41 | 41 | * |
| 42 | 42 | * If the statistics cannot be obtained, an empty array is returned. |
| 43 | - */ |
|
| 43 | + */ |
|
| 44 | 44 | public function getStats() |
| 45 | 45 | { |
| 46 | 46 | $results = []; |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | * - 'miss_rate': The rate of cache lookups that did not find a matching item per second. |
| 133 | 133 | * |
| 134 | 134 | * If the statistics cannot be obtained, an empty array is returned. |
| 135 | - */ |
|
| 135 | + */ |
|
| 136 | 136 | public function getStats() |
| 137 | 137 | { |
| 138 | 138 | $results = []; |
@@ -273,7 +273,7 @@ |
||
| 273 | 273 | ORDER BY LENGTH(code) DESC', |
| 274 | 274 | [] |
| 275 | 275 | )->fetch_callback( |
| 276 | - static function ($row) use (&$smileysFrom, &$smileysTo, &$smileysDescriptions) { |
|
| 276 | + static function($row) use (&$smileysFrom, &$smileysTo, &$smileysDescriptions) { |
|
| 277 | 277 | $smileysFrom[] = $row['code']; |
| 278 | 278 | $smileysTo[] = htmlspecialchars($row['filename']); |
| 279 | 279 | $smileysDescriptions[] = $row['description']; |
@@ -1323,10 +1323,13 @@ |
||
| 1323 | 1323 | $fn_total += $this->fn_num; |
| 1324 | 1324 | |
| 1325 | 1325 | // If we have footnotes, add them in at the end of the message |
| 1326 | - if ($this->fn_num !== 0) // Set in callback |
|
| 1326 | + if ($this->fn_num !== 0) |
|
| 1327 | + { |
|
| 1328 | + // Set in callback |
|
| 1327 | 1329 | { |
| 1328 | 1330 | $this->message .= $this->smiley_marker . '<div class="bbc_footnotes">' . implode('', $this->fn_content) . '</div>' . $this->smiley_marker; |
| 1329 | 1331 | } |
| 1332 | + } |
|
| 1330 | 1333 | } |
| 1331 | 1334 | |
| 1332 | 1335 | /** |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | // icode line |
| 215 | 215 | if (strpos($data, '`') !== false) |
| 216 | 216 | { |
| 217 | - return preg_replace_callback('~(?<=\W|^)`([^`]+)`(?=\W|$)~u', static function ($match) { |
|
| 217 | + return preg_replace_callback('~(?<=\W|^)`([^`]+)`(?=\W|$)~u', static function($match) { |
|
| 218 | 218 | if (strpos($match[1], '<br />')) |
| 219 | 219 | { |
| 220 | 220 | return $match[0]; |