Completed
Pull Request — development (#3620)
by Emanuele
07:38 queued 07:38
created
sources/subs/Profile.subs.php 2 patches
Switch Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1843,13 +1843,13 @@
 block discarded – undo
1843 1843
 			{
1844 1844
 				switch ($is_valid)
1845 1845
 				{
1846
-					case 'custom_field_too_long':
1847
-						$value = Util::substr($value, 0, $row['field_length']);
1848
-						break;
1849
-					case 'custom_field_invalid_email':
1850
-					case 'custom_field_inproper_format':
1851
-						$value = $row['default_value'];
1852
-						break;
1846
+				case 'custom_field_too_long':
1847
+					$value = Util::substr($value, 0, $row['field_length']);
1848
+					break;
1849
+				case 'custom_field_invalid_email':
1850
+				case 'custom_field_inproper_format':
1851
+					$value = $row['default_value'];
1852
+					break;
1853 1853
 				}
1854 1854
 			}
1855 1855
 
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  * @return int if no error.  May return false in case of problems only if $fatal is set to false
35 35
  * @throws \ElkArte\Exceptions\Exception not_a_user
36 36
  */
37
-function currentMemberID($fatal = true, $reload_id = false)
37
+function currentMemberID ($fatal = true, $reload_id = false)
38 38
 {
39 39
 	static $memID;
40 40
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  * @param mixed[] $fields
87 87
  * @param string $hook a string that represent the hook that can be used to operate on $fields
88 88
  */
89
-function setupProfileContext($fields, $hook = '')
89
+function setupProfileContext ($fields, $hook = '')
90 90
 {
91 91
 	global $profile_fields, $context, $cur_profile, $txt;
92 92
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
  * @param string $area = 'summary'
203 203
  * @param mixed[] $custom_fields = array()
204 204
  */
205
-function loadCustomFields($memID, $area = 'summary', array $custom_fields = array())
205
+function loadCustomFields ($memID, $area = 'summary', array $custom_fields = array())
206 206
 {
207 207
 	global $context, $txt, $settings, $scripturl;
208 208
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
  *
388 388
  * @param bool $force_reload = false
389 389
  */
390
-function loadProfileFields($force_reload = false)
390
+function loadProfileFields ($force_reload = false)
391 391
 {
392 392
 	global $context, $profile_fields, $txt, $scripturl, $modSettings, $cur_profile, $language, $settings;
393 393
 
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 			'type' => 'callback',
457 457
 			'callback_func' => 'birthdate',
458 458
 			'permission' => 'profile_extra',
459
-			'preload' => function () {
459
+			'preload' => function() {
460 460
 				global $cur_profile, $context;
461 461
 
462 462
 				// Split up the birth date....
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 
470 470
 				return true;
471 471
 			},
472
-			'input_validate' => function (&$value) {
472
+			'input_validate' => function(&$value) {
473 473
 				global $profile_vars, $cur_profile;
474 474
 
475 475
 				if (isset($_POST['bday2'], $_POST['bday3']) && $value > 0 && $_POST['bday2'] > 0)
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 		'birthdate' => array(
500 500
 			'type' => 'hidden',
501 501
 			'permission' => 'profile_extra',
502
-			'input_validate' => function (&$value) {
502
+			'input_validate' => function(&$value) {
503 503
 				global $cur_profile;
504 504
 
505 505
 				// @todo Should we check for this year and tell them they made a mistake :P? (based on coppa at least?)
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 			'label' => $txt['date_registered'],
524 524
 			'log_change' => true,
525 525
 			'permission' => 'moderate_forum',
526
-			'input_validate' => function (&$value) {
526
+			'input_validate' => function(&$value) {
527 527
 				global $txt, $modSettings, $cur_profile;
528 528
 
529 529
 				// Bad date!  Go try again - please?
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 			'subtext' => $txt['valid_email'],
553 553
 			'log_change' => true,
554 554
 			'permission' => 'profile_identity',
555
-			'input_validate' => function (&$value) {
555
+			'input_validate' => function(&$value) {
556 556
 				global $context, $old_profile, $profile_vars, $modSettings;
557 557
 
558 558
 				if (strtolower($value) === strtolower($old_profile['email_address']))
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 			'value' => empty($cur_profile['hide_email']),
582 582
 			'label' => $txt['allow_user_email'],
583 583
 			'permission' => 'profile_identity',
584
-			'input_validate' => function (&$value) {
584
+			'input_validate' => function(&$value) {
585 585
 				$value = $value == 0 ? 1 : 0;
586 586
 
587 587
 				return true;
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 			'callback_func' => 'theme_pick',
602 602
 			'permission' => 'profile_extra',
603 603
 			'enabled' => empty($settings['disable_user_variant']) || !empty($modSettings['theme_allow']) || allowedTo('admin_forum'),
604
-			'preload' => function () {
604
+			'preload' => function() {
605 605
 				global $context, $cur_profile, $txt;
606 606
 
607 607
 				$db = database();
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
 
627 627
 				return true;
628 628
 			},
629
-			'input_validate' => function (&$value) {
629
+			'input_validate' => function(&$value) {
630 630
 				$value = (int) $value;
631 631
 
632 632
 				return true;
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 			'callback_func' => 'karma_modify',
638 638
 			'permission' => 'admin_forum',
639 639
 			// Set karma_bad too!
640
-			'input_validate' => function (&$value) {
640
+			'input_validate' => function(&$value) {
641 641
 				global $profile_vars, $cur_profile;
642 642
 
643 643
 				$value = (int) $value;
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 
650 650
 				return true;
651 651
 			},
652
-			'preload' => function () {
652
+			'preload' => function() {
653 653
 				global $context, $cur_profile;
654 654
 
655 655
 				$context['member']['karma'] = array(
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
 			'preload' => 'profileLoadLanguages',
670 670
 			'enabled' => !empty($modSettings['userLanguage']),
671 671
 			'value' => empty($cur_profile['lngfile']) ? $language : $cur_profile['lngfile'],
672
-			'input_validate' => function (&$value) {
672
+			'input_validate' => function(&$value) {
673 673
 				global $context, $cur_profile;
674 674
 
675 675
 				// Load the languages.
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 			'log_change' => true,
701 701
 			'permission' => 'profile_identity',
702 702
 			'prehtml' => allowedTo('admin_forum') && isset($_GET['changeusername']) ? '<div class="warningbox">' . $txt['username_warning'] . '</div>' : '',
703
-			'input_validate' => function (&$value) {
703
+			'input_validate' => function(&$value) {
704 704
 				global $context, $cur_profile;
705 705
 
706 706
 				if (allowedTo('admin_forum'))
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 			'permission' => 'profile_identity',
758 758
 			'save_key' => 'passwd',
759 759
 			// Note this will only work if passwrd2 also exists!
760
-			'input_validate' => function (&$value) {
760
+			'input_validate' => function(&$value) {
761 761
 				global $cur_profile;
762 762
 
763 763
 				// If we didn't try it then ignore it!
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 			),
827 827
 			'subtext' => $txt['receive_from_description'],
828 828
 			'value' => empty($cur_profile['receive_from']) ? 0 : $cur_profile['receive_from'],
829
-			'input_validate' => function (&$value) {
829
+			'input_validate' => function(&$value) {
830 830
 				global $cur_profile, $profile_vars;
831 831
 
832 832
 				// Simple validate and apply the two "sub settings"
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
 			'callback_func' => 'pm_settings',
844 844
 			'permission' => 'pm_read',
845 845
 			'save_key' => 'pm_prefs',
846
-			'preload' => function () {
846
+			'preload' => function() {
847 847
 				global $context, $cur_profile;
848 848
 
849 849
 				$context['display_mode'] = $cur_profile['pm_prefs'] & 3;
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
 				return true;
853 853
 			},
854
-			'input_validate' => function (&$value) {
854
+			'input_validate' => function(&$value) {
855 855
 				global $cur_profile, $profile_vars;
856 856
 
857 857
 				// Simple validate and apply the two "sub settings"
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 			'log_change' => true,
869 869
 			'size' => 7,
870 870
 			'permission' => 'moderate_forum',
871
-			'input_validate' => function (&$value) {
871
+			'input_validate' => function(&$value) {
872 872
 				// Account for comma_format presentation up front
873 873
 				$check = strtr($value, array(',' => '', '.' => '', ' ' => ''));
874 874
 				if (!is_numeric($check))
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
 			'input_attr' => array('maxlength="60"'),
890 890
 			'permission' => 'profile_identity',
891 891
 			'enabled' => !empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum'),
892
-			'input_validate' => function (&$value) {
892
+			'input_validate' => function(&$value) {
893 893
 				global $context, $cur_profile;
894 894
 
895 895
 				$value = trim(preg_replace('~[\s]~u', ' ', $value));
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
 			'postinput' => '<span class="smalltext" style="margin-left: 4ex;">[<a href="' . $scripturl . '?action=quickhelp;help=secret_why_blank" onclick="return reqOverlayDiv(this.href);">' . $txt['secret_why_blank'] . '</a>]</span>',
930 930
 			'value' => '',
931 931
 			'permission' => 'profile_identity',
932
-			'input_validate' => function (&$value) {
932
+			'input_validate' => function(&$value) {
933 933
 				global $cur_profile;
934 934
 
935 935
 				if (empty($value))
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 			'callback_func' => 'smiley_pick',
976 976
 			'enabled' => !empty($modSettings['smiley_sets_enable']),
977 977
 			'permission' => 'profile_extra',
978
-			'preload' => function () {
978
+			'preload' => function() {
979 979
 				global $modSettings, $context, $txt, $cur_profile;
980 980
 
981 981
 				$smiley_set = ['id' => '', 'name' => ''];
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
 
1005 1005
 				return true;
1006 1006
 			},
1007
-			'input_validate' => function (&$value) {
1007
+			'input_validate' => function(&$value) {
1008 1008
 				global $modSettings;
1009 1009
 
1010 1010
 				$smiley_sets = explode(',', $modSettings['smiley_sets_known']);
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
 			'callback_func' => 'theme_settings',
1023 1023
 			'permission' => 'profile_extra',
1024 1024
 			'is_dummy' => true,
1025
-			'preload' => function () {
1025
+			'preload' => function() {
1026 1026
 				global $context;
1027 1027
 
1028 1028
 				Txt::load('Settings');
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 			'type' => 'callback',
1042 1042
 			'callback_func' => 'timeformat_modify',
1043 1043
 			'permission' => 'profile_extra',
1044
-			'preload' => function () {
1044
+			'preload' => function() {
1045 1045
 				global $context, $txt, $cur_profile, $modSettings;
1046 1046
 
1047 1047
 				$context['easy_timeformats'] = array(
@@ -1065,14 +1065,14 @@  discard block
 block discarded – undo
1065 1065
 			'type' => 'callback',
1066 1066
 			'callback_func' => 'timeoffset_modify',
1067 1067
 			'permission' => 'profile_extra',
1068
-			'preload' => function () {
1068
+			'preload' => function() {
1069 1069
 				global $context, $cur_profile;
1070 1070
 
1071 1071
 				$context['member']['time_offset'] = $cur_profile['time_offset'];
1072 1072
 
1073 1073
 				return true;
1074 1074
 			},
1075
-			'input_validate' => function (&$value) {
1075
+			'input_validate' => function(&$value) {
1076 1076
 				// Validate the time_offset...
1077 1077
 				$value = (float) strtr($value, ',', '.');
1078 1078
 
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
 			'size' => 50,
1093 1093
 			'permission' => 'profile_title',
1094 1094
 			'enabled' => !empty($modSettings['titlesEnable']),
1095
-			'input_validate' => function (&$value) {
1095
+			'input_validate' => function(&$value) {
1096 1096
 				if (Util::strlen($value) > 50)
1097 1097
 				{
1098 1098
 					return 'user_title_too_long';
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
 			'size' => 50,
1117 1117
 			'permission' => 'profile_extra',
1118 1118
 			// Fix the URL...
1119
-			'input_validate' => function (&$value) {
1119
+			'input_validate' => function(&$value) {
1120 1120
 
1121 1121
 				$value = addProtocol($value, array('http://', 'https://', 'ftp://', 'ftps://'));
1122 1122
 				if (strlen($value) < 8)
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
  * @param string[] $fields
1167 1167
  * @param string $hook
1168 1168
  */
1169
-function saveProfileFields($fields, $hook)
1169
+function saveProfileFields ($fields, $hook)
1170 1170
 {
1171 1171
 	global $profile_fields, $profile_vars, $context, $old_profile, $post_errors, $cur_profile;
1172 1172
 
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
  *
1347 1347
  * @return bool|string
1348 1348
  */
1349
-function profileValidateEmail($email, $memID = 0)
1349
+function profileValidateEmail ($email, $memID = 0)
1350 1350
 {
1351 1351
 	$db = database();
1352 1352
 
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
  * @param mixed[] $profile_vars
1386 1386
  * @param int $memID id_member
1387 1387
  */
1388
-function saveProfileChanges(&$profile_vars, $memID)
1388
+function saveProfileChanges (&$profile_vars, $memID)
1389 1389
 {
1390 1390
 	global $context;
1391 1391
 
@@ -1508,7 +1508,7 @@  discard block
 block discarded – undo
1508 1508
  * @param int $id_theme
1509 1509
  * @throws \ElkArte\Exceptions\Exception
1510 1510
  */
1511
-function makeThemeChanges($memID, $id_theme)
1511
+function makeThemeChanges ($memID, $id_theme)
1512 1512
 {
1513 1513
 	global $modSettings, $context;
1514 1514
 
@@ -1550,7 +1550,7 @@  discard block
 block discarded – undo
1550 1550
 			'is_active' => 1,
1551 1551
 		)
1552 1552
 	)->fetch_callback(
1553
-		function ($row) use (&$custom_fields) {
1553
+		function($row) use (&$custom_fields) {
1554 1554
 			$custom_fields[] = $row['col_name'];
1555 1555
 		}
1556 1556
 	);
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
  *
1635 1635
  * @param int $memID id_member
1636 1636
  */
1637
-function makeNotificationChanges($memID)
1637
+function makeNotificationChanges ($memID)
1638 1638
 {
1639 1639
 	$db = database();
1640 1640
 
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
 				'id_board' => 0,
1706 1706
 			)
1707 1707
 		)->fetch_callback(
1708
-			function ($row) use (&$notification_current) {
1708
+			function($row) use (&$notification_current) {
1709 1709
 				$notification_current[] = $row['id_board'];
1710 1710
 			}
1711 1711
 		);
@@ -1773,7 +1773,7 @@  discard block
 block discarded – undo
1773 1773
  * @param string $area
1774 1774
  * @param bool $sanitize = true
1775 1775
  */
1776
-function makeCustomFieldChanges($memID, $area, $sanitize = true)
1776
+function makeCustomFieldChanges ($memID, $area, $sanitize = true)
1777 1777
 {
1778 1778
 	global $context, $modSettings;
1779 1779
 
@@ -1919,7 +1919,7 @@  discard block
 block discarded – undo
1919 1919
  * @param string|int $value - The value that we want to validate
1920 1920
  * @return string|bool - A string representing the type of error, or true
1921 1921
  */
1922
-function isCustomFieldValid($field, $value)
1922
+function isCustomFieldValid ($field, $value)
1923 1923
 {
1924 1924
 	// Is it too long?
1925 1925
 	if ($field['field_length'] && $field['field_length'] < Util::strlen($value))
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
 /**
1954 1954
  * Send the user a new activation email if they need to reactivate!
1955 1955
  */
1956
-function profileSendActivation()
1956
+function profileSendActivation ()
1957 1957
 {
1958 1958
 	global $profile_vars, $old_profile, $txt, $context, $scripturl, $cookiename, $cur_profile, $language, $modSettings;
1959 1959
 
@@ -2008,7 +2008,7 @@  discard block
 block discarded – undo
2008 2008
  *
2009 2009
  * @return bool
2010 2010
  */
2011
-function profileLoadSignatureData()
2011
+function profileLoadSignatureData ()
2012 2012
 {
2013 2013
 	global $modSettings, $context, $txt, $cur_profile;
2014 2014
 
@@ -2081,7 +2081,7 @@  discard block
 block discarded – undo
2081 2081
  *
2082 2082
  * @return bool
2083 2083
  */
2084
-function profileLoadAvatarData()
2084
+function profileLoadAvatarData ()
2085 2085
 {
2086 2086
 	global $context, $cur_profile, $modSettings;
2087 2087
 
@@ -2181,7 +2181,7 @@  discard block
 block discarded – undo
2181 2181
  * Loads all the member groups that this member can assign
2182 2182
  * Places the result in context for template use
2183 2183
  */
2184
-function profileLoadGroups()
2184
+function profileLoadGroups ()
2185 2185
 {
2186 2186
 	global $cur_profile, $context;
2187 2187
 
@@ -2214,7 +2214,7 @@  discard block
 block discarded – undo
2214 2214
 /**
2215 2215
  * Load all the languages for the profile.
2216 2216
  */
2217
-function profileLoadLanguages()
2217
+function profileLoadLanguages ()
2218 2218
 {
2219 2219
 	global $context;
2220 2220
 
@@ -2238,7 +2238,7 @@  discard block
 block discarded – undo
2238 2238
 /**
2239 2239
  * Reload a users settings.
2240 2240
  */
2241
-function profileReloadUser()
2241
+function profileReloadUser ()
2242 2242
 {
2243 2243
 	global $modSettings, $context, $cur_profile;
2244 2244
 
@@ -2264,7 +2264,7 @@  discard block
 block discarded – undo
2264 2264
  *
2265 2265
  * @return bool|string
2266 2266
  */
2267
-function profileValidateSignature(&$value)
2267
+function profileValidateSignature (&$value)
2268 2268
 {
2269 2269
 	global $modSettings, $txt;
2270 2270
 
@@ -2509,7 +2509,7 @@  discard block
 block discarded – undo
2509 2509
  * @return false|string
2510 2510
  *
2511 2511
  */
2512
-function profileSaveAvatarData($value)
2512
+function profileSaveAvatarData ($value)
2513 2513
 {
2514 2514
 	global $profile_vars, $cur_profile, $context;
2515 2515
 
@@ -2550,7 +2550,7 @@  discard block
 block discarded – undo
2550 2550
  * @return bool
2551 2551
  * @throws \ElkArte\Exceptions\Exception at_least_one_admin
2552 2552
  */
2553
-function profileSaveGroups(&$value)
2553
+function profileSaveGroups (&$value)
2554 2554
 {
2555 2555
 	global $profile_vars, $old_profile, $context, $cur_profile;
2556 2556
 
@@ -2569,7 +2569,7 @@  discard block
 block discarded – undo
2569 2569
 				'is_protected' => 1,
2570 2570
 			)
2571 2571
 		)->fetch_callback(
2572
-			function ($row) use (&$protected_groups) {
2572
+			function($row) use (&$protected_groups) {
2573 2573
 				$protected_groups[] = $row['id_group'];
2574 2574
 			}
2575 2575
 		);
@@ -2675,7 +2675,7 @@  discard block
 block discarded – undo
2675 2675
  *
2676 2676
  * @return array
2677 2677
  */
2678
-function list_getUserWarnings($start, $items_per_page, $sort, $memID)
2678
+function list_getUserWarnings ($start, $items_per_page, $sort, $memID)
2679 2679
 {
2680 2680
 	$db = database();
2681 2681
 
@@ -2695,7 +2695,7 @@  discard block
 block discarded – undo
2695 2695
 			'warning' => 'warning',
2696 2696
 		)
2697 2697
 	)->fetch_callback(
2698
-		function ($row) use (&$previous_warnings) {
2698
+		function($row) use (&$previous_warnings) {
2699 2699
 			$previous_warnings[] = array(
2700 2700
 				'issuer' => array(
2701 2701
 					'id' => $row['id_member'],
@@ -2721,7 +2721,7 @@  discard block
 block discarded – undo
2721 2721
  * @param int $memID
2722 2722
  * @return int the number of warnings
2723 2723
  */
2724
-function list_getUserWarningCount($memID)
2724
+function list_getUserWarningCount ($memID)
2725 2725
 {
2726 2726
 	$db = database();
2727 2727
 
@@ -2755,7 +2755,7 @@  discard block
 block discarded – undo
2755 2755
  *
2756 2756
  * @return array
2757 2757
  */
2758
-function profileLoadAttachments($start, $items_per_page, $sort, $boardsAllowed, $memID, $exclude_boards = null)
2758
+function profileLoadAttachments ($start, $items_per_page, $sort, $boardsAllowed, $memID, $exclude_boards = null)
2759 2759
 {
2760 2760
 	global $board, $modSettings, $context;
2761 2761
 
@@ -2799,7 +2799,7 @@  discard block
 block discarded – undo
2799 2799
 			'limit' => $items_per_page,
2800 2800
 		)
2801 2801
 	)->fetch_callback(
2802
-		function ($row) use (&$attachments) {
2802
+		function($row) use (&$attachments) {
2803 2803
 			global $txt, $settings, $modSettings;
2804 2804
 
2805 2805
 			$row['subject'] = censor($row['subject']);
@@ -2843,7 +2843,7 @@  discard block
 block discarded – undo
2843 2843
  * @param int $memID
2844 2844
  * @return int number of attachments
2845 2845
  */
2846
-function getNumAttachments($boardsAllowed, $memID)
2846
+function getNumAttachments ($boardsAllowed, $memID)
2847 2847
 {
2848 2848
 	global $board, $modSettings, $context;
2849 2849
 
@@ -2888,7 +2888,7 @@  discard block
 block discarded – undo
2888 2888
  *
2889 2889
  * @return array
2890 2890
  */
2891
-function getUnwatchedBy($start, $items_per_page, $sort, $memID)
2891
+function getUnwatchedBy ($start, $items_per_page, $sort, $memID)
2892 2892
 {
2893 2893
 	$db = database();
2894 2894
 
@@ -2914,7 +2914,7 @@  discard block
 block discarded – undo
2914 2914
 			'limit' => $items_per_page,
2915 2915
 		)
2916 2916
 	)->fetch_callback(
2917
-		function ($row) use (&$topics) {
2917
+		function($row) use (&$topics) {
2918 2918
 			$topics[] = $row['id_topic'];
2919 2919
 		}
2920 2920
 	);
@@ -2936,7 +2936,7 @@  discard block
 block discarded – undo
2936 2936
 				'topics' => $topics,
2937 2937
 			)
2938 2938
 		)->fetch_callback(
2939
-			function ($row) use (&$topicsInfo) {
2939
+			function($row) use (&$topicsInfo) {
2940 2940
 				$topicsInfo[] = $row;
2941 2941
 			}
2942 2942
 		);
@@ -2951,7 +2951,7 @@  discard block
 block discarded – undo
2951 2951
  * @param int $memID
2952 2952
  * @return int
2953 2953
  */
2954
-function getNumUnwatchedBy($memID)
2954
+function getNumUnwatchedBy ($memID)
2955 2955
 {
2956 2956
 	$db = database();
2957 2957
 
@@ -2984,7 +2984,7 @@  discard block
 block discarded – undo
2984 2984
  * @param int|null $board
2985 2985
  * @return int
2986 2986
  */
2987
-function count_user_posts($memID, $board = null)
2987
+function count_user_posts ($memID, $board = null)
2988 2988
 {
2989 2989
 	global $modSettings;
2990 2990
 
@@ -3021,7 +3021,7 @@  discard block
 block discarded – undo
3021 3021
  * @param int|null $board
3022 3022
  * @return int
3023 3023
  */
3024
-function count_user_topics($memID, $board = null)
3024
+function count_user_topics ($memID, $board = null)
3025 3025
 {
3026 3026
 	global $modSettings;
3027 3027
 
@@ -3060,7 +3060,7 @@  discard block
 block discarded – undo
3060 3060
  *
3061 3061
  * @return array
3062 3062
  */
3063
-function findMinMaxUserMessage($memID, $board = null)
3063
+function findMinMaxUserMessage ($memID, $board = null)
3064 3064
 {
3065 3065
 	global $modSettings;
3066 3066
 
@@ -3098,7 +3098,7 @@  discard block
 block discarded – undo
3098 3098
  *
3099 3099
  * @return array
3100 3100
  */
3101
-function findMinMaxUserTopic($memID, $board = null)
3101
+function findMinMaxUserTopic ($memID, $board = null)
3102 3102
 {
3103 3103
 	global $modSettings;
3104 3104
 
@@ -3141,7 +3141,7 @@  discard block
 block discarded – undo
3141 3141
  *
3142 3142
  * @return array
3143 3143
  */
3144
-function load_user_posts($memID, $start, $count, $range_limit = '', $reverse = false, $board = null)
3144
+function load_user_posts ($memID, $start, $count, $range_limit = '', $reverse = false, $board = null)
3145 3145
 {
3146 3146
 	global $modSettings;
3147 3147
 
@@ -3214,7 +3214,7 @@  discard block
 block discarded – undo
3214 3214
  *
3215 3215
  * @return array
3216 3216
  */
3217
-function load_user_topics($memID, $start, $count, $range_limit = '', $reverse = false, $board = null)
3217
+function load_user_topics ($memID, $start, $count, $range_limit = '', $reverse = false, $board = null)
3218 3218
 {
3219 3219
 	global $modSettings;
3220 3220
 
@@ -3278,7 +3278,7 @@  discard block
 block discarded – undo
3278 3278
  *
3279 3279
  * @return array
3280 3280
  */
3281
-function getMemberGeneralPermissions($curGroups)
3281
+function getMemberGeneralPermissions ($curGroups)
3282 3282
 {
3283 3283
 	$db = database();
3284 3284
 	Txt::load('ManagePermissions');
@@ -3297,7 +3297,7 @@  discard block
 block discarded – undo
3297 3297
 			'newbie_group' => 4,
3298 3298
 		)
3299 3299
 	)->fetch_callback(
3300
-		function ($row) use (&$general_permission) {
3300
+		function($row) use (&$general_permission) {
3301 3301
 			global $txt;
3302 3302
 
3303 3303
 			// We don't know about this permission, it doesn't exist :P.
@@ -3356,7 +3356,7 @@  discard block
 block discarded – undo
3356 3356
  *
3357 3357
  * @return array
3358 3358
  */
3359
-function getMemberBoardPermissions($memID, $curGroups, $board = null)
3359
+function getMemberBoardPermissions ($memID, $curGroups, $board = null)
3360 3360
 {
3361 3361
 	$db = database();
3362 3362
 	Txt::load('ManagePermissions');
@@ -3381,7 +3381,7 @@  discard block
 block discarded – undo
3381 3381
 			'moderator_group' => 3,
3382 3382
 		)
3383 3383
 	)->fetch_callback(
3384
-		function ($row) use (&$board_permission, $board) {
3384
+		function($row) use (&$board_permission, $board) {
3385 3385
 			global $txt;
3386 3386
 
3387 3387
 			// We don't know about this permission, it doesn't exist :P.
@@ -3434,7 +3434,7 @@  discard block
 block discarded – undo
3434 3434
  *
3435 3435
  * @return array
3436 3436
  */
3437
-function getMembersIPs($memID)
3437
+function getMembersIPs ($memID)
3438 3438
 {
3439 3439
 	global $modSettings;
3440 3440
 
@@ -3480,7 +3480,7 @@  discard block
 block discarded – undo
3480 3480
 			'max_msg_member' => $max_msg_member ?? 0,
3481 3481
 		)
3482 3482
 	)->fetch_callback(
3483
-		function ($row) use (&$ips) {
3483
+		function($row) use (&$ips) {
3484 3484
 			$ips[] = $row['poster_ip'];
3485 3485
 		}
3486 3486
 	);
@@ -3497,7 +3497,7 @@  discard block
 block discarded – undo
3497 3497
 			'current_member' => $memID,
3498 3498
 		)
3499 3499
 	)->fetch_callback(
3500
-		function ($row) use (&$error_ips) {
3500
+		function($row) use (&$error_ips) {
3501 3501
 			$error_ips[] = $row['ip'];
3502 3502
 		}
3503 3503
 	);
@@ -3514,7 +3514,7 @@  discard block
 block discarded – undo
3514 3514
  *
3515 3515
  * @return array
3516 3516
  */
3517
-function getMembersInRange($ips, $memID)
3517
+function getMembersInRange ($ips, $memID)
3518 3518
 {
3519 3519
 	$db = database();
3520 3520
 
@@ -3533,7 +3533,7 @@  discard block
 block discarded – undo
3533 3533
 			'ip_list' => $ips,
3534 3534
 		)
3535 3535
 	)->fetch_callback(
3536
-		function ($row) use (&$message_members) {
3536
+		function($row) use (&$message_members) {
3537 3537
 			$message_members[] = $row['id_member'];
3538 3538
 		}
3539 3539
 	);
@@ -3550,7 +3550,7 @@  discard block
 block discarded – undo
3550 3550
 			'ip_list' => $ips,
3551 3551
 		)
3552 3552
 	)->fetch_callback(
3553
-		function ($row) use (&$message_members) {
3553
+		function($row) use (&$message_members) {
3554 3554
 			$message_members[] = $row['id_member'];
3555 3555
 		}
3556 3556
 	);
@@ -3579,7 +3579,7 @@  discard block
 block discarded – undo
3579 3579
  *
3580 3580
  * @return array
3581 3581
  */
3582
-function getMemberNotificationsProfile($member_id)
3582
+function getMemberNotificationsProfile ($member_id)
3583 3583
 {
3584 3584
 	global $modSettings, $context, $txt;
3585 3585
 
Please login to merge, or discard this patch.
sources/subs/Membergroups.subs.php 2 patches
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1525,11 +1525,11 @@
 block discarded – undo
1525 1525
 			$updates[] = $name . '={' . $known_properties[$name]['type'] . ':subs_' . $name . '}';
1526 1526
 			switch ($known_properties[$name]['type'])
1527 1527
 			{
1528
-				case 'string':
1529
-					$values['subs_' . $name] = Util::htmlspecialchars((string) $value);
1530
-					break;
1531
-				default:
1532
-					$values['subs_' . $name] = (int) $value;
1528
+			case 'string':
1529
+				$values['subs_' . $name] = Util::htmlspecialchars((string) $value);
1530
+				break;
1531
+			default:
1532
+				$values['subs_' . $name] = (int) $value;
1533 1533
 			}
1534 1534
 		}
1535 1535
 	}
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  * @return bool
33 33
  * @package Membergroups
34 34
  */
35
-function deleteMembergroups($groups)
35
+function deleteMembergroups ($groups)
36 36
 {
37 37
 	global $modSettings;
38 38
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 				'is_protected' => 1,
70 70
 			)
71 71
 		)->fetch_callback(
72
-			function ($row) use (&$protected_groups) {
72
+			function($row) use (&$protected_groups) {
73 73
 				$protected_groups[] = $row['id_group'];
74 74
 			}
75 75
 		);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			'additional_groups_explode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups),
166 166
 		)
167 167
 	)->fetch_callback(
168
-		function ($row) use (&$updates) {
168
+		function($row) use (&$updates) {
169 169
 			// Update each member information.
170 170
 			$updates[$row['additional_groups']][] = $row['id_member'];
171 171
 		}
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 			'member_groups_explode' => implode(', member_groups) != 0 OR FIND_IN_SET(', $groups),
189 189
 		)
190 190
 	)->fetch_callback(
191
-		function ($row) use (&$updates) {
191
+		function($row) use (&$updates) {
192 192
 			$updates[$row['member_groups']][] = $row['id_board'];
193 193
 		}
194 194
 	);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
  * @return bool
241 241
  * @package Membergroups
242 242
  */
243
-function removeMembersFromGroups($members, $groups = null, $permissionCheckDone = false)
243
+function removeMembersFromGroups ($members, $groups = null, $permissionCheckDone = false)
244 244
 {
245 245
 	global $modSettings;
246 246
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 				'is_protected' => 1,
364 364
 			)
365 365
 		)->fetch_callback(
366
-			function ($row) use (&$protected_groups) {
366
+			function($row) use (&$protected_groups) {
367 367
 				$protected_groups[] = $row['id_group'];
368 368
 			}
369 369
 		);
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 			'member_list' => $members,
391 391
 		)
392 392
 	)->fetch_callback(
393
-		function ($row) use ($group_names) {
393
+		function($row) use ($group_names) {
394 394
 			return array('group' => $group_names[$row['id_group']], 'member' => $row['id_member']);
395 395
 		}
396 396
 	);
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			'additional_groups_implode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups),
422 422
 		)
423 423
 	)->fetch_callback(
424
-		function ($row) use (&$updates, $groups, $group_names) {
424
+		function($row) use (&$updates, $groups, $group_names) {
425 425
 			// What log entries must we make for this one, eh?
426 426
 			foreach (explode(',', $row['additional_groups']) as $group)
427 427
 			{
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
  * @return bool success or failure
485 485
  * @package Membergroups
486 486
  */
487
-function addMembersToGroup($members, $group, $type = 'auto', $permissionCheckDone = false)
487
+function addMembersToGroup ($members, $group, $type = 'auto', $permissionCheckDone = false)
488 488
 {
489 489
 	$db = database();
490 490
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
  * @return bool
618 618
  * @package Membergroups
619 619
  */
620
-function listMembergroupMembers_Href(&$members, $membergroup, $limit = null)
620
+function listMembergroupMembers_Href (&$members, $membergroup, $limit = null)
621 621
 {
622 622
 	$db = database();
623 623
 
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 			'id_group' => $membergroup,
633 633
 		)
634 634
 	)->fetch_callback(
635
-		function ($row) use (&$members) {
635
+		function($row) use (&$members) {
636 636
 			$members[$row['id_member']] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>';
637 637
 		}
638 638
 	);
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
  *
654 654
  * @package Membergroups
655 655
  */
656
-function cache_getMembergroupList()
656
+function cache_getMembergroupList ()
657 657
 {
658 658
 	$db = database();
659 659
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 			'blank_string' => '',
674 674
 		)
675 675
 	)->fetch_callback(
676
-		function ($row) {
676
+		function($row) {
677 677
 			return '<a href="' . getUrl('group', ['action' => 'groups', 'sa' => 'members', 'group' => $row['id_group'], 'name' => $row['group_name']]) . '" ' . ($row['online_color'] ? 'style="color: ' . $row['online_color'] . '"' : '') . '>' . $row['group_name'] . '</a>';
678 678
 		}
679 679
 	);
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
  * @package Membergroups
704 704
  *
705 705
  */
706
-function list_getMembergroups($start, $items_per_page, $sort, $membergroup_type, $user_id, $include_hidden, $include_all = false, $aggregate = false, $count_permissions = false, $pid = null)
706
+function list_getMembergroups ($start, $items_per_page, $sort, $membergroup_type, $user_id, $include_hidden, $include_all = false, $aggregate = false, $count_permissions = false, $pid = null)
707 707
 {
708 708
 	global $txt, $context;
709 709
 
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 			'sort' => $sort,
774 774
 		)
775 775
 	)->fetch_callback(
776
-		function ($row) use (&$parent_groups, &$groups, &$group_ids, &$include_hidden, $count_permissions, $aggregate) {
776
+		function($row) use (&$parent_groups, &$groups, &$group_ids, &$include_hidden, $count_permissions, $aggregate) {
777 777
 			global $txt;
778 778
 
779 779
 			// We only list the groups they can see.
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 				'group_list' => $group_ids,
857 857
 			)
858 858
 		)->fetch_callback(
859
-			function ($row) use (&$groups) {
859
+			function($row) use (&$groups) {
860 860
 				$groups[$row['id_group']]['moderators'][] = '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>';
861 861
 			}
862 862
 		);
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 				'groups' => $parent_groups,
878 878
 			)
879 879
 		)->fetch_callback(
880
-			function ($row) use (&$all_group_names) {
880
+			function($row) use (&$all_group_names) {
881 881
 				$all_group_names[$row['id_group']] = $row['group_name'];
882 882
 			}
883 883
 		);
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
  * @return array
935 935
  * @package Membergroups
936 936
  */
937
-function membersInGroups($postGroups, $normalGroups = array(), $include_hidden = false, $include_moderators = false, $include_non_active = false)
937
+function membersInGroups ($postGroups, $normalGroups = array(), $include_hidden = false, $include_moderators = false, $include_non_active = false)
938 938
 {
939 939
 	$db = database();
940 940
 
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 				'active_members' => 1,
956 956
 			)
957 957
 		)->fetch_callback(
958
-			function ($row) use (&$groups) {
958
+			function($row) use (&$groups) {
959 959
 				$groups[$row['id_group']] = $row['member_count'];
960 960
 			}
961 961
 		);
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 				'active_members' => 1,
977 977
 			)
978 978
 		)->fetch_callback(
979
-			function ($row) use (&$groups) {
979
+			function($row) use (&$groups) {
980 980
 				$groups[$row['id_group']] = $row['member_count'];
981 981
 			}
982 982
 		);
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 					'blank_string' => '',
1002 1002
 				)
1003 1003
 			)->fetch_callback(
1004
-				function ($row) use (&$groups) {
1004
+				function($row) use (&$groups) {
1005 1005
 					if (isset($groups[$row['id_group']]))
1006 1006
 					{
1007 1007
 						$groups[$row['id_group']] += $row['member_count'];
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
  * @return array
1045 1045
  * @package Membergroups
1046 1046
  */
1047
-function membergroupsById($group_ids, $limit = 1, $detailed = false, $assignable = false)
1047
+function membergroupsById ($group_ids, $limit = 1, $detailed = false, $assignable = false)
1048 1048
 {
1049 1049
 	$db = database();
1050 1050
 
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 			'limit' => $limit,
1074 1074
 		)
1075 1075
 	)->fetch_callback(
1076
-		function ($row) use (&$groups) {
1076
+		function($row) use (&$groups) {
1077 1077
 			$groups[$row['id_group']] = $row;
1078 1078
 		}
1079 1079
 	);
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
  * @package Membergroups
1093 1093
  *
1094 1094
  */
1095
-function membergroupById($group_id, $detailed = false, $assignable = false)
1095
+function membergroupById ($group_id, $detailed = false, $assignable = false)
1096 1096
 {
1097 1097
 	$groups = membergroupsById(array($group_id), 1, $detailed, $assignable);
1098 1098
 
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
  * @return array
1127 1127
  * @package Membergroups
1128 1128
  */
1129
-function getBasicMembergroupData($includes = array(), $excludes = array(), $sort_order = null, $split = null)
1129
+function getBasicMembergroupData ($includes = array(), $excludes = array(), $sort_order = null, $split = null)
1130 1130
 {
1131 1131
 	global $txt, $modSettings;
1132 1132
 
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
  * @return array with ('id', 'name', 'member_count')
1270 1270
  * @package Membergroups
1271 1271
  */
1272
-function getGroups($groupList)
1272
+function getGroups ($groupList)
1273 1273
 {
1274 1274
 	global $txt;
1275 1275
 
@@ -1297,7 +1297,7 @@  discard block
 block discarded – undo
1297 1297
 			'group_list' => $groupList,
1298 1298
 		)
1299 1299
 	)->fetch_callback(
1300
-		function ($row) use (&$groups) {
1300
+		function($row) use (&$groups) {
1301 1301
 			$groups[$row['id_group']] = array(
1302 1302
 				'id' => $row['id_group'],
1303 1303
 				'name' => $row['group_name'],
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
  * @return int $id_group
1316 1316
  * @package Membergroups
1317 1317
  */
1318
-function getMaxGroupID()
1318
+function getMaxGroupID ()
1319 1319
 {
1320 1320
 	$db = database();
1321 1321
 
@@ -1339,7 +1339,7 @@  discard block
 block discarded – undo
1339 1339
  * @param string $type
1340 1340
  * @package Membergroups
1341 1341
  */
1342
-function createMembergroup($groupname, $minposts, $type)
1342
+function createMembergroup ($groupname, $minposts, $type)
1343 1343
 {
1344 1344
 	$db = database();
1345 1345
 
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
  * @todo another function with the same name in ManagePermissions.subs.php
1369 1369
  * @package Membergroups
1370 1370
  */
1371
-function copyPermissions($id_group, $copy_from, $illegal_permissions)
1371
+function copyPermissions ($id_group, $copy_from, $illegal_permissions)
1372 1372
 {
1373 1373
 	$db = database();
1374 1374
 
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
 			'copy_from' => $copy_from,
1384 1384
 		)
1385 1385
 	)->fetch_callback(
1386
-		function ($row) use (&$inserts, $illegal_permissions, $id_group) {
1386
+		function($row) use (&$inserts, $illegal_permissions, $id_group) {
1387 1387
 			if (empty($illegal_permissions) || !in_array($row['permission'], $illegal_permissions))
1388 1388
 			{
1389 1389
 				$inserts[] = array($id_group, $row['permission'], $row['add_deny']);
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
  * @param int $copy_from
1410 1410
  * @package Membergroups
1411 1411
  */
1412
-function copyBoardPermissions($id_group, $copy_from)
1412
+function copyBoardPermissions ($id_group, $copy_from)
1413 1413
 {
1414 1414
 	$db = database();
1415 1415
 
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
 			'copy_from' => $copy_from,
1423 1423
 		)
1424 1424
 	)->fetch_callback(
1425
-		function ($row) use ($id_group) {
1425
+		function($row) use ($id_group) {
1426 1426
 			return array($id_group, $row['id_profile'], $row['permission'], $row['add_deny']);
1427 1427
 		}
1428 1428
 	);
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
  * @param int $copy_from
1446 1446
  * @package Membergroups
1447 1447
  */
1448
-function updateCopiedGroup($id_group, $copy_from)
1448
+function updateCopiedGroup ($id_group, $copy_from)
1449 1449
 {
1450 1450
 	$db = database();
1451 1451
 
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
  * @param int $copy_id
1477 1477
  * @package Membergroups
1478 1478
  */
1479
-function updateInheritedGroup($id_group, $copy_id)
1479
+function updateInheritedGroup ($id_group, $copy_id)
1480 1480
 {
1481 1481
 	$db = database();
1482 1482
 
@@ -1500,7 +1500,7 @@  discard block
 block discarded – undo
1500 1500
  * @param mixed[] $properties
1501 1501
  * @package Membergroups
1502 1502
  */
1503
-function updateMembergroupProperties($properties)
1503
+function updateMembergroupProperties ($properties)
1504 1504
 {
1505 1505
 	$db = database();
1506 1506
 
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
  * @param string $access_list ('allow', 'deny')
1556 1556
  * @package Membergroups
1557 1557
  */
1558
-function detachGroupFromBoards($id_group, $boards, $access_list)
1558
+function detachGroupFromBoards ($id_group, $boards, $access_list)
1559 1559
 {
1560 1560
 	$db = database();
1561 1561
 
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 			'column' => $access_list === 'allow' ? 'member_groups' : 'deny_member_groups',
1573 1573
 		)
1574 1574
 	)->fetch_callback(
1575
-		function ($row) use ($id_group, $access_list, $db) {
1575
+		function($row) use ($id_group, $access_list, $db) {
1576 1576
 			$db->query('', '
1577 1577
 				UPDATE {db_prefix}boards
1578 1578
 				SET {raw:column} = {string:member_group_access}
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
  * @param string $access_list ('allow', 'deny')
1597 1597
  * @package Membergroups
1598 1598
  */
1599
-function assignGroupToBoards($id_group, $boards, $access_list)
1599
+function assignGroupToBoards ($id_group, $boards, $access_list)
1600 1600
 {
1601 1601
 	$db = database();
1602 1602
 
@@ -1622,7 +1622,7 @@  discard block
 block discarded – undo
1622 1622
  * @param int $id_group
1623 1623
  * @package Membergroups
1624 1624
  */
1625
-function detachDeletedGroupFromMembers($id_group)
1625
+function detachDeletedGroupFromMembers ($id_group)
1626 1626
 {
1627 1627
 	$db = database();
1628 1628
 
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
 			'current_group' => $id_group,
1648 1648
 		)
1649 1649
 	)->fetch_callback(
1650
-		function ($row) use (&$updates) {
1650
+		function($row) use (&$updates) {
1651 1651
 			$updates[$row['additional_groups']][] = $row['id_member'];
1652 1652
 		}
1653 1653
 	);
@@ -1666,7 +1666,7 @@  discard block
 block discarded – undo
1666 1666
  * @param int $id_group
1667 1667
  * @package Membergroups
1668 1668
  */
1669
-function setGroupToHidden($id_group)
1669
+function setGroupToHidden ($id_group)
1670 1670
 {
1671 1671
 	$db = database();
1672 1672
 
@@ -1682,7 +1682,7 @@  discard block
 block discarded – undo
1682 1682
 			'current_group' => $id_group,
1683 1683
 		)
1684 1684
 	)->fetch_callback(
1685
-		function ($row) use (&$updates) {
1685
+		function($row) use (&$updates) {
1686 1686
 			$updates[$row['additional_groups']][] = $row['id_member'];
1687 1687
 		}
1688 1688
 	);
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
  *
1711 1711
  * @package Membergroups
1712 1712
  */
1713
-function validateShowGroupMembership()
1713
+function validateShowGroupMembership ()
1714 1714
 {
1715 1715
 	global $modSettings;
1716 1716
 
@@ -1741,7 +1741,7 @@  discard block
 block discarded – undo
1741 1741
  * @param int $id_group
1742 1742
  * @package Membergroups
1743 1743
  */
1744
-function detachGroupModerators($id_group)
1744
+function detachGroupModerators ($id_group)
1745 1745
 {
1746 1746
 	$db = database();
1747 1747
 
@@ -1762,7 +1762,7 @@  discard block
 block discarded – undo
1762 1762
  * @return int[]
1763 1763
  * @package Membergroups
1764 1764
  */
1765
-function getIDMemberFromGroupModerators($moderators)
1765
+function getIDMemberFromGroupModerators ($moderators)
1766 1766
 {
1767 1767
 	$db = database();
1768 1768
 
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
 			'moderators' => $moderators,
1777 1777
 		)
1778 1778
 	)->fetch_callback(
1779
-		function ($row) {
1779
+		function($row) {
1780 1780
 			return $row['id_member'];
1781 1781
 		}
1782 1782
 	);
@@ -1789,7 +1789,7 @@  discard block
 block discarded – undo
1789 1789
  * @param int[] $group_moderators
1790 1790
  * @package Membergroups
1791 1791
  */
1792
-function assignGroupModerators($id_group, $group_moderators)
1792
+function assignGroupModerators ($id_group, $group_moderators)
1793 1793
 {
1794 1794
 	$db = database();
1795 1795
 
@@ -1814,7 +1814,7 @@  discard block
 block discarded – undo
1814 1814
  * @return array moderators as array(id => name)
1815 1815
  * @package Membergroups
1816 1816
  */
1817
-function getGroupModerators($id_group)
1817
+function getGroupModerators ($id_group)
1818 1818
 {
1819 1819
 	$db = database();
1820 1820
 
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
 			'current_group' => $id_group,
1831 1831
 		)
1832 1832
 	)->fetch_callback(
1833
-		function ($row) use (&$moderators) {
1833
+		function($row) use (&$moderators) {
1834 1834
 			$moderators[$row['id_member']] = $row['real_name'];
1835 1835
 		}
1836 1836
 	);
@@ -1847,7 +1847,7 @@  discard block
 block discarded – undo
1847 1847
  * @return array
1848 1848
  * @package Membergroups
1849 1849
  */
1850
-function getInheritableGroups($id_group = false)
1850
+function getInheritableGroups ($id_group = false)
1851 1851
 {
1852 1852
 	global $modSettings;
1853 1853
 
@@ -1872,7 +1872,7 @@  discard block
 block discarded – undo
1872 1872
 			'is_protected' => 1,
1873 1873
 		)
1874 1874
 	)->fetch_callback(
1875
-		function ($row) use (&$inheritable_groups) {
1875
+		function($row) use (&$inheritable_groups) {
1876 1876
 			$inheritable_groups[$row['id_group']] = $row['group_name'];
1877 1877
 		}
1878 1878
 	);
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
  * @return array
1887 1887
  * @package Membergroups
1888 1888
  */
1889
-function prepareMembergroupPermissions()
1889
+function prepareMembergroupPermissions ()
1890 1890
 {
1891 1891
 	global $modSettings, $txt;
1892 1892
 
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 			'min_posts' => -1,
1929 1929
 		)
1930 1930
 	)->fetch_callback(
1931
-		function ($row) use (&$profile_groups) {
1931
+		function($row) use (&$profile_groups) {
1932 1932
 			if ($row['id_parent'] == -2)
1933 1933
 			{
1934 1934
 				$profile_groups[$row['id_group']] = array(
@@ -1964,7 +1964,7 @@  discard block
 block discarded – undo
1964 1964
  * @return array
1965 1965
  * @package Membergroups
1966 1966
  */
1967
-function loadGroups($id_member, $show_hidden = false, $min_posts = -1)
1967
+function loadGroups ($id_member, $show_hidden = false, $min_posts = -1)
1968 1968
 {
1969 1969
 	$db = database();
1970 1970
 
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
 			'not_hidden' => 0,
1986 1986
 		)
1987 1987
 	)->fetch_callback(
1988
-		function ($row) use (&$groups, $show_hidden) {
1988
+		function($row) use (&$groups, $show_hidden) {
1989 1989
 			// Hide hidden groups!
1990 1990
 			if ($show_hidden && $row['hidden'] && !$row['can_moderate'])
1991 1991
 			{
@@ -2008,7 +2008,7 @@  discard block
 block discarded – undo
2008 2008
  * @return array
2009 2009
  * @package Membergroups
2010 2010
  */
2011
-function accessibleGroups()
2011
+function accessibleGroups ()
2012 2012
 {
2013 2013
 	$db = database();
2014 2014
 
@@ -2026,7 +2026,7 @@  discard block
 block discarded – undo
2026 2026
 			'moderator_group' => 3,
2027 2027
 		)
2028 2028
 	)->fetch_callback(
2029
-		function ($row) use (&$groups) {
2029
+		function($row) use (&$groups) {
2030 2030
 			// Hide hidden groups!
2031 2031
 			if ($row['hidden'] && !$row['can_moderate'] && !allowedTo('manage_membergroups'))
2032 2032
 			{
@@ -2052,7 +2052,7 @@  discard block
 block discarded – undo
2052 2052
  * @return int the count of group requests
2053 2053
  * @package Membergroups
2054 2054
  */
2055
-function list_getGroupRequestCount($where, $where_parameters)
2055
+function list_getGroupRequestCount ($where, $where_parameters)
2056 2056
 {
2057 2057
 	$db = database();
2058 2058
 
@@ -2088,7 +2088,7 @@  discard block
 block discarded – undo
2088 2088
  *   'time_submitted'
2089 2089
  * @package Membergroups
2090 2090
  */
2091
-function list_getGroupRequests($start, $items_per_page, $sort, $where, $where_parameters)
2091
+function list_getGroupRequests ($start, $items_per_page, $sort, $where, $where_parameters)
2092 2092
 {
2093 2093
 	$db = database();
2094 2094
 
@@ -2106,7 +2106,7 @@  discard block
 block discarded – undo
2106 2106
 			'sort' => $sort,
2107 2107
 		))
2108 2108
 	)->fetch_callback(
2109
-		function ($row) {
2109
+		function($row) {
2110 2110
 			return array(
2111 2111
 				'id' => $row['id_request'],
2112 2112
 				'member_link' => '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member'], 'name' => $row['real_name']]) . '">' . $row['real_name'] . '</a>',
@@ -2124,7 +2124,7 @@  discard block
 block discarded – undo
2124 2124
  * @param int[] $groups
2125 2125
  * @package Membergroups
2126 2126
  */
2127
-function deleteGroupRequests($groups)
2127
+function deleteGroupRequests ($groups)
2128 2128
 {
2129 2129
 	$db = database();
2130 2130
 
@@ -2146,7 +2146,7 @@  discard block
 block discarded – undo
2146 2146
  * @param string[]|null $parameter2 = null
2147 2147
  * @package Membergroups
2148 2148
  */
2149
-function updatePostGroupStats($members = null, $parameter2 = null)
2149
+function updatePostGroupStats ($members = null, $parameter2 = null)
2150 2150
 {
2151 2151
 	$db = database();
2152 2152
 
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
 				'min_posts' => -1,
2171 2171
 			)
2172 2172
 		)->fetch_callback(
2173
-			function ($row) use (&$postgroups) {
2173
+			function($row) use (&$postgroups) {
2174 2174
 				$postgroups[$row['id_group']] = $row['min_posts'];
2175 2175
 			}
2176 2176
 		);
@@ -2216,7 +2216,7 @@  discard block
 block discarded – undo
2216 2216
  * @param bool $ignore_protected To ignore protected groups
2217 2217
  * @return int[]
2218 2218
  */
2219
-function getUnassignableGroups($ignore_protected)
2219
+function getUnassignableGroups ($ignore_protected)
2220 2220
 {
2221 2221
 	$db = database();
2222 2222
 
@@ -2231,7 +2231,7 @@  discard block
 block discarded – undo
2231 2231
 			'is_protected' => 1,
2232 2232
 		)
2233 2233
 	)->fetch_callback(
2234
-		function ($row) {
2234
+		function($row) {
2235 2235
 			return $row['id_group'];
2236 2236
 		},
2237 2237
 		array(-1, 3)
@@ -2243,7 +2243,7 @@  discard block
 block discarded – undo
2243 2243
  *
2244 2244
  * @return array
2245 2245
  */
2246
-function getGroupsList()
2246
+function getGroupsList ()
2247 2247
 {
2248 2248
 	global $txt;
2249 2249
 
@@ -2276,7 +2276,7 @@  discard block
 block discarded – undo
2276 2276
 			'newbie_group' => 4,
2277 2277
 		)
2278 2278
 	)->fetch_callback(
2279
-		function ($row) use (&$member_groups) {
2279
+		function($row) use (&$member_groups) {
2280 2280
 			// We should skip the administrator group if they don't have the admin_forum permission!
2281 2281
 			if ($row['id_group'] == 1 && !allowedTo('admin_forum'))
2282 2282
 			{
Please login to merge, or discard this patch.
sources/subs/Cache.subs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  * @deprecated since 2.0
33 33
  *
34 34
  */
35
-function cache_quick_get($key, $file, $function, $params, $level = 1)
35
+function cache_quick_get ($key, $file, $function, $params, $level = 1)
36 36
 {
37 37
 	\ElkArte\Errors\Errors::instance()->log_deprecated('cache_quick_get()', '\\ElkArte\\Cache\\Cache::instance()->quick_get');
38 38
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
  * @deprecated since 2.0
56 56
  *
57 57
  */
58
-function cache_put_data($key, $value, $ttl = 120)
58
+function cache_put_data ($key, $value, $ttl = 120)
59 59
 {
60 60
 	\ElkArte\Errors\Errors::instance()->log_deprecated('cache_put_data()', '\\ElkArte\\Cache\\Cache::instance()->put');
61 61
 	Cache::instance()->put($key, $value, $ttl);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
  * @deprecated since 2.0
75 75
  *
76 76
  */
77
-function cache_get_data($key, $ttl = 120)
77
+function cache_get_data ($key, $ttl = 120)
78 78
 {
79 79
 	\ElkArte\Errors\Errors::instance()->log_deprecated('cache_get_data()', '\\ElkArte\\Cache\\Cache::instance()->get');
80 80
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
  * @deprecated since 2.0
96 96
  *
97 97
  */
98
-function clean_cache($type = '')
98
+function clean_cache ($type = '')
99 99
 {
100 100
 	\ElkArte\Errors\Errors::instance()->log_deprecated('clean_cache()', '\\ElkArte\\Cache\\Cache::instance()->clean');
101 101
 	Cache::instance()->clean($type);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
  *
116 116
  * @return mixed[]
117 117
  */
118
-function loadCacheEngines($supported_only = true)
118
+function loadCacheEngines ($supported_only = true)
119 119
 {
120 120
 	$engines = array();
121 121
 
Please login to merge, or discard this patch.
sources/subs/MessageIcons.subs.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
sources/subs/MembersOnline.subs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
sources/subs/Likes.subs.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.
sources/subs/Smileys.subs.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
sources/subs/Moderation.subs.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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?
Please login to merge, or discard this patch.
sources/subs/PaidSubscriptions.subs.php 3 patches
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -220,20 +220,20 @@  discard block
 block discarded – undo
220 220
 	{
221 221
 		switch ($renewal)
222 222
 		{
223
-			case 'D':
224
-				$duration = 86400;
225
-				break;
226
-			case 'W':
227
-				$duration = 604800;
228
-				break;
229
-			case 'M':
230
-				$duration = 2629743;
231
-				break;
232
-			case 'Y':
233
-				$duration = 31556926;
234
-				break;
235
-			default:
236
-				break;
223
+		case 'D':
224
+			$duration = 86400;
225
+			break;
226
+		case 'W':
227
+			$duration = 604800;
228
+			break;
229
+		case 'M':
230
+			$duration = 2629743;
231
+			break;
232
+		case 'Y':
233
+			$duration = 31556926;
234
+			break;
235
+		default:
236
+			break;
237 237
 		}
238 238
 	}
239 239
 
@@ -505,24 +505,24 @@  discard block
 block discarded – undo
505 505
 				$length = $match[1] . ' ';
506 506
 				switch ($match[2])
507 507
 				{
508
-					case 'D':
509
-						$length .= $txt['paid_mod_span_days'];
510
-						$num_length *= 86400;
511
-						break;
512
-					case 'W':
513
-						$length .= $txt['paid_mod_span_weeks'];
514
-						$num_length *= 604800;
515
-						break;
516
-					case 'M':
517
-						$length .= $txt['paid_mod_span_months'];
518
-						$num_length *= 2629743;
519
-						break;
520
-					case 'Y':
521
-						$length .= $txt['paid_mod_span_years'];
522
-						$num_length *= 31556926;
523
-						break;
524
-					default:
525
-						$length = '??';
508
+				case 'D':
509
+					$length .= $txt['paid_mod_span_days'];
510
+					$num_length *= 86400;
511
+					break;
512
+				case 'W':
513
+					$length .= $txt['paid_mod_span_weeks'];
514
+					$num_length *= 604800;
515
+					break;
516
+				case 'M':
517
+					$length .= $txt['paid_mod_span_months'];
518
+					$num_length *= 2629743;
519
+					break;
520
+				case 'Y':
521
+					$length .= $txt['paid_mod_span_years'];
522
+					$num_length *= 31556926;
523
+					break;
524
+				default:
525
+					$length = '??';
526 526
 				}
527 527
 			}
528 528
 
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']]))
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1377,11 +1377,13 @@
 block discarded – undo
1377 1377
 		{
1378 1378
 			// If we revert to the old id-group we need to ensure it wasn't from a subscription.
1379 1379
 			foreach ($context['subscriptions'] as $id => $group)
1380
-				// It was? Make them a regular member then!
1380
+			{
1381
+							// It was? Make them a regular member then!
1381 1382
 			{
1382 1383
 				if ($group['prim_group'] == $member['id_group'])
1383 1384
 				{
1384 1385
 					$member['id_group'] = 0;
1386
+			}
1385 1387
 				}
1386 1388
 			}
1387 1389
 
Please login to merge, or discard this patch.