@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | $smcFunc['db_free_result']($request); |
272 | 272 | |
273 | - if($withSender) |
|
273 | + if ($withSender) |
|
274 | 274 | { |
275 | 275 | $senders = loadMemberData($senders); |
276 | 276 | foreach ($senders as $member) |
@@ -1952,7 +1952,7 @@ discard block |
||
1952 | 1952 | if (count($context['ip']) !== 2) |
1953 | 1953 | fatal_lang_error('invalid_tracking_ip', false); |
1954 | 1954 | |
1955 | - $ip_string = array('{inet:ip_address_low}','{inet:ip_address_high}'); |
|
1955 | + $ip_string = array('{inet:ip_address_low}', '{inet:ip_address_high}'); |
|
1956 | 1956 | $fields = array( |
1957 | 1957 | 'ip_address_low' => $context['ip']['low'], |
1958 | 1958 | 'ip_address_high' => $context['ip']['high'], |
@@ -1960,7 +1960,7 @@ discard block |
||
1960 | 1960 | |
1961 | 1961 | $ip_var = $context['ip']; |
1962 | 1962 | |
1963 | - if ($context['ip']['low'] !== $context['ip']['high']) |
|
1963 | + if ($context['ip']['low'] !== $context['ip']['high']) |
|
1964 | 1964 | $context['ip'] = $context['ip']['low'] . ' - ' . $context['ip']['high']; |
1965 | 1965 | else |
1966 | 1966 | $context['ip'] = $context['ip']['low']; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | |
660 | 660 | // Remove the phrase parts and extract the words. |
661 | 661 | $wordArray = preg_replace('~(?:^|\s)(?:[-]?)"(?:[^"]+)"(?:$|\s)~' . ($context['utf8'] ? 'u' : ''), ' ', $search_params['search']); |
662 | - $wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); |
|
662 | + $wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); |
|
663 | 663 | |
664 | 664 | // A minus sign in front of a word excludes the word.... so... |
665 | 665 | $excludedWords = array(); |
@@ -997,7 +997,7 @@ discard block |
||
997 | 997 | // Are the result fresh? |
998 | 998 | if (!$update_cache && !empty($_SESSION['search_cache']['id_search'])) |
999 | 999 | { |
1000 | - $request = $smcFunc['db_query']('',' |
|
1000 | + $request = $smcFunc['db_query']('', ' |
|
1001 | 1001 | SELECT id_search |
1002 | 1002 | FROM {db_prefix}log_search_results |
1003 | 1003 | WHERE id_search = {int:search_id} |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | SELECT |
1120 | 1120 | {int:id_search}, |
1121 | 1121 | t.id_topic, |
1122 | - ' . $relevance. ', |
|
1122 | + ' . $relevance . ', |
|
1123 | 1123 | ' . (empty($userQuery) ? 't.id_first_msg' : 'm.id_msg') . ', |
1124 | 1124 | 1 |
1125 | 1125 | FROM ' . $subject_query['from'] . (empty($subject_query['inner_join']) ? '' : ' |
@@ -1352,7 +1352,7 @@ discard block |
||
1352 | 1352 | if (empty($subject_query['where'])) |
1353 | 1353 | continue; |
1354 | 1354 | |
1355 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( ' |
|
1355 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? (' |
|
1356 | 1356 | INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics |
1357 | 1357 | (' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . ' |
1358 | 1358 | SELECT ' . ($createTemporary ? '' : $_SESSION['search_cache']['id_search'] . ', ') . 't.id_topic |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | } |
1580 | 1580 | $main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance'; |
1581 | 1581 | |
1582 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( ' |
|
1582 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? (' |
|
1583 | 1583 | INSERT IGNORE INTO ' . '{db_prefix}log_search_results |
1584 | 1584 | (' . implode(', ', array_keys($main_query['select'])) . ')') : '') . ' |
1585 | 1585 | SELECT |
@@ -1647,7 +1647,7 @@ discard block |
||
1647 | 1647 | $relevance = substr($relevance, 0, -3) . ') / ' . $weight_total . ' AS relevance'; |
1648 | 1648 | |
1649 | 1649 | $usedIDs = array_flip(empty($inserts) ? array() : array_keys($inserts)); |
1650 | - $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ( ' |
|
1650 | + $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? (' |
|
1651 | 1651 | INSERT IGNORE INTO {db_prefix}log_search_results |
1652 | 1652 | (id_search, id_topic, relevance, id_msg, num_matches)') : '') . ' |
1653 | 1653 | SELECT |
@@ -2116,7 +2116,7 @@ discard block |
||
2116 | 2116 | if (strlen($query) == 0) |
2117 | 2117 | continue; |
2118 | 2118 | |
2119 | - $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function ($m) |
|
2119 | + $body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function($m) |
|
2120 | 2120 | { |
2121 | 2121 | return isset($m[2]) && "$m[2]" == "$m[1]" ? stripslashes("$m[1]") : "<strong class=\"highlight\">$m[1]</strong>"; |
2122 | 2122 | }, $body_highlighted); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // Just send a generic message. |
77 | 77 | else |
78 | 78 | $this->setResponse(array( |
79 | - 'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error', |
|
79 | + 'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error', |
|
80 | 80 | 'type' => 'error', |
81 | 81 | 'data' => false, |
82 | 82 | )); |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | // Gotta urlencode the filename. |
411 | 411 | if ($this->_attachResults) |
412 | 412 | foreach ($this->_attachResults as $k => $v) |
413 | - $this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']); |
|
413 | + $this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']); |
|
414 | 414 | |
415 | 415 | $this->_response = array( |
416 | 416 | 'files' => $this->_attachResults ? $this->_attachResults : false, |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | ob_start(); |
438 | 438 | |
439 | 439 | // Set the header. |
440 | - header('content-type: application/json; charset='. $context['character_set'] .''); |
|
440 | + header('content-type: application/json; charset=' . $context['character_set'] . ''); |
|
441 | 441 | |
442 | 442 | echo $smcFunc['json_encode']($this->_response ? $this->_response : array()); |
443 | 443 |
@@ -246,7 +246,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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']('', ' |
@@ -1112,7 +1112,7 @@ discard block |
||
1112 | 1112 | $lastlen = strlen($text = preg_replace($backToBackPattern, '', $text)); |
1113 | 1113 | |
1114 | 1114 | // Need to sort the tags by name length. |
1115 | - uksort($valid_tags, function ($a, $b) { |
|
1115 | + uksort($valid_tags, function($a, $b) { |
|
1116 | 1116 | return strlen($a) < strlen($b) ? 1 : -1; |
1117 | 1117 | }); |
1118 | 1118 | |
@@ -1979,7 +1979,7 @@ discard block |
||
1979 | 1979 | } |
1980 | 1980 | |
1981 | 1981 | // Set proper extensions; do this post caching so cache doesn't become extension-specific |
1982 | - array_walk_recursive($context['smileys'], function (&$filename, $key) |
|
1982 | + array_walk_recursive($context['smileys'], function(&$filename, $key) |
|
1983 | 1983 | { |
1984 | 1984 | global $context, $user_info, $modSettings; |
1985 | 1985 | if ($key == 'filename') |
@@ -1783,7 +1783,7 @@ discard block |
||
1783 | 1783 | call_integration_hook('integrate_pre_load_theme', array(&$id_theme)); |
1784 | 1784 | |
1785 | 1785 | // We already load the basic stuff? |
1786 | - if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme ) |
|
1786 | + if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme) |
|
1787 | 1787 | { |
1788 | 1788 | $member = empty($user_info['id']) ? -1 : $user_info['id']; |
1789 | 1789 | |
@@ -1808,7 +1808,7 @@ discard block |
||
1808 | 1808 | SELECT variable, value, id_member, id_theme |
1809 | 1809 | FROM {db_prefix}themes |
1810 | 1810 | WHERE id_member' . (empty($themeData[0]) ? ' IN (-1, 0, {int:id_member})' : ' = {int:id_member}') . ' |
1811 | - AND id_theme' . ($id_theme == 1 ? ' = {int:id_theme}' : ' IN ({int:id_theme}, 1)') .' |
|
1811 | + AND id_theme' . ($id_theme == 1 ? ' = {int:id_theme}' : ' IN ({int:id_theme}, 1)') . ' |
|
1812 | 1812 | ORDER BY id_theme asc', |
1813 | 1813 | array( |
1814 | 1814 | 'id_theme' => $id_theme, |
@@ -2047,7 +2047,7 @@ discard block |
||
2047 | 2047 | if (!isset($context['javascript_vars'])) |
2048 | 2048 | $context['javascript_vars'] = array(); |
2049 | 2049 | |
2050 | - $context['login_url'] = $scripturl . '?action=login2'; |
|
2050 | + $context['login_url'] = $scripturl . '?action=login2'; |
|
2051 | 2051 | $context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | '; |
2052 | 2052 | $context['session_var'] = $_SESSION['session_var']; |
2053 | 2053 | $context['session_id'] = $_SESSION['session_value']; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | ' . (empty($sort_methods_table[$context['sort_by']]) ? '' : $sort_methods_table[$context['sort_by']]) . ' |
325 | 325 | WHERE t.id_board = {int:current_board} ' |
326 | 326 | . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
327 | - AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') .' |
|
327 | + AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . ' |
|
328 | 328 | ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
329 | 329 | LIMIT {int:maxindex} |
330 | 330 | OFFSET {int:start} '; |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | SELECT |
334 | 334 | t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board, |
335 | 335 | ' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from, |
336 | - ' . ( $enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
336 | + ' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
337 | 337 | ' : '') . ' |
338 | 338 | t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic, |
339 | 339 | ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon, |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . ' |
358 | 358 | ' . (!empty($message_index_tables) ? implode("\n\t\t\t\t", $message_index_tables) : '') . ' |
359 | 359 | ' . (!empty($message_index_wheres) ? ' WHERE ' . implode("\n\t\t\t\tAND ", $message_index_wheres) : '') . ' |
360 | - ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') , |
|
360 | + ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC'), |
|
361 | 361 | $message_index_parameters |
362 | 362 | ); |
363 | 363 |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | // INET. |
353 | 353 | elseif ($param_info['type'] == 'inet') |
354 | 354 | { |
355 | - if(count($search_params[$param_name]) === 1) |
|
355 | + if (count($search_params[$param_name]) === 1) |
|
356 | 356 | { |
357 | 357 | $query_parts[] = '(' . $param_info['db_fields'][0] . ' = {inet:' . $param_name . '})'; |
358 | 358 | $where_params[$param_name] = $search_params[$param_name][0]; |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | elseif (count($search_params[$param_name]) === 2) |
361 | 361 | { |
362 | 362 | $query_parts[] = '(' . $param_info['db_fields'][0] . ' <= {inet:' . $param_name . '_high} and ' . $param_info['db_fields'][0] . ' >= {inet:' . $param_name . '_low})'; |
363 | - $where_params[$param_name.'_low'] = $search_params[$param_name]['low']; |
|
364 | - $where_params[$param_name.'_high'] = $search_params[$param_name]['high']; |
|
363 | + $where_params[$param_name . '_low'] = $search_params[$param_name]['low']; |
|
364 | + $where_params[$param_name . '_high'] = $search_params[$param_name]['high']; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | } |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | if (!empty($context['show_filter']) && !empty($context['available_filters'])) |
1006 | 1006 | $listOptions['additional_rows'][] = array( |
1007 | 1007 | 'position' => 'above_column_headers', |
1008 | - 'value' => '<strong>' . $txt['admin_browse_filter_show'] . ':</strong> ' . ((isset($context['current_filter']) && isset($txt['admin_browse_filter_type_'.$context['current_filter']])) ? $txt['admin_browse_filter_type_'.$context['current_filter']] : $context['available_filters'][0]['desc']), |
|
1008 | + 'value' => '<strong>' . $txt['admin_browse_filter_show'] . ':</strong> ' . ((isset($context['current_filter']) && isset($txt['admin_browse_filter_type_' . $context['current_filter']])) ? $txt['admin_browse_filter_type_' . $context['current_filter']] : $context['available_filters'][0]['desc']), |
|
1009 | 1009 | 'class' => 'filter_row generic_list_wrapper smalltext', |
1010 | 1010 | ); |
1011 | 1011 |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | 'editlang' => array( |
593 | 593 | 'header' => array( |
594 | 594 | 'value' => '', |
595 | - ),'data' => array( |
|
595 | + ), 'data' => array( |
|
596 | 596 | 'function' => function($rowData) use ($scripturl, $txt) |
597 | 597 | { |
598 | 598 | return sprintf('<a href="%1$s?action=admin;area=languages;sa=editlang;lid=%2$s" class="button">%3$s</a>', $scripturl, $rowData['id'], $txt['edit']); |
@@ -1269,7 +1269,7 @@ discard block |
||
1269 | 1269 | // Now create the string! |
1270 | 1270 | $final_saves[$entryKey] = array( |
1271 | 1271 | 'find' => $entryValue['full'], |
1272 | - 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryKey . '\'] = array(' . implode(', ', $items) . ');' . $entryValue['cruft'], |
|
1272 | + 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryKey . '\'] = array(' . implode(', ', $items) . ');' . $entryValue['cruft'], |
|
1273 | 1273 | ); |
1274 | 1274 | } |
1275 | 1275 | } |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | // And save it |
1292 | 1292 | $final_saves[$entryKey] = array( |
1293 | 1293 | 'find' => $entryValue['full'], |
1294 | - 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryValue['key'] . '\'][' . $subKey . '] = ' . $save_strings[$entryValue['key']][$entryValue['subkey']] . ';' . $entryValue['cruft'], |
|
1294 | + 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryValue['key'] . '\'][' . $subKey . '] = ' . $save_strings[$entryValue['key']][$entryValue['subkey']] . ';' . $entryValue['cruft'], |
|
1295 | 1295 | ); |
1296 | 1296 | } |
1297 | 1297 | |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | $entryValue['entry'] = '\'\''; |
1302 | 1302 | $final_saves[$entryKey] = array( |
1303 | 1303 | 'find' => $entryValue['full'], |
1304 | - 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n", |
|
1304 | + 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n", |
|
1305 | 1305 | ); |
1306 | 1306 | } |
1307 | 1307 | |
@@ -1329,7 +1329,7 @@ discard block |
||
1329 | 1329 | // And we know what to save now! |
1330 | 1330 | $final_saves[$entryKey] = array( |
1331 | 1331 | 'find' => $entryValue['full'], |
1332 | - 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryValue['key'] . '\'] = ' . $save_strings[$entryValue['key']] . ';' . $entryValue['cruft'], |
|
1332 | + 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n" . '$' . $entryValue['type'] . '[\'' . $entryValue['key'] . '\'] = ' . $save_strings[$entryValue['key']] . ';' . $entryValue['cruft'], |
|
1333 | 1333 | ); |
1334 | 1334 | } |
1335 | 1335 | // Remove this entry only if it is allowed |
@@ -1338,7 +1338,7 @@ discard block |
||
1338 | 1338 | $entryValue['entry'] = '\'\''; |
1339 | 1339 | $final_saves[$entryKey] = array( |
1340 | 1340 | 'find' => $entryValue['full'], |
1341 | - 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n", |
|
1341 | + 'replace' => '// ' . implode("\n// ", explode("\n", rtrim($entryValue['full'], "\n"))) . "\n", |
|
1342 | 1342 | ); |
1343 | 1343 | } |
1344 | 1344 | |
@@ -1369,8 +1369,8 @@ discard block |
||
1369 | 1369 | continue; |
1370 | 1370 | |
1371 | 1371 | $final_saves[$string_key] = array( |
1372 | - 'find' => "\s*\?".'>$', |
|
1373 | - 'replace' => "\n\$" . $type . '[\'' . $string_key . '\'] = ' . $string_val['string'] . ';' . "\n\n?".'>', |
|
1372 | + 'find' => "\s*\?" . '>$', |
|
1373 | + 'replace' => "\n\$" . $type . '[\'' . $string_key . '\'] = ' . $string_val['string'] . ';' . "\n\n?" . '>', |
|
1374 | 1374 | 'is_regex' => true, |
1375 | 1375 | ); |
1376 | 1376 | } |
@@ -1387,8 +1387,8 @@ discard block |
||
1387 | 1387 | $subKey = ctype_digit(trim($substring_key, '\'')) ? trim($substring_key, '\'') : '\'' . $substring_key . '\''; |
1388 | 1388 | |
1389 | 1389 | $final_saves[$string_key . '[' . $substring_key . ']'] = array( |
1390 | - 'find' => "\s*\?".'>$', |
|
1391 | - 'replace' => "\n\$" . $type . '[\'' . $string_key . '\'][' . $subKey . '] = ' . $substring_val['string'] . ';' . "\n\n?".'>', |
|
1390 | + 'find' => "\s*\?" . '>$', |
|
1391 | + 'replace' => "\n\$" . $type . '[\'' . $string_key . '\'][' . $subKey . '] = ' . $substring_val['string'] . ';' . "\n\n?" . '>', |
|
1392 | 1392 | 'is_regex' => true, |
1393 | 1393 | ); |
1394 | 1394 | } |