@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | 'filter_style' => 'parser' |
381 | 381 | ] |
382 | 382 | )->fetch_callback( |
383 | - static function ($row) use (&$expressions) { |
|
383 | + static function($row) use (&$expressions) { |
|
384 | 384 | // Build an array of valid expressions |
385 | 385 | $expressions[] = [ |
386 | 386 | 'type' => $row['filter_type'] === 'regex' ? 'regex' : 'string', |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | 'filter_style' => 'filter' |
441 | 441 | ] |
442 | 442 | )->fetch_callback( |
443 | - static function ($row) use (&$text) { |
|
443 | + static function($row) use (&$text) { |
|
444 | 444 | if ($row['filter_type'] === 'regex') |
445 | 445 | { |
446 | 446 | // Newline madness |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | } |
1181 | 1181 | |
1182 | 1182 | // Clean up the groups |
1183 | - $pbe['user_info']['groups'] = array_map(static function ($v) { |
|
1183 | + $pbe['user_info']['groups'] = array_map(static function($v) { |
|
1184 | 1184 | return (int) $v; |
1185 | 1185 | }, $pbe['user_info']['groups']); |
1186 | 1186 | |
@@ -1245,7 +1245,7 @@ discard block |
||
1245 | 1245 | 'id_profile' => ($type === 'board') ? $topic_info['id_profile'] : '', |
1246 | 1246 | ] |
1247 | 1247 | )->fetch_callback( |
1248 | - static function ($row) use (&$removals, &$pbe) { |
|
1248 | + static function($row) use (&$removals, &$pbe) { |
|
1249 | 1249 | if (empty($row['add_deny'])) |
1250 | 1250 | { |
1251 | 1251 | $removals[] = $row['permission']; |
@@ -1621,7 +1621,7 @@ discard block |
||
1621 | 1621 | 'id_member' => $id_member, |
1622 | 1622 | ] |
1623 | 1623 | )->fetch_callback( |
1624 | - static function ($row) use (&$theme_settings) { |
|
1624 | + static function($row) use (&$theme_settings) { |
|
1625 | 1625 | // Put everything about this member/theme into a theme setting array |
1626 | 1626 | $theme_settings[$row['variable']] = $row['value']; |
1627 | 1627 | } |
@@ -1736,7 +1736,7 @@ discard block |
||
1736 | 1736 | 'is_not_deleted' => 0, |
1737 | 1737 | ] |
1738 | 1738 | )->fetch_callback( |
1739 | - static function ($row) use (&$total_unread) { |
|
1739 | + static function($row) use (&$total_unread) { |
|
1740 | 1740 | $total_unread += $row['num']; |
1741 | 1741 | } |
1742 | 1742 | ); |
@@ -1943,7 +1943,7 @@ discard block |
||
1943 | 1943 | { |
1944 | 1944 | // Try and strip out purely presentational ones, for example how we send html emails |
1945 | 1945 | $text = preg_replace_callback('~(<table[^>].*?role="presentation".*?>.*?</table>)~s', |
1946 | - static function ($matches) { |
|
1946 | + static function($matches) { |
|
1947 | 1947 | $result = preg_replace('~<table[^>].*?role="presentation".*?>~', '', $matches[0]); |
1948 | 1948 | $result = str_replace('</table>', '', $result); |
1949 | 1949 | return preg_replace('~<tr.*?>|</tr>|<td.*?>|</td>|<tbody.*?>|</tbody>~', '', $result); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | 'filter' => empty($filter) ? '' : $filter['value']['sql'], |
114 | 114 | ) |
115 | 115 | )->fetch_callback( |
116 | - function ($row) use (&$log, $filter, $scripturl, $txt) { |
|
116 | + function($row) use (&$log, $filter, $scripturl, $txt) { |
|
117 | 117 | $search_message = preg_replace('~<span class="remove">(.+?)</span>~', '%', $this->_db->escape_wildcard_string($row['message'])); |
118 | 118 | if (!empty($filter) && $search_message == $filter['value']['sql']) |
119 | 119 | { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'critical_type' => 'critical', |
193 | 193 | ) |
194 | 194 | )->fetch_callback( |
195 | - function ($row) use (&$types, $filter, $txt, $sort, &$sum) { |
|
195 | + function($row) use (&$types, $filter, $txt, $sort, &$sum) { |
|
196 | 196 | // Total errors so far? |
197 | 197 | $sum += $row['num_errors']; |
198 | 198 |
@@ -131,7 +131,7 @@ |
||
131 | 131 | 'target' => $target, |
132 | 132 | ] |
133 | 133 | )->fetch_callback( |
134 | - static function ($row) use (&$existing) { |
|
134 | + static function($row) use (&$existing) { |
|
135 | 135 | $existing[] = (int) $row['id_member']; |
136 | 136 | } |
137 | 137 | ); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | return $this->_getNotificationStrings('', [ |
37 | 37 | 'subject' => static::$_type, |
38 | 38 | 'body' => static::$_type], |
39 | - $members, $this->_task); |
|
39 | + $members, $this->_task); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $keys = [ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function connect($ftp_server, $ftp_port = 21, $ftp_user = 'anonymous', $ftp_pass = '[email protected]') |
73 | 73 | { |
74 | 74 | // Connect to the FTP server. |
75 | - set_error_handler(static function () { /* ignore errors */ }); |
|
75 | + set_error_handler(static function() { /* ignore errors */ }); |
|
76 | 76 | $ftp_server = $this->getServer($ftp_server); |
77 | 77 | $this->connection = stream_socket_client($ftp_server . ':' . $ftp_port, $err_code, $err, 5); |
78 | 78 | restore_error_handler(); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | fwrite($this->connection, 'STOR ' . $ftp_file . "\r\n"); |
300 | 300 | |
301 | 301 | // Okay, now we connect to the data port. If it doesn't work out, it's probably "file already exists", etc. |
302 | - set_error_handler(static function () { /* ignore errors */ }); |
|
302 | + set_error_handler(static function() { /* ignore errors */ }); |
|
303 | 303 | $fp = stream_socket_client($this->pasv['ip'] . ':' . $this->pasv['port'], $err_code, $err, 5); |
304 | 304 | restore_error_handler(); |
305 | 305 | if ($fp === false || $err_code !== 0 || !$this->check_response(150)) |
@@ -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'][] = (int) $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'][] = (int) $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 | LIMIT {int:start}, {int:limit}' : ''), |
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 | $row['id_member'] = (int) $row['id_member']; |
1876 | 1876 | $row['posts'] = (int) $row['posts']; |
1877 | 1877 | $row['id_theme'] = (int) $row['id_theme']; |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | 'is_activated' => 1, |
1927 | 1927 | ) |
1928 | 1928 | )->fetch_callback( |
1929 | - function ($row) use (&$inactive_members) { |
|
1929 | + function($row) use (&$inactive_members) { |
|
1930 | 1930 | $inactive_members[(int) $row['is_activated']] = (int) $row['total_members']; |
1931 | 1931 | } |
1932 | 1932 | ); |
@@ -2008,7 +2008,7 @@ discard block |
||
2008 | 2008 | 'limit' => Util::strlen($search) <= 2 ? 100 : 200, |
2009 | 2009 | ) |
2010 | 2010 | )->fetch_callback( |
2011 | - function ($row) { |
|
2011 | + function($row) { |
|
2012 | 2012 | $row['real_name'] = strtr($row['real_name'], array('&' => '&', '<' => '<', '>' => '>', '"' => '"')); |
2013 | 2013 | |
2014 | 2014 | return array( |
@@ -2098,7 +2098,7 @@ discard block |
||
2098 | 2098 | ORDER BY {raw:order_by}' . $limit, |
2099 | 2099 | $conditions |
2100 | 2100 | )->fetch_callback( |
2101 | - function ($row) use (&$data) { |
|
2101 | + function($row) use (&$data) { |
|
2102 | 2102 | global $modSettings, $language; |
2103 | 2103 | |
2104 | 2104 | $data['members'][] = (int) $row['id_member']; |
@@ -2404,7 +2404,7 @@ discard block |
||
2404 | 2404 | 'request_list' => $groups, |
2405 | 2405 | ) |
2406 | 2406 | )->fetch_callback( |
2407 | - function ($row) use (&$email_details, &$group_changes, $change_groups) { |
|
2407 | + function($row) use (&$email_details, &$group_changes, $change_groups) { |
|
2408 | 2408 | global $modSettings, $language; |
2409 | 2409 | |
2410 | 2410 | $row['lngfile'] = empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile']; |
@@ -2749,7 +2749,7 @@ discard block |
||
2749 | 2749 | WHERE ' . $condition, |
2750 | 2750 | $parameters |
2751 | 2751 | )->fetch_callback( |
2752 | - function ($row) { |
|
2752 | + function($row) { |
|
2753 | 2753 | return $row['member_name']; |
2754 | 2754 | } |
2755 | 2755 | ); |
@@ -2863,7 +2863,7 @@ discard block |
||
2863 | 2863 | 'ip_address' => $ip_var, |
2864 | 2864 | ) |
2865 | 2865 | )->fetch_callback( |
2866 | - function ($row) use (&$ips) { |
|
2866 | + function($row) use (&$ips) { |
|
2867 | 2867 | $ips[$row['member_ip']][] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['display_name']]) . '">' . $row['display_name'] . '</a>'; |
2868 | 2868 | } |
2869 | 2869 | ); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'settings' => [ |
43 | 43 | 'cal_enabled' => 1, |
44 | 44 | ], |
45 | - 'setting_callback' => static function ($value) { |
|
45 | + 'setting_callback' => static function($value) { |
|
46 | 46 | if ($value) |
47 | 47 | { |
48 | 48 | enableModules('calendar', ['admin', 'post', 'boardindex', 'display']); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'value' => $txt['date'], |
165 | 165 | ], |
166 | 166 | 'data' => [ |
167 | - 'function' => static function ($rowData) { |
|
167 | + 'function' => static function($rowData) { |
|
168 | 168 | global $txt; |
169 | 169 | |
170 | 170 | // Recurring every year or just a single year? |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | // $hook, $function, $file |
39 | 39 | return [ |
40 | - ['integrate_load_theme', '\\ElkArte\\UserNotificationIntegrate::integrate_load_theme'],]; |
|
40 | + ['integrate_load_theme', '\\ElkArte\\UserNotificationIntegrate::integrate_load_theme'], ]; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | 'value' => $txt['package_restore_permissions_cur_status'], |
178 | 178 | ), |
179 | 179 | 'data' => array( |
180 | - 'function' => static function ($rowData) { |
|
180 | + 'function' => static function($rowData) { |
|
181 | 181 | global $txt; |
182 | 182 | $formatTxt = $rowData['result'] === '' || $rowData['result'] === 'skipped' ? $txt['package_restore_permissions_pre_change'] : $txt['package_restore_permissions_post_change']; |
183 | 183 | return sprintf($formatTxt, $rowData['cur_perms'], $rowData['new_perms'], $rowData['writable_message']); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | 'value' => $txt['package_restore_permissions_result'], |
206 | 206 | ), |
207 | 207 | 'data' => array( |
208 | - 'function' => static function ($rowData) { |
|
208 | + 'function' => static function($rowData) { |
|
209 | 209 | global $txt; |
210 | 210 | return $txt['package_restore_permissions_action_' . $rowData['result']]; |
211 | 211 | }, |