Completed
Pull Request — release-2.1 (#4959)
by Jeremy
07:43
created
Sources/RepairBoards.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 					LEFT JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
247 247
 				WHERE t.id_topic IS NULL
248 248
 				GROUP BY m.id_topic, m.id_board',
249
-			'fix_processing' => function ($row) use ($smcFunc)
249
+			'fix_processing' => function($row) use ($smcFunc)
250 250
 			{
251 251
 				global $salvageBoardID;
252 252
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 			// Remove all topics that have zero messages in the messages table.
333 333
 			'fix_collect' => array(
334 334
 				'index' => 'id_topic',
335
-				'process' => function ($topics) use ($smcFunc)
335
+				'process' => function($topics) use ($smcFunc)
336 336
 				{
337 337
 					$smcFunc['db_query']('', '
338 338
 						DELETE FROM {db_prefix}topics
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 				  AND p.id_poll IS NULL
370 370
 				GROUP BY o.id_poll, t.id_topic, t.id_board, t.id_member_started, m.member_name
371 371
 				  ',
372
-			'fix_processing' => function ($row) use ($smcFunc, $txt)
372
+			'fix_processing' => function($row) use ($smcFunc, $txt)
373 373
 			{
374 374
 				global $salvageBoardID;
375 375
 
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 					LEFT JOIN {db_prefix}topics AS t ON (t.id_poll = p.id_poll)
507 507
 				WHERE p.id_poll BETWEEN {STEP_LOW} AND {STEP_HIGH}
508 508
 					AND t.id_poll IS NULL',
509
-			'fix_processing' => function ($row) use ($smcFunc, $txt)
509
+			'fix_processing' => function($row) use ($smcFunc, $txt)
510 510
 			{
511 511
 				global $salvageBoardID;
512 512
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 				WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH}
618 618
 				GROUP BY t.id_topic, t.id_first_msg, t.id_last_msg, t.approved, mf.approved
619 619
 				ORDER BY t.id_topic',
620
-			'fix_processing' => function ($row) use ($smcFunc)
620
+			'fix_processing' => function($row) use ($smcFunc)
621 621
 			{
622 622
 				$row['firstmsg_approved'] = (int) $row['firstmsg_approved'];
623 623
 				$row['myid_first_msg'] = (int) $row['myid_first_msg'];
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 					)
647 647
 				);
648 648
 			},
649
-			'message_function' => function ($row) use ($txt, &$context)
649
+			'message_function' => function($row) use ($txt, &$context)
650 650
 			{
651 651
 				// A pretend error?
652 652
 				if ($row['id_first_msg'] == $row['myid_first_msg'] && $row['id_last_msg'] == $row['myid_last_msg'] && $row['approved'] == $row['firstmsg_approved'])
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 				WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH}
681 681
 				GROUP BY t.id_topic, t.num_replies, mf.approved
682 682
 				ORDER BY t.id_topic',
683
-			'fix_processing' => function ($row)
683
+			'fix_processing' => function($row)
684 684
 			{
685 685
 				global $smcFunc;
686 686
 				$row['my_num_replies'] = (int) $row['my_num_replies'];
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 					)
700 700
 				);
701 701
 			},
702
-			'message_function' => function ($row)
702
+			'message_function' => function($row)
703 703
 			{
704 704
 				global $txt, $context;
705 705
 
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 				GROUP BY t.id_topic, t.unapproved_posts
731 731
 				HAVING unapproved_posts != COUNT(mu.id_msg)
732 732
 				ORDER BY t.id_topic',
733
-			'fix_processing' => function ($row)
733
+			'fix_processing' => function($row)
734 734
 			{
735 735
 				global $smcFunc;
736 736
 				$row['my_unapproved_posts'] = (int) $row['my_unapproved_posts'];
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 				WHERE b.id_board IS NULL
771 771
 					AND t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH}
772 772
 				GROUP BY t.id_board',
773
-			'fix_processing' => function ($row)
773
+			'fix_processing' => function($row)
774 774
 			{
775 775
 				global $smcFunc, $salvageCatID, $txt;
776 776
 				createSalvageArea();
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 				ORDER BY b.id_cat, b.id_board',
818 818
 			'fix_collect' => array(
819 819
 				'index' => 'id_cat',
820
-				'process' => function ($cats)
820
+				'process' => function($cats)
821 821
 				{
822 822
 					global $smcFunc, $salvageCatID;
823 823
 					createSalvageArea();
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 			// Last step-make sure all non-guest posters still exist.
854 854
 			'fix_collect' => array(
855 855
 				'index' => 'id_msg',
856
-				'process' => function ($msgs)
856
+				'process' => function($msgs)
857 857
 				{
858 858
 					global $smcFunc;
859 859
 					$smcFunc['db_query']('', '
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
 				ORDER BY b.id_parent, b.id_board',
881 881
 			'fix_collect' => array(
882 882
 				'index' => 'id_parent',
883
-				'process' => function ($parents)
883
+				'process' => function($parents)
884 884
 				{
885 885
 					global $smcFunc, $salvageBoardID, $salvageCatID;
886 886
 
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
 					AND p.id_poll IS NULL',
918 918
 			'fix_collect' => array(
919 919
 				'index' => 'id_poll',
920
-				'process' => function ($polls)
920
+				'process' => function($polls)
921 921
 				{
922 922
 					global $smcFunc;
923 923
 					$smcFunc['db_query']('', '
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 				ORDER BY cal.id_topic',
950 950
 			'fix_collect' => array(
951 951
 				'index' => 'id_topic',
952
-				'process' => function ($events)
952
+				'process' => function($events)
953 953
 				{
954 954
 					global $smcFunc;
955 955
 					$smcFunc['db_query']('', '
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
 					AND lt.id_member BETWEEN {STEP_LOW} AND {STEP_HIGH}',
980 980
 			'fix_collect' => array(
981 981
 				'index' => 'id_topic',
982
-				'process' => function ($topics)
982
+				'process' => function($topics)
983 983
 				{
984 984
 					global $smcFunc;
985 985
 					$smcFunc['db_query']('', '
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 				GROUP BY lt.id_member',
1010 1010
 			'fix_collect' => array(
1011 1011
 				'index' => 'id_member',
1012
-				'process' => function ($members)
1012
+				'process' => function($members)
1013 1013
 				{
1014 1014
 					global $smcFunc;
1015 1015
 					$smcFunc['db_query']('', '
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
 				GROUP BY lb.id_board',
1040 1040
 			'fix_collect' => array(
1041 1041
 				'index' => 'id_board',
1042
-				'process' => function ($boards)
1042
+				'process' => function($boards)
1043 1043
 				{
1044 1044
 					global $smcFunc;
1045 1045
 					$smcFunc['db_query']('', '
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
 				GROUP BY lb.id_member',
1070 1070
 			'fix_collect' => array(
1071 1071
 				'index' => 'id_member',
1072
-				'process' => function ($members) use ($smcFunc)
1072
+				'process' => function($members) use ($smcFunc)
1073 1073
 				{
1074 1074
 					$smcFunc['db_query']('', '
1075 1075
 						DELETE FROM {db_prefix}log_boards
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
 				GROUP BY lmr.id_board',
1099 1099
 			'fix_collect' => array(
1100 1100
 				'index' => 'id_board',
1101
-				'process' => function ($boards) use ($smcFunc)
1101
+				'process' => function($boards) use ($smcFunc)
1102 1102
 				{
1103 1103
 					$smcFunc['db_query']('', '
1104 1104
 						DELETE FROM {db_prefix}log_mark_read
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
 				GROUP BY lmr.id_member',
1128 1128
 			'fix_collect' => array(
1129 1129
 				'index' => 'id_member',
1130
-				'process' => function ($members) use ($smcFunc)
1130
+				'process' => function($members) use ($smcFunc)
1131 1131
 				{
1132 1132
 					$smcFunc['db_query']('', '
1133 1133
 						DELETE FROM {db_prefix}log_mark_read
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 				GROUP BY pmr.id_pm',
1157 1157
 			'fix_collect' => array(
1158 1158
 				'index' => 'id_pm',
1159
-				'process' => function ($pms) use ($smcFunc)
1159
+				'process' => function($pms) use ($smcFunc)
1160 1160
 				{
1161 1161
 					$smcFunc['db_query']('', '
1162 1162
 						DELETE FROM {db_prefix}pm_recipients
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 				GROUP BY pmr.id_member',
1187 1187
 			'fix_collect' => array(
1188 1188
 				'index' => 'id_member',
1189
-				'process' => function ($members)
1189
+				'process' => function($members)
1190 1190
 				{
1191 1191
 					global $smcFunc;
1192 1192
 					$smcFunc['db_query']('', '
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
 					AND mem.id_member IS NULL',
1217 1217
 			'fix_collect' => array(
1218 1218
 				'index' => 'id_pm',
1219
-				'process' => function ($guestMessages)
1219
+				'process' => function($guestMessages)
1220 1220
 				{
1221 1221
 					global $smcFunc;
1222 1222
 					$smcFunc['db_query']('', '
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 				GROUP BY ln.id_member',
1247 1247
 			'fix_collect' => array(
1248 1248
 				'index' => 'id_member',
1249
-				'process' => function ($members) use ($smcFunc)
1249
+				'process' => function($members) use ($smcFunc)
1250 1250
 				{
1251 1251
 					$smcFunc['db_query']('', '
1252 1252
 						DELETE FROM {db_prefix}log_notify
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
 					LEFT JOIN {db_prefix}log_search_subjects AS lss ON (lss.id_topic = t.id_topic)
1274 1274
 				WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH}
1275 1275
 					AND lss.id_topic IS NULL',
1276
-			'fix_full_processing' => function ($result)
1276
+			'fix_full_processing' => function($result)
1277 1277
 			{
1278 1278
 				global $smcFunc;
1279 1279
 
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
 						array('word', 'id_topic')
1303 1303
 					);
1304 1304
 			},
1305
-			'message_function' => function ($row)
1305
+			'message_function' => function($row)
1306 1306
 			{
1307 1307
 				global $txt, $context;
1308 1308
 
@@ -1330,7 +1330,7 @@  discard block
 block discarded – undo
1330 1330
 					AND t.id_topic IS NULL',
1331 1331
 			'fix_collect' => array(
1332 1332
 				'index' => 'id_topic',
1333
-				'process' => function ($deleteTopics)
1333
+				'process' => function($deleteTopics)
1334 1334
 				{
1335 1335
 					global $smcFunc;
1336 1336
 					$smcFunc['db_query']('', '
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
 					AND mem.id_member IS NULL',
1361 1361
 			'fix_collect' => array(
1362 1362
 				'index' => 'id_member',
1363
-				'process' => function ($members)
1363
+				'process' => function($members)
1364 1364
 				{
1365 1365
 					global $smcFunc;
1366 1366
 					$smcFunc['db_query']('', '
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
 					AND p.id_poll IS NULL',
1390 1390
 			'fix_collect' => array(
1391 1391
 				'index' => 'id_poll',
1392
-				'process' => function ($polls)
1392
+				'process' => function($polls)
1393 1393
 				{
1394 1394
 					global $smcFunc;
1395 1395
 					$smcFunc['db_query']('', '
@@ -1418,7 +1418,7 @@  discard block
 block discarded – undo
1418 1418
 					AND lrc.id_report IS NULL',
1419 1419
 			'fix_collect' => array(
1420 1420
 				'index' => 'id_report',
1421
-				'process' => function ($reports)
1421
+				'process' => function($reports)
1422 1422
 				{
1423 1423
 					global $smcFunc;
1424 1424
 					$smcFunc['db_query']('', '
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
 					AND lr.id_report IS NULL',
1448 1448
 			'fix_collect' => array(
1449 1449
 				'index' => 'id_report',
1450
-				'process' => function ($reports)
1450
+				'process' => function($reports)
1451 1451
 				{
1452 1452
 					global $smcFunc;
1453 1453
 					$smcFunc['db_query']('', '
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
 				GROUP BY lgr.id_member',
1478 1478
 			'fix_collect' => array(
1479 1479
 				'index' => 'id_member',
1480
-				'process' => function ($members)
1480
+				'process' => function($members)
1481 1481
 				{
1482 1482
 					global $smcFunc;
1483 1483
 					$smcFunc['db_query']('', '
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
 				GROUP BY lgr.id_group',
1508 1508
 			'fix_collect' => array(
1509 1509
 				'index' => 'id_group',
1510
-				'process' => function ($groups)
1510
+				'process' => function($groups)
1511 1511
 				{
1512 1512
 					global $smcFunc;
1513 1513
 					$smcFunc['db_query']('', '
Please login to merge, or discard this patch.