@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | 'class' => 'centertext', |
979 | 979 | ), |
980 | 980 | 'data' => array( |
981 | - 'function' => function ($rowData) { |
|
981 | + 'function' => function($rowData) { |
|
982 | 982 | $isChecked = $rowData['disabled'] ? '' : ' checked="checked"'; |
983 | 983 | $onClickHandler = $rowData['can_show_register'] ? sprintf('onclick="document.getElementById(\'reg_%1$s\').disabled = !this.checked;"', $rowData['id']) : ''; |
984 | 984 | |
@@ -994,7 +994,7 @@ discard block |
||
994 | 994 | 'class' => 'centertext', |
995 | 995 | ), |
996 | 996 | 'data' => array( |
997 | - 'function' => function ($rowData) { |
|
997 | + 'function' => function($rowData) { |
|
998 | 998 | $isChecked = $rowData['on_register'] && !$rowData['disabled'] ? ' checked="checked"' : ''; |
999 | 999 | $isDisabled = $rowData['can_show_register'] ? '' : ' disabled="disabled"'; |
1000 | 1000 | |
@@ -1057,7 +1057,7 @@ discard block |
||
1057 | 1057 | 'value' => $txt['custom_profile_fieldname'], |
1058 | 1058 | ), |
1059 | 1059 | 'data' => array( |
1060 | - 'function' => function ($rowData) { |
|
1060 | + 'function' => function($rowData) { |
|
1061 | 1061 | return sprintf('<a href="%1$s">%2$s</a><div class="smalltext">%3$s</div>', getUrl('admin', ['action' => 'admin', 'area' => 'featuresettings', 'sa' => 'profileedit', 'fid' => (int) $rowData['id_field']]), $rowData['field_name'], $rowData['field_desc']); |
1062 | 1062 | }, |
1063 | 1063 | 'style' => 'width: 65%;', |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | 'value' => $txt['custom_profile_fieldtype'], |
1073 | 1073 | ), |
1074 | 1074 | 'data' => array( |
1075 | - 'function' => function ($rowData) { |
|
1075 | + 'function' => function($rowData) { |
|
1076 | 1076 | global $txt; |
1077 | 1077 | |
1078 | 1078 | $textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']); |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | 'class' => 'centertext', |
1093 | 1093 | ), |
1094 | 1094 | 'data' => array( |
1095 | - 'function' => function ($rowData) { |
|
1095 | + 'function' => function($rowData) { |
|
1096 | 1096 | $isChecked = $rowData['active'] === '1' ? ' checked="checked"' : ''; |
1097 | 1097 | |
1098 | 1098 | return sprintf('<input type="checkbox" name="cust[]" id="cust_%1$s" value="%1$s" class="input_check"%2$s />', $rowData['id_field'], $isChecked); |
@@ -1110,7 +1110,7 @@ discard block |
||
1110 | 1110 | 'value' => $txt['custom_profile_placement'], |
1111 | 1111 | ), |
1112 | 1112 | 'data' => array( |
1113 | - 'function' => function ($rowData) { |
|
1113 | + 'function' => function($rowData) { |
|
1114 | 1114 | global $txt; |
1115 | 1115 | $placement = 'custom_profile_placement_'; |
1116 | 1116 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | private $_smiley_context = []; |
40 | 40 | |
41 | 41 | /** @var string[] allowed extensions for smiles */ |
42 | - private $_smiley_types = ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg']; |
|
42 | + private $_smiley_types = ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg']; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * This is the dispatcher of smileys administration. |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | 'class' => 'centertext', |
330 | 330 | ], |
331 | 331 | 'data' => [ |
332 | - 'function' => function ($rowData) { |
|
332 | + 'function' => function($rowData) { |
|
333 | 333 | return $rowData['selected'] ? '<i class="icon i-check"></i>' : ''; |
334 | 334 | }, |
335 | 335 | 'class' => 'centertext', |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | 'class' => 'centertext', |
400 | 400 | ], |
401 | 401 | 'data' => [ |
402 | - 'function' => function ($rowData) { |
|
402 | + 'function' => function($rowData) { |
|
403 | 403 | return $rowData['id'] == 0 ? '' : sprintf('<input type="checkbox" name="smiley_set[%1$d]" class="input_check" />', $rowData['id']); |
404 | 404 | }, |
405 | 405 | 'class' => 'centertext', |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | |
899 | 899 | // If the file exists - ignore it. |
900 | 900 | $smileyLocation = $context['smileys_dir'] . '/' . $set['path'] . '/' . $destName; |
901 | - if ($fileFunc-fileExists($smileyLocation)) |
|
901 | + if ($fileFunc - fileExists($smileyLocation)) |
|
902 | 902 | { |
903 | 903 | continue; |
904 | 904 | } |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | 'columns' => [ |
1109 | 1109 | 'picture' => [ |
1110 | 1110 | 'data' => [ |
1111 | - 'function' => static function ($rowData) use ($context) { |
|
1111 | + 'function' => static function($rowData) use ($context) { |
|
1112 | 1112 | return ' |
1113 | 1113 | <a href="' . getUrl('admin', ['action' => 'admin', 'area' => 'smileys', 'sa' => 'modifysmiley', 'smiley' => '']) . $rowData['id_smiley'] . '"> |
1114 | 1114 | <img class="smiley" src="' . $context['smiley_path'] . $rowData['filename'] . '.' . $context['smiley_extension'] . '" alt="' . $rowData['description'] . '" id="smiley' . $rowData['id_smiley'] . '" /> |
@@ -1147,7 +1147,7 @@ discard block |
||
1147 | 1147 | 'value' => $txt['smileys_location'], |
1148 | 1148 | ], |
1149 | 1149 | 'data' => [ |
1150 | - 'function' => function ($rowData) use ($smiley_locations) { |
|
1150 | + 'function' => function($rowData) use ($smiley_locations) { |
|
1151 | 1151 | return $smiley_locations[$rowData['hidden']]; |
1152 | 1152 | }, |
1153 | 1153 | ], |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | 'value' => $txt['smileys_description'], |
1162 | 1162 | ], |
1163 | 1163 | 'data' => [ |
1164 | - 'function' => static function ($rowData) use ($fileFunc) { |
|
1164 | + 'function' => static function($rowData) use ($fileFunc) { |
|
1165 | 1165 | global $context, $txt, $modSettings; |
1166 | 1166 | |
1167 | 1167 | if (empty($modSettings['smileys_dir']) || !$fileFunc->isDir($modSettings['smileys_dir'])) |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | if (!$fileFunc->fileExists($modSettings['smileys_dir'] . '/' . $smiley_set['path'] . '/' . $filename)) |
1179 | 1179 | { |
1180 | 1180 | $missing_sets[] = $smiley_set['path']; |
1181 | - if (possibleSmileEmoji($rowData, $modSettings['smileys_dir'] . '/' . $smiley_set['path'] , $smiley_set['ext'])) |
|
1181 | + if (possibleSmileEmoji($rowData, $modSettings['smileys_dir'] . '/' . $smiley_set['path'], $smiley_set['ext'])) |
|
1182 | 1182 | { |
1183 | 1183 | $found_replacement = $rowData['emoji'] . '.svg'; |
1184 | 1184 | } |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | 'sortable' => true, |
1441 | 1441 | 'base_href' => getUrl('admin', ['action' => 'admin', 'area' => 'smileys', 'sa' => 'editicons']), |
1442 | 1442 | 'get_items' => [ |
1443 | - 'function' => function () { |
|
1443 | + 'function' => function() { |
|
1444 | 1444 | return $this->list_fetchMessageIconsDetails(); |
1445 | 1445 | }, |
1446 | 1446 | ], |
@@ -1973,7 +1973,7 @@ discard block |
||
1973 | 1973 | foreach ($smiley_sets as $smiley_set) |
1974 | 1974 | { |
1975 | 1975 | $smiles = $fileFunc->listTree($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path'])); |
1976 | - foreach($smiles as $smile) |
|
1976 | + foreach ($smiles as $smile) |
|
1977 | 1977 | { |
1978 | 1978 | if (in_array($smile['filename'], ['.', '..', '.htaccess', 'index.php'], true)) |
1979 | 1979 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | // Replace away! |
129 | 129 | return preg_replace_callback($this->search, |
130 | - function (array $matches) { |
|
130 | + function(array $matches) { |
|
131 | 131 | return $this->parser_callback($matches); |
132 | 132 | }, $message); |
133 | 133 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | ORDER BY LENGTH(code) DESC', |
276 | 276 | [] |
277 | 277 | )->fetch_callback( |
278 | - function ($row) use (&$smileysfrom, &$smileysto, &$smileysdescs) { |
|
278 | + function($row) use (&$smileysfrom, &$smileysto, &$smileysdescs) { |
|
279 | 279 | $smileysfrom[] = $row['code']; |
280 | 280 | $smileysto[] = htmlspecialchars($row['filename']); |
281 | 281 | $smileysdescs[] = $row['description']; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | public function emojiFromHTML($string) |
164 | 164 | { |
165 | 165 | // If there are 4byte encoded values 🄣, change those back to utf8 characters |
166 | - return preg_replace_callback(self::POSSIBLE_HTML_EMOJI, static function ($match) { |
|
166 | + return preg_replace_callback(self::POSSIBLE_HTML_EMOJI, static function($match) { |
|
167 | 167 | $replace = html_entity_decode($match[0], ENT_NOQUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8'); |
168 | 168 | |
169 | 169 | // The Fitzpatrick Scale modifiers are not (well) supported across all graphics sets. For now |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | return $string; |
265 | 265 | } |
266 | 266 | |
267 | - $result = preg_replace_callback($this->emoji_regex, function ($match) { |
|
267 | + $result = preg_replace_callback($this->emoji_regex, function($match) { |
|
268 | 268 | $hex_str = $this->unicodeCharacterToNumber($match[0]); |
269 | 269 | $found = $this->findEmojiByCode($hex_str); |
270 | 270 |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | 'style' => 'width: 25%;', |
1054 | 1054 | ), |
1055 | 1055 | 'data' => array( |
1056 | - 'function' => function ($package_md5) use ($type) { |
|
1056 | + 'function' => function($package_md5) use ($type) { |
|
1057 | 1057 | global $context; |
1058 | 1058 | |
1059 | 1059 | if (isset($context['available_' . $type][$package_md5])) |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | 'style' => 'width: 25%;', |
1076 | 1076 | ), |
1077 | 1077 | 'data' => array( |
1078 | - 'function' => function ($package_md5) use ($type) { |
|
1078 | + 'function' => function($package_md5) use ($type) { |
|
1079 | 1079 | global $context; |
1080 | 1080 | |
1081 | 1081 | if (isset($context['available_' . $type][$package_md5])) |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | 'value' => '', |
1097 | 1097 | ), |
1098 | 1098 | 'data' => array( |
1099 | - 'function' => function ($package_md5) use ($type) { |
|
1099 | + 'function' => function($package_md5) use ($type) { |
|
1100 | 1100 | global $context, $txt; |
1101 | 1101 | |
1102 | 1102 | if (!isset($context['available_' . $type][$package_md5])) |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | 'value' => $txt['mentions_from'], |
215 | 215 | ], |
216 | 216 | 'data' => [ |
217 | - 'function' => function ($row) { |
|
217 | + 'function' => function($row) { |
|
218 | 218 | global $settings; |
219 | 219 | |
220 | 220 | if (isset($settings['mentions']['mentioner_template'])) |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | 'class' => 'listaction grid8', |
275 | 275 | ], |
276 | 276 | 'data' => [ |
277 | - 'function' => function ($row) { |
|
277 | + 'function' => function($row) { |
|
278 | 278 | global $txt, $settings; |
279 | 279 | |
280 | 280 | $mark = empty($row['status']) ? 'read' : 'unread'; |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | else |
487 | 487 | { |
488 | - $to_register = array_map(static function ($name) { |
|
488 | + $to_register = array_map(static function($name) { |
|
489 | 489 | return '\\ElkArte\\Mentions\\MentionType\\Event\\' . ucfirst($name); |
490 | 490 | }, $this->_known_mentions); |
491 | 491 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if ($directory === false) |
252 | 252 | { |
253 | 253 | // Maybe it's just the folder name |
254 | - $tree = explode(DIRECTORY_SEPARATOR,BOARDDIR . DIRECTORY_SEPARATOR . $path); |
|
254 | + $tree = explode(DIRECTORY_SEPARATOR, BOARDDIR . DIRECTORY_SEPARATOR . $path); |
|
255 | 255 | $count = count($tree); |
256 | 256 | |
257 | 257 | $directory = !empty($tree) ? $this->_initDir($tree, $count) : false; |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | continue; |
439 | 439 | } |
440 | 440 | |
441 | - $sub_path = str_replace($path,'', $file->getPath()); |
|
441 | + $sub_path = str_replace($path, '', $file->getPath()); |
|
442 | 442 | |
443 | 443 | $tree[] = [ |
444 | 444 | 'filename' => $sub_path === '' ? $file->getFilename() : $sub_path . '/' . $file->getFilename(), |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $search_highlight = preg_quote(strtr($query, ['\'' => ''']), '/'); |
164 | 164 | $body_highlighted = preg_replace_callback('/((<[^>]*)|(\b' . $search_highlight . '\b)|' . $search_highlight . ')/iu', |
165 | - function ($matches) { |
|
165 | + function($matches) { |
|
166 | 166 | return $this->_highlighted_callback($matches); |
167 | 167 | }, $body_highlighted); |
168 | 168 | $subject_highlighted = preg_replace('/(' . preg_quote($query, '/') . ')/iu', '<strong class="highlight">$1</strong>', $subject_highlighted); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | // Drop any non-enabled ones |
249 | - return array_filter($searchButtons, static function ($button) { |
|
249 | + return array_filter($searchButtons, static function($button) { |
|
250 | 250 | return !isset($button['enabled']) || $button['enabled'] !== false; |
251 | 251 | }); |
252 | 252 | } |
@@ -271,7 +271,7 @@ |
||
271 | 271 | ]; |
272 | 272 | |
273 | 273 | // Drop any non-enabled ones |
274 | - $postButtons = array_filter($postButtons, static function ($button) { |
|
274 | + $postButtons = array_filter($postButtons, static function($button) { |
|
275 | 275 | return !isset($button['enabled']) || $button['enabled'] !== false; |
276 | 276 | }); |
277 | 277 |