@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | { |
182 | 182 | collapsedDiv.show(\'slow\'); |
183 | 183 | icon.removeClass(\'toggle_down\').addClass(\'toggle_up\'); |
184 | - icon.prop(\'title\', '. JavaScriptEscape($txt['hide']) .'); |
|
184 | + icon.prop(\'title\', '. JavaScriptEscape($txt['hide']) . '); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | else |
188 | 188 | { |
189 | 189 | collapsedDiv.hide(\'slow\'); |
190 | 190 | icon.removeClass(\'toggle_up\').addClass(\'toggle_down\'); |
191 | - icon.prop(\'title\', '. JavaScriptEscape($txt['show']) .'); |
|
191 | + icon.prop(\'title\', '. JavaScriptEscape($txt['show']) . '); |
|
192 | 192 | } |
193 | 193 | });', true); |
194 | 194 | } |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | |
642 | 642 | // Setup the correct template, even though I'll admit we ain't downloading ;) |
643 | 643 | $context['sub_template'] = 'downloaded'; |
644 | - $allowext = array('.zip','.tgz','.gz'); |
|
644 | + $allowext = array('.zip', '.tgz', '.gz'); |
|
645 | 645 | // @todo Use FTP if the Packages directory is not writable. |
646 | 646 | |
647 | 647 | // Check the file was even sent! |
@@ -653,13 +653,13 @@ discard block |
||
653 | 653 | // Make sure it has a sane filename. |
654 | 654 | $_FILES['package']['name'] = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $_FILES['package']['name']); |
655 | 655 | $extension = substr(strrchr(strtolower($_FILES['package']['name']), '.'), 0); |
656 | - if(!in_array($extension, $allowext)) |
|
656 | + if (!in_array($extension, $allowext)) |
|
657 | 657 | { |
658 | 658 | fatal_lang_error('package_upload_error_supports', false, array('zip, tgz, tar.gz')); |
659 | 659 | } |
660 | 660 | |
661 | 661 | // We only need the filename... |
662 | - $extension = ($extension == '.gz') ? '.tar.gz' : $extension ; |
|
662 | + $extension = ($extension == '.gz') ? '.tar.gz' : $extension; |
|
663 | 663 | $packageName = time() . $extension; |
664 | 664 | |
665 | 665 | // Setup the destination and throw an error if the file is already there! |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $query_where = array(); |
167 | 167 | $query_params = $search_data['params']; |
168 | 168 | |
169 | - if( $smcFunc['db_title'] == "PostgreSQL") |
|
169 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
170 | 170 | $modSettings['search_simple_fulltext'] = true; |
171 | 171 | |
172 | 172 | if ($query_params['id_search']) |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | // if we have bool terms to search, add them in |
247 | 247 | if ($query_params['boolean_match']) |
248 | 248 | { |
249 | - if($smcFunc['db_title'] == "PostgreSQL") |
|
249 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
250 | 250 | { |
251 | 251 | $language_ftx = $smcFunc['db_search_language'](); |
252 | 252 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } |
259 | 259 | } |
260 | 260 | |
261 | - $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? ( ' |
|
261 | + $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? (' |
|
262 | 262 | INSERT IGNORE INTO {db_prefix}' . $search_data['insert_into'] . ' |
263 | 263 | (' . implode(', ', array_keys($query_select)) . ')') : '') . ' |
264 | 264 | SELECT ' . implode(', ', $query_select) . ' |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | LEFT JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic) |
233 | 233 | WHERE t.id_topic IS NULL |
234 | 234 | GROUP BY m.id_topic, m.id_board', |
235 | - 'fix_processing' => function ($row) use ($smcFunc) |
|
235 | + 'fix_processing' => function($row) use ($smcFunc) |
|
236 | 236 | { |
237 | 237 | global $salvageBoardID; |
238 | 238 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | // Remove all topics that have zero messages in the messages table. |
319 | 319 | 'fix_collect' => array( |
320 | 320 | 'index' => 'id_topic', |
321 | - 'process' => function ($topics) use ($smcFunc) |
|
321 | + 'process' => function($topics) use ($smcFunc) |
|
322 | 322 | { |
323 | 323 | $smcFunc['db_query']('', ' |
324 | 324 | DELETE FROM {db_prefix}topics |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | AND p.id_poll IS NULL |
356 | 356 | GROUP BY o.id_poll, t.id_topic, t.id_board, t.id_member_started, m.member_name |
357 | 357 | ', |
358 | - 'fix_processing' => function ($row) use ($smcFunc, $txt) |
|
358 | + 'fix_processing' => function($row) use ($smcFunc, $txt) |
|
359 | 359 | { |
360 | 360 | global $salvageBoardID; |
361 | 361 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | { |
367 | 367 | // Only if we don't have a reasonable idea of where to put it. |
368 | 368 | createSalvageArea(); |
369 | - $row['id_board'] = (int)$salvageBoardID; |
|
369 | + $row['id_board'] = (int) $salvageBoardID; |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | if (empty($row['id_topic'])) |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | LEFT JOIN {db_prefix}topics AS t ON (t.id_poll = p.id_poll) |
493 | 493 | WHERE p.id_poll BETWEEN {STEP_LOW} AND {STEP_HIGH} |
494 | 494 | AND t.id_poll IS NULL', |
495 | - 'fix_processing' => function ($row) use ($smcFunc, $txt) |
|
495 | + 'fix_processing' => function($row) use ($smcFunc, $txt) |
|
496 | 496 | { |
497 | 497 | global $salvageBoardID; |
498 | 498 | |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
604 | 604 | GROUP BY t.id_topic, t.id_first_msg, t.id_last_msg, t.approved, mf.approved |
605 | 605 | ORDER BY t.id_topic', |
606 | - 'fix_processing' => function ($row) use ($smcFunc) |
|
606 | + 'fix_processing' => function($row) use ($smcFunc) |
|
607 | 607 | { |
608 | 608 | $row['firstmsg_approved'] = (int) $row['firstmsg_approved']; |
609 | 609 | $row['myid_first_msg'] = (int) $row['myid_first_msg']; |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | ) |
633 | 633 | ); |
634 | 634 | }, |
635 | - 'message_function' => function ($row) use ($txt, &$context) |
|
635 | + 'message_function' => function($row) use ($txt, &$context) |
|
636 | 636 | { |
637 | 637 | // A pretend error? |
638 | 638 | if ($row['id_first_msg'] == $row['myid_first_msg'] && $row['id_last_msg'] == $row['myid_last_msg'] && $row['approved'] == $row['firstmsg_approved']) |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
667 | 667 | GROUP BY t.id_topic, t.num_replies, mf.approved |
668 | 668 | ORDER BY t.id_topic', |
669 | - 'fix_processing' => function ($row) |
|
669 | + 'fix_processing' => function($row) |
|
670 | 670 | { |
671 | 671 | global $smcFunc; |
672 | 672 | $row['my_num_replies'] = (int) $row['my_num_replies']; |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | ) |
686 | 686 | ); |
687 | 687 | }, |
688 | - 'message_function' => function ($row) |
|
688 | + 'message_function' => function($row) |
|
689 | 689 | { |
690 | 690 | global $txt, $context; |
691 | 691 | |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | GROUP BY t.id_topic, t.unapproved_posts |
717 | 717 | HAVING unapproved_posts != COUNT(mu.id_msg) |
718 | 718 | ORDER BY t.id_topic', |
719 | - 'fix_processing' => function ($row) |
|
719 | + 'fix_processing' => function($row) |
|
720 | 720 | { |
721 | 721 | global $smcFunc; |
722 | 722 | $row['my_unapproved_posts'] = (int) $row['my_unapproved_posts']; |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | WHERE b.id_board IS NULL |
757 | 757 | AND t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
758 | 758 | GROUP BY t.id_board', |
759 | - 'fix_processing' => function ($row) |
|
759 | + 'fix_processing' => function($row) |
|
760 | 760 | { |
761 | 761 | global $smcFunc, $salvageCatID, $txt; |
762 | 762 | createSalvageArea(); |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | ORDER BY b.id_cat, b.id_board', |
804 | 804 | 'fix_collect' => array( |
805 | 805 | 'index' => 'id_cat', |
806 | - 'process' => function ($cats) |
|
806 | + 'process' => function($cats) |
|
807 | 807 | { |
808 | 808 | global $smcFunc, $salvageCatID; |
809 | 809 | createSalvageArea(); |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | // Last step-make sure all non-guest posters still exist. |
840 | 840 | 'fix_collect' => array( |
841 | 841 | 'index' => 'id_msg', |
842 | - 'process' => function ($msgs) |
|
842 | + 'process' => function($msgs) |
|
843 | 843 | { |
844 | 844 | global $smcFunc; |
845 | 845 | $smcFunc['db_query']('', ' |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | ORDER BY b.id_parent, b.id_board', |
867 | 867 | 'fix_collect' => array( |
868 | 868 | 'index' => 'id_parent', |
869 | - 'process' => function ($parents) |
|
869 | + 'process' => function($parents) |
|
870 | 870 | { |
871 | 871 | global $smcFunc, $salvageBoardID, $salvageCatID; |
872 | 872 | createSalvageArea(); |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | AND p.id_poll IS NULL', |
901 | 901 | 'fix_collect' => array( |
902 | 902 | 'index' => 'id_poll', |
903 | - 'process' => function ($polls) |
|
903 | + 'process' => function($polls) |
|
904 | 904 | { |
905 | 905 | global $smcFunc; |
906 | 906 | $smcFunc['db_query']('', ' |
@@ -932,7 +932,7 @@ discard block |
||
932 | 932 | ORDER BY cal.id_topic', |
933 | 933 | 'fix_collect' => array( |
934 | 934 | 'index' => 'id_topic', |
935 | - 'process' => function ($events) |
|
935 | + 'process' => function($events) |
|
936 | 936 | { |
937 | 937 | global $smcFunc; |
938 | 938 | $smcFunc['db_query']('', ' |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | AND lt.id_member BETWEEN {STEP_LOW} AND {STEP_HIGH}', |
963 | 963 | 'fix_collect' => array( |
964 | 964 | 'index' => 'id_topic', |
965 | - 'process' => function ($topics) |
|
965 | + 'process' => function($topics) |
|
966 | 966 | { |
967 | 967 | global $smcFunc; |
968 | 968 | $smcFunc['db_query']('', ' |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | GROUP BY lt.id_member', |
993 | 993 | 'fix_collect' => array( |
994 | 994 | 'index' => 'id_member', |
995 | - 'process' => function ($members) |
|
995 | + 'process' => function($members) |
|
996 | 996 | { |
997 | 997 | global $smcFunc; |
998 | 998 | $smcFunc['db_query']('', ' |
@@ -1022,7 +1022,7 @@ discard block |
||
1022 | 1022 | GROUP BY lb.id_board', |
1023 | 1023 | 'fix_collect' => array( |
1024 | 1024 | 'index' => 'id_board', |
1025 | - 'process' => function ($boards) |
|
1025 | + 'process' => function($boards) |
|
1026 | 1026 | { |
1027 | 1027 | global $smcFunc; |
1028 | 1028 | $smcFunc['db_query']('', ' |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | GROUP BY lb.id_member', |
1053 | 1053 | 'fix_collect' => array( |
1054 | 1054 | 'index' => 'id_member', |
1055 | - 'process' => function ($members) use ($smcFunc) |
|
1055 | + 'process' => function($members) use ($smcFunc) |
|
1056 | 1056 | { |
1057 | 1057 | $smcFunc['db_query']('', ' |
1058 | 1058 | DELETE FROM {db_prefix}log_boards |
@@ -1081,7 +1081,7 @@ discard block |
||
1081 | 1081 | GROUP BY lmr.id_board', |
1082 | 1082 | 'fix_collect' => array( |
1083 | 1083 | 'index' => 'id_board', |
1084 | - 'process' => function ($boards) use ($smcFunc) |
|
1084 | + 'process' => function($boards) use ($smcFunc) |
|
1085 | 1085 | { |
1086 | 1086 | $smcFunc['db_query']('', ' |
1087 | 1087 | DELETE FROM {db_prefix}log_mark_read |
@@ -1110,7 +1110,7 @@ discard block |
||
1110 | 1110 | GROUP BY lmr.id_member', |
1111 | 1111 | 'fix_collect' => array( |
1112 | 1112 | 'index' => 'id_member', |
1113 | - 'process' => function ($members) use ($smcFunc) |
|
1113 | + 'process' => function($members) use ($smcFunc) |
|
1114 | 1114 | { |
1115 | 1115 | $smcFunc['db_query']('', ' |
1116 | 1116 | DELETE FROM {db_prefix}log_mark_read |
@@ -1139,7 +1139,7 @@ discard block |
||
1139 | 1139 | GROUP BY pmr.id_pm', |
1140 | 1140 | 'fix_collect' => array( |
1141 | 1141 | 'index' => 'id_pm', |
1142 | - 'process' => function ($pms) use ($smcFunc) |
|
1142 | + 'process' => function($pms) use ($smcFunc) |
|
1143 | 1143 | { |
1144 | 1144 | $smcFunc['db_query']('', ' |
1145 | 1145 | DELETE FROM {db_prefix}pm_recipients |
@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | GROUP BY pmr.id_member', |
1170 | 1170 | 'fix_collect' => array( |
1171 | 1171 | 'index' => 'id_member', |
1172 | - 'process' => function ($members) |
|
1172 | + 'process' => function($members) |
|
1173 | 1173 | { |
1174 | 1174 | global $smcFunc; |
1175 | 1175 | $smcFunc['db_query']('', ' |
@@ -1199,7 +1199,7 @@ discard block |
||
1199 | 1199 | AND mem.id_member IS NULL', |
1200 | 1200 | 'fix_collect' => array( |
1201 | 1201 | 'index' => 'id_pm', |
1202 | - 'process' => function ($guestMessages) |
|
1202 | + 'process' => function($guestMessages) |
|
1203 | 1203 | { |
1204 | 1204 | global $smcFunc; |
1205 | 1205 | $smcFunc['db_query']('', ' |
@@ -1229,7 +1229,7 @@ discard block |
||
1229 | 1229 | GROUP BY ln.id_member', |
1230 | 1230 | 'fix_collect' => array( |
1231 | 1231 | 'index' => 'id_member', |
1232 | - 'process' => function ($members) use ($smcFunc) |
|
1232 | + 'process' => function($members) use ($smcFunc) |
|
1233 | 1233 | { |
1234 | 1234 | $smcFunc['db_query']('', ' |
1235 | 1235 | DELETE FROM {db_prefix}log_notify |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | LEFT JOIN {db_prefix}log_search_subjects AS lss ON (lss.id_topic = t.id_topic) |
1257 | 1257 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
1258 | 1258 | AND lss.id_topic IS NULL', |
1259 | - 'fix_full_processing' => function ($result) |
|
1259 | + 'fix_full_processing' => function($result) |
|
1260 | 1260 | { |
1261 | 1261 | global $smcFunc; |
1262 | 1262 | |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | array('word', 'id_topic') |
1286 | 1286 | ); |
1287 | 1287 | }, |
1288 | - 'message_function' => function ($row) |
|
1288 | + 'message_function' => function($row) |
|
1289 | 1289 | { |
1290 | 1290 | global $txt, $context; |
1291 | 1291 | |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | AND t.id_topic IS NULL', |
1314 | 1314 | 'fix_collect' => array( |
1315 | 1315 | 'index' => 'id_topic', |
1316 | - 'process' => function ($deleteTopics) |
|
1316 | + 'process' => function($deleteTopics) |
|
1317 | 1317 | { |
1318 | 1318 | global $smcFunc; |
1319 | 1319 | $smcFunc['db_query']('', ' |
@@ -1343,7 +1343,7 @@ discard block |
||
1343 | 1343 | AND mem.id_member IS NULL', |
1344 | 1344 | 'fix_collect' => array( |
1345 | 1345 | 'index' => 'id_member', |
1346 | - 'process' => function ($members) |
|
1346 | + 'process' => function($members) |
|
1347 | 1347 | { |
1348 | 1348 | global $smcFunc; |
1349 | 1349 | $smcFunc['db_query']('', ' |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | AND p.id_poll IS NULL', |
1373 | 1373 | 'fix_collect' => array( |
1374 | 1374 | 'index' => 'id_poll', |
1375 | - 'process' => function ($polls) |
|
1375 | + 'process' => function($polls) |
|
1376 | 1376 | { |
1377 | 1377 | global $smcFunc; |
1378 | 1378 | $smcFunc['db_query']('', ' |
@@ -1401,7 +1401,7 @@ discard block |
||
1401 | 1401 | AND lrc.id_report IS NULL', |
1402 | 1402 | 'fix_collect' => array( |
1403 | 1403 | 'index' => 'id_report', |
1404 | - 'process' => function ($reports) |
|
1404 | + 'process' => function($reports) |
|
1405 | 1405 | { |
1406 | 1406 | global $smcFunc; |
1407 | 1407 | $smcFunc['db_query']('', ' |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | AND lr.id_report IS NULL', |
1431 | 1431 | 'fix_collect' => array( |
1432 | 1432 | 'index' => 'id_report', |
1433 | - 'process' => function ($reports) |
|
1433 | + 'process' => function($reports) |
|
1434 | 1434 | { |
1435 | 1435 | global $smcFunc; |
1436 | 1436 | $smcFunc['db_query']('', ' |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | GROUP BY lgr.id_member', |
1461 | 1461 | 'fix_collect' => array( |
1462 | 1462 | 'index' => 'id_member', |
1463 | - 'process' => function ($members) |
|
1463 | + 'process' => function($members) |
|
1464 | 1464 | { |
1465 | 1465 | global $smcFunc; |
1466 | 1466 | $smcFunc['db_query']('', ' |
@@ -1490,7 +1490,7 @@ discard block |
||
1490 | 1490 | GROUP BY lgr.id_group', |
1491 | 1491 | 'fix_collect' => array( |
1492 | 1492 | 'index' => 'id_group', |
1493 | - 'process' => function ($groups) |
|
1493 | + 'process' => function($groups) |
|
1494 | 1494 | { |
1495 | 1495 | global $smcFunc; |
1496 | 1496 | $smcFunc['db_query']('', ' |