@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Gets a list of all available message icons. |
| 22 | 22 | */ |
| 23 | -function fetchMessageIconsDetails() |
|
| 23 | +function fetchMessageIconsDetails () |
|
| 24 | 24 | { |
| 25 | 25 | static $icons; |
| 26 | 26 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ORDER BY m.icon_order', |
| 44 | 44 | array() |
| 45 | 45 | )->fetch_callback( |
| 46 | - function ($row) use (&$icons, &$last_icon, &$trueOrder) { |
|
| 46 | + function($row) use (&$icons, &$last_icon, &$trueOrder) { |
|
| 47 | 47 | global $settings, $txt; |
| 48 | 48 | |
| 49 | 49 | $icons[$row['id_icon']] = array( |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * |
| 70 | 70 | * @param int[] $icons |
| 71 | 71 | */ |
| 72 | -function deleteMessageIcons($icons) |
|
| 72 | +function deleteMessageIcons ($icons) |
|
| 73 | 73 | { |
| 74 | 74 | $db = database(); |
| 75 | 75 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @param mixed[] $icon array of values to use in the $db->insert |
| 90 | 90 | */ |
| 91 | -function updateMessageIcon($icon) |
|
| 91 | +function updateMessageIcon ($icon) |
|
| 92 | 92 | { |
| 93 | 93 | $db = database(); |
| 94 | 94 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @param mixed[] $icon associative array to use in the insert |
| 107 | 107 | */ |
| 108 | -function addMessageIcon($icon) |
|
| 108 | +function addMessageIcon ($icon) |
|
| 109 | 109 | { |
| 110 | 110 | $db = database(); |
| 111 | 111 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | * @param int $board_id |
| 128 | 128 | * @return array |
| 129 | 129 | */ |
| 130 | -function getMessageIcons($board_id) |
|
| 130 | +function getMessageIcons ($board_id) |
|
| 131 | 131 | { |
| 132 | 132 | global $modSettings, $txt, $settings; |
| 133 | 133 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @return array |
| 30 | 30 | * @package Members |
| 31 | 31 | */ |
| 32 | -function getMembersOnlineStats($membersOnlineOptions) |
|
| 32 | +function getMembersOnlineStats ($membersOnlineOptions) |
|
| 33 | 33 | { |
| 34 | 34 | global $modSettings, $txt; |
| 35 | 35 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | * @return mixed[] |
| 206 | 206 | * @package Members |
| 207 | 207 | */ |
| 208 | -function filter_members_online($membersOnlineStats, $sortFunction) |
|
| 208 | +function filter_members_online ($membersOnlineStats, $sortFunction) |
|
| 209 | 209 | { |
| 210 | 210 | foreach ($membersOnlineStats['users_online'] as $key => $row) |
| 211 | 211 | { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * @param int $total_users_online |
| 242 | 242 | * @package Members |
| 243 | 243 | */ |
| 244 | -function trackStatsUsersOnline($total_users_online) |
|
| 244 | +function trackStatsUsersOnline ($total_users_online) |
|
| 245 | 245 | { |
| 246 | 246 | global $modSettings; |
| 247 | 247 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @package Likes |
| 29 | 29 | * |
| 30 | 30 | */ |
| 31 | -function likePost($id_liker, $liked_message, $direction) |
|
| 31 | +function likePost ($id_liker, $liked_message, $direction) |
|
| 32 | 32 | { |
| 33 | 33 | global $txt, $modSettings; |
| 34 | 34 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * @package Likes |
| 62 | 62 | * |
| 63 | 63 | */ |
| 64 | -function loadLikes($messages, $prepare = true) |
|
| 64 | +function loadLikes ($messages, $prepare = true) |
|
| 65 | 65 | { |
| 66 | 66 | $db = database(); |
| 67 | 67 | $likes = array(); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'id_messages' => $messages, |
| 89 | 89 | ) |
| 90 | 90 | )->fetch_callback( |
| 91 | - function ($row) use (&$likes) { |
|
| 91 | + function($row) use (&$likes) { |
|
| 92 | 92 | $likes[$row['id_msg']]['member'][$row['id_member']] = $row['real_name']; |
| 93 | 93 | } |
| 94 | 94 | ); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @return int[] |
| 121 | 121 | * @package Likes |
| 122 | 122 | */ |
| 123 | -function prepareLikes($likes) |
|
| 123 | +function prepareLikes ($likes) |
|
| 124 | 124 | { |
| 125 | 125 | global $modSettings, $txt; |
| 126 | 126 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * @param int $likeWaitTime |
| 171 | 171 | * @package Likes |
| 172 | 172 | */ |
| 173 | -function clearLikes($likeWaitTime) |
|
| 173 | +function clearLikes ($likeWaitTime) |
|
| 174 | 174 | { |
| 175 | 175 | $db = database(); |
| 176 | 176 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | * @package Likes |
| 200 | 200 | * |
| 201 | 201 | */ |
| 202 | -function lastLikeOn($id_liker) |
|
| 202 | +function lastLikeOn ($id_liker) |
|
| 203 | 203 | { |
| 204 | 204 | global $modSettings; |
| 205 | 205 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @param string $direction - options: - or + |
| 234 | 234 | * @package Likes |
| 235 | 235 | */ |
| 236 | -function updateLike($id_liker, $liked_message, $direction) |
|
| 236 | +function updateLike ($id_liker, $liked_message, $direction) |
|
| 237 | 237 | { |
| 238 | 238 | $db = database(); |
| 239 | 239 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | * @param string $direction +/- liking or unliking |
| 316 | 316 | * @package Likes |
| 317 | 317 | */ |
| 318 | -function increaseTopicLikes($id_topic, $direction) |
|
| 318 | +function increaseTopicLikes ($id_topic, $direction) |
|
| 319 | 319 | { |
| 320 | 320 | $db = database(); |
| 321 | 321 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | * @package Likes |
| 342 | 342 | * |
| 343 | 343 | */ |
| 344 | -function likesCount($memberID, $given = true) |
|
| 344 | +function likesCount ($memberID, $given = true) |
|
| 345 | 345 | { |
| 346 | 346 | $db = database(); |
| 347 | 347 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | * @package Likes |
| 383 | 383 | * |
| 384 | 384 | */ |
| 385 | -function likesPostsGiven($start, $items_per_page, $sort, $memberID) |
|
| 385 | +function likesPostsGiven ($start, $items_per_page, $sort, $memberID) |
|
| 386 | 386 | { |
| 387 | 387 | global $scripturl, $context, $modSettings; |
| 388 | 388 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | 'per_page' => $items_per_page, |
| 409 | 409 | ) |
| 410 | 410 | )->fetch_callback( |
| 411 | - function ($row) use ($scripturl, $context) { |
|
| 411 | + function($row) use ($scripturl, $context) { |
|
| 412 | 412 | return array( |
| 413 | 413 | 'subject' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '">' . $row['subject'] . '</a>', |
| 414 | 414 | 'poster_name' => $row['poster_name'], |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | * @package Likes |
| 435 | 435 | * |
| 436 | 436 | */ |
| 437 | -function likesPostsReceived($start, $items_per_page, $sort, $memberID) |
|
| 437 | +function likesPostsReceived ($start, $items_per_page, $sort, $memberID) |
|
| 438 | 438 | { |
| 439 | 439 | global $scripturl, $modSettings; |
| 440 | 440 | |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | 'per_page' => $items_per_page, |
| 461 | 461 | ) |
| 462 | 462 | )->fetch_callback( |
| 463 | - function ($row) use ($scripturl) { |
|
| 463 | + function($row) use ($scripturl) { |
|
| 464 | 464 | return array( |
| 465 | 465 | 'subject' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '">' . $row['subject'] . '</a>', |
| 466 | 466 | 'name' => $row['name'], |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | * @package Likes |
| 485 | 485 | * |
| 486 | 486 | */ |
| 487 | -function postLikers($start, $items_per_page, $sort, $messageID, $simple = true) |
|
| 487 | +function postLikers ($start, $items_per_page, $sort, $messageID, $simple = true) |
|
| 488 | 488 | { |
| 489 | 489 | global $scripturl; |
| 490 | 490 | |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | 'per_page' => $items_per_page, |
| 517 | 517 | ) |
| 518 | 518 | )->fetch_callback( |
| 519 | - function ($row) use ($scripturl, $simple) { |
|
| 519 | + function($row) use ($scripturl, $simple) { |
|
| 520 | 520 | $like = array( |
| 521 | 521 | 'real_name' => $row['real_name'], |
| 522 | 522 | 'id_member' => $row['id_member'], |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | * @package Likes |
| 544 | 544 | * |
| 545 | 545 | */ |
| 546 | -function messageLikeCount($message) |
|
| 546 | +function messageLikeCount ($message) |
|
| 547 | 547 | { |
| 548 | 548 | $db = database(); |
| 549 | 549 | $total = 0; |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | * @return array |
| 577 | 577 | * @package Likes |
| 578 | 578 | */ |
| 579 | -function dbMostLikedMessage($limit = 10) |
|
| 579 | +function dbMostLikedMessage ($limit = 10) |
|
| 580 | 580 | { |
| 581 | 581 | global $txt; |
| 582 | 582 | |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | 'limit' => $limit, |
| 611 | 611 | ) |
| 612 | 612 | )->fetch_callback( |
| 613 | - function ($row) use (&$mostLikedMessages, $bbc_parser) { |
|
| 613 | + function($row) use (&$mostLikedMessages, $bbc_parser) { |
|
| 614 | 614 | global $scripturl; |
| 615 | 615 | |
| 616 | 616 | // Censor it! |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | * @return array |
| 676 | 676 | * @package Likes |
| 677 | 677 | */ |
| 678 | -function dbMostLikedMessagesByTopic($topic, $limit = 5) |
|
| 678 | +function dbMostLikedMessagesByTopic ($topic, $limit = 5) |
|
| 679 | 679 | { |
| 680 | 680 | global $scripturl; |
| 681 | 681 | |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | 'type_avatar' => 1, |
| 711 | 711 | ) |
| 712 | 712 | )->fetch_callback( |
| 713 | - function ($row) use ($scripturl, $bbc_parser) { |
|
| 713 | + function($row) use ($scripturl, $bbc_parser) { |
|
| 714 | 714 | // Censor those naughty words |
| 715 | 715 | $row['body'] = censor($row['body']); |
| 716 | 716 | $row['subject'] = censor($row['subject']); |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | * @package Likes |
| 765 | 765 | * |
| 766 | 766 | */ |
| 767 | -function dbMostLikedTopic($board = null, $limit = 10) |
|
| 767 | +function dbMostLikedTopic ($board = null, $limit = 10) |
|
| 768 | 768 | { |
| 769 | 769 | global $txt; |
| 770 | 770 | |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | 'limit' => $limit * 5, |
| 792 | 792 | ) |
| 793 | 793 | )->fetch_callback( |
| 794 | - function ($row) use (&$mostLikedTopics) { |
|
| 794 | + function($row) use (&$mostLikedTopics) { |
|
| 795 | 795 | $mostLikedTopics[$row['id_topic']] = $row; |
| 796 | 796 | |
| 797 | 797 | $log = log($row['like_count'] / ($row['num_replies'] + ($row['num_replies'] == 0 || $row['like_count'] == $row['num_replies'] ? 1 : 0))); |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | * |
| 835 | 835 | * @return mixed |
| 836 | 836 | */ |
| 837 | -function sort_by_relevance($a, $b) |
|
| 837 | +function sort_by_relevance ($a, $b) |
|
| 838 | 838 | { |
| 839 | 839 | return $b['relevance'] - $a['relevance']; |
| 840 | 840 | } |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | * |
| 845 | 845 | * @package Likes |
| 846 | 846 | */ |
| 847 | -function dbMostLikedBoard() |
|
| 847 | +function dbMostLikedBoard () |
|
| 848 | 848 | { |
| 849 | 849 | global $txt; |
| 850 | 850 | |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | * @package Likes |
| 901 | 901 | * |
| 902 | 902 | */ |
| 903 | -function dbMostLikesReceivedUser($limit = 10) |
|
| 903 | +function dbMostLikesReceivedUser ($limit = 10) |
|
| 904 | 904 | { |
| 905 | 905 | global $txt; |
| 906 | 906 | |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | 'limit' => $limit |
| 933 | 933 | ) |
| 934 | 934 | )->fetch_callback( |
| 935 | - function ($row) use (&$mostLikedMembers) { |
|
| 935 | + function($row) use (&$mostLikedMembers) { |
|
| 936 | 936 | global $scripturl; |
| 937 | 937 | |
| 938 | 938 | $avatar = determineAvatar($row); |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | * |
| 970 | 970 | * @return array |
| 971 | 971 | */ |
| 972 | -function dbMostLikedPostsByUser($id_member, $limit = 10) |
|
| 972 | +function dbMostLikedPostsByUser ($id_member, $limit = 10) |
|
| 973 | 973 | { |
| 974 | 974 | $db = database(); |
| 975 | 975 | $bbc_parser = ParserWrapper::instance(); |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | 'limit' => $limit |
| 993 | 993 | ) |
| 994 | 994 | )->fetch_callback( |
| 995 | - function ($row) use ($bbc_parser) { |
|
| 995 | + function($row) use ($bbc_parser) { |
|
| 996 | 996 | // Censor those naughty words |
| 997 | 997 | $row['body'] = censor($row['body']); |
| 998 | 998 | $row['subject'] = censor($row['subject']); |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | * @package Likes |
| 1028 | 1028 | * |
| 1029 | 1029 | */ |
| 1030 | -function dbMostLikesGivenUser($limit = 10) |
|
| 1030 | +function dbMostLikesGivenUser ($limit = 10) |
|
| 1031 | 1031 | { |
| 1032 | 1032 | global $txt; |
| 1033 | 1033 | |
@@ -1055,7 +1055,7 @@ discard block |
||
| 1055 | 1055 | 'limit' => $limit |
| 1056 | 1056 | ) |
| 1057 | 1057 | )->fetch_callback( |
| 1058 | - function ($row) use (&$mostLikeGivingMembers) { |
|
| 1058 | + function($row) use (&$mostLikeGivingMembers) { |
|
| 1059 | 1059 | global $scripturl; |
| 1060 | 1060 | |
| 1061 | 1061 | $avatar = determineAvatar($row); |
@@ -1092,7 +1092,7 @@ discard block |
||
| 1092 | 1092 | * @param int $limit number of recently liked posts to fetch |
| 1093 | 1093 | * @return array |
| 1094 | 1094 | */ |
| 1095 | -function dbRecentlyLikedPostsGivenUser($id_liker, $limit = 5) |
|
| 1095 | +function dbRecentlyLikedPostsGivenUser ($id_liker, $limit = 5) |
|
| 1096 | 1096 | { |
| 1097 | 1097 | $db = database(); |
| 1098 | 1098 | $bbc_parser = ParserWrapper::instance(); |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | 'limit' => $limit |
| 1114 | 1114 | ) |
| 1115 | 1115 | )->fetch_callback( |
| 1116 | - function ($row) use ($bbc_parser) { |
|
| 1116 | + function($row) use ($bbc_parser) { |
|
| 1117 | 1117 | // Censor those $%#^&% words |
| 1118 | 1118 | $row['body'] = censor($row['body']); |
| 1119 | 1119 | $row['subject'] = censor($row['subject']); |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | * |
| 1150 | 1150 | * @param int[]|int $messages |
| 1151 | 1151 | */ |
| 1152 | -function decreaseLikeCounts($messages) |
|
| 1152 | +function decreaseLikeCounts ($messages) |
|
| 1153 | 1153 | { |
| 1154 | 1154 | $db = database(); |
| 1155 | 1155 | |
@@ -1175,7 +1175,7 @@ discard block |
||
| 1175 | 1175 | 'messages' => $messages, |
| 1176 | 1176 | ) |
| 1177 | 1177 | )->fetch_callback( |
| 1178 | - function ($row) use (&$posters, &$likers) { |
|
| 1178 | + function($row) use (&$posters, &$likers) { |
|
| 1179 | 1179 | // Track how many likes each member gave and how many were received |
| 1180 | 1180 | $posters[$row['id_poster']] = isset($posters[$row['id_poster']]) ? $posters[$row['id_poster']]++ : 1; |
| 1181 | 1181 | $likers[$row['id_member']] = isset($likers[$row['id_member']]) ? $likers[$row['id_member']]++ : 1; |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | 'members' => array_keys($likers), |
| 1202 | 1202 | ) |
| 1203 | 1203 | )->fetch_callback( |
| 1204 | - function ($row) use (&$update_given, $likers) { |
|
| 1204 | + function($row) use (&$update_given, $likers) { |
|
| 1205 | 1205 | // All who liked these messages have their "likes given" reduced |
| 1206 | 1206 | $update_given[$row['id_member']] = $row['likes'] - $likers[$row['id_member']]; |
| 1207 | 1207 | } |
@@ -1221,7 +1221,7 @@ discard block |
||
| 1221 | 1221 | 'members' => array_keys($posters), |
| 1222 | 1222 | ) |
| 1223 | 1223 | )->fetch_callback( |
| 1224 | - function ($row) use (&$update_received, $posters) { |
|
| 1224 | + function($row) use (&$update_received, $posters) { |
|
| 1225 | 1225 | // The message posters have their "likes received" reduced |
| 1226 | 1226 | $update_received[$row['id_poster']] = $row['likes'] - $posters[$row['id_poster']]; |
| 1227 | 1227 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @param string[] $smileys |
| 21 | 21 | * @return array |
| 22 | 22 | */ |
| 23 | -function smileyExists($smileys) |
|
| 23 | +function smileyExists ($smileys) |
|
| 24 | 24 | { |
| 25 | 25 | $db = database(); |
| 26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | 'smiley_list' => $smileys, |
| 35 | 35 | ) |
| 36 | 36 | )->fetch_callback( |
| 37 | - function ($row) use (&$found) { |
|
| 37 | + function($row) use (&$found) { |
|
| 38 | 38 | $found[] = $row['filename']; |
| 39 | 39 | } |
| 40 | 40 | ); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @param string|null $current |
| 50 | 50 | * @return bool |
| 51 | 51 | */ |
| 52 | -function validateDuplicateSmiley($code, $current = null) |
|
| 52 | +function validateDuplicateSmiley ($code, $current = null) |
|
| 53 | 53 | { |
| 54 | 54 | $db = database(); |
| 55 | 55 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return int |
| 75 | 75 | */ |
| 76 | -function nextSmileyLocation($location) |
|
| 76 | +function nextSmileyLocation ($location) |
|
| 77 | 77 | { |
| 78 | 78 | $db = database(); |
| 79 | 79 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * |
| 99 | 99 | * @param mixed[] $param associative array to use in the insert |
| 100 | 100 | */ |
| 101 | -function addSmiley($param) |
|
| 101 | +function addSmiley ($param) |
|
| 102 | 102 | { |
| 103 | 103 | $db = database(); |
| 104 | 104 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * |
| 118 | 118 | * @param int[] $smileys |
| 119 | 119 | */ |
| 120 | -function deleteSmileys($smileys) |
|
| 120 | +function deleteSmileys ($smileys) |
|
| 121 | 121 | { |
| 122 | 122 | $db = database(); |
| 123 | 123 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * @param int[] $smileys |
| 137 | 137 | * @param int $display_type |
| 138 | 138 | */ |
| 139 | -function updateSmileyDisplayType($smileys, $display_type) |
|
| 139 | +function updateSmileyDisplayType ($smileys, $display_type) |
|
| 140 | 140 | { |
| 141 | 141 | $db = database(); |
| 142 | 142 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * |
| 158 | 158 | * @param mixed[] $param |
| 159 | 159 | */ |
| 160 | -function updateSmiley($param) |
|
| 160 | +function updateSmiley ($param) |
|
| 161 | 161 | { |
| 162 | 162 | $db = database(); |
| 163 | 163 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * @return array |
| 188 | 188 | * @throws \ElkArte\Exceptions\Exception smiley_not_found |
| 189 | 189 | */ |
| 190 | -function getSmiley($id) |
|
| 190 | +function getSmiley ($id) |
|
| 191 | 191 | { |
| 192 | 192 | $db = database(); |
| 193 | 193 | |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | * |
| 219 | 219 | * @return array |
| 220 | 220 | */ |
| 221 | -function getSmileyPosition($location, $id) |
|
| 221 | +function getSmileyPosition ($location, $id) |
|
| 222 | 222 | { |
| 223 | 223 | $db = database(); |
| 224 | 224 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | * @param int[] $smiley |
| 248 | 248 | * @param int $source |
| 249 | 249 | */ |
| 250 | -function moveSmileyPosition($smiley, $source) |
|
| 250 | +function moveSmileyPosition ($smiley, $source) |
|
| 251 | 251 | { |
| 252 | 252 | $db = database(); |
| 253 | 253 | |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | * @param int $row |
| 289 | 289 | * @param int $location |
| 290 | 290 | */ |
| 291 | -function updateSmileyRow($id, $row, $location) |
|
| 291 | +function updateSmileyRow ($id, $row, $location) |
|
| 292 | 292 | { |
| 293 | 293 | $db = database(); |
| 294 | 294 | |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | * @param int $id |
| 313 | 313 | * @param int $order |
| 314 | 314 | */ |
| 315 | -function updateSmileyOrder($id, $order) |
|
| 315 | +function updateSmileyOrder ($id, $order) |
|
| 316 | 316 | { |
| 317 | 317 | $db = database(); |
| 318 | 318 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | /** |
| 332 | 332 | * Get a list of all visible smileys. |
| 333 | 333 | */ |
| 334 | -function getSmileys() |
|
| 334 | +function getSmileys () |
|
| 335 | 335 | { |
| 336 | 336 | $db = database(); |
| 337 | 337 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | 'popup' => 1, |
| 355 | 355 | ) |
| 356 | 356 | )->fetch_callback( |
| 357 | - function ($row) use (&$smileys) { |
|
| 357 | + function($row) use (&$smileys) { |
|
| 358 | 358 | $location = empty($row['hidden']) ? 'postform' : 'popup'; |
| 359 | 359 | $smileys[$location]['rows'][$row['smiley_row']][] = array( |
| 360 | 360 | 'id' => $row['id_smiley'], |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | * @param string $set name of smiley set to check |
| 378 | 378 | * @return bool |
| 379 | 379 | */ |
| 380 | -function isSmileySetInstalled($set) |
|
| 380 | +function isSmileySetInstalled ($set) |
|
| 381 | 381 | { |
| 382 | 382 | $db = database(); |
| 383 | 383 | |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * |
| 402 | 402 | * @param mixed[] $param |
| 403 | 403 | */ |
| 404 | -function logPackageInstall($param) |
|
| 404 | +function logPackageInstall ($param) |
|
| 405 | 405 | { |
| 406 | 406 | $db = database(); |
| 407 | 407 | |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | * |
| 429 | 429 | * @return string |
| 430 | 430 | */ |
| 431 | -function getMaxSmileyOrder() |
|
| 431 | +function getMaxSmileyOrder () |
|
| 432 | 432 | { |
| 433 | 433 | $db = database(); |
| 434 | 434 | |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | * |
| 460 | 460 | * @return array |
| 461 | 461 | */ |
| 462 | -function list_getSmileySets($start, $items_per_page, $sort) |
|
| 462 | +function list_getSmileySets ($start, $items_per_page, $sort) |
|
| 463 | 463 | { |
| 464 | 464 | global $modSettings; |
| 465 | 465 | |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | /** |
| 514 | 514 | * Callback function for createList(). |
| 515 | 515 | */ |
| 516 | -function list_getNumSmileySets() |
|
| 516 | +function list_getNumSmileySets () |
|
| 517 | 517 | { |
| 518 | 518 | global $modSettings; |
| 519 | 519 | |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | * |
| 530 | 530 | * @return array |
| 531 | 531 | */ |
| 532 | -function list_getSmileys($start, $items_per_page, $sort) |
|
| 532 | +function list_getSmileys ($start, $items_per_page, $sort) |
|
| 533 | 533 | { |
| 534 | 534 | $db = database(); |
| 535 | 535 | |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | /** |
| 547 | 547 | * Callback function for createList(). |
| 548 | 548 | */ |
| 549 | -function list_getNumSmileys() |
|
| 549 | +function list_getNumSmileys () |
|
| 550 | 550 | { |
| 551 | 551 | $db = database(); |
| 552 | 552 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @return array |
| 34 | 34 | */ |
| 35 | -function recountOpenReports($flush = true, $count_pms = false) |
|
| 35 | +function recountOpenReports ($flush = true, $count_pms = false) |
|
| 36 | 36 | { |
| 37 | 37 | global $context; |
| 38 | 38 | |
@@ -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 | ); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @param string|null $approve_query |
| 96 | 96 | * @return array of values |
| 97 | 97 | */ |
| 98 | -function recountUnapprovedPosts($approve_query = null) |
|
| 98 | +function recountUnapprovedPosts ($approve_query = null) |
|
| 99 | 99 | { |
| 100 | 100 | global $context; |
| 101 | 101 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * |
| 153 | 153 | * @return int |
| 154 | 154 | */ |
| 155 | -function recountFailedEmails($approve_query = null) |
|
| 155 | +function recountFailedEmails ($approve_query = null) |
|
| 156 | 156 | { |
| 157 | 157 | global $context; |
| 158 | 158 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * |
| 190 | 190 | * @return int |
| 191 | 191 | */ |
| 192 | -function totalReports($status = 0, $show_pms = false) |
|
| 192 | +function totalReports ($status = 0, $show_pms = false) |
|
| 193 | 193 | { |
| 194 | 194 | $db = database(); |
| 195 | 195 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * |
| 221 | 221 | * @return int |
| 222 | 222 | */ |
| 223 | -function updateReportsStatus($reports_id, $property = 'close', $status = 0) |
|
| 223 | +function updateReportsStatus ($reports_id, $property = 'close', $status = 0) |
|
| 224 | 224 | { |
| 225 | 225 | if (empty($reports_id)) |
| 226 | 226 | { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * |
| 262 | 262 | * @return mixed |
| 263 | 263 | */ |
| 264 | -function loadModeratorMenuCounts($brd = null) |
|
| 264 | +function loadModeratorMenuCounts ($brd = null) |
|
| 265 | 265 | { |
| 266 | 266 | global $modSettings; |
| 267 | 267 | |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | * @param string $body |
| 405 | 405 | * @return int |
| 406 | 406 | */ |
| 407 | -function logWarningNotice($subject, $body) |
|
| 407 | +function logWarningNotice ($subject, $body) |
|
| 408 | 408 | { |
| 409 | 409 | $db = database(); |
| 410 | 410 | |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | * @param int $level_change |
| 433 | 433 | * @param string $warn_reason |
| 434 | 434 | */ |
| 435 | -function logWarning($memberID, $real_name, $id_notice, $level_change, $warn_reason) |
|
| 435 | +function logWarning ($memberID, $real_name, $id_notice, $level_change, $warn_reason) |
|
| 436 | 436 | { |
| 437 | 437 | $db = database(); |
| 438 | 438 | |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | * @param int $id_tpl id of the template to remove |
| 459 | 459 | * @param string $template_type type of template, defaults to warntpl |
| 460 | 460 | */ |
| 461 | -function removeWarningTemplate($id_tpl, $template_type = 'warntpl') |
|
| 461 | +function removeWarningTemplate ($id_tpl, $template_type = 'warntpl') |
|
| 462 | 462 | { |
| 463 | 463 | $db = database(); |
| 464 | 464 | |
@@ -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 | ); |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | * |
| 509 | 509 | * @return array |
| 510 | 510 | */ |
| 511 | -function warningTemplates($start, $items_per_page, $sort, $template_type = 'warntpl') |
|
| 511 | +function warningTemplates ($start, $items_per_page, $sort, $template_type = 'warntpl') |
|
| 512 | 512 | { |
| 513 | 513 | $db = database(); |
| 514 | 514 | |
@@ -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( |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | * |
| 559 | 559 | * @return int |
| 560 | 560 | */ |
| 561 | -function warningTemplateCount($template_type = 'warntpl') |
|
| 561 | +function warningTemplateCount ($template_type = 'warntpl') |
|
| 562 | 562 | { |
| 563 | 563 | $db = database(); |
| 564 | 564 | |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * |
| 594 | 594 | * @return array |
| 595 | 595 | */ |
| 596 | -function warnings($start, $items_per_page, $sort, $query_string = '', $query_params = array()) |
|
| 596 | +function warnings ($start, $items_per_page, $sort, $query_string = '', $query_params = array()) |
|
| 597 | 597 | { |
| 598 | 598 | $db = database(); |
| 599 | 599 | |
@@ -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( |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | * |
| 644 | 644 | * @return int |
| 645 | 645 | */ |
| 646 | -function warningCount($query_string = '', $query_params = array()) |
|
| 646 | +function warningCount ($query_string = '', $query_params = array()) |
|
| 647 | 647 | { |
| 648 | 648 | $db = database(); |
| 649 | 649 | |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | * @param int $id_template |
| 672 | 672 | * @param string $template_type |
| 673 | 673 | */ |
| 674 | -function modLoadTemplate($id_template, $template_type = 'warntpl') |
|
| 674 | +function modLoadTemplate ($id_template, $template_type = 'warntpl') |
|
| 675 | 675 | { |
| 676 | 676 | $db = database(); |
| 677 | 677 | |
@@ -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( |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | * @param bool $edit true to update, false to insert a new row |
| 713 | 713 | * @param string $type |
| 714 | 714 | */ |
| 715 | -function modAddUpdateTemplate($recipient_id, $template_title, $template_body, $id_template, $edit = true, $type = 'warntpl') |
|
| 715 | +function modAddUpdateTemplate ($recipient_id, $template_title, $template_body, $id_template, $edit = true, $type = 'warntpl') |
|
| 716 | 716 | { |
| 717 | 717 | $db = database(); |
| 718 | 718 | |
@@ -765,7 +765,7 @@ discard block |
||
| 765 | 765 | * |
| 766 | 766 | * @return bool |
| 767 | 767 | */ |
| 768 | -function modReportDetails($id_report, $show_pms = false) |
|
| 768 | +function modReportDetails ($id_report, $show_pms = false) |
|
| 769 | 769 | { |
| 770 | 770 | $db = database(); |
| 771 | 771 | |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | * @return array |
| 811 | 811 | * @todo move to createList? |
| 812 | 812 | */ |
| 813 | -function getModReports($status = 0, $start = 0, $limit = 10, $show_pms = false) |
|
| 813 | +function getModReports ($status = 0, $start = 0, $limit = 10, $show_pms = false) |
|
| 814 | 814 | { |
| 815 | 815 | $db = database(); |
| 816 | 816 | |
@@ -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 | ); |
@@ -849,7 +849,7 @@ discard block |
||
| 849 | 849 | * |
| 850 | 850 | * @return array |
| 851 | 851 | */ |
| 852 | -function getReportsUserComments($id_reports) |
|
| 852 | +function getReportsUserComments ($id_reports) |
|
| 853 | 853 | { |
| 854 | 854 | $db = database(); |
| 855 | 855 | |
@@ -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 | ); |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | * |
| 882 | 882 | * @return array |
| 883 | 883 | */ |
| 884 | -function getReportModeratorsComments($id_report) |
|
| 884 | +function getReportModeratorsComments ($id_report) |
|
| 885 | 885 | { |
| 886 | 886 | $db = database(); |
| 887 | 887 | |
@@ -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 | ); |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | * This is a helper function: approve everything unapproved. |
| 912 | 912 | * Used from moderation panel. |
| 913 | 913 | */ |
| 914 | -function approveAllUnapproved() |
|
| 914 | +function approveAllUnapproved () |
|
| 915 | 915 | { |
| 916 | 916 | $db = database(); |
| 917 | 917 | |
@@ -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 | ); |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | * @param int $warning_watch |
| 970 | 970 | * @return int |
| 971 | 971 | */ |
| 972 | -function watchedUserCount($warning_watch = 0) |
|
| 972 | +function watchedUserCount ($warning_watch = 0) |
|
| 973 | 973 | { |
| 974 | 974 | $db = database(); |
| 975 | 975 | |
@@ -1000,7 +1000,7 @@ discard block |
||
| 1000 | 1000 | * |
| 1001 | 1001 | * @return array |
| 1002 | 1002 | */ |
| 1003 | -function watchedUsers($start, $items_per_page, $sort) |
|
| 1003 | +function watchedUsers ($start, $items_per_page, $sort) |
|
| 1004 | 1004 | { |
| 1005 | 1005 | global $modSettings; |
| 1006 | 1006 | |
@@ -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 | } |
@@ -1109,7 +1109,7 @@ discard block |
||
| 1109 | 1109 | * @param int $warning_watch |
| 1110 | 1110 | * @return int |
| 1111 | 1111 | */ |
| 1112 | -function watchedUserPostsCount($approve_query, $warning_watch) |
|
| 1112 | +function watchedUserPostsCount ($approve_query, $warning_watch) |
|
| 1113 | 1113 | { |
| 1114 | 1114 | global $modSettings; |
| 1115 | 1115 | |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | * |
| 1150 | 1150 | * @return array |
| 1151 | 1151 | */ |
| 1152 | -function watchedUserPosts($start, $items_per_page, $approve_query, $delete_boards) |
|
| 1152 | +function watchedUserPosts ($start, $items_per_page, $approve_query, $delete_boards) |
|
| 1153 | 1153 | { |
| 1154 | 1154 | global $modSettings; |
| 1155 | 1155 | |
@@ -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']); |
@@ -1202,7 +1202,7 @@ discard block |
||
| 1202 | 1202 | * Show a list of all the group requests they can see. |
| 1203 | 1203 | * Checks permissions for group moderation. |
| 1204 | 1204 | */ |
| 1205 | -function groupRequests() |
|
| 1205 | +function groupRequests () |
|
| 1206 | 1206 | { |
| 1207 | 1207 | $db = database(); |
| 1208 | 1208 | |
@@ -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( |
@@ -1257,7 +1257,7 @@ discard block |
||
| 1257 | 1257 | /** |
| 1258 | 1258 | * Returns an array of basic info about the most active watched users. |
| 1259 | 1259 | */ |
| 1260 | -function basicWatchedUsers() |
|
| 1260 | +function basicWatchedUsers () |
|
| 1261 | 1261 | { |
| 1262 | 1262 | global $modSettings; |
| 1263 | 1263 | |
@@ -1278,7 +1278,7 @@ discard block |
||
| 1278 | 1278 | 'warning_watch' => $modSettings['warning_watch'], |
| 1279 | 1279 | ) |
| 1280 | 1280 | )->fetch_callback( |
| 1281 | - function ($row) use (&$watched_users) { |
|
| 1281 | + function($row) use (&$watched_users) { |
|
| 1282 | 1282 | $watched_users[] = $row; |
| 1283 | 1283 | } |
| 1284 | 1284 | ); |
@@ -1296,7 +1296,7 @@ discard block |
||
| 1296 | 1296 | * |
| 1297 | 1297 | * @return array |
| 1298 | 1298 | */ |
| 1299 | -function reportedPosts($show_pms = false) |
|
| 1299 | +function reportedPosts ($show_pms = false) |
|
| 1300 | 1300 | { |
| 1301 | 1301 | $db = database(); |
| 1302 | 1302 | |
@@ -1327,7 +1327,7 @@ discard block |
||
| 1327 | 1327 | 'rep_type' => $show_pms ? array('pm') : array('msg'), |
| 1328 | 1328 | ) |
| 1329 | 1329 | )->fetch_callback( |
| 1330 | - function ($row) use (&$reported_posts) { |
|
| 1330 | + function($row) use (&$reported_posts) { |
|
| 1331 | 1331 | $reported_posts[] = $row; |
| 1332 | 1332 | } |
| 1333 | 1333 | ); |
@@ -1344,7 +1344,7 @@ discard block |
||
| 1344 | 1344 | * |
| 1345 | 1345 | * @param int $id_note |
| 1346 | 1346 | */ |
| 1347 | -function removeModeratorNote($id_note) |
|
| 1347 | +function removeModeratorNote ($id_note) |
|
| 1348 | 1348 | { |
| 1349 | 1349 | $db = database(); |
| 1350 | 1350 | |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | * |
| 1366 | 1366 | * @return int |
| 1367 | 1367 | */ |
| 1368 | -function countModeratorNotes() |
|
| 1368 | +function countModeratorNotes () |
|
| 1369 | 1369 | { |
| 1370 | 1370 | $db = database(); |
| 1371 | 1371 | |
@@ -1398,7 +1398,7 @@ discard block |
||
| 1398 | 1398 | * @param string $poster_name a name to show |
| 1399 | 1399 | * @param string $contents what they are posting |
| 1400 | 1400 | */ |
| 1401 | -function addModeratorNote($id_poster, $poster_name, $contents) |
|
| 1401 | +function addModeratorNote ($id_poster, $poster_name, $contents) |
|
| 1402 | 1402 | { |
| 1403 | 1403 | $db = database(); |
| 1404 | 1404 | |
@@ -1422,7 +1422,7 @@ discard block |
||
| 1422 | 1422 | * @param int $report |
| 1423 | 1423 | * @param string $newComment |
| 1424 | 1424 | */ |
| 1425 | -function addReportComment($report, $newComment) |
|
| 1425 | +function addReportComment ($report, $newComment) |
|
| 1426 | 1426 | { |
| 1427 | 1427 | $db = database(); |
| 1428 | 1428 | |
@@ -1448,7 +1448,7 @@ discard block |
||
| 1448 | 1448 | * |
| 1449 | 1449 | * @return array |
| 1450 | 1450 | */ |
| 1451 | -function moderatorNotes($offset) |
|
| 1451 | +function moderatorNotes ($offset) |
|
| 1452 | 1452 | { |
| 1453 | 1453 | $db = database(); |
| 1454 | 1454 | |
@@ -1471,7 +1471,7 @@ discard block |
||
| 1471 | 1471 | 'offset' => $offset, |
| 1472 | 1472 | ) |
| 1473 | 1473 | )->fetch_callback( |
| 1474 | - function ($row) use (&$moderator_notes) { |
|
| 1474 | + function($row) use (&$moderator_notes) { |
|
| 1475 | 1475 | $moderator_notes[] = $row; |
| 1476 | 1476 | } |
| 1477 | 1477 | ); |
@@ -1492,7 +1492,7 @@ discard block |
||
| 1492 | 1492 | * |
| 1493 | 1493 | * @return array |
| 1494 | 1494 | */ |
| 1495 | -function moderatorNotice($id_notice) |
|
| 1495 | +function moderatorNotice ($id_notice) |
|
| 1496 | 1496 | { |
| 1497 | 1497 | $db = database(); |
| 1498 | 1498 | |
@@ -1527,7 +1527,7 @@ discard block |
||
| 1527 | 1527 | * |
| 1528 | 1528 | * @return int |
| 1529 | 1529 | */ |
| 1530 | -function warningDailyLimit($member) |
|
| 1530 | +function warningDailyLimit ($member) |
|
| 1531 | 1531 | { |
| 1532 | 1532 | $db = database(); |
| 1533 | 1533 | |
@@ -1571,7 +1571,7 @@ discard block |
||
| 1571 | 1571 | * |
| 1572 | 1572 | * @return array |
| 1573 | 1573 | */ |
| 1574 | -function getUnapprovedPosts($approve_query, $current_view, $boards_allowed, $start, $limit = 10) |
|
| 1574 | +function getUnapprovedPosts ($approve_query, $current_view, $boards_allowed, $start, $limit = 10) |
|
| 1575 | 1575 | { |
| 1576 | 1576 | $db = database(); |
| 1577 | 1577 | |
@@ -1599,7 +1599,7 @@ discard block |
||
| 1599 | 1599 | 'not_approved' => 0, |
| 1600 | 1600 | ) |
| 1601 | 1601 | )->fetch_callback( |
| 1602 | - function ($row) use (&$unapproved_items, $bbc_parser, &$i, $boards_allowed) { |
|
| 1602 | + function($row) use (&$unapproved_items, $bbc_parser, &$i, $boards_allowed) { |
|
| 1603 | 1603 | global $context, $scripturl, $modSettings; |
| 1604 | 1604 | |
| 1605 | 1605 | // Can delete is complicated, let's solve it first... is it their own post? |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @todo refactor away |
| 29 | 29 | * |
| 30 | 30 | */ |
| 31 | -function list_getSubscribedUserCount($id_sub, $search_string, $search_vars = array()) |
|
| 31 | +function list_getSubscribedUserCount ($id_sub, $search_string, $search_vars = array()) |
|
| 32 | 32 | { |
| 33 | 33 | $db = database(); |
| 34 | 34 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @todo refactor outta here |
| 67 | 67 | * |
| 68 | 68 | */ |
| 69 | -function list_getSubscribedUsers($start, $items_per_page, $sort, $id_sub, $search_string, $search_vars = array()) |
|
| 69 | +function list_getSubscribedUsers ($start, $items_per_page, $sort, $id_sub, $search_string, $search_vars = array()) |
|
| 70 | 70 | { |
| 71 | 71 | global $txt; |
| 72 | 72 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'guest' => $txt['guest'], |
| 91 | 91 | )) |
| 92 | 92 | )->fetch_callback( |
| 93 | - function ($row) use (&$subscribers) { |
|
| 93 | + function($row) use (&$subscribers) { |
|
| 94 | 94 | global $txt; |
| 95 | 95 | |
| 96 | 96 | $subscribers[] = array( |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * |
| 115 | 115 | * @param int[]|int $users |
| 116 | 116 | */ |
| 117 | -function reapplySubscriptions($users) |
|
| 117 | +function reapplySubscriptions ($users) |
|
| 118 | 118 | { |
| 119 | 119 | $db = database(); |
| 120 | 120 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | 'current_time' => time(), |
| 150 | 150 | ) |
| 151 | 151 | )->fetch_callback( |
| 152 | - function ($row) use (&$groups) { |
|
| 152 | + function($row) use (&$groups) { |
|
| 153 | 153 | // Specific primary group? |
| 154 | 154 | if ($row['id_group'] != 0) |
| 155 | 155 | { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @param int $forceStartTime = 0 |
| 196 | 196 | * @param int $forceEndTime = 0 |
| 197 | 197 | */ |
| 198 | -function addSubscription($id_subscribe, $id_member, $renewal = '', $forceStartTime = 0, $forceEndTime = 0) |
|
| 198 | +function addSubscription ($id_subscribe, $id_member, $renewal = '', $forceStartTime = 0, $forceEndTime = 0) |
|
| 199 | 199 | { |
| 200 | 200 | global $context; |
| 201 | 201 | |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | * |
| 425 | 425 | * @return array |
| 426 | 426 | */ |
| 427 | -function loadPaymentGateways() |
|
| 427 | +function loadPaymentGateways () |
|
| 428 | 428 | { |
| 429 | 429 | $gateways = array(); |
| 430 | 430 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | /** |
| 465 | 465 | * This just kind of catches all the subscription data. |
| 466 | 466 | */ |
| 467 | -function loadSubscriptions() |
|
| 467 | +function loadSubscriptions () |
|
| 468 | 468 | { |
| 469 | 469 | $db = database(); |
| 470 | 470 | |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | FROM {db_prefix}subscriptions', |
| 486 | 486 | array() |
| 487 | 487 | )->fetch_callback( |
| 488 | - function ($row) { |
|
| 488 | + function($row) { |
|
| 489 | 489 | global $context, $modSettings, $txt; |
| 490 | 490 | |
| 491 | 491 | // Pick a cost. |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | GROUP BY id_subscribe, status', |
| 556 | 556 | array() |
| 557 | 557 | )->fetch_callback( |
| 558 | - function ($row) { |
|
| 558 | + function($row) { |
|
| 559 | 559 | global $context; |
| 560 | 560 | |
| 561 | 561 | $ind = $row['status'] == 0 ? 'finished' : 'total'; |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | GROUP BY id_subscribe', |
| 576 | 576 | array() |
| 577 | 577 | )->fetch_callback( |
| 578 | - function ($row) { |
|
| 578 | + function($row) { |
|
| 579 | 579 | global $context; |
| 580 | 580 | |
| 581 | 581 | if (isset($context['subscriptions'][$row['id_subscribe']])) |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | * |
| 595 | 595 | * @return array |
| 596 | 596 | */ |
| 597 | -function loadMemberSubscriptions($memID, $active_subscriptions) |
|
| 597 | +function loadMemberSubscriptions ($memID, $active_subscriptions) |
|
| 598 | 598 | { |
| 599 | 599 | $db = database(); |
| 600 | 600 | |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | 'selected_member' => $memID, |
| 610 | 610 | ) |
| 611 | 611 | )->fetch_callback( |
| 612 | - function ($row) use (&$current, $active_subscriptions) { |
|
| 612 | + function($row) use (&$current, $active_subscriptions) { |
|
| 613 | 613 | global $txt; |
| 614 | 614 | |
| 615 | 615 | // The subscription must exist! |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | * |
| 643 | 643 | * @return array |
| 644 | 644 | */ |
| 645 | -function loadAllSubsctiptions($sub_id) |
|
| 645 | +function loadAllSubsctiptions ($sub_id) |
|
| 646 | 646 | { |
| 647 | 647 | global $txt; |
| 648 | 648 | |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | 'guest' => $txt['guest'], |
| 671 | 671 | ) |
| 672 | 672 | )->fetch_callback( |
| 673 | - function ($row) use (&$members) { |
|
| 673 | + function($row) use (&$members) { |
|
| 674 | 674 | $members[$row['id_member']] = $row; |
| 675 | 675 | } |
| 676 | 676 | ); |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | * |
| 686 | 686 | * @param int $id |
| 687 | 687 | */ |
| 688 | -function deleteSubscription($id) |
|
| 688 | +function deleteSubscription ($id) |
|
| 689 | 689 | { |
| 690 | 690 | $db = database(); |
| 691 | 691 | |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | * |
| 754 | 754 | * @param mixed[] $insert |
| 755 | 755 | */ |
| 756 | -function insertSubscription($insert) |
|
| 756 | +function insertSubscription ($insert) |
|
| 757 | 757 | { |
| 758 | 758 | $db = database(); |
| 759 | 759 | |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | * @param int $sub_id |
| 782 | 782 | * @return int |
| 783 | 783 | */ |
| 784 | -function countActiveSubscriptions($sub_id) |
|
| 784 | +function countActiveSubscriptions ($sub_id) |
|
| 785 | 785 | { |
| 786 | 786 | $db = database(); |
| 787 | 787 | |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | * @param mixed[] $update |
| 810 | 810 | * @param int $ignore_active - used to ignore already active subscriptions. |
| 811 | 811 | */ |
| 812 | -function updateSubscription($update, $ignore_active) |
|
| 812 | +function updateSubscription ($update, $ignore_active) |
|
| 813 | 813 | { |
| 814 | 814 | $db = database(); |
| 815 | 815 | |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | * |
| 845 | 845 | * @param mixed[] $subscription_info |
| 846 | 846 | */ |
| 847 | -function updateNonrecurrent($subscription_info) |
|
| 847 | +function updateNonrecurrent ($subscription_info) |
|
| 848 | 848 | { |
| 849 | 849 | $db = database(); |
| 850 | 850 | |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | * @param int $sub_id |
| 868 | 868 | * @return array |
| 869 | 869 | */ |
| 870 | -function getSubscriptionDetails($sub_id) |
|
| 870 | +function getSubscriptionDetails ($sub_id) |
|
| 871 | 871 | { |
| 872 | 872 | $db = database(); |
| 873 | 873 | |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | 'current_subscription' => $sub_id, |
| 884 | 884 | ) |
| 885 | 885 | )->fetch_callback( |
| 886 | - function ($row) use (&$subscription) { |
|
| 886 | + function($row) use (&$subscription) { |
|
| 887 | 887 | // Sort the date. |
| 888 | 888 | preg_match('~(\d*)(\w)~', $row['length'], $match); |
| 889 | 889 | if (isset($match[2])) |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | * @return int |
| 930 | 930 | * @throws \ElkArte\Exceptions\Exception no_access |
| 931 | 931 | */ |
| 932 | -function validateSubscriptionID($id) |
|
| 932 | +function validateSubscriptionID ($id) |
|
| 933 | 933 | { |
| 934 | 934 | $db = database(); |
| 935 | 935 | |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | * @param int $id_member |
| 963 | 963 | * @return bool |
| 964 | 964 | */ |
| 965 | -function alreadySubscribed($id_sub, $id_member) |
|
| 965 | +function alreadySubscribed ($id_sub, $id_member) |
|
| 966 | 966 | { |
| 967 | 967 | $db = database(); |
| 968 | 968 | |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | * @return array |
| 993 | 993 | * @throws \ElkArte\Exceptions\Exception no_access |
| 994 | 994 | */ |
| 995 | -function getSubscriptionStatus($log_id) |
|
| 995 | +function getSubscriptionStatus ($log_id) |
|
| 996 | 996 | { |
| 997 | 997 | $db = database(); |
| 998 | 998 | |
@@ -1028,7 +1028,7 @@ discard block |
||
| 1028 | 1028 | * |
| 1029 | 1029 | * @param int[] $item |
| 1030 | 1030 | */ |
| 1031 | -function updateSubscriptionItem($item) |
|
| 1031 | +function updateSubscriptionItem ($item) |
|
| 1032 | 1032 | { |
| 1033 | 1033 | $db = database(); |
| 1034 | 1034 | |
@@ -1054,7 +1054,7 @@ discard block |
||
| 1054 | 1054 | * @param int $member_id |
| 1055 | 1055 | * @param int $time |
| 1056 | 1056 | */ |
| 1057 | -function handleRefund($subscription_info, $member_id, $time) |
|
| 1057 | +function handleRefund ($subscription_info, $member_id, $time) |
|
| 1058 | 1058 | { |
| 1059 | 1059 | $db = database(); |
| 1060 | 1060 | |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | * @param int[] $toDelete |
| 1098 | 1098 | * @return array $delete |
| 1099 | 1099 | */ |
| 1100 | -function prepareDeleteSubscriptions($toDelete) |
|
| 1100 | +function prepareDeleteSubscriptions ($toDelete) |
|
| 1101 | 1101 | { |
| 1102 | 1102 | $db = database(); |
| 1103 | 1103 | |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | 'subscription_list' => $toDelete, |
| 1112 | 1112 | ) |
| 1113 | 1113 | )->fetch_callback( |
| 1114 | - function ($row) use (&$delete) { |
|
| 1114 | + function($row) use (&$delete) { |
|
| 1115 | 1115 | $delete[$row['id_subscribe']] = $row['id_member']; |
| 1116 | 1116 | } |
| 1117 | 1117 | ); |
@@ -1125,7 +1125,7 @@ discard block |
||
| 1125 | 1125 | * @param int $log_id |
| 1126 | 1126 | * @return array |
| 1127 | 1127 | */ |
| 1128 | -function getPendingSubscriptions($log_id) |
|
| 1128 | +function getPendingSubscriptions ($log_id) |
|
| 1129 | 1129 | { |
| 1130 | 1130 | $db = database(); |
| 1131 | 1131 | |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | * |
| 1150 | 1150 | * @param mixed[] $details associative array for the insert |
| 1151 | 1151 | */ |
| 1152 | -function logSubscription($details) |
|
| 1152 | +function logSubscription ($details) |
|
| 1153 | 1153 | { |
| 1154 | 1154 | $db = database(); |
| 1155 | 1155 | |
@@ -1174,7 +1174,7 @@ discard block |
||
| 1174 | 1174 | * @param int $memID |
| 1175 | 1175 | * @param string $pending_details |
| 1176 | 1176 | */ |
| 1177 | -function logNewSubscription($sub_id, $memID, $pending_details) |
|
| 1177 | +function logNewSubscription ($sub_id, $memID, $pending_details) |
|
| 1178 | 1178 | { |
| 1179 | 1179 | $db = database(); |
| 1180 | 1180 | |
@@ -1197,7 +1197,7 @@ discard block |
||
| 1197 | 1197 | * @param int $sub_id |
| 1198 | 1198 | * @param string $details |
| 1199 | 1199 | */ |
| 1200 | -function updatePendingSubscription($sub_id, $details) |
|
| 1200 | +function updatePendingSubscription ($sub_id, $details) |
|
| 1201 | 1201 | { |
| 1202 | 1202 | $db = database(); |
| 1203 | 1203 | |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | * @param int $memID |
| 1223 | 1223 | * @param string $details |
| 1224 | 1224 | */ |
| 1225 | -function updatePendingSubscriptionCount($pending_count, $sub_id, $memID, $details) |
|
| 1225 | +function updatePendingSubscriptionCount ($pending_count, $sub_id, $memID, $details) |
|
| 1226 | 1226 | { |
| 1227 | 1227 | $db = database(); |
| 1228 | 1228 | |
@@ -1251,7 +1251,7 @@ discard block |
||
| 1251 | 1251 | * @param int $memID |
| 1252 | 1252 | * @param string $details |
| 1253 | 1253 | */ |
| 1254 | -function updatePendingStatus($sub_id, $memID, $details) |
|
| 1254 | +function updatePendingStatus ($sub_id, $memID, $details) |
|
| 1255 | 1255 | { |
| 1256 | 1256 | $db = database(); |
| 1257 | 1257 | |
@@ -1276,7 +1276,7 @@ discard block |
||
| 1276 | 1276 | * @param int $id_member |
| 1277 | 1277 | * @param bool $delete |
| 1278 | 1278 | */ |
| 1279 | -function removeSubscription($id_subscribe, $id_member, $delete = false) |
|
| 1279 | +function removeSubscription ($id_subscribe, $id_member, $delete = false) |
|
| 1280 | 1280 | { |
| 1281 | 1281 | global $context; |
| 1282 | 1282 | |
@@ -1321,7 +1321,7 @@ discard block |
||
| 1321 | 1321 | 'is_active' => 1, |
| 1322 | 1322 | ) |
| 1323 | 1323 | )->fetch_callback( |
| 1324 | - function ($row) use (&$removals, &$allowed, &$member, &$new_id_group, $id_subscribe) { |
|
| 1324 | + function($row) use (&$removals, &$allowed, &$member, &$new_id_group, $id_subscribe) { |
|
| 1325 | 1325 | global $context; |
| 1326 | 1326 | |
| 1327 | 1327 | if (!isset($context['subscriptions'][$row['id_subscribe']])) |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param string[] $recipientList |
| 24 | 24 | * @package Drafts |
| 25 | 25 | */ |
| 26 | -function create_pm_draft($draft, $recipientList) |
|
| 26 | +function create_pm_draft ($draft, $recipientList) |
|
| 27 | 27 | { |
| 28 | 28 | $db = database(); |
| 29 | 29 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param string[] $recipientList |
| 68 | 68 | * @package Drafts |
| 69 | 69 | */ |
| 70 | -function modify_pm_draft($draft, $recipientList) |
|
| 70 | +function modify_pm_draft ($draft, $recipientList) |
|
| 71 | 71 | { |
| 72 | 72 | $db = database(); |
| 73 | 73 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param mixed[] $draft |
| 103 | 103 | * @package Drafts |
| 104 | 104 | */ |
| 105 | -function create_post_draft($draft) |
|
| 105 | +function create_post_draft ($draft) |
|
| 106 | 106 | { |
| 107 | 107 | global $modSettings; |
| 108 | 108 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @param mixed[] $draft |
| 156 | 156 | * @package Drafts |
| 157 | 157 | */ |
| 158 | -function modify_post_draft($draft) |
|
| 158 | +function modify_post_draft ($draft) |
|
| 159 | 159 | { |
| 160 | 160 | $db = database(); |
| 161 | 161 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * @package Drafts |
| 208 | 208 | * |
| 209 | 209 | */ |
| 210 | -function load_draft($id_draft, $uid, $type = 0, $drafts_keep_days = 0, $check = true) |
|
| 210 | +function load_draft ($id_draft, $uid, $type = 0, $drafts_keep_days = 0, $check = true) |
|
| 211 | 211 | { |
| 212 | 212 | $db = database(); |
| 213 | 213 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | * @package Drafts |
| 263 | 263 | * |
| 264 | 264 | */ |
| 265 | -function load_user_drafts($member_id, $draft_type = 0, $topic = false, $order = '', $limit = '') |
|
| 265 | +function load_user_drafts ($member_id, $draft_type = 0, $topic = false, $order = '', $limit = '') |
|
| 266 | 266 | { |
| 267 | 267 | global $modSettings; |
| 268 | 268 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | * @package Drafts |
| 314 | 314 | * |
| 315 | 315 | */ |
| 316 | -function deleteDrafts($id_draft, $member_id = -1, $check = true) |
|
| 316 | +function deleteDrafts ($id_draft, $member_id = -1, $check = true) |
|
| 317 | 317 | { |
| 318 | 318 | $db = database(); |
| 319 | 319 | |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | * @return int |
| 356 | 356 | * @package Drafts |
| 357 | 357 | */ |
| 358 | -function draftsCount($member_id, $draft_type = 0) |
|
| 358 | +function draftsCount ($member_id, $draft_type = 0) |
|
| 359 | 359 | { |
| 360 | 360 | global $modSettings; |
| 361 | 361 | |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | * |
| 396 | 396 | * @package Drafts |
| 397 | 397 | */ |
| 398 | -function draftsRecipients($allRecipients, $recipient_ids) |
|
| 398 | +function draftsRecipients ($allRecipients, $recipient_ids) |
|
| 399 | 399 | { |
| 400 | 400 | // Holds our results |
| 401 | 401 | $recipients = array( |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | * @package Drafts |
| 427 | 427 | * |
| 428 | 428 | */ |
| 429 | -function getOldDrafts($days) |
|
| 429 | +function getOldDrafts ($days) |
|
| 430 | 430 | { |
| 431 | 431 | $db = database(); |
| 432 | 432 | |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | 'poster_time_old' => time() - (86400 * $days), |
| 441 | 441 | ) |
| 442 | 442 | )->fetch_callback( |
| 443 | - function ($row) { |
|
| 443 | + function($row) { |
|
| 444 | 444 | return (int) $row['id_draft']; |
| 445 | 445 | } |
| 446 | 446 | ); |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | * @param bool $check_last_save |
| 457 | 457 | * @package Drafts |
| 458 | 458 | */ |
| 459 | -function saveDraft($draft, $check_last_save = false) |
|
| 459 | +function saveDraft ($draft, $check_last_save = false) |
|
| 460 | 460 | { |
| 461 | 461 | global $context; |
| 462 | 462 | |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | * @package Drafts |
| 532 | 532 | * |
| 533 | 533 | */ |
| 534 | -function savePMDraft($recipientList, $draft, $check_last_save = false) |
|
| 534 | +function savePMDraft ($recipientList, $draft, $check_last_save = false) |
|
| 535 | 535 | { |
| 536 | 536 | global $context; |
| 537 | 537 | |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | * @param array $draft |
| 611 | 611 | * @param array $draft_info |
| 612 | 612 | */ |
| 613 | -function prepareDraft(&$draft, $draft_info) |
|
| 613 | +function prepareDraft (&$draft, $draft_info) |
|
| 614 | 614 | { |
| 615 | 615 | preparsecode($draft['body']); |
| 616 | 616 | if (Util::strlen($draft['subject']) > 100) |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | * @package Drafts |
| 646 | 646 | * |
| 647 | 647 | */ |
| 648 | -function loadDraft($id_draft, $type = 0, $check = true, $load = false) |
|
| 648 | +function loadDraft ($id_draft, $type = 0, $check = true, $load = false) |
|
| 649 | 649 | { |
| 650 | 650 | global $context, $modSettings; |
| 651 | 651 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @uses markdown.php for text to html conversions |
| 46 | 46 | * @package Maillist |
| 47 | 47 | */ |
| 48 | -function pbe_email_to_bbc($text, $html) |
|
| 48 | +function pbe_email_to_bbc ($text, $html) |
|
| 49 | 49 | { |
| 50 | 50 | // Define some things that need to be converted/modified, outside normal html or markup |
| 51 | 51 | $tags = array( |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param string $text |
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | -function pbe_run_parsers($text) |
|
| 113 | +function pbe_run_parsers ($text) |
|
| 114 | 114 | { |
| 115 | 115 | // Run our parsers, as defined in the ACP, to remove the original "replied to" message |
| 116 | 116 | $text_save = $text; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * |
| 147 | 147 | * @uses EmailFormat.class.php |
| 148 | 148 | */ |
| 149 | -function pbe_fix_email_body($body, $real_name = '', $charset = 'UTF-8') |
|
| 149 | +function pbe_fix_email_body ($body, $real_name = '', $charset = 'UTF-8') |
|
| 150 | 150 | { |
| 151 | 151 | global $txt; |
| 152 | 152 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @package Maillist |
| 196 | 196 | * |
| 197 | 197 | */ |
| 198 | -function pbe_fix_email_quotes($body, $html) |
|
| 198 | +function pbe_fix_email_quotes ($body, $html) |
|
| 199 | 199 | { |
| 200 | 200 | // Coming from HTML then remove lines that start with > and are inside [quote] ... [/quote] blocks |
| 201 | 201 | if ($html) |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | * @package Maillist |
| 313 | 313 | * |
| 314 | 314 | */ |
| 315 | -function pbe_email_quote_depth(&$string, $update = true) |
|
| 315 | +function pbe_email_quote_depth (&$string, $update = true) |
|
| 316 | 316 | { |
| 317 | 317 | // Get the quote "depth" level for this line |
| 318 | 318 | $level = 0; |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | * @return bool on find |
| 361 | 361 | * @package Maillist |
| 362 | 362 | */ |
| 363 | -function pbe_parse_email_message(&$body) |
|
| 363 | +function pbe_parse_email_message (&$body) |
|
| 364 | 364 | { |
| 365 | 365 | $db = database(); |
| 366 | 366 | |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | 'filter_style' => 'parser' |
| 377 | 377 | ) |
| 378 | 378 | )->fetch_callback( |
| 379 | - function ($row) use (&$expressions) { |
|
| 379 | + function($row) use (&$expressions) { |
|
| 380 | 380 | // Build an array of valid expressions |
| 381 | 381 | { |
| 382 | 382 | $expressions[] = array( |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | * @package Maillist |
| 426 | 426 | * |
| 427 | 427 | */ |
| 428 | -function pbe_filter_email_message($text) |
|
| 428 | +function pbe_filter_email_message ($text) |
|
| 429 | 429 | { |
| 430 | 430 | $db = database(); |
| 431 | 431 | |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | 'filter_style' => 'filter' |
| 441 | 441 | ) |
| 442 | 442 | )->fetch_callback( |
| 443 | - function ($row) use (&$text) { |
|
| 443 | + function($row) use (&$text) { |
|
| 444 | 444 | if ($row['filter_type'] === 'regex') |
| 445 | 445 | { |
| 446 | 446 | // Newline madness |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | * @package Maillist |
| 479 | 479 | * |
| 480 | 480 | */ |
| 481 | -function pbe_clean_email_subject($text, $check = false) |
|
| 481 | +function pbe_clean_email_subject ($text, $check = false) |
|
| 482 | 482 | { |
| 483 | 483 | global $txt, $modSettings, $mbname; |
| 484 | 484 | |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | * @package Maillist |
| 545 | 545 | * |
| 546 | 546 | */ |
| 547 | -function pbe_fix_client_quotes($body) |
|
| 547 | +function pbe_fix_client_quotes ($body) |
|
| 548 | 548 | { |
| 549 | 549 | global $txt; |
| 550 | 550 | |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | * @return string |
| 607 | 607 | * @package Maillist |
| 608 | 608 | */ |
| 609 | -function pbe_str_replace_once($needle, $replace, $haystack) |
|
| 609 | +function pbe_str_replace_once ($needle, $replace, $haystack) |
|
| 610 | 610 | { |
| 611 | 611 | // Looks for the first occurrence of $needle in $haystack and replaces it with $replace |
| 612 | 612 | $pos = strpos($haystack, $needle); |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | * @param mixed[] $pbe array of user values |
| 627 | 627 | * @package Maillist |
| 628 | 628 | */ |
| 629 | -function pbe_check_moderation(&$pbe) |
|
| 629 | +function pbe_check_moderation (&$pbe) |
|
| 630 | 630 | { |
| 631 | 631 | global $modSettings; |
| 632 | 632 | |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | * @package Maillist |
| 690 | 690 | * |
| 691 | 691 | */ |
| 692 | -function pbe_emailError($error, $email_message) |
|
| 692 | +function pbe_emailError ($error, $email_message) |
|
| 693 | 693 | { |
| 694 | 694 | global $txt; |
| 695 | 695 | |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | * @package Maillist |
| 833 | 833 | * |
| 834 | 834 | */ |
| 835 | -function pbe_email_attachments($pbe, $email_message) |
|
| 835 | +function pbe_email_attachments ($pbe, $email_message) |
|
| 836 | 836 | { |
| 837 | 837 | // Trying to attach a file with this post .... |
| 838 | 838 | global $modSettings, $context, $txt; |
@@ -963,7 +963,7 @@ discard block |
||
| 963 | 963 | * @package Maillist |
| 964 | 964 | * |
| 965 | 965 | */ |
| 966 | -function pbe_find_board_number($email_address) |
|
| 966 | +function pbe_find_board_number ($email_address) |
|
| 967 | 967 | { |
| 968 | 968 | global $modSettings; |
| 969 | 969 | |
@@ -1005,7 +1005,7 @@ discard block |
||
| 1005 | 1005 | * @param string $signature |
| 1006 | 1006 | * @package Maillist |
| 1007 | 1007 | */ |
| 1008 | -function pbe_prepare_text(&$message, &$subject = '', &$signature = '') |
|
| 1008 | +function pbe_prepare_text (&$message, &$subject = '', &$signature = '') |
|
| 1009 | 1009 | { |
| 1010 | 1010 | global $context; |
| 1011 | 1011 | |
@@ -1103,7 +1103,7 @@ discard block |
||
| 1103 | 1103 | * @param \ElkArte\EmailParse $email_message |
| 1104 | 1104 | * @package Maillist |
| 1105 | 1105 | */ |
| 1106 | -function pbe_disable_user_notify($email_message) |
|
| 1106 | +function pbe_disable_user_notify ($email_message) |
|
| 1107 | 1107 | { |
| 1108 | 1108 | global $modSettings; |
| 1109 | 1109 | $db = database(); |
@@ -1175,7 +1175,7 @@ discard block |
||
| 1175 | 1175 | * |
| 1176 | 1176 | * @return string |
| 1177 | 1177 | */ |
| 1178 | -function quote_callback($matches) |
|
| 1178 | +function quote_callback ($matches) |
|
| 1179 | 1179 | { |
| 1180 | 1180 | global $txt; |
| 1181 | 1181 | |
@@ -1193,7 +1193,7 @@ discard block |
||
| 1193 | 1193 | * |
| 1194 | 1194 | * @return string |
| 1195 | 1195 | */ |
| 1196 | -function quote_callback_2($matches) |
|
| 1196 | +function quote_callback_2 ($matches) |
|
| 1197 | 1197 | { |
| 1198 | 1198 | global $txt; |
| 1199 | 1199 | |
@@ -1221,7 +1221,7 @@ discard block |
||
| 1221 | 1221 | * @package Maillist |
| 1222 | 1222 | * |
| 1223 | 1223 | */ |
| 1224 | -function query_load_user_info($email) |
|
| 1224 | +function query_load_user_info ($email) |
|
| 1225 | 1225 | { |
| 1226 | 1226 | global $modSettings, $language; |
| 1227 | 1227 | |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | * @param mixed[] $topic_info |
| 1320 | 1320 | * @package Maillist |
| 1321 | 1321 | */ |
| 1322 | -function query_load_permissions($type, &$pbe, $topic_info = array()) |
|
| 1322 | +function query_load_permissions ($type, &$pbe, $topic_info = array()) |
|
| 1323 | 1323 | { |
| 1324 | 1324 | global $modSettings; |
| 1325 | 1325 | |
@@ -1340,7 +1340,7 @@ discard block |
||
| 1340 | 1340 | 'id_profile' => ($type === 'board') ? $topic_info['id_profile'] : '', |
| 1341 | 1341 | ) |
| 1342 | 1342 | )->fetch_callback( |
| 1343 | - function ($row) use (&$removals, &$pbe) { |
|
| 1343 | + function($row) use (&$removals, &$pbe) { |
|
| 1344 | 1344 | if (empty($row['add_deny'])) |
| 1345 | 1345 | { |
| 1346 | 1346 | $removals[] = $row['permission']; |
@@ -1369,7 +1369,7 @@ discard block |
||
| 1369 | 1369 | * @return mixed[] |
| 1370 | 1370 | * @package Maillist |
| 1371 | 1371 | */ |
| 1372 | -function query_sender_wrapper($from) |
|
| 1372 | +function query_sender_wrapper ($from) |
|
| 1373 | 1373 | { |
| 1374 | 1374 | $db = database(); |
| 1375 | 1375 | |
@@ -1411,7 +1411,7 @@ discard block |
||
| 1411 | 1411 | * @package Maillist |
| 1412 | 1412 | * |
| 1413 | 1413 | */ |
| 1414 | -function query_user_keys($email) |
|
| 1414 | +function query_user_keys ($email) |
|
| 1415 | 1415 | { |
| 1416 | 1416 | $db = database(); |
| 1417 | 1417 | |
@@ -1435,7 +1435,7 @@ discard block |
||
| 1435 | 1435 | * @return string email address the key was sent to |
| 1436 | 1436 | * @package Maillist |
| 1437 | 1437 | */ |
| 1438 | -function query_key_owner($email_message) |
|
| 1438 | +function query_key_owner ($email_message) |
|
| 1439 | 1439 | { |
| 1440 | 1440 | $db = database(); |
| 1441 | 1441 | |
@@ -1478,7 +1478,7 @@ discard block |
||
| 1478 | 1478 | * @package Maillist |
| 1479 | 1479 | * |
| 1480 | 1480 | */ |
| 1481 | -function query_load_subject($message_id, $message_type, $email) |
|
| 1481 | +function query_load_subject ($message_id, $message_type, $email) |
|
| 1482 | 1482 | { |
| 1483 | 1483 | $db = database(); |
| 1484 | 1484 | |
@@ -1577,7 +1577,7 @@ discard block |
||
| 1577 | 1577 | * @package Maillist |
| 1578 | 1578 | * |
| 1579 | 1579 | */ |
| 1580 | -function query_load_message($message_type, $message_id, $pbe) |
|
| 1580 | +function query_load_message ($message_type, $message_id, $pbe) |
|
| 1581 | 1581 | { |
| 1582 | 1582 | $db = database(); |
| 1583 | 1583 | |
@@ -1659,7 +1659,7 @@ discard block |
||
| 1659 | 1659 | * @package Maillist |
| 1660 | 1660 | * |
| 1661 | 1661 | */ |
| 1662 | -function query_load_board($message_id) |
|
| 1662 | +function query_load_board ($message_id) |
|
| 1663 | 1663 | { |
| 1664 | 1664 | $db = database(); |
| 1665 | 1665 | |
@@ -1686,7 +1686,7 @@ discard block |
||
| 1686 | 1686 | * @return mixed[] |
| 1687 | 1687 | * @package Maillist |
| 1688 | 1688 | */ |
| 1689 | -function query_load_board_details($board_id, $pbe) |
|
| 1689 | +function query_load_board_details ($board_id, $pbe) |
|
| 1690 | 1690 | { |
| 1691 | 1691 | $db = database(); |
| 1692 | 1692 | |
@@ -1720,7 +1720,7 @@ discard block |
||
| 1720 | 1720 | * @package Maillist |
| 1721 | 1721 | * |
| 1722 | 1722 | */ |
| 1723 | -function query_get_theme($id_member, $id_theme, $board_info) |
|
| 1723 | +function query_get_theme ($id_member, $id_theme, $board_info) |
|
| 1724 | 1724 | { |
| 1725 | 1725 | global $modSettings; |
| 1726 | 1726 | |
@@ -1756,7 +1756,7 @@ discard block |
||
| 1756 | 1756 | 'id_member' => $id_member, |
| 1757 | 1757 | ) |
| 1758 | 1758 | )->fetch_callback( |
| 1759 | - function ($row) use (&$theme_settings) { |
|
| 1759 | + function($row) use (&$theme_settings) { |
|
| 1760 | 1760 | // Put everything about this member/theme into a theme setting array |
| 1761 | 1761 | $theme_settings[$row['variable']] = $row['value']; |
| 1762 | 1762 | } |
@@ -1775,7 +1775,7 @@ discard block |
||
| 1775 | 1775 | * @param mixed[] $permissions |
| 1776 | 1776 | * @package Maillist |
| 1777 | 1777 | */ |
| 1778 | -function query_notifications($id_member, $id_board, $id_topic, $auto_notify, $permissions) |
|
| 1778 | +function query_notifications ($id_member, $id_board, $id_topic, $auto_notify, $permissions) |
|
| 1779 | 1779 | { |
| 1780 | 1780 | $db = database(); |
| 1781 | 1781 | |
@@ -1836,7 +1836,7 @@ discard block |
||
| 1836 | 1836 | * @param mixed[] $pbe |
| 1837 | 1837 | * @package Maillist |
| 1838 | 1838 | */ |
| 1839 | -function query_mark_pms($email_message, $pbe) |
|
| 1839 | +function query_mark_pms ($email_message, $pbe) |
|
| 1840 | 1840 | { |
| 1841 | 1841 | $db = database(); |
| 1842 | 1842 | |
@@ -1870,7 +1870,7 @@ discard block |
||
| 1870 | 1870 | 'is_not_deleted' => 0, |
| 1871 | 1871 | ) |
| 1872 | 1872 | )->fetch_callback( |
| 1873 | - function ($row) use (&$total_unread) { |
|
| 1873 | + function($row) use (&$total_unread) { |
|
| 1874 | 1874 | $total_unread += $row['num']; |
| 1875 | 1875 | } |
| 1876 | 1876 | ); |
@@ -1902,7 +1902,7 @@ discard block |
||
| 1902 | 1902 | * @param \ElkArte\EmailParse $email_message |
| 1903 | 1903 | * @package Maillist |
| 1904 | 1904 | */ |
| 1905 | -function query_key_maintenance($email_message) |
|
| 1905 | +function query_key_maintenance ($email_message) |
|
| 1906 | 1906 | { |
| 1907 | 1907 | global $modSettings; |
| 1908 | 1908 | |
@@ -1953,7 +1953,7 @@ discard block |
||
| 1953 | 1953 | * @param mixed[] $topic_info |
| 1954 | 1954 | * @package Maillist |
| 1955 | 1955 | */ |
| 1956 | -function query_update_member_stats($pbe, $email_message, $topic_info = array()) |
|
| 1956 | +function query_update_member_stats ($pbe, $email_message, $topic_info = array()) |
|
| 1957 | 1957 | { |
| 1958 | 1958 | $db = database(); |
| 1959 | 1959 | |
@@ -2027,7 +2027,7 @@ discard block |
||
| 2027 | 2027 | * @package Maillist |
| 2028 | 2028 | * |
| 2029 | 2029 | */ |
| 2030 | -function pbe_load_text(&$html, $email_message, $pbe) |
|
| 2030 | +function pbe_load_text (&$html, $email_message, $pbe) |
|
| 2031 | 2031 | { |
| 2032 | 2032 | if (!$html || ($html && preg_match_all('~<table.*?>~i', $email_message->body, $match) >= 2)) |
| 2033 | 2033 | { |
@@ -2083,7 +2083,7 @@ discard block |
||
| 2083 | 2083 | * @package Maillist |
| 2084 | 2084 | * |
| 2085 | 2085 | */ |
| 2086 | -function pbe_create_post($pbe, $email_message, $topic_info) |
|
| 2086 | +function pbe_create_post ($pbe, $email_message, $topic_info) |
|
| 2087 | 2087 | { |
| 2088 | 2088 | global $modSettings, $txt; |
| 2089 | 2089 | |
@@ -2213,7 +2213,7 @@ discard block |
||
| 2213 | 2213 | * |
| 2214 | 2214 | * @uses sendpm to do the actual "sending" |
| 2215 | 2215 | */ |
| 2216 | -function pbe_create_pm($pbe, $email_message, $pm_info) |
|
| 2216 | +function pbe_create_pm ($pbe, $email_message, $pm_info) |
|
| 2217 | 2217 | { |
| 2218 | 2218 | global $modSettings, $txt; |
| 2219 | 2219 | |
@@ -2280,7 +2280,7 @@ discard block |
||
| 2280 | 2280 | * |
| 2281 | 2281 | * @uses createPost to do the actual "posting" |
| 2282 | 2282 | */ |
| 2283 | -function pbe_create_topic($pbe, $email_message, $board_info) |
|
| 2283 | +function pbe_create_topic ($pbe, $email_message, $board_info) |
|
| 2284 | 2284 | { |
| 2285 | 2285 | global $txt, $modSettings; |
| 2286 | 2286 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @package Permissions |
| 29 | 29 | * |
| 30 | 30 | */ |
| 31 | -function setPermissionLevel($level, $group = null, $profile = null) |
|
| 31 | +function setPermissionLevel ($level, $group = null, $profile = null) |
|
| 32 | 32 | { |
| 33 | 33 | $db = database(); |
| 34 | 34 | |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | 'newbie_group' => 4, |
| 331 | 331 | ) |
| 332 | 332 | )->fetch_callback( |
| 333 | - function ($row) use ($db, $boardLevels, $profile, $level) { |
|
| 333 | + function($row) use ($db, $boardLevels, $profile, $level) { |
|
| 334 | 334 | $group = $row['id_group']; |
| 335 | 335 | |
| 336 | 336 | $boardInserts = array(); |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | * |
| 375 | 375 | * @package Permissions |
| 376 | 376 | */ |
| 377 | -function loadPermissionProfiles() |
|
| 377 | +function loadPermissionProfiles () |
|
| 378 | 378 | { |
| 379 | 379 | global $context, $txt; |
| 380 | 380 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | ORDER BY id_profile', |
| 389 | 389 | array() |
| 390 | 390 | )->fetch_callback( |
| 391 | - function ($row) use ($txt) { |
|
| 391 | + function($row) use ($txt) { |
|
| 392 | 392 | global $context; |
| 393 | 393 | |
| 394 | 394 | // Format the label nicely. |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | * |
| 410 | 410 | * @package Permissions |
| 411 | 411 | */ |
| 412 | -function loadAllPermissions() |
|
| 412 | +function loadAllPermissions () |
|
| 413 | 413 | { |
| 414 | 414 | global $context, $txt, $modSettings; |
| 415 | 415 | |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | * @return int[] [id_group][num_permissions][denied] = count, [id_group][num_permissions][allowed] = count |
| 724 | 724 | * @package Permissions |
| 725 | 725 | */ |
| 726 | -function countPermissions($groups, $hidden_permissions = null) |
|
| 726 | +function countPermissions ($groups, $hidden_permissions = null) |
|
| 727 | 727 | { |
| 728 | 728 | $db = database(); |
| 729 | 729 | |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | 'hidden_permissions' => !isset($hidden_permissions) ? $hidden_permissions : array(), |
| 738 | 738 | ) |
| 739 | 739 | )->fetch_callback( |
| 740 | - function ($row) use (&$groups) { |
|
| 740 | + function($row) use (&$groups) { |
|
| 741 | 741 | if (isset($groups[(int) $row['id_group']]) && (!empty($row['add_deny']) || $row['id_group'] != -1)) |
| 742 | 742 | { |
| 743 | 743 | $groups[$row['id_group']]['num_permissions'][empty($row['add_deny']) ? 'denied' : 'allowed'] = $row['num_permissions']; |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | * @return int[] |
| 759 | 759 | * @package Permissions |
| 760 | 760 | */ |
| 761 | -function countBoardPermissions($groups, $hidden_permissions = null, $profile_id = null) |
|
| 761 | +function countBoardPermissions ($groups, $hidden_permissions = null, $profile_id = null) |
|
| 762 | 762 | { |
| 763 | 763 | $db = database(); |
| 764 | 764 | |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | 'current_profile' => $profile_id, |
| 776 | 776 | ) |
| 777 | 777 | )->fetch_callback( |
| 778 | - function ($row) use (&$groups) { |
|
| 778 | + function($row) use (&$groups) { |
|
| 779 | 779 | if (isset($groups[(int) $row['id_group']]) && (!empty($row['add_deny']) || $row['id_group'] != -1)) |
| 780 | 780 | { |
| 781 | 781 | $groups[$row['id_group']]['num_permissions'][empty($row['add_deny']) ? 'denied' : 'allowed'] += $row['num_permissions']; |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | * @param int $board |
| 794 | 794 | * @package Permissions |
| 795 | 795 | */ |
| 796 | -function assignPermissionProfileToBoard($profile, $board) |
|
| 796 | +function assignPermissionProfileToBoard ($profile, $board) |
|
| 797 | 797 | { |
| 798 | 798 | $db = database(); |
| 799 | 799 | |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | * @todo another function with the same name in Membergroups.subs.php |
| 820 | 820 | * @package Permissions |
| 821 | 821 | */ |
| 822 | -function copyPermission($copy_from, $groups, $illegal_permissions, $non_guest_permissions = array()) |
|
| 822 | +function copyPermission ($copy_from, $groups, $illegal_permissions, $non_guest_permissions = array()) |
|
| 823 | 823 | { |
| 824 | 824 | $db = database(); |
| 825 | 825 | |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | 'copy_from' => $copy_from, |
| 835 | 835 | ) |
| 836 | 836 | )->fetch_callback( |
| 837 | - function ($row) use (&$target_perm) { |
|
| 837 | + function($row) use (&$target_perm) { |
|
| 838 | 838 | $target_perm[$row['permission']] = $row['add_deny']; |
| 839 | 839 | } |
| 840 | 840 | ); |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | * @param string[] $non_guest_permissions |
| 891 | 891 | * @package Permissions |
| 892 | 892 | */ |
| 893 | -function copyBoardPermission($copy_from, $groups, $profile_id, $non_guest_permissions) |
|
| 893 | +function copyBoardPermission ($copy_from, $groups, $profile_id, $non_guest_permissions) |
|
| 894 | 894 | { |
| 895 | 895 | $db = database(); |
| 896 | 896 | |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | 'current_profile' => $profile_id, |
| 908 | 908 | ) |
| 909 | 909 | )->fetch_callback( |
| 910 | - function ($row) use (&$target_perm) { |
|
| 910 | + function($row) use (&$target_perm) { |
|
| 911 | 911 | $target_perm[$row['permission']] = $row['add_deny']; |
| 912 | 912 | } |
| 913 | 913 | ); |
@@ -946,7 +946,7 @@ discard block |
||
| 946 | 946 | * @param string[] $illegal_permissions |
| 947 | 947 | * @package Permissions |
| 948 | 948 | */ |
| 949 | -function deletePermission($groups, $permission, $illegal_permissions) |
|
| 949 | +function deletePermission ($groups, $permission, $illegal_permissions) |
|
| 950 | 950 | { |
| 951 | 951 | $db = database(); |
| 952 | 952 | |
@@ -971,7 +971,7 @@ discard block |
||
| 971 | 971 | * @param string $permission |
| 972 | 972 | * @package Permissions |
| 973 | 973 | */ |
| 974 | -function deleteBoardPermission($group, $profile_id, $permission) |
|
| 974 | +function deleteBoardPermission ($group, $profile_id, $permission) |
|
| 975 | 975 | { |
| 976 | 976 | $db = database(); |
| 977 | 977 | |
@@ -994,7 +994,7 @@ discard block |
||
| 994 | 994 | * @param mixed[] $permChange associative array permission, id_group, add_deny |
| 995 | 995 | * @package Permissions |
| 996 | 996 | */ |
| 997 | -function replacePermission($permChange) |
|
| 997 | +function replacePermission ($permChange) |
|
| 998 | 998 | { |
| 999 | 999 | $db = database(); |
| 1000 | 1000 | |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | * @param mixed[] $permChange associative array of 'permission', 'id_group', 'add_deny', 'id_profile' |
| 1016 | 1016 | * @package Permissions |
| 1017 | 1017 | */ |
| 1018 | -function replaceBoardPermission($permChange) |
|
| 1018 | +function replaceBoardPermission ($permChange) |
|
| 1019 | 1019 | { |
| 1020 | 1020 | $db = database(); |
| 1021 | 1021 | |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | * |
| 1033 | 1033 | * @package Permissions |
| 1034 | 1034 | */ |
| 1035 | -function removeModeratorPermissions() |
|
| 1035 | +function removeModeratorPermissions () |
|
| 1036 | 1036 | { |
| 1037 | 1037 | $db = database(); |
| 1038 | 1038 | |
@@ -1052,7 +1052,7 @@ discard block |
||
| 1052 | 1052 | * @return array |
| 1053 | 1053 | * @package Permissions |
| 1054 | 1054 | */ |
| 1055 | -function fetchPermissions($id_group) |
|
| 1055 | +function fetchPermissions ($id_group) |
|
| 1056 | 1056 | { |
| 1057 | 1057 | $db = database(); |
| 1058 | 1058 | |
@@ -1070,7 +1070,7 @@ discard block |
||
| 1070 | 1070 | 'current_group' => $id_group, |
| 1071 | 1071 | ) |
| 1072 | 1072 | )->fetch_callback( |
| 1073 | - function ($row) use (&$permissions) { |
|
| 1073 | + function($row) use (&$permissions) { |
|
| 1074 | 1074 | $permissions[empty($row['add_deny']) ? 'denied' : 'allowed'][] = $row['permission']; |
| 1075 | 1075 | } |
| 1076 | 1076 | ); |
@@ -1089,7 +1089,7 @@ discard block |
||
| 1089 | 1089 | * @package Permissions |
| 1090 | 1090 | * |
| 1091 | 1091 | */ |
| 1092 | -function fetchBoardPermissions($id_group, $permission_type, $profile_id) |
|
| 1092 | +function fetchBoardPermissions ($id_group, $permission_type, $profile_id) |
|
| 1093 | 1093 | { |
| 1094 | 1094 | $db = database(); |
| 1095 | 1095 | |
@@ -1109,7 +1109,7 @@ discard block |
||
| 1109 | 1109 | 'current_profile' => $permission_type === 'membergroup' ? 1 : $profile_id, |
| 1110 | 1110 | ) |
| 1111 | 1111 | )->fetch_callback( |
| 1112 | - function ($row) use (&$permissions) { |
|
| 1112 | + function($row) use (&$permissions) { |
|
| 1113 | 1113 | $permissions[empty($row['add_deny']) ? 'denied' : 'allowed'][] = $row['permission']; |
| 1114 | 1114 | } |
| 1115 | 1115 | ); |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | * @param string[] $illegal_permissions |
| 1125 | 1125 | * @package Permissions |
| 1126 | 1126 | */ |
| 1127 | -function deleteInvalidPermissions($id_group, $illegal_permissions) |
|
| 1127 | +function deleteInvalidPermissions ($id_group, $illegal_permissions) |
|
| 1128 | 1128 | { |
| 1129 | 1129 | $db = database(); |
| 1130 | 1130 | |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | * @param int $id_profile |
| 1147 | 1147 | * @package Permissions |
| 1148 | 1148 | */ |
| 1149 | -function deleteAllBoardPermissions(array $groups, $id_profile) |
|
| 1149 | +function deleteAllBoardPermissions (array $groups, $id_profile) |
|
| 1150 | 1150 | { |
| 1151 | 1151 | $db = database(); |
| 1152 | 1152 | |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | * |
| 1167 | 1167 | * @package Permissions |
| 1168 | 1168 | */ |
| 1169 | -function clearDenyPermissions() |
|
| 1169 | +function clearDenyPermissions () |
|
| 1170 | 1170 | { |
| 1171 | 1171 | $db = database(); |
| 1172 | 1172 | |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | * |
| 1193 | 1193 | * @package Permissions |
| 1194 | 1194 | */ |
| 1195 | -function clearPostgroupPermissions() |
|
| 1195 | +function clearPostgroupPermissions () |
|
| 1196 | 1196 | { |
| 1197 | 1197 | $db = database(); |
| 1198 | 1198 | |
@@ -1205,7 +1205,7 @@ discard block |
||
| 1205 | 1205 | 'min_posts' => -1, |
| 1206 | 1206 | ) |
| 1207 | 1207 | )->fetch_callback( |
| 1208 | - function ($row) { |
|
| 1208 | + function($row) { |
|
| 1209 | 1209 | return $row['id_group']; |
| 1210 | 1210 | } |
| 1211 | 1211 | ); |
@@ -1244,7 +1244,7 @@ discard block |
||
| 1244 | 1244 | * @param int $copy_from |
| 1245 | 1245 | * @package Permissions |
| 1246 | 1246 | */ |
| 1247 | -function copyPermissionProfile($profile_name, $copy_from) |
|
| 1247 | +function copyPermissionProfile ($profile_name, $copy_from) |
|
| 1248 | 1248 | { |
| 1249 | 1249 | $db = database(); |
| 1250 | 1250 | |
@@ -1272,7 +1272,7 @@ discard block |
||
| 1272 | 1272 | 'copy_from' => $copy_from, |
| 1273 | 1273 | ) |
| 1274 | 1274 | )->fetch_callback( |
| 1275 | - function ($row) use ($profile_id) { |
|
| 1275 | + function($row) use ($profile_id) { |
|
| 1276 | 1276 | return array($profile_id, $row['id_group'], $row['permission'], $row['add_deny']); |
| 1277 | 1277 | } |
| 1278 | 1278 | ); |
@@ -1295,7 +1295,7 @@ discard block |
||
| 1295 | 1295 | * @param string $name |
| 1296 | 1296 | * @package Permissions |
| 1297 | 1297 | */ |
| 1298 | -function renamePermissionProfile($id_profile, $name) |
|
| 1298 | +function renamePermissionProfile ($id_profile, $name) |
|
| 1299 | 1299 | { |
| 1300 | 1300 | $db = database(); |
| 1301 | 1301 | |
@@ -1322,7 +1322,7 @@ discard block |
||
| 1322 | 1322 | * @package Permissions |
| 1323 | 1323 | * |
| 1324 | 1324 | */ |
| 1325 | -function deletePermissionProfiles($profiles) |
|
| 1325 | +function deletePermissionProfiles ($profiles) |
|
| 1326 | 1326 | { |
| 1327 | 1327 | $db = database(); |
| 1328 | 1328 | |
@@ -1361,7 +1361,7 @@ discard block |
||
| 1361 | 1361 | * @return int[] |
| 1362 | 1362 | * @package Permissions |
| 1363 | 1363 | */ |
| 1364 | -function permProfilesInUse($profiles) |
|
| 1364 | +function permProfilesInUse ($profiles) |
|
| 1365 | 1365 | { |
| 1366 | 1366 | $db = database(); |
| 1367 | 1367 | |
@@ -1372,7 +1372,7 @@ discard block |
||
| 1372 | 1372 | GROUP BY id_profile', |
| 1373 | 1373 | array() |
| 1374 | 1374 | )->fetch_callback( |
| 1375 | - function ($row) use (&$profiles) { |
|
| 1375 | + function($row) use (&$profiles) { |
|
| 1376 | 1376 | global $txt; |
| 1377 | 1377 | |
| 1378 | 1378 | if (isset($profiles[$row['id_profile']])) |
@@ -1395,7 +1395,7 @@ discard block |
||
| 1395 | 1395 | * @param string[] $permissions |
| 1396 | 1396 | * @package Permissions |
| 1397 | 1397 | */ |
| 1398 | -function deleteBoardPermissions($groups, $profile, $permissions) |
|
| 1398 | +function deleteBoardPermissions ($groups, $profile, $permissions) |
|
| 1399 | 1399 | { |
| 1400 | 1400 | $db = database(); |
| 1401 | 1401 | |
@@ -1419,7 +1419,7 @@ discard block |
||
| 1419 | 1419 | * @param mixed[] $new_permissions |
| 1420 | 1420 | * @package Permissions |
| 1421 | 1421 | */ |
| 1422 | -function insertBoardPermission($new_permissions) |
|
| 1422 | +function insertBoardPermission ($new_permissions) |
|
| 1423 | 1423 | { |
| 1424 | 1424 | $db = database(); |
| 1425 | 1425 | |
@@ -1440,7 +1440,7 @@ discard block |
||
| 1440 | 1440 | * @return array |
| 1441 | 1441 | * @package Permissions |
| 1442 | 1442 | */ |
| 1443 | -function getPermission($group, $profile, $permissions) |
|
| 1443 | +function getPermission ($group, $profile, $permissions) |
|
| 1444 | 1444 | { |
| 1445 | 1445 | $db = database(); |
| 1446 | 1446 | |
@@ -1459,7 +1459,7 @@ discard block |
||
| 1459 | 1459 | 'permissions' => $permissions, |
| 1460 | 1460 | ) |
| 1461 | 1461 | )->fetch_callback( |
| 1462 | - function ($row) use (&$groups) { |
|
| 1462 | + function($row) use (&$groups) { |
|
| 1463 | 1463 | $groups[$row['id_group']][$row['add_deny'] ? 'add' : 'deny'][] = $row['permission']; |
| 1464 | 1464 | } |
| 1465 | 1465 | ); |