@@ -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 | ); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @param int $karmaWaitTime |
| 18 | 18 | * @package Karma |
| 19 | 19 | */ |
| 20 | -function clearKarma($karmaWaitTime) |
|
| 20 | +function clearKarma ($karmaWaitTime) |
|
| 21 | 21 | { |
| 22 | 22 | $db = database(); |
| 23 | 23 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @return null |
| 42 | 42 | * @package Karma |
| 43 | 43 | */ |
| 44 | -function lastActionOn($id_executor, $id_target) |
|
| 44 | +function lastActionOn ($id_executor, $id_target) |
|
| 45 | 45 | { |
| 46 | 46 | $db = database(); |
| 47 | 47 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @param int $direction - options: -1 or 1 |
| 76 | 76 | * @package Karma |
| 77 | 77 | */ |
| 78 | -function addKarma($id_executor, $id_target, $direction) |
|
| 78 | +function addKarma ($id_executor, $id_target, $direction) |
|
| 79 | 79 | { |
| 80 | 80 | $db = database(); |
| 81 | 81 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param int $direction - options: -1 or 1 |
| 101 | 101 | * @package Karma |
| 102 | 102 | */ |
| 103 | -function updateKarma($id_executor, $id_target, $direction) |
|
| 103 | +function updateKarma ($id_executor, $id_target, $direction) |
|
| 104 | 104 | { |
| 105 | 105 | $db = database(); |
| 106 | 106 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return double |
| 29 | 29 | */ |
| 30 | -function onlineCount() |
|
| 30 | +function onlineCount () |
|
| 31 | 31 | { |
| 32 | 32 | $db = database(); |
| 33 | 33 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return array |
| 52 | 52 | */ |
| 53 | -function getAverages() |
|
| 53 | +function getAverages () |
|
| 54 | 54 | { |
| 55 | 55 | $db = database(); |
| 56 | 56 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @return int |
| 74 | 74 | */ |
| 75 | -function numCategories() |
|
| 75 | +function numCategories () |
|
| 76 | 76 | { |
| 77 | 77 | $db = database(); |
| 78 | 78 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param int $date |
| 95 | 95 | * @return int |
| 96 | 96 | */ |
| 97 | -function mostOnline($date) |
|
| 97 | +function mostOnline ($date) |
|
| 98 | 98 | { |
| 99 | 99 | $db = database(); |
| 100 | 100 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @param int|null $limit if empty defaults to 10 |
| 123 | 123 | * @return array |
| 124 | 124 | */ |
| 125 | -function topPosters($limit = null) |
|
| 125 | +function topPosters ($limit = null) |
|
| 126 | 126 | { |
| 127 | 127 | global $modSettings; |
| 128 | 128 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | 'limit_posts' => $limit, |
| 155 | 155 | ) |
| 156 | 156 | )->fetch_callback( |
| 157 | - function ($row) use (&$top_posters, &$max_num_posts) { |
|
| 157 | + function($row) use (&$top_posters, &$max_num_posts) { |
|
| 158 | 158 | $href = getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]); |
| 159 | 159 | |
| 160 | 160 | // Build general member information for each top poster |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | * @param bool $read_status |
| 192 | 192 | * @return array |
| 193 | 193 | */ |
| 194 | -function topBoards($limit = null, $read_status = false) |
|
| 194 | +function topBoards ($limit = null, $read_status = false) |
|
| 195 | 195 | { |
| 196 | 196 | global $modSettings; |
| 197 | 197 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | 'current_member' => User::$info->id, |
| 229 | 229 | ) |
| 230 | 230 | )->fetch_callback( |
| 231 | - function ($row) use (&$top_boards, &$max_num_posts, $read_status) { |
|
| 231 | + function($row) use (&$top_boards, &$max_num_posts, $read_status) { |
|
| 232 | 232 | $href = getUrl('board', ['board' => $row['id_board'], 'start' => '0', 'name' => $row['name']]); |
| 233 | 233 | |
| 234 | 234 | // Load the boards info, number of posts, topics etc |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | * @param int $limit if not supplied, defaults to 10 |
| 272 | 272 | * @return array |
| 273 | 273 | */ |
| 274 | -function topTopicReplies($limit = 10) |
|
| 274 | +function topTopicReplies ($limit = 10) |
|
| 275 | 275 | { |
| 276 | 276 | global $modSettings; |
| 277 | 277 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | 'recycle_board' => $modSettings['recycle_board'], |
| 298 | 298 | ) |
| 299 | 299 | )->fetch_callback( |
| 300 | - function ($row) use (&$topic_ids) { |
|
| 300 | + function($row) use (&$topic_ids) { |
|
| 301 | 301 | $topic_ids[$row['id_topic']] = $row['num_replies']; |
| 302 | 302 | } |
| 303 | 303 | ); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | 'topic_list' => array_keys($topic_ids), |
| 320 | 320 | ) |
| 321 | 321 | )->fetch_callback( |
| 322 | - function ($row) use (&$top_topics_replies, &$max_num_replies) { |
|
| 322 | + function($row) use (&$top_topics_replies, &$max_num_replies) { |
|
| 323 | 323 | $href = getUrl('topic', ['topic' => $row['id_topic'], 'start' => '0', 'subject' => $row['subject']]); |
| 324 | 324 | |
| 325 | 325 | // Build out this topics details for controller use |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | ); |
| 337 | 337 | |
| 338 | 338 | // @todo dedupe this |
| 339 | - usort($top_topics_replies, function ($a, $b) { |
|
| 339 | + usort($top_topics_replies, function($a, $b) { |
|
| 340 | 340 | return $b['num_replies'] <=> $a['num_replies']; |
| 341 | 341 | }); |
| 342 | 342 | |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | * @param int|null $limit if not supplied, defaults to 10 |
| 352 | 352 | * @return array |
| 353 | 353 | */ |
| 354 | -function topTopicViews($limit = null) |
|
| 354 | +function topTopicViews ($limit = null) |
|
| 355 | 355 | { |
| 356 | 356 | global $modSettings; |
| 357 | 357 | |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | 'no_views' => 0, |
| 384 | 384 | ) |
| 385 | 385 | )->fetch_callback( |
| 386 | - function ($row) use (&$topic_ids) { |
|
| 386 | + function($row) use (&$topic_ids) { |
|
| 387 | 387 | $topic_ids[] = $row['id_topic']; |
| 388 | 388 | } |
| 389 | 389 | ); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | 'topic_views' => $limit, |
| 411 | 411 | ) |
| 412 | 412 | )->fetch_callback( |
| 413 | - function ($row) use (&$top_topics_views, &$max_num_views) { |
|
| 413 | + function($row) use (&$top_topics_views, &$max_num_views) { |
|
| 414 | 414 | $board_href = getUrl('board', ['board' => $row['id_board'], 'start' => '0', 'name' => $row['name']]); |
| 415 | 415 | $topic_href = getUrl('topic', ['topic' => $row['id_topic'], 'start' => '0', 'subject' => $row['subject']]); |
| 416 | 416 | |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | * |
| 456 | 456 | * @return array |
| 457 | 457 | */ |
| 458 | -function topTopicStarter() |
|
| 458 | +function topTopicStarter () |
|
| 459 | 459 | { |
| 460 | 460 | global $modSettings; |
| 461 | 461 | |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | 'recycle_board' => $modSettings['recycle_board'], |
| 477 | 477 | ) |
| 478 | 478 | )->fetch_callback( |
| 479 | - function ($row) use (&$members) { |
|
| 479 | + function($row) use (&$members) { |
|
| 480 | 480 | $members[$row['id_member_started']] = $row['hits']; |
| 481 | 481 | } |
| 482 | 482 | ); |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | 'member_list' => array_keys($members), |
| 504 | 504 | ) |
| 505 | 505 | )->fetch_callback( |
| 506 | - function ($row) use (&$top_starters, $members, $max_num_topics) { |
|
| 506 | + function($row) use (&$top_starters, $members, $max_num_topics) { |
|
| 507 | 507 | $href = getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]); |
| 508 | 508 | |
| 509 | 509 | // Our array of spammers, er topic starters ! |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | ); |
| 520 | 520 | |
| 521 | 521 | // Even spammers must be orderly. |
| 522 | - uksort($top_starters, function ($a, $b) use ($members) { |
|
| 522 | + uksort($top_starters, function($a, $b) use ($members) { |
|
| 523 | 523 | return $members[$b] <=> $members[$a]; |
| 524 | 524 | }); |
| 525 | 525 | |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | * |
| 534 | 534 | * @return array |
| 535 | 535 | */ |
| 536 | -function topTimeOnline() |
|
| 536 | +function topTimeOnline () |
|
| 537 | 537 | { |
| 538 | 538 | global $modSettings, $txt; |
| 539 | 539 | |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | * - page views, new registrations, topics posts, most on etc |
| 627 | 627 | * |
| 628 | 628 | */ |
| 629 | -function monthlyActivity() |
|
| 629 | +function monthlyActivity () |
|
| 630 | 630 | { |
| 631 | 631 | global $context, $txt; |
| 632 | 632 | |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | * @param string $condition_string |
| 702 | 702 | * @param mixed[] $condition_parameters = array() |
| 703 | 703 | */ |
| 704 | -function getDailyStats($condition_string, $condition_parameters = array()) |
|
| 704 | +function getDailyStats ($condition_string, $condition_parameters = array()) |
|
| 705 | 705 | { |
| 706 | 706 | $db = database(); |
| 707 | 707 | |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | ORDER BY stats_day DESC', |
| 715 | 715 | $condition_parameters |
| 716 | 716 | )->fetch_callback( |
| 717 | - function ($row) { |
|
| 717 | + function($row) { |
|
| 718 | 718 | global $context; |
| 719 | 719 | |
| 720 | 720 | $context['yearly'][$row['stats_year']]['months'][(int) $row['stats_month']]['days'][] = array( |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | * |
| 742 | 742 | * @return int |
| 743 | 743 | */ |
| 744 | -function UserStatsTopicsStarted($memID) |
|
| 744 | +function UserStatsTopicsStarted ($memID) |
|
| 745 | 745 | { |
| 746 | 746 | global $modSettings; |
| 747 | 747 | |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | * |
| 776 | 776 | * @return int |
| 777 | 777 | */ |
| 778 | -function UserStatsPollsStarted($memID) |
|
| 778 | +function UserStatsPollsStarted ($memID) |
|
| 779 | 779 | { |
| 780 | 780 | global $modSettings; |
| 781 | 781 | |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | * |
| 810 | 810 | * @return int |
| 811 | 811 | */ |
| 812 | -function UserStatsPollsVoted($memID) |
|
| 812 | +function UserStatsPollsVoted ($memID) |
|
| 813 | 813 | { |
| 814 | 814 | $db = database(); |
| 815 | 815 | |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | * |
| 840 | 840 | * @return array |
| 841 | 841 | */ |
| 842 | -function UserStatsMostPostedBoard($memID, $limit = 10) |
|
| 842 | +function UserStatsMostPostedBoard ($memID, $limit = 10) |
|
| 843 | 843 | { |
| 844 | 844 | $db = database(); |
| 845 | 845 | |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | 'limit' => (int) $limit, |
| 863 | 863 | ) |
| 864 | 864 | )->fetch_callback( |
| 865 | - function ($row) use (&$popular_boards, $memID) { |
|
| 865 | + function($row) use (&$popular_boards, $memID) { |
|
| 866 | 866 | $href = getUrl('board', ['board' => $row['id_board'], 'start' => '0', 'name' => $row['name']]); |
| 867 | 867 | $posts = MembersList::get($memID)->posts; |
| 868 | 868 | |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | * |
| 893 | 893 | * @return array |
| 894 | 894 | */ |
| 895 | -function UserStatsMostActiveBoard($memID, $limit = 10) |
|
| 895 | +function UserStatsMostActiveBoard ($memID, $limit = 10) |
|
| 896 | 896 | { |
| 897 | 897 | $db = database(); |
| 898 | 898 | |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | * |
| 951 | 951 | * @return array |
| 952 | 952 | */ |
| 953 | -function UserStatsPostingTime($memID) |
|
| 953 | +function UserStatsPostingTime ($memID) |
|
| 954 | 954 | { |
| 955 | 955 | global $modSettings; |
| 956 | 956 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param mixed[] $where_vars = array() or values used in the where statement |
| 26 | 26 | * @return string number of user errors |
| 27 | 27 | */ |
| 28 | -function getUserErrorCount($where, $where_vars = array()) |
|
| 28 | +function getUserErrorCount ($where, $where_vars = array()) |
|
| 29 | 29 | { |
| 30 | 30 | $db = database(); |
| 31 | 31 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @param mixed[] $where_vars array of values used in the where statement |
| 53 | 53 | * @return mixed[] error messages array |
| 54 | 54 | */ |
| 55 | -function getUserErrors($start, $items_per_page, $sort, $where, $where_vars = array()) |
|
| 55 | +function getUserErrors ($start, $items_per_page, $sort, $where, $where_vars = array()) |
|
| 56 | 56 | { |
| 57 | 57 | global $txt; |
| 58 | 58 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | 'guest_title' => $txt['guest_title'], |
| 74 | 74 | )) |
| 75 | 75 | )->fetch_callback( |
| 76 | - function ($row) use (&$error_messages) { |
|
| 76 | + function($row) use (&$error_messages) { |
|
| 77 | 77 | $error_messages[] = array( |
| 78 | 78 | 'ip' => $row['ip'], |
| 79 | 79 | 'member_link' => $row['id_member'] > 0 ? '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>' : $row['display_name'], |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @param mixed[] $where_vars array of values used in the where statement |
| 97 | 97 | * @return string count of messages matching the IP |
| 98 | 98 | */ |
| 99 | -function getIPMessageCount($where, $where_vars = array()) |
|
| 99 | +function getIPMessageCount ($where, $where_vars = array()) |
|
| 100 | 100 | { |
| 101 | 101 | $db = database(); |
| 102 | 102 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param mixed[] $where_vars array of values used in the where statement |
| 125 | 125 | * @return mixed[] an array of basic messages / details |
| 126 | 126 | */ |
| 127 | -function getIPMessages($start, $items_per_page, $sort, $where, $where_vars = array()) |
|
| 127 | +function getIPMessages ($start, $items_per_page, $sort, $where, $where_vars = array()) |
|
| 128 | 128 | { |
| 129 | 129 | $db = database(); |
| 130 | 130 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | LIMIT ' . $items_per_page . ' OFFSET ' . $start, |
| 144 | 144 | array_merge($where_vars, array()) |
| 145 | 145 | )->fetch_callback( |
| 146 | - function ($row) use (&$messages) { |
|
| 146 | + function($row) use (&$messages) { |
|
| 147 | 147 | $messages[] = array( |
| 148 | 148 | 'ip' => $row['poster_ip'], |
| 149 | 149 | 'member_link' => empty($row['id_member']) ? $row['display_name'] : '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>', |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @param mixed[] $where_vars array of values used in the where statement |
| 175 | 175 | * @return string count of messages matching the IP |
| 176 | 176 | */ |
| 177 | -function getLoginCount($where, $where_vars = array()) |
|
| 177 | +function getLoginCount ($where, $where_vars = array()) |
|
| 178 | 178 | { |
| 179 | 179 | $db = database(); |
| 180 | 180 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * |
| 204 | 204 | * @return mixed[] an array of messages |
| 205 | 205 | */ |
| 206 | -function getLogins($where, $where_vars = array()) |
|
| 206 | +function getLogins ($where, $where_vars = array()) |
|
| 207 | 207 | { |
| 208 | 208 | $db = database(); |
| 209 | 209 | |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | 'current_member' => $where_vars['current_member'], |
| 219 | 219 | ) |
| 220 | 220 | )->fetch_callback( |
| 221 | - function ($row) use (&$logins) { |
|
| 221 | + function($row) use (&$logins) { |
|
| 222 | 222 | $logins[] = array( |
| 223 | 223 | 'time' => standardTime($row['time']), |
| 224 | 224 | 'html_time' => htmlTime($row['time']), |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * @param int $memID id_member |
| 239 | 239 | * @return string number of profile edits |
| 240 | 240 | */ |
| 241 | -function getProfileEditCount($memID) |
|
| 241 | +function getProfileEditCount ($memID) |
|
| 242 | 242 | { |
| 243 | 243 | $db = database(); |
| 244 | 244 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | * @param int $memID |
| 271 | 271 | * @return mixed[] array of profile edits |
| 272 | 272 | */ |
| 273 | -function getProfileEdits($start, $items_per_page, $sort, $memID) |
|
| 273 | +function getProfileEdits ($start, $items_per_page, $sort, $memID) |
|
| 274 | 274 | { |
| 275 | 275 | global $txt, $context; |
| 276 | 276 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @return array |
| 22 | 22 | * @package AddonSettings |
| 23 | 23 | */ |
| 24 | -function get_files_recursive($dir_path) |
|
| 24 | +function get_files_recursive ($dir_path) |
|
| 25 | 25 | { |
| 26 | 26 | $files = array(); |
| 27 | 27 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @return array |
| 64 | 64 | * @package AddonSettings |
| 65 | 65 | */ |
| 66 | -function list_integration_hooks_data($start, $items_per_page, $sort) |
|
| 66 | +function list_integration_hooks_data ($start, $items_per_page, $sort) |
|
| 67 | 67 | { |
| 68 | 68 | global $txt, $context, $scripturl; |
| 69 | 69 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * @package AddonSettings |
| 279 | 279 | * |
| 280 | 280 | */ |
| 281 | -function integration_hooks_count($filter = false) |
|
| 281 | +function integration_hooks_count ($filter = false) |
|
| 282 | 282 | { |
| 283 | 283 | $hooks = get_integration_hooks(); |
| 284 | 284 | $hooks_count = 0; |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | * @package AddonSettings |
| 306 | 306 | * @staticvar type $integration_hooks |
| 307 | 307 | */ |
| 308 | -function get_integration_hooks() |
|
| 308 | +function get_integration_hooks () |
|
| 309 | 309 | { |
| 310 | 310 | global $modSettings; |
| 311 | 311 | static $integration_hooks = null; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @return array |
| 34 | 34 | */ |
| 35 | -function messageIndexTopics($id_board, $id_member, $start, $items_per_page, $sort_by, $sort_column, $indexOptions) |
|
| 35 | +function messageIndexTopics ($id_board, $id_member, $start, $items_per_page, $sort_by, $sort_column, $indexOptions) |
|
| 36 | 36 | { |
| 37 | 37 | $db = database(); |
| 38 | 38 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'maxindex' => $items_per_page, |
| 71 | 71 | ) |
| 72 | 72 | )->fetch_callback( |
| 73 | - function ($row) use (&$topics) { |
|
| 73 | + function($row) use (&$topics) { |
|
| 74 | 74 | $topics[$row['id_topic']] = []; |
| 75 | 75 | } |
| 76 | 76 | ); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * This simple function returns the sort methods for message index in an array. |
| 143 | 143 | */ |
| 144 | -function messageIndexSort() |
|
| 144 | +function messageIndexSort () |
|
| 145 | 145 | { |
| 146 | 146 | // Default sort methods for message index. |
| 147 | 147 | $sort_methods = array( |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * |
| 170 | 170 | * @return array |
| 171 | 171 | */ |
| 172 | -function topicsParticipation($id_member, $topic_ids) |
|
| 172 | +function topicsParticipation ($id_member, $topic_ids) |
|
| 173 | 173 | { |
| 174 | 174 | $db = database(); |
| 175 | 175 | $topics = array(); |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | 'topic_list' => $topic_ids, |
| 185 | 185 | ) |
| 186 | 186 | )->fetch_callback( |
| 187 | - function ($row) use (&$topics) { |
|
| 187 | + function($row) use (&$topics) { |
|
| 188 | 188 | $topics[] = $row; |
| 189 | 189 | } |
| 190 | 190 | ); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @param int|null $pollID = null the ID of the poll, if any. If null is passed, it retrieves the current ID. |
| 27 | 27 | * @return int |
| 28 | 28 | */ |
| 29 | -function associatedPoll($topicID, $pollID = null) |
|
| 29 | +function associatedPoll ($topicID, $pollID = null) |
|
| 30 | 30 | { |
| 31 | 31 | // Retrieve the poll ID. |
| 32 | 32 | if ($pollID === null) |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @param int[]|int $pollID The id of the poll to remove |
| 49 | 49 | */ |
| 50 | -function removePoll($pollID) |
|
| 50 | +function removePoll ($pollID) |
|
| 51 | 51 | { |
| 52 | 52 | $db = database(); |
| 53 | 53 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @param int $pollID The ID of the poll to reset the votes on |
| 88 | 88 | */ |
| 89 | -function resetVotes($pollID) |
|
| 89 | +function resetVotes ($pollID) |
|
| 90 | 90 | { |
| 91 | 91 | $db = database(); |
| 92 | 92 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * kind of integration |
| 136 | 136 | * @return array|false array of poll information, or false if no poll is found |
| 137 | 137 | */ |
| 138 | -function pollInfo($id_poll, $ignore_permissions = true) |
|
| 138 | +function pollInfo ($id_poll, $ignore_permissions = true) |
|
| 139 | 139 | { |
| 140 | 140 | global $modSettings; |
| 141 | 141 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * |
| 208 | 208 | * @return string[]|bool |
| 209 | 209 | */ |
| 210 | -function pollInfoForTopic($topicID) |
|
| 210 | +function pollInfoForTopic ($topicID) |
|
| 211 | 211 | { |
| 212 | 212 | $db = database(); |
| 213 | 213 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @param int $pollID the topic with an associated poll. |
| 247 | 247 | * @return array the topic id and the board id, false if no topics found |
| 248 | 248 | */ |
| 249 | -function topicFromPoll($pollID) |
|
| 249 | +function topicFromPoll ($pollID) |
|
| 250 | 250 | { |
| 251 | 251 | $db = database(); |
| 252 | 252 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | * |
| 295 | 295 | * @return array |
| 296 | 296 | */ |
| 297 | -function pollOptionsForMember($id_poll, $id_member) |
|
| 297 | +function pollOptionsForMember ($id_poll, $id_member) |
|
| 298 | 298 | { |
| 299 | 299 | $db = database(); |
| 300 | 300 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | 'not_guest' => 0, |
| 314 | 314 | ) |
| 315 | 315 | )->fetch_callback( |
| 316 | - function ($row) use (&$pollOptions) { |
|
| 316 | + function($row) use (&$pollOptions) { |
|
| 317 | 317 | $row['label'] = censor($row['label']); |
| 318 | 318 | $pollOptions[$row['id_choice']] = $row; |
| 319 | 319 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | * |
| 331 | 331 | * @return array |
| 332 | 332 | */ |
| 333 | -function pollOptions($id_poll) |
|
| 333 | +function pollOptions ($id_poll) |
|
| 334 | 334 | { |
| 335 | 335 | $db = database(); |
| 336 | 336 | |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | 'id_poll' => $id_poll, |
| 345 | 345 | ) |
| 346 | 346 | )->fetch_callback( |
| 347 | - function ($row) use (&$pollOptions) { |
|
| 347 | + function($row) use (&$pollOptions) { |
|
| 348 | 348 | $row['label'] = censor($row['label']); |
| 349 | 349 | $pollOptions[$row['id_choice']] = $row; |
| 350 | 350 | } |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | * @param mixed[] $options = array() The poll options |
| 368 | 368 | * @return int the id of the created poll |
| 369 | 369 | */ |
| 370 | -function createPoll($question, $id_member, $poster_name, $max_votes = 1, $hide_results = 1, $expire = 0, $can_change_vote = 0, $can_guest_vote = 0, array $options = array()) |
|
| 370 | +function createPoll ($question, $id_member, $poster_name, $max_votes = 1, $hide_results = 1, $expire = 0, $can_change_vote = 0, $can_guest_vote = 0, array $options = array()) |
|
| 371 | 371 | { |
| 372 | 372 | $expire = empty($expire) ? 0 : time() + $expire * 3600 * 24; |
| 373 | 373 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | * @param int $can_change_vote = 0 If you can change your vote |
| 409 | 409 | * @param int $can_guest_vote = 0 If guests can vote |
| 410 | 410 | */ |
| 411 | -function modifyPoll($id_poll, $question, $max_votes = 1, $hide_results = 1, $expire = 0, $can_change_vote = 0, $can_guest_vote = 0) |
|
| 411 | +function modifyPoll ($id_poll, $question, $max_votes = 1, $hide_results = 1, $expire = 0, $can_change_vote = 0, $can_guest_vote = 0) |
|
| 412 | 412 | { |
| 413 | 413 | $db = database(); |
| 414 | 414 | |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | * @param int $id_poll The id of the poll you're adding the options to |
| 442 | 442 | * @param mixed[] $options The options to choose from |
| 443 | 443 | */ |
| 444 | -function addPollOptions($id_poll, array $options) |
|
| 444 | +function addPollOptions ($id_poll, array $options) |
|
| 445 | 445 | { |
| 446 | 446 | $db = database(); |
| 447 | 447 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | * |
| 465 | 465 | * @param mixed[] $options An array holding the poll choices |
| 466 | 466 | */ |
| 467 | -function insertPollOptions($options) |
|
| 467 | +function insertPollOptions ($options) |
|
| 468 | 468 | { |
| 469 | 469 | $db = database(); |
| 470 | 470 | |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | * |
| 484 | 484 | * @param mixed[] $options An array holding the poll choices |
| 485 | 485 | */ |
| 486 | -function modifyPollOption($options) |
|
| 486 | +function modifyPollOption ($options) |
|
| 487 | 487 | { |
| 488 | 488 | $db = database(); |
| 489 | 489 | |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | * @param int $id_poll The id of the poll you're deleting the options from |
| 511 | 511 | * @param int[] $id_options An array holding the choice id |
| 512 | 512 | */ |
| 513 | -function deletePollOptions($id_poll, $id_options) |
|
| 513 | +function deletePollOptions ($id_poll, $id_options) |
|
| 514 | 514 | { |
| 515 | 515 | $db = database(); |
| 516 | 516 | |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | * |
| 544 | 544 | * @return array |
| 545 | 545 | */ |
| 546 | -function pollStarters($id_topic) |
|
| 546 | +function pollStarters ($id_topic) |
|
| 547 | 547 | { |
| 548 | 548 | $db = database(); |
| 549 | 549 | |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | * @param int $topic the topic with an associated poll |
| 577 | 577 | * @return mixed[] |
| 578 | 578 | */ |
| 579 | -function checkVote($topic) |
|
| 579 | +function checkVote ($topic) |
|
| 580 | 580 | { |
| 581 | 581 | $db = database(); |
| 582 | 582 | |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | * @param int $id_member The id of the member |
| 604 | 604 | * @param int $id_poll The topic with an associated poll. |
| 605 | 605 | */ |
| 606 | -function removeVote($id_member, $id_poll) |
|
| 606 | +function removeVote ($id_member, $id_poll) |
|
| 607 | 607 | { |
| 608 | 608 | $db = database(); |
| 609 | 609 | |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | * @param int $id_poll The id of the poll to lower the vote count |
| 625 | 625 | * @param int[] $options The available poll options |
| 626 | 626 | */ |
| 627 | -function decreaseVoteCounter($id_poll, $options) |
|
| 627 | +function decreaseVoteCounter ($id_poll, $options) |
|
| 628 | 628 | { |
| 629 | 629 | $db = database(); |
| 630 | 630 | |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | * @param int $id_poll The id of the poll to increase the vote count |
| 650 | 650 | * @param int[] $options The available poll options |
| 651 | 651 | */ |
| 652 | -function increaseVoteCounter($id_poll, $options) |
|
| 652 | +function increaseVoteCounter ($id_poll, $options) |
|
| 653 | 653 | { |
| 654 | 654 | $db = database(); |
| 655 | 655 | |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | * |
| 672 | 672 | * @param mixed[] $insert array of vote details, includes member and their choice |
| 673 | 673 | */ |
| 674 | -function addVote($insert) |
|
| 674 | +function addVote ($insert) |
|
| 675 | 675 | { |
| 676 | 676 | $db = database(); |
| 677 | 677 | |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | * |
| 689 | 689 | * @param int $id_poll The id of the poll to increase |
| 690 | 690 | */ |
| 691 | -function increaseGuestVote($id_poll) |
|
| 691 | +function increaseGuestVote ($id_poll) |
|
| 692 | 692 | { |
| 693 | 693 | $db = database(); |
| 694 | 694 | |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | * |
| 712 | 712 | * @return int[] |
| 713 | 713 | */ |
| 714 | -function determineVote($id_member, $id_poll) |
|
| 714 | +function determineVote ($id_member, $id_poll) |
|
| 715 | 715 | { |
| 716 | 716 | $db = database(); |
| 717 | 717 | $pollOptions = array(); |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | 'id_poll' => $id_poll, |
| 728 | 728 | ) |
| 729 | 729 | )->fetch_callback( |
| 730 | - function ($row) use (&$pollOptions) { |
|
| 730 | + function($row) use (&$pollOptions) { |
|
| 731 | 731 | $pollOptions[] = $row[0]; |
| 732 | 732 | } |
| 733 | 733 | ); |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | * @return string[]|bool |
| 743 | 743 | * @deprecated since 2.0 - use pollInfoForTopic instead |
| 744 | 744 | */ |
| 745 | -function pollStatus($id_topic) |
|
| 745 | +function pollStatus ($id_topic) |
|
| 746 | 746 | { |
| 747 | 747 | \ElkArte\Errors\Errors::instance()->log_deprecated('pollStatus()', 'pollInfoForTopic()'); |
| 748 | 748 | |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | * @param int $id_poll The id of the poll to check |
| 756 | 756 | * @param int $locked the value to set in voting_locked |
| 757 | 757 | */ |
| 758 | -function lockPoll($id_poll, $locked) |
|
| 758 | +function lockPoll ($id_poll, $locked) |
|
| 759 | 759 | { |
| 760 | 760 | $db = database(); |
| 761 | 761 | |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | * @param int $id_poll The id of the poll |
| 778 | 778 | * @return array |
| 779 | 779 | */ |
| 780 | -function getPollChoices($id_poll) |
|
| 780 | +function getPollChoices ($id_poll) |
|
| 781 | 781 | { |
| 782 | 782 | $db = database(); |
| 783 | 783 | |
@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | 'id_poll' => $id_poll, |
| 793 | 793 | ) |
| 794 | 794 | )->fetch_callback( |
| 795 | - function ($row) use (&$choices, &$number) { |
|
| 795 | + function($row) use (&$choices, &$number) { |
|
| 796 | 796 | $row['label'] = censor($row['label']); |
| 797 | 797 | $choices[$row['id_choice']] = array( |
| 798 | 798 | 'id' => $row['id_choice'], |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | * @return array |
| 816 | 816 | * @throws \ElkArte\Exceptions\Exception no_board |
| 817 | 817 | */ |
| 818 | -function getPollStarter($id_topic) |
|
| 818 | +function getPollStarter ($id_topic) |
|
| 819 | 819 | { |
| 820 | 820 | $db = database(); |
| 821 | 821 | |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | * |
| 846 | 846 | * @param int $poll_id simply a poll id... |
| 847 | 847 | */ |
| 848 | -function loadPollContext($poll_id) |
|
| 848 | +function loadPollContext ($poll_id) |
|
| 849 | 849 | { |
| 850 | 850 | global $context, $txt; |
| 851 | 851 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return array |
| 72 | 72 | */ |
| 73 | -function createMenu($menuData, $menuOptions = []) |
|
| 73 | +function createMenu ($menuData, $menuOptions = []) |
|
| 74 | 74 | { |
| 75 | 75 | $menu = new Menu(); |
| 76 | 76 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * |
| 104 | 104 | * @return bool |
| 105 | 105 | */ |
| 106 | -function destroyMenu($menu_id = 'last') |
|
| 106 | +function destroyMenu ($menu_id = 'last') |
|
| 107 | 107 | { |
| 108 | 108 | global $context; |
| 109 | 109 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * |
| 147 | 147 | * @param array $selectedMenu |
| 148 | 148 | */ |
| 149 | -function callMenu($selectedMenu) |
|
| 149 | +function callMenu ($selectedMenu) |
|
| 150 | 150 | { |
| 151 | 151 | global $context; |
| 152 | 152 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @return array |
| 163 | 163 | */ |
| 164 | -function loadDefaultMenuButtons() |
|
| 164 | +function loadDefaultMenuButtons () |
|
| 165 | 165 | { |
| 166 | 166 | global $scripturl, $txt, $context, $modSettings; |
| 167 | 167 | |