@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'moderate_forum' => 'moderate_forum', |
109 | 109 | ] |
110 | 110 | )->fetch_callback( |
111 | - function ($row) use (&$groups) { |
|
111 | + function($row) use (&$groups) { |
|
112 | 112 | $groups[] = $row['id_group']; |
113 | 113 | } |
114 | 114 | ); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | 'group_array_implode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups), |
133 | 133 | ] |
134 | 134 | )->fetch_callback( |
135 | - function ($row) use ($type, $member_name, $memberID, $language) { |
|
135 | + function($row) use ($type, $member_name, $memberID, $language) { |
|
136 | 136 | global $scripturl, $modSettings; |
137 | 137 | |
138 | 138 | $replacements = [ |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | 'mention_types' => $notification_types, |
285 | 285 | ] |
286 | 286 | )->fetch_callback( |
287 | - function ($row) use (&$results) { |
|
287 | + function($row) use (&$results) { |
|
288 | 288 | if (!isset($results[$row['id_member']])) |
289 | 289 | { |
290 | 290 | $results[$row['id_member']] = []; |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | return false; |
503 | 503 | } |
504 | 504 | |
505 | - $blowfish_salt = '$2a$07$' . $memSalt . $modSettings['unsubscribe_site_salt']. '$'; |
|
505 | + $blowfish_salt = '$2a$07$' . $memSalt . $modSettings['unsubscribe_site_salt'] . '$'; |
|
506 | 506 | $expected = substr($blowfish_salt, 0, 28) . $hash; |
507 | 507 | $check = crypt($area . $memEmail . $memSalt, $blowfish_salt); |
508 | 508 | |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | 'attachment_type' => 0, |
541 | 541 | ] |
542 | 542 | )->fetch_callback( |
543 | - function ($row) use (&$topicData, &$boards_index, $type) { |
|
543 | + function($row) use (&$topicData, &$boards_index, $type) { |
|
544 | 544 | // all the boards for these topics, used to find all the members to be notified |
545 | 545 | $boards_index[] = $row['id_board']; |
546 | 546 | |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | 'members_only' => is_array($members_only) ? $members_only : [$members_only], |
633 | 633 | ] |
634 | 634 | )->fetch_callback( |
635 | - function ($row) use (&$boardNotifyData) { |
|
635 | + function($row) use (&$boardNotifyData) { |
|
636 | 636 | // The board subscription information for the member |
637 | 637 | $clean = [ |
638 | 638 | 'id_member' => (int) $row['id_member'], |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | 'members_only' => is_array($members_only) ? $members_only : [$members_only], |
716 | 716 | ] |
717 | 717 | )->fetch_callback( |
718 | - function ($row) use (&$topicNotifyData) { |
|
718 | + function($row) use (&$topicNotifyData) { |
|
719 | 719 | // The topic subscription information for the member |
720 | 720 | $clean = [ |
721 | 721 | 'id_member' => (int) $row['id_member'], |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | 'notify_regularity' => 2, |
820 | 820 | ] |
821 | 821 | )->fetch_callback( |
822 | - function ($row) use (&$approvalNotifyData) { |
|
822 | + function($row) use (&$approvalNotifyData) { |
|
823 | 823 | $clean = [ |
824 | 824 | 'id_member' => (int) $row['id_member'], |
825 | 825 | 'email_address' => $row['email_address'], |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'approved' => 1, |
40 | 40 | ) |
41 | 41 | )->fetch_callback( |
42 | - function ($row) use (&$returns) { |
|
42 | + function($row) use (&$returns) { |
|
43 | 43 | $returns[$row['derived_from']][] = $row; |
44 | 44 | } |
45 | 45 | ); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'approved' => 1, |
74 | 74 | ) |
75 | 75 | )->fetch_callback( |
76 | - function ($row) use (&$returns) { |
|
76 | + function($row) use (&$returns) { |
|
77 | 77 | $returns = $row; |
78 | 78 | } |
79 | 79 | ); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ORDER BY cat_order', |
56 | 56 | array() |
57 | 57 | )->fetch_callback( |
58 | - function ($row) use (&$cat_order, &$cats, $category_id, $catOptions) { |
|
58 | + function($row) use (&$cat_order, &$cats, $category_id, $catOptions) { |
|
59 | 59 | if ($row['id_cat'] != $category_id) |
60 | 60 | { |
61 | 61 | $cats[] = $row['id_cat']; |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | 'member_list' => $members, |
339 | 339 | ) |
340 | 340 | )->fetch_callback( |
341 | - function ($row) use (&$updates, $check_collapsable) { |
|
341 | + function($row) use (&$updates, $check_collapsable) { |
|
342 | 342 | if (empty($row['is_collapsed']) && (!empty($row['can_collapse']) || !$check_collapsable)) |
343 | 343 | { |
344 | 344 | $updates['insert'][] = array($row['id_member'], $row['id_cat']); |
@@ -1000,7 +1000,7 @@ discard block |
||
1000 | 1000 | 'blank_string' => '', |
1001 | 1001 | ) |
1002 | 1002 | )->fetch_callback( |
1003 | - function ($row) use (&$memberIDs, &$memberEmails, &$memberEmailWild) { |
|
1003 | + function($row) use (&$memberIDs, &$memberEmails, &$memberEmailWild) { |
|
1004 | 1004 | if ($row['id_member']) |
1005 | 1005 | { |
1006 | 1006 | $memberIDs[$row['id_member']] = $row['id_member']; |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | WHERE ' . implode(' OR ', $queryPart), |
1053 | 1053 | $queryValues |
1054 | 1054 | )->fetch_callback( |
1055 | - function ($row) use (&$allMembers, &$updates, &$newMembers) { |
|
1055 | + function($row) use (&$allMembers, &$updates, &$newMembers) { |
|
1056 | 1056 | if (!in_array($row['id_member'], $allMembers)) |
1057 | 1057 | { |
1058 | 1058 | $allMembers[] = $row['id_member']; |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | 'ban_flag' => 10, |
1089 | 1089 | ) |
1090 | 1090 | )->fetch_callback( |
1091 | - function ($row) use (&$allMembers, &$updates) { |
|
1091 | + function($row) use (&$allMembers, &$updates) { |
|
1092 | 1092 | // Don't do this twice! |
1093 | 1093 | if (!in_array($row['id_member'], $allMembers)) |
1094 | 1094 | { |
@@ -1607,7 +1607,7 @@ discard block |
||
1607 | 1607 | 'empty' => '', |
1608 | 1608 | ] |
1609 | 1609 | ); |
1610 | - $error_ips = $request->fetch_callback(function ($row) { |
|
1610 | + $error_ips = $request->fetch_callback(function($row) { |
|
1611 | 1611 | return $row['ip']; |
1612 | 1612 | }); |
1613 | 1613 | $request->free_result(); |
@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | 'ban_group' => $ban_group, |
1679 | 1679 | ) |
1680 | 1680 | )->fetch_callback( |
1681 | - function ($row) use (&$details) { |
|
1681 | + function($row) use (&$details) { |
|
1682 | 1682 | $details[$row['id_ban']] = $row; |
1683 | 1683 | } |
1684 | 1684 | ); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | 'rep_type' => array('pm', 'msg'), |
58 | 58 | ) |
59 | 59 | )->fetch_callback( |
60 | - function ($row) use (&$open_reports) { |
|
60 | + function($row) use (&$open_reports) { |
|
61 | 61 | $open_reports[$row['type']] = $row['num_reports']; |
62 | 62 | } |
63 | 63 | ); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | 'current_member' => User::$info->id, |
478 | 478 | ) |
479 | 479 | )->fetch_callback( |
480 | - function ($row) { |
|
480 | + function($row) { |
|
481 | 481 | logAction('delete_warn_template', array('template' => $row['recipient_name'])); |
482 | 482 | } |
483 | 483 | ); |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | 'current_member' => User::$info->id, |
531 | 531 | ) |
532 | 532 | )->fetch_callback( |
533 | - function ($row) use (&$templates) { |
|
533 | + function($row) use (&$templates) { |
|
534 | 534 | global $scripturl; |
535 | 535 | |
536 | 536 | $templates[] = array( |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | 'warning' => 'warning', |
615 | 615 | )) |
616 | 616 | )->fetch_callback( |
617 | - function ($row) use (&$warnings) { |
|
617 | + function($row) use (&$warnings) { |
|
618 | 618 | global $scripturl; |
619 | 619 | |
620 | 620 | $warnings[] = array( |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | 'current_member' => User::$info->id, |
690 | 690 | ) |
691 | 691 | )->fetch_callback( |
692 | - function ($row) { |
|
692 | + function($row) { |
|
693 | 693 | global $context; |
694 | 694 | |
695 | 695 | $context['template_data'] = array( |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | 'rep_type' => $show_pms ? array('pm') : array('msg'), |
835 | 835 | ) |
836 | 836 | )->fetch_callback( |
837 | - function ($row) use (&$reports) { |
|
837 | + function($row) use (&$reports) { |
|
838 | 838 | $reports[$row['id_report']] = $row; |
839 | 839 | } |
840 | 840 | ); |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | 'report_list' => $id_reports, |
867 | 867 | ) |
868 | 868 | )->fetch_callback( |
869 | - function ($row) use (&$comments) { |
|
869 | + function($row) use (&$comments) { |
|
870 | 870 | $comments[$row['id_report']][] = $row; |
871 | 871 | } |
872 | 872 | ); |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | 'reportc' => 'reportc', |
900 | 900 | ) |
901 | 901 | )->fetch_callback( |
902 | - function ($row) use (&$comments) { |
|
902 | + function($row) use (&$comments) { |
|
903 | 903 | $comments[] = $row; |
904 | 904 | } |
905 | 905 | ); |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | 'not_approved' => 0, |
927 | 927 | ) |
928 | 928 | )->fetch_callback( |
929 | - function ($row) use (&$msgs) { |
|
929 | + function($row) use (&$msgs) { |
|
930 | 930 | $msgs[] = $row['id_msg']; |
931 | 931 | } |
932 | 932 | ); |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | 'not_approved' => 0, |
950 | 950 | ) |
951 | 951 | )->fetch_callback( |
952 | - function ($row) use (&$attaches) { |
|
952 | + function($row) use (&$attaches) { |
|
953 | 953 | $attaches[] = $row['id_attach']; |
954 | 954 | } |
955 | 955 | ); |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | 'sort' => $sort, |
1021 | 1021 | ) |
1022 | 1022 | )->fetch_callback( |
1023 | - function ($row) use (&$watched_users, &$members) { |
|
1023 | + function($row) use (&$watched_users, &$members) { |
|
1024 | 1024 | global $txt; |
1025 | 1025 | |
1026 | 1026 | $watched_users[$row['id_member']] = array( |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | 'is_approved' => 1, |
1055 | 1055 | ) |
1056 | 1056 | )->fetch_callback( |
1057 | - function ($row) use (&$latest_posts) { |
|
1057 | + function($row) use (&$latest_posts) { |
|
1058 | 1058 | $latest_posts[$row['id_member']] = $row['last_post_id']; |
1059 | 1059 | } |
1060 | 1060 | ); |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | 'message_list' => $latest_posts, |
1072 | 1072 | ) |
1073 | 1073 | )->fetch_callback( |
1074 | - function ($row) use (&$watched_users, $latest_posts) { |
|
1074 | + function($row) use (&$watched_users, $latest_posts) { |
|
1075 | 1075 | $watched_users[$row['id_member']]['last_post'] = standardTime($row['poster_time']); |
1076 | 1076 | $watched_users[$row['id_member']]['last_post_id'] = $latest_posts[$row['id_member']]; |
1077 | 1077 | } |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | 'is_approved' => 1, |
1092 | 1092 | ) |
1093 | 1093 | )->fetch_callback( |
1094 | - function ($row) use (&$watched_users) { |
|
1094 | + function($row) use (&$watched_users) { |
|
1095 | 1095 | $watched_users[$row['id_member']]['last_post'] = standardTime($row['last_post']); |
1096 | 1096 | $watched_users[$row['id_member']]['last_post_id'] = $row['last_post_id']; |
1097 | 1097 | } |
@@ -1175,7 +1175,7 @@ discard block |
||
1175 | 1175 | 'recycle' => $modSettings['recycle_board'], |
1176 | 1176 | ) |
1177 | 1177 | )->fetch_callback( |
1178 | - function ($row) use (&$member_posts, $bbc_parser, $start, $delete_boards) { |
|
1178 | + function($row) use (&$member_posts, $bbc_parser, $start, $delete_boards) { |
|
1179 | 1179 | global $scripturl; |
1180 | 1180 | |
1181 | 1181 | $row['subject'] = censor($row['subject']); |
@@ -1227,7 +1227,7 @@ discard block |
||
1227 | 1227 | LIMIT 10', |
1228 | 1228 | array() |
1229 | 1229 | )->fetch_callback( |
1230 | - function ($row) use (&$group_requests, &$i) { |
|
1230 | + function($row) use (&$group_requests, &$i) { |
|
1231 | 1231 | global $scripturl; |
1232 | 1232 | |
1233 | 1233 | $group_requests[] = array( |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | 'warning_watch' => $modSettings['warning_watch'], |
1278 | 1278 | ) |
1279 | 1279 | )->fetch_callback( |
1280 | - function ($row) use (&$watched_users) { |
|
1280 | + function($row) use (&$watched_users) { |
|
1281 | 1281 | $watched_users[] = $row; |
1282 | 1282 | } |
1283 | 1283 | ); |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | 'rep_type' => $show_pms ? array('pm') : array('msg'), |
1327 | 1327 | ) |
1328 | 1328 | )->fetch_callback( |
1329 | - function ($row) use (&$reported_posts) { |
|
1329 | + function($row) use (&$reported_posts) { |
|
1330 | 1330 | $reported_posts[] = $row; |
1331 | 1331 | } |
1332 | 1332 | ); |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | 'offset' => $offset, |
1471 | 1471 | ) |
1472 | 1472 | )->fetch_callback( |
1473 | - function ($row) use (&$moderator_notes) { |
|
1473 | + function($row) use (&$moderator_notes) { |
|
1474 | 1474 | $moderator_notes[] = $row; |
1475 | 1475 | } |
1476 | 1476 | ); |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | 'not_approved' => 0, |
1599 | 1599 | ) |
1600 | 1600 | )->fetch_callback( |
1601 | - function ($row) use (&$unapproved_items, $bbc_parser, &$i, $boards_allowed) { |
|
1601 | + function($row) use (&$unapproved_items, $bbc_parser, &$i, $boards_allowed) { |
|
1602 | 1602 | global $context, $scripturl, $modSettings; |
1603 | 1603 | |
1604 | 1604 | // Can delete is complicated, let's solve it first... is it their own post? |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | 'tasks' => $tasks, |
224 | 224 | ) |
225 | 225 | )->fetch_callback( |
226 | - function ($row) use (&$task) { |
|
226 | + function($row) use (&$task) { |
|
227 | 227 | $task[$row['id_task']] = $row['task']; |
228 | 228 | } |
229 | 229 | ); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | 'id_task' => $id_task, |
387 | 387 | ) |
388 | 388 | )->fetch_callback( |
389 | - function ($row) use (&$task) { |
|
389 | + function($row) use (&$task) { |
|
390 | 390 | global $txt; |
391 | 391 | |
392 | 392 | $task = array( |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | FROM {db_prefix}scheduled_tasks', |
433 | 433 | array() |
434 | 434 | )->fetch_callback( |
435 | - function ($row) use (&$known_tasks) { |
|
435 | + function($row) use (&$known_tasks) { |
|
436 | 436 | global $txt; |
437 | 437 | |
438 | 438 | // Find the next for regularity - don't offset as it's always server time! |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | LIMIT ' . $items_per_page . ' OFFSET ' . $start, |
482 | 482 | array() |
483 | 483 | )->fetch_callback( |
484 | - function ($row) use (&$log_entries) { |
|
484 | + function($row) use (&$log_entries) { |
|
485 | 485 | global $txt; |
486 | 486 | |
487 | 487 | $log_entries[] = array( |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'users_groups' => User::$info->groups, |
51 | 51 | ) |
52 | 52 | )->fetch_callback( |
53 | - function ($row) use (&$message_limit) { |
|
53 | + function($row) use (&$message_limit) { |
|
54 | 54 | $message_limit = $row['top_limit'] == 0 ? 0 : $row['bottom_limit']; |
55 | 55 | } |
56 | 56 | ); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'not_deleted' => 0, |
88 | 88 | ) |
89 | 89 | )->fetch_callback( |
90 | - function ($row) use (&$labels) { |
|
90 | + function($row) use (&$labels) { |
|
91 | 91 | $this_labels = explode(',', $row['labels']); |
92 | 92 | foreach ($this_labels as $this_label) |
93 | 93 | { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | 'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(), |
244 | 244 | ) |
245 | 245 | )->fetch_callback( |
246 | - function ($row) use ($where) { |
|
246 | + function($row) use ($where) { |
|
247 | 247 | // ...And update the statistics accordingly - now including unread messages!. |
248 | 248 | if ($row['is_read']) |
249 | 249 | { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | 'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(), |
300 | 300 | ) |
301 | 301 | )->fetch_callback( |
302 | - function ($row) use (&$remove_pms) { |
|
302 | + function($row) use (&$remove_pms) { |
|
303 | 303 | $remove_pms[] = $row['sender']; |
304 | 304 | } |
305 | 305 | ); |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | 'is_not_deleted' => 0, |
451 | 451 | ) |
452 | 452 | )->fetch_callback( |
453 | - function ($row) use ($context, &$total_unread, $owner) { |
|
453 | + function($row) use ($context, &$total_unread, $owner) { |
|
454 | 454 | $total_unread += $row['num']; |
455 | 455 | |
456 | 456 | if ($owner != User::$info->id) |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | 'delete_pm' => 1, |
673 | 673 | ) |
674 | 674 | )->fetch_callback( |
675 | - function ($row) use (&$deletes, $from, $subject, $message) { |
|
675 | + function($row) use (&$deletes, $from, $subject, $message) { |
|
676 | 676 | // Check whether we have to apply anything... |
677 | 677 | $criteria = Util::unserialize($row['criteria']); |
678 | 678 | |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | FROM {db_prefix}membergroups', |
712 | 712 | array() |
713 | 713 | )->fetch_callback( |
714 | - function ($row) use (&$message_limit_cache) { |
|
714 | + function($row) use (&$message_limit_cache) { |
|
715 | 715 | $message_limit_cache[$row['id_group']] = $row['max_messages']; |
716 | 716 | } |
717 | 717 | ); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | 'read_permission' => 'pm_read', |
731 | 731 | ) |
732 | 732 | )->fetch_callback( |
733 | - function ($row) use (&$disallowed_groups, &$allowed_groups) { |
|
733 | + function($row) use (&$disallowed_groups, &$allowed_groups) { |
|
734 | 734 | if (empty($row['add_deny'])) |
735 | 735 | { |
736 | 736 | $disallowed_groups[] = $row['id_group']; |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | 'sort' => $pm_options['sort_by_query'], |
1092 | 1092 | ) |
1093 | 1093 | )->fetch_callback( |
1094 | - function ($row) use (&$sub_pms) { |
|
1094 | + function($row) use (&$sub_pms) { |
|
1095 | 1095 | $sub_pms[$row['id_pm_head']] = $row['sort_param']; |
1096 | 1096 | } |
1097 | 1097 | ); |
@@ -1237,7 +1237,7 @@ discard block |
||
1237 | 1237 | 'msgtime' => time() - $time, |
1238 | 1238 | ) |
1239 | 1239 | )->fetch_callback( |
1240 | - function ($row) use (&$pmCount) { |
|
1240 | + function($row) use (&$pmCount) { |
|
1241 | 1241 | $pmCount = $row['post_count']; |
1242 | 1242 | } |
1243 | 1243 | ); |
@@ -1288,7 +1288,7 @@ discard block |
||
1288 | 1288 | 'not_deleted' => 0, |
1289 | 1289 | ) |
1290 | 1290 | )->fetch_callback( |
1291 | - function ($row) use ($context, &$actions) { |
|
1291 | + function($row) use ($context, &$actions) { |
|
1292 | 1292 | foreach ($context['rules'] as $rule) |
1293 | 1293 | { |
1294 | 1294 | $match = false; |
@@ -1419,7 +1419,7 @@ discard block |
||
1419 | 1419 | 'current_member' => User::$info->id, |
1420 | 1420 | ) |
1421 | 1421 | )->fetch_callback( |
1422 | - function ($row) use (&$context) { |
|
1422 | + function($row) use (&$context) { |
|
1423 | 1423 | $context['rules'][$row['id_rule']] = array( |
1424 | 1424 | 'id' => $row['id_rule'], |
1425 | 1425 | 'name' => $row['rule_name'], |
@@ -1485,7 +1485,7 @@ discard block |
||
1485 | 1485 | 'newbie_group' => 4, |
1486 | 1486 | ) |
1487 | 1487 | )->fetch_callback( |
1488 | - function ($row) use (&$groups) { |
|
1488 | + function($row) use (&$groups) { |
|
1489 | 1489 | if ($row['id_group'] != 1) |
1490 | 1490 | { |
1491 | 1491 | $groups[$row['id_group']] = $row; |
@@ -1518,7 +1518,7 @@ discard block |
||
1518 | 1518 | 'id_pms' => $id_pms, |
1519 | 1519 | ) |
1520 | 1520 | )->fetch_callback( |
1521 | - function ($row) use (&$pm_heads) { |
|
1521 | + function($row) use (&$pm_heads) { |
|
1522 | 1522 | $pm_heads[$row['id_pm_head']] = $row['id_pm']; |
1523 | 1523 | } |
1524 | 1524 | ); |
@@ -1548,7 +1548,7 @@ discard block |
||
1548 | 1548 | 'pm_heads' => $pm_heads, |
1549 | 1549 | ) |
1550 | 1550 | )->fetch_callback( |
1551 | - function ($row) use (&$pms) { |
|
1551 | + function($row) use (&$pms) { |
|
1552 | 1552 | // Copy the action from the single to PM to the others. |
1553 | 1553 | $pms[$row['id_pm']] = $row['id_pm_head']; |
1554 | 1554 | } |
@@ -1587,7 +1587,7 @@ discard block |
||
1587 | 1587 | 'to_label' => array_keys($to_label), |
1588 | 1588 | ) |
1589 | 1589 | )->fetch_callback( |
1590 | - function ($row) use ($options, &$to_update, &$to_label, &$label_type) { |
|
1590 | + function($row) use ($options, &$to_update, &$to_label, &$label_type) { |
|
1591 | 1591 | $labels = $row['labels'] === '' ? array('-1') : explode(',', trim($row['labels'])); |
1592 | 1592 | |
1593 | 1593 | // Already exists? Then... unset it! |
@@ -1652,7 +1652,7 @@ discard block |
||
1652 | 1652 | 'find_label_implode' => '\'' . implode('\', labels) != 0 OR FIND_IN_SET(\'', $searchArray) . '\'', |
1653 | 1653 | ) |
1654 | 1654 | )->fetch_callback( |
1655 | - function ($row) use (&$to_update, $searchArray, $new_labels) { |
|
1655 | + function($row) use (&$to_update, $searchArray, $new_labels) { |
|
1656 | 1656 | // Do the long task of updating them... |
1657 | 1657 | $toChange = explode(',', $row['labels']); |
1658 | 1658 | |
@@ -1758,7 +1758,7 @@ discard block |
||
1758 | 1758 | 'msgtime' => $time, |
1759 | 1759 | ) |
1760 | 1760 | )->fetch_callback( |
1761 | - function ($row) use (&$pm_ids) { |
|
1761 | + function($row) use (&$pm_ids) { |
|
1762 | 1762 | $pm_ids[] = $row['id_pm']; |
1763 | 1763 | } |
1764 | 1764 | ); |
@@ -1778,7 +1778,7 @@ discard block |
||
1778 | 1778 | 'msgtime' => $time, |
1779 | 1779 | ) |
1780 | 1780 | )->fetch_callback( |
1781 | - function ($row) use (&$pm_ids) { |
|
1781 | + function($row) use (&$pm_ids) { |
|
1782 | 1782 | $pm_ids[] = $row['id_pm']; |
1783 | 1783 | } |
1784 | 1784 | ); |
@@ -1954,7 +1954,7 @@ discard block |
||
1954 | 1954 | 'not_deleted' => 0, |
1955 | 1955 | ) |
1956 | 1956 | )->fetch_callback( |
1957 | - function ($row) use ($folder, &$recipients, &$display_pms, &$posters) { |
|
1957 | + function($row) use ($folder, &$recipients, &$display_pms, &$posters) { |
|
1958 | 1958 | // This is, frankly, a joke. |
1959 | 1959 | // We will put in a workaround for people sending to themselves - yawn! |
1960 | 1960 | if ($folder === 'sent' && $row['id_member_from'] == User::$info->id && $row['deleted_by_sender'] == 1) |
@@ -2014,7 +2014,7 @@ discard block |
||
2014 | 2014 | 'id_pm' => $pms, |
2015 | 2015 | ) |
2016 | 2016 | )->fetch_callback( |
2017 | - function ($row) use (&$head_pms) { |
|
2017 | + function($row) use (&$head_pms) { |
|
2018 | 2018 | $head_pms[$row['id_pm_head']] = $row['id_pm']; |
2019 | 2019 | } |
2020 | 2020 | ); |
@@ -2036,7 +2036,7 @@ discard block |
||
2036 | 2036 | 'not_deleted' => 0, |
2037 | 2037 | ) |
2038 | 2038 | )->fetch_callback( |
2039 | - function ($row) use ($head_pms, &$unread_pms) { |
|
2039 | + function($row) use ($head_pms, &$unread_pms) { |
|
2040 | 2040 | // Return the results under the original index since that's what we are |
2041 | 2041 | // displaying in the subject list |
2042 | 2042 | $index = $head_pms[$row['id_pm_head']]; |
@@ -2300,7 +2300,7 @@ discard block |
||
2300 | 2300 | 'not_bcc' => 0, |
2301 | 2301 | ) |
2302 | 2302 | )->fetch_callback( |
2303 | - function ($row) use (&$recipients, &$hidden_recipients, $bcc_count, $scripturl) { |
|
2303 | + function($row) use (&$recipients, &$hidden_recipients, $bcc_count, $scripturl) { |
|
2304 | 2304 | // If it's hidden we still don't reveal their names |
2305 | 2305 | if ($bcc_count && $row['bcc']) |
2306 | 2306 | { |
@@ -2456,7 +2456,7 @@ discard block |
||
2456 | 2456 | 'not_deleted' => 0, |
2457 | 2457 | )) |
2458 | 2458 | )->fetch_callback( |
2459 | - function ($row) use (&$foundMessages, &$posters, &$head_pms) |
|
2459 | + function($row) use (&$foundMessages, &$posters, &$head_pms) |
|
2460 | 2460 | { |
2461 | 2461 | $foundMessages[] = $row['id_pm']; |
2462 | 2462 | $posters[] = $row['id_member_from']; |
@@ -2499,7 +2499,7 @@ discard block |
||
2499 | 2499 | 'limit' => count($head_pms), |
2500 | 2500 | ) |
2501 | 2501 | )->fetch_callback( |
2502 | - function ($row) use (&$real_pm_ids) |
|
2502 | + function($row) use (&$real_pm_ids) |
|
2503 | 2503 | { |
2504 | 2504 | $real_pm_ids[$row['id_pm_head']] = $row['id_pm']; |
2505 | 2505 | } |
@@ -2534,7 +2534,7 @@ discard block |
||
2534 | 2534 | 'message_list' => $foundMessages, |
2535 | 2535 | ) |
2536 | 2536 | )->fetch_callback( |
2537 | - function ($row) use (&$search_results) { |
|
2537 | + function($row) use (&$search_results) { |
|
2538 | 2538 | $search_results[] = $row; |
2539 | 2539 | } |
2540 | 2540 | ); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'guest_title' => $txt['guest_title'], |
74 | 74 | )) |
75 | 75 | )->fetch_callback( |
76 | - function ($row) use (&$error_messages) { |
|
76 | + function($row) use (&$error_messages) { |
|
77 | 77 | $error_messages[] = array( |
78 | 78 | 'ip' => $row['ip'], |
79 | 79 | 'member_link' => $row['id_member'] > 0 ? '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>' : $row['display_name'], |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | LIMIT ' . $items_per_page . ' OFFSET ' . $start, |
144 | 144 | array_merge($where_vars, array()) |
145 | 145 | )->fetch_callback( |
146 | - function ($row) use (&$messages) { |
|
146 | + function($row) use (&$messages) { |
|
147 | 147 | $messages[] = array( |
148 | 148 | 'ip' => $row['poster_ip'], |
149 | 149 | 'member_link' => empty($row['id_member']) ? $row['display_name'] : '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>', |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | 'current_member' => $where_vars['current_member'], |
219 | 219 | ) |
220 | 220 | )->fetch_callback( |
221 | - function ($row) use (&$logins) { |
|
221 | + function($row) use (&$logins) { |
|
222 | 222 | $logins[] = array( |
223 | 223 | 'time' => standardTime($row['time']), |
224 | 224 | 'html_time' => htmlTime($row['time']), |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | 'increment' => $increment - 1, |
144 | 144 | ) |
145 | 145 | )->fetch_callback( |
146 | - function ($row) { |
|
146 | + function($row) { |
|
147 | 147 | return $row['id_msg']; |
148 | 148 | } |
149 | 149 | ); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | 'messages' => $msg, |
175 | 175 | ) |
176 | 176 | )->fetch_callback( |
177 | - function ($row) use ($scripturl) { |
|
177 | + function($row) use ($scripturl) { |
|
178 | 178 | return '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '">' . $row['subject'] . '</a>'; |
179 | 179 | } |
180 | 180 | ); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | 'max_id' => $start + $increment, |
260 | 260 | ) |
261 | 261 | )->fetch_callback( |
262 | - function ($row) { |
|
262 | + function($row) { |
|
263 | 263 | setTopicAttribute($row['id_topic'], array('num_replies' => $row['real_num_replies'])); |
264 | 264 | } |
265 | 265 | ); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | 'max_id' => $start + $increment, |
294 | 294 | ) |
295 | 295 | )->fetch_callback( |
296 | - function ($row) { |
|
296 | + function($row) { |
|
297 | 297 | setTopicAttribute($row['id_topic'], array('unapproved_posts' => $row['real_unapproved_posts'])); |
298 | 298 | } |
299 | 299 | ); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | 'is_approved' => 1, |
364 | 364 | ) |
365 | 365 | )->fetch_callback( |
366 | - function ($row) use ($db) { |
|
366 | + function($row) use ($db) { |
|
367 | 367 | $db->query('', ' |
368 | 368 | UPDATE {db_prefix}boards |
369 | 369 | SET |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | 'id_topic_max' => $start + $increment, |
394 | 394 | ) |
395 | 395 | )->fetch_callback( |
396 | - function ($row) use ($db) { |
|
396 | + function($row) use ($db) { |
|
397 | 397 | $db->query('', ' |
398 | 398 | UPDATE {db_prefix}boards |
399 | 399 | SET |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | 'is_approved' => 0, |
424 | 424 | ) |
425 | 425 | )->fetch_callback( |
426 | - function ($row) use ($db) { |
|
426 | + function($row) use ($db) { |
|
427 | 427 | $db->query('', ' |
428 | 428 | UPDATE {db_prefix}boards |
429 | 429 | SET unapproved_posts = unapproved_posts + {int:unapproved_posts} |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | 'id_topic_max' => $start + $increment, |
453 | 453 | ) |
454 | 454 | )->fetch_callback( |
455 | - function ($row) use ($db) { |
|
455 | + function($row) use ($db) { |
|
456 | 456 | $db->query('', ' |
457 | 457 | UPDATE {db_prefix}boards |
458 | 458 | SET unapproved_topics = unapproved_topics + {int:real_unapproved_topics} |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | 'is_not_deleted' => 0, |
495 | 495 | ) |
496 | 496 | )->fetch_callback( |
497 | - function ($row) { |
|
497 | + function($row) { |
|
498 | 498 | updateMemberData($row['id_member'], array('personal_messages' => $row['real_num'])); |
499 | 499 | } |
500 | 500 | ); |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | 'is_not_read' => 0, |
513 | 513 | ) |
514 | 514 | )->fetch_callback( |
515 | - function ($row) { |
|
515 | + function($row) { |
|
516 | 516 | updateMemberData($row['id_member'], array('unread_messages' => $row['real_num'])); |
517 | 517 | } |
518 | 518 | ); |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | 'id_msg_max' => $start + $increment, |
543 | 543 | ) |
544 | 544 | )->fetch_callback( |
545 | - function ($row) use (&$boards) { |
|
545 | + function($row) use (&$boards) { |
|
546 | 546 | $boards[$row['id_board']][] = $row['id_msg']; |
547 | 547 | } |
548 | 548 | ); |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | 'is_approved' => 1, |
583 | 583 | ) |
584 | 584 | )->fetch_callback( |
585 | - function ($row) use (&$realBoardCounts) { |
|
585 | + function($row) use (&$realBoardCounts) { |
|
586 | 586 | $realBoardCounts[$row['id_board']] = $row['local_last_msg']; |
587 | 587 | } |
588 | 588 | ); |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | FROM {db_prefix}boards', |
595 | 595 | array() |
596 | 596 | )->fetch_callback( |
597 | - function ($row) use (&$resort_me, $realBoardCounts) { |
|
597 | + function($row) use (&$resort_me, $realBoardCounts) { |
|
598 | 598 | $row['local_last_msg'] = $realBoardCounts[$row['id_board']] ?? 0; |
599 | 599 | $resort_me[$row['child_level']][] = $row; |
600 | 600 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | 'id_board' => $id_board, |
694 | 694 | ) |
695 | 695 | )->fetch_callback( |
696 | - function ($row) { |
|
696 | + function($row) { |
|
697 | 697 | return $row['id_topic']; |
698 | 698 | } |
699 | 699 | ); |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | 'recycle' => $modSettings['recycle_board'] |
805 | 805 | ) |
806 | 806 | )->fetch_callback( |
807 | - function ($row) { |
|
807 | + function($row) { |
|
808 | 808 | // Set the post count to zero for any delinquents we may have found |
809 | 809 | return $row['id_member']; |
810 | 810 | } |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | FROM {db_prefix}membergroups', |
851 | 851 | array() |
852 | 852 | )->fetch_callback( |
853 | - function ($row) use (&$where, &$where_vars, $groups) { |
|
853 | + function($row) use (&$where, &$where_vars, $groups) { |
|
854 | 854 | // Avoid this one? |
855 | 855 | if (!in_array($row['id_group'], $groups)) |
856 | 856 | { |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | WHERE ' . $where, |
887 | 887 | $where_vars |
888 | 888 | )->fetch_callback( |
889 | - function ($row) use (&$members, $groups) { |
|
889 | + function($row) use (&$members, $groups) { |
|
890 | 890 | if (!$row['is_mod'] || !in_array(3, $groups)) |
891 | 891 | { |
892 | 892 | $members[] = $row['id_member']; |