@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | if ($connection) { |
| 72 | 72 | if (!empty($db_options['port'])) |
| 73 | - $success = mysqli_real_connect($connection, $db_server, $db_user, $db_passwd, '', $db_options['port'] , null ,$flags); |
|
| 73 | + $success = mysqli_real_connect($connection, $db_server, $db_user, $db_passwd, '', $db_options['port'], null, $flags); |
|
| 74 | 74 | else |
| 75 | - $success = mysqli_real_connect($connection, $db_server, $db_user, $db_passwd,'', 0, null, $flags); |
|
| 75 | + $success = mysqli_real_connect($connection, $db_server, $db_user, $db_passwd, '', 0, null, $flags); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // Something's wrong, show an error if its fatal (which we assume it is) |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $replacement[$key] = 'null'; |
| 283 | 283 | if (!isValidIP($value)) |
| 284 | 284 | smf_db_error_backtrace('Wrong value type sent to the database. IPv4 or IPv6 expected.(' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
| 285 | - $replacement[$key] = sprintf('unhex(\'%1$s\')', bin2hex(inet_pton($value))); |
|
| 285 | + $replacement[$key] = sprintf('unhex(\'%1$s\')', bin2hex(inet_pton($value))); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | return implode(', ', $replacement); |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | * @param bool $translate_human_wildcards If true, turns human readable wildcards into SQL wildcards. |
| 870 | 870 | * @return string The escaped string |
| 871 | 871 | */ |
| 872 | -function smf_db_escape_wildcard_string($string, $translate_human_wildcards=false) |
|
| 872 | +function smf_db_escape_wildcard_string($string, $translate_human_wildcards = false) |
|
| 873 | 873 | { |
| 874 | 874 | $replacements = array( |
| 875 | 875 | '%' => '\%', |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | 'value' => $txt['date'], |
| 137 | 137 | ), |
| 138 | 138 | 'data' => array( |
| 139 | - 'function' => function ($rowData) use ($txt) |
|
| 139 | + 'function' => function($rowData) use ($txt) |
|
| 140 | 140 | { |
| 141 | 141 | // Recurring every year or just a single year? |
| 142 | 142 | $year = $rowData['year'] == '0004' ? sprintf('(%1$s)', $txt['every_year']) : $rowData['year']; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | checkSession(); |
| 219 | 219 | |
| 220 | 220 | // Not too long good sir? |
| 221 | - $_REQUEST['title'] = $smcFunc['substr']($_REQUEST['title'], 0, 60); |
|
| 221 | + $_REQUEST['title'] = $smcFunc['substr']($_REQUEST['title'], 0, 60); |
|
| 222 | 222 | $_REQUEST['holiday'] = isset($_REQUEST['holiday']) ? (int) $_REQUEST['holiday'] : 0; |
| 223 | 223 | |
| 224 | 224 | if (isset($_REQUEST['delete'])) |
@@ -303,7 +303,7 @@ |
||
| 303 | 303 | ), |
| 304 | 304 | array( |
| 305 | 305 | $_POST['msg'], $message['id_topic'], $message['id_board'], $message['id_poster'], $message['real_name'], |
| 306 | - $message['subject'], $message['body'] , time(), time(), 1, 0, |
|
| 306 | + $message['subject'], $message['body'], time(), time(), 1, 0, |
|
| 307 | 307 | ), |
| 308 | 308 | array('id_report') |
| 309 | 309 | ); |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | |
| 573 | 573 | // Don't want to mess with code... |
| 574 | 574 | $types = array('install', 'uninstall', 'upgrade'); |
| 575 | - foreach($types as $type) |
|
| 575 | + foreach ($types as $type) |
|
| 576 | 576 | { |
| 577 | 577 | if (isset($package[$type]['code'])) |
| 578 | 578 | { |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | 'value' => $txt['package_restore_permissions_cur_status'], |
| 698 | 698 | ), |
| 699 | 699 | 'data' => array( |
| 700 | - 'function' => function ($rowData) use ($txt) |
|
| 700 | + 'function' => function($rowData) use ($txt) |
|
| 701 | 701 | { |
| 702 | 702 | $formatTxt = $rowData['result'] == '' || $rowData['result'] == 'skipped' ? $txt['package_restore_permissions_pre_change'] : $txt['package_restore_permissions_post_change']; |
| 703 | 703 | return sprintf($formatTxt, $rowData['cur_perms'], $rowData['new_perms'], $rowData['writable_message']); |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | 'value' => $txt['package_restore_permissions_result'], |
| 726 | 726 | ), |
| 727 | 727 | 'data' => array( |
| 728 | - 'function' => function ($rowData) use ($txt) |
|
| 728 | + 'function' => function($rowData) use ($txt) |
|
| 729 | 729 | { |
| 730 | 730 | return $txt['package_restore_permissions_action_' . $rowData['result']]; |
| 731 | 731 | }, |
@@ -1195,7 +1195,7 @@ discard block |
||
| 1195 | 1195 | if ($action->exists('@lang')) |
| 1196 | 1196 | { |
| 1197 | 1197 | // Auto-select the language based on either request variable or current language. |
| 1198 | - if ((isset($_REQUEST['readme']) && $action->fetch('@lang') == $_REQUEST['readme']) || (isset($_REQUEST['license']) && $action->fetch('@lang') == $_REQUEST['license']) || (!isset($_REQUEST['readme']) && $action->fetch('@lang') == $language) || (!isset($_REQUEST['license']) && $action->fetch('@lang') == $language)) |
|
| 1198 | + if ((isset($_REQUEST['readme']) && $action->fetch('@lang') == $_REQUEST['readme']) || (isset($_REQUEST['license']) && $action->fetch('@lang') == $_REQUEST['license']) || (!isset($_REQUEST['readme']) && $action->fetch('@lang') == $language) || (!isset($_REQUEST['license']) && $action->fetch('@lang') == $language)) |
|
| 1199 | 1199 | { |
| 1200 | 1200 | // In case the user put the blocks in the wrong order. |
| 1201 | 1201 | if (isset($context[$type]['selected']) && $context[$type]['selected'] == 'default') |
@@ -1243,7 +1243,7 @@ discard block |
||
| 1243 | 1243 | 'redirect_url' => $action->exists('@url') ? $action->fetch('@url') : '', |
| 1244 | 1244 | 'redirect_timeout' => $action->exists('@timeout') ? (int) $action->fetch('@timeout') : '', |
| 1245 | 1245 | 'parse_bbc' => $action->exists('@parsebbc') && $action->fetch('@parsebbc') == 'true', |
| 1246 | - 'language' => (($actionType == 'readme' || $actionType == 'license') && $action->exists('@lang') && $action->fetch('@lang') == $language) ? $language : '', |
|
| 1246 | + 'language' => (($actionType == 'readme' || $actionType == 'license') && $action->exists('@lang') && $action->fetch('@lang') == $language) ? $language : '', |
|
| 1247 | 1247 | ); |
| 1248 | 1248 | |
| 1249 | 1249 | continue; |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | 'class' => 'centercol', |
| 394 | 394 | ), |
| 395 | 395 | 'data' => array( |
| 396 | - 'function' => function ($rowData) |
|
| 396 | + 'function' => function($rowData) |
|
| 397 | 397 | { |
| 398 | 398 | return $rowData['selected'] ? '<span class="generic_icons valid"></span>' : ''; |
| 399 | 399 | }, |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | 'class' => 'centercol', |
| 454 | 454 | ), |
| 455 | 455 | 'data' => array( |
| 456 | - 'function' => function ($rowData) |
|
| 456 | + 'function' => function($rowData) |
|
| 457 | 457 | { |
| 458 | 458 | return $rowData['selected'] ? '' : sprintf('<input type="checkbox" name="smiley_set[%1$d]" class="input_check">', $rowData['id']); |
| 459 | 459 | }, |
@@ -997,7 +997,7 @@ discard block |
||
| 997 | 997 | 'value' => $txt['smileys_location'], |
| 998 | 998 | ), |
| 999 | 999 | 'data' => array( |
| 1000 | - 'function' => function ($rowData) use ($txt) |
|
| 1000 | + 'function' => function($rowData) use ($txt) |
|
| 1001 | 1001 | { |
| 1002 | 1002 | if (empty($rowData['hidden'])) |
| 1003 | 1003 | return $txt['smileys_location_form']; |
@@ -1017,7 +1017,7 @@ discard block |
||
| 1017 | 1017 | 'value' => $txt['smileys_description'], |
| 1018 | 1018 | ), |
| 1019 | 1019 | 'data' => array( |
| 1020 | - 'function' => function ($rowData) use ($context, $txt, $modSettings, $smcFunc) |
|
| 1020 | + 'function' => function($rowData) use ($context, $txt, $modSettings, $smcFunc) |
|
| 1021 | 1021 | { |
| 1022 | 1022 | if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir'])) |
| 1023 | 1023 | return $smcFunc['htmlspecialchars']($rowData['description']); |
@@ -1557,7 +1557,7 @@ discard block |
||
| 1557 | 1557 | 'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.'))) |
| 1558 | 1558 | ); |
| 1559 | 1559 | |
| 1560 | - $file = $packagesdir . '/temp/' . $base_path . $action['filename']; |
|
| 1560 | + $file = $packagesdir . '/temp/' . $base_path . $action['filename']; |
|
| 1561 | 1561 | if (isset($action['filename']) && (!file_exists($file) || !is_writable(dirname($action['destination'])))) |
| 1562 | 1562 | { |
| 1563 | 1563 | $context['has_failure'] = true; |
@@ -1601,7 +1601,7 @@ discard block |
||
| 1601 | 1601 | { |
| 1602 | 1602 | updateSettings(array( |
| 1603 | 1603 | 'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . basename($action['action']), |
| 1604 | - 'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' . (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''), |
|
| 1604 | + 'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' . (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''), |
|
| 1605 | 1605 | )); |
| 1606 | 1606 | } |
| 1607 | 1607 | |
@@ -1613,7 +1613,7 @@ discard block |
||
| 1613 | 1613 | '{db_prefix}log_packages', |
| 1614 | 1614 | array( |
| 1615 | 1615 | 'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string', |
| 1616 | - 'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int', |
|
| 1616 | + 'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int', |
|
| 1617 | 1617 | 'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string', |
| 1618 | 1618 | 'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string', |
| 1619 | 1619 | ), |
@@ -1862,7 +1862,7 @@ discard block |
||
| 1862 | 1862 | 'columns' => array( |
| 1863 | 1863 | 'icon' => array( |
| 1864 | 1864 | 'data' => array( |
| 1865 | - 'function' => function ($rowData) use ($settings, $smcFunc) |
|
| 1865 | + 'function' => function($rowData) use ($settings, $smcFunc) |
|
| 1866 | 1866 | { |
| 1867 | 1867 | $images_url = $settings[file_exists(sprintf('%1$s/images/post/%2$s.png', $settings['theme_dir'], $rowData['filename'])) ? 'actual_images_url' : 'default_images_url']; |
| 1868 | 1868 | return sprintf('<img src="%1$s/post/%2$s.png" alt="%3$s">', $images_url, $rowData['filename'], $smcFunc['htmlspecialchars']($rowData['title'])); |
@@ -1896,7 +1896,7 @@ discard block |
||
| 1896 | 1896 | 'value' => $txt['icons_board'], |
| 1897 | 1897 | ), |
| 1898 | 1898 | 'data' => array( |
| 1899 | - 'function' => function ($rowData) use ($txt) |
|
| 1899 | + 'function' => function($rowData) use ($txt) |
|
| 1900 | 1900 | { |
| 1901 | 1901 | return empty($rowData['board_name']) ? $txt['icons_edit_icons_all_boards'] : $rowData['board_name']; |
| 1902 | 1902 | }, |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | |
| 743 | 743 | // For each table.... |
| 744 | 744 | $_SESSION['optimized_tables'] = !empty($_SESSION['optimized_tables']) ? $_SESSION['optimized_tables'] : array(); |
| 745 | - for ($key=$_REQUEST['start']; $context['num_tables']-1; $key++) |
|
| 745 | + for ($key = $_REQUEST['start']; $context['num_tables'] - 1; $key++) |
|
| 746 | 746 | { |
| 747 | 747 | if (empty($tables[$key])) |
| 748 | 748 | break; |
@@ -1905,10 +1905,10 @@ discard block |
||
| 1905 | 1905 | 'value' => $txt['hooks_field_function_name'], |
| 1906 | 1906 | ), |
| 1907 | 1907 | 'data' => array( |
| 1908 | - 'function' => function ($data) use ($txt) |
|
| 1908 | + 'function' => function($data) use ($txt) |
|
| 1909 | 1909 | { |
| 1910 | 1910 | // Show a nice icon to indicate this is an instance. |
| 1911 | - $instance = (!empty($data['instance']) ? '<span class="generic_icons news" title="'. $txt['hooks_field_function_method'] .'"></span> ' : ''); |
|
| 1911 | + $instance = (!empty($data['instance']) ? '<span class="generic_icons news" title="' . $txt['hooks_field_function_method'] . '"></span> ' : ''); |
|
| 1912 | 1912 | |
| 1913 | 1913 | if (!empty($data['included_file'])) |
| 1914 | 1914 | return $instance . $txt['hooks_field_function'] . ': ' . $data['real_function'] . '<br>' . $txt['hooks_field_included_file'] . ': ' . $data['included_file']; |
@@ -1940,7 +1940,7 @@ discard block |
||
| 1940 | 1940 | 'style' => 'width:3%;', |
| 1941 | 1941 | ), |
| 1942 | 1942 | 'data' => array( |
| 1943 | - 'function' => function ($data) use ($txt, $scripturl, $context) |
|
| 1943 | + 'function' => function($data) use ($txt, $scripturl, $context) |
|
| 1944 | 1944 | { |
| 1945 | 1945 | $change_status = array('before' => '', 'after' => ''); |
| 1946 | 1946 | |
@@ -1977,7 +1977,7 @@ discard block |
||
| 1977 | 1977 | 'style' => 'width:3%', |
| 1978 | 1978 | ), |
| 1979 | 1979 | 'data' => array( |
| 1980 | - 'function' => function ($data) use ($txt, $scripturl, $context) |
|
| 1980 | + 'function' => function($data) use ($txt, $scripturl, $context) |
|
| 1981 | 1981 | { |
| 1982 | 1982 | if (!$data['hook_exists']) |
| 1983 | 1983 | return ' |
@@ -2113,7 +2113,7 @@ discard block |
||
| 2113 | 2113 | $context['insert_after_template'] .= ' |
| 2114 | 2114 | <script> |
| 2115 | 2115 | var hook_name_header = document.getElementById(\'header_list_integration_hooks_hook_name\'); |
| 2116 | - hook_name_header.innerHTML += ' . JavaScriptEscape('<select style="margin-left:15px;" onchange="window.location=(\'' . $scripturl . '?action=admin;area=maintain;sa=hooks\' + (this.value ? \';filter=\' + this.value : \'\'));"><option value="">' . $txt['hooks_reset_filter'] . '</option>' . implode('', $hooks_filters) . '</select>'). '; |
|
| 2116 | + hook_name_header.innerHTML += ' . JavaScriptEscape('<select style="margin-left:15px;" onchange="window.location=(\'' . $scripturl . '?action=admin;area=maintain;sa=hooks\' + (this.value ? \';filter=\' + this.value : \'\'));"><option value="">' . $txt['hooks_reset_filter'] . '</option>' . implode('', $hooks_filters) . '</select>') . '; |
|
| 2117 | 2117 | </script>'; |
| 2118 | 2118 | |
| 2119 | 2119 | $temp_data = array(); |
@@ -236,7 +236,7 @@ |
||
| 236 | 236 | $header = 'POST /cgi-bin/webscr HTTP/1.1' . "\r\n"; |
| 237 | 237 | $header .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n"; |
| 238 | 238 | $header .= 'Host: www.' . (!empty($modSettings['paidsubs_test']) ? 'sandbox.' : '') . 'paypal.com' . "\r\n"; |
| 239 | - $header .= 'Content-Length: ' . strlen ($requestString) . "\r\n"; |
|
| 239 | + $header .= 'Content-Length: ' . strlen($requestString) . "\r\n"; |
|
| 240 | 240 | $header .= 'Connection: close' . "\r\n\r\n"; |
| 241 | 241 | |
| 242 | 242 | // Open the connection. |
@@ -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 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | // Remove all topics that have zero messages in the messages table. |
| 320 | 320 | 'fix_collect' => array( |
| 321 | 321 | 'index' => 'id_topic', |
| 322 | - 'process' => function ($topics) use ($smcFunc) |
|
| 322 | + 'process' => function($topics) use ($smcFunc) |
|
| 323 | 323 | { |
| 324 | 324 | $smcFunc['db_query']('', ' |
| 325 | 325 | DELETE FROM {db_prefix}topics |
@@ -357,21 +357,21 @@ discard block |
||
| 357 | 357 | AND p.id_poll IS NULL |
| 358 | 358 | GROUP BY o.id_poll |
| 359 | 359 | ', |
| 360 | - 'fix_processing' => function ($row) use ($smcFunc, $txt) |
|
| 360 | + 'fix_processing' => function($row) use ($smcFunc, $txt) |
|
| 361 | 361 | { |
| 362 | 362 | global $salvageBoardID; |
| 363 | 363 | |
| 364 | 364 | $row['poster_name'] = !empty($row['poster_name']) ? $row['poster_name'] : $txt['guest']; |
| 365 | 365 | $row['id_poster'] = !empty($row['id_poster']) ? $row['id_poster'] : 0; |
| 366 | 366 | |
| 367 | - if(empty($row['id_board'])) |
|
| 367 | + if (empty($row['id_board'])) |
|
| 368 | 368 | { |
| 369 | 369 | // Only if we don't have a reasonable idea of where to put it. |
| 370 | 370 | createSalvageArea(); |
| 371 | - $row['id_board'] = (int)$salvageBoardID; |
|
| 371 | + $row['id_board'] = (int) $salvageBoardID; |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | - if(empty($row['id_topic'])) { |
|
| 374 | + if (empty($row['id_topic'])) { |
|
| 375 | 375 | $smcFunc['db_insert']('', |
| 376 | 376 | '{db_prefix}messages', |
| 377 | 377 | array( |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | LEFT JOIN {db_prefix}topics AS t ON (t.id_poll = p.id_poll) |
| 496 | 496 | WHERE p.id_poll BETWEEN {STEP_LOW} AND {STEP_HIGH} |
| 497 | 497 | AND t.id_poll IS NULL', |
| 498 | - 'fix_processing' => function ($row) use ($smcFunc, $txt) |
|
| 498 | + 'fix_processing' => function($row) use ($smcFunc, $txt) |
|
| 499 | 499 | { |
| 500 | 500 | global $salvageBoardID; |
| 501 | 501 | |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
| 611 | 611 | GROUP BY t.id_topic, t.id_first_msg, t.id_last_msg, t.approved, mf.approved |
| 612 | 612 | ORDER BY t.id_topic', |
| 613 | - 'fix_processing' => function ($row) use ($smcFunc) |
|
| 613 | + 'fix_processing' => function($row) use ($smcFunc) |
|
| 614 | 614 | { |
| 615 | 615 | $row['firstmsg_approved'] = (int) $row['firstmsg_approved']; |
| 616 | 616 | $row['myid_first_msg'] = (int) $row['myid_first_msg']; |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | ) |
| 640 | 640 | ); |
| 641 | 641 | }, |
| 642 | - 'message_function' => function ($row) use ($txt, &$context) |
|
| 642 | + 'message_function' => function($row) use ($txt, &$context) |
|
| 643 | 643 | { |
| 644 | 644 | // A pretend error? |
| 645 | 645 | if ($row['myid_first_msg'] == $row['myid_first_msg'] && $row['myid_first_msg'] == $row['myid_first_msg'] && $row['approved'] == $row['firstmsg_approved']) |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
| 674 | 674 | GROUP BY t.id_topic, t.num_replies, mf.approved |
| 675 | 675 | ORDER BY t.id_topic', |
| 676 | - 'fix_processing' => function ($row) |
|
| 676 | + 'fix_processing' => function($row) |
|
| 677 | 677 | { |
| 678 | 678 | |
| 679 | 679 | global $smcFunc; |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | ); |
| 695 | 695 | |
| 696 | 696 | }, |
| 697 | - 'message_function' => function ($row) |
|
| 697 | + 'message_function' => function($row) |
|
| 698 | 698 | { |
| 699 | 699 | |
| 700 | 700 | global $txt, $context; |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | GROUP BY t.id_topic, t.unapproved_posts |
| 728 | 728 | HAVING unapproved_posts != COUNT(mu.id_msg) |
| 729 | 729 | ORDER BY t.id_topic', |
| 730 | - 'fix_processing' => function ($row) |
|
| 730 | + 'fix_processing' => function($row) |
|
| 731 | 731 | { |
| 732 | 732 | |
| 733 | 733 | global $smcFunc; |
@@ -769,7 +769,7 @@ discard block |
||
| 769 | 769 | WHERE b.id_board IS NULL |
| 770 | 770 | AND t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
| 771 | 771 | GROUP BY t.id_board', |
| 772 | - 'fix_processing' => function ($row) |
|
| 772 | + 'fix_processing' => function($row) |
|
| 773 | 773 | { |
| 774 | 774 | |
| 775 | 775 | global $smcFunc, $salvageCatID, $txt; |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | ORDER BY b.id_cat, b.id_board', |
| 819 | 819 | 'fix_collect' => array( |
| 820 | 820 | 'index' => 'id_cat', |
| 821 | - 'process' => function ($cats) |
|
| 821 | + 'process' => function($cats) |
|
| 822 | 822 | { |
| 823 | 823 | global $smcFunc, $salvageCatID; |
| 824 | 824 | createSalvageArea(); |
@@ -854,7 +854,7 @@ discard block |
||
| 854 | 854 | // Last step-make sure all non-guest posters still exist. |
| 855 | 855 | 'fix_collect' => array( |
| 856 | 856 | 'index' => 'id_msg', |
| 857 | - 'process' => function ($msgs) |
|
| 857 | + 'process' => function($msgs) |
|
| 858 | 858 | { |
| 859 | 859 | |
| 860 | 860 | global $smcFunc; |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | ORDER BY b.id_parent, b.id_board', |
| 884 | 884 | 'fix_collect' => array( |
| 885 | 885 | 'index' => 'id_parent', |
| 886 | - 'process' => function ($parents) |
|
| 886 | + 'process' => function($parents) |
|
| 887 | 887 | { |
| 888 | 888 | global $smcFunc, $salvageBoardID, $salvageCatID; |
| 889 | 889 | createSalvageArea(); |
@@ -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 | |
| 923 | 923 | global $smcFunc; |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | ORDER BY cal.id_topic', |
| 952 | 952 | 'fix_collect' => array( |
| 953 | 953 | 'index' => 'id_topic', |
| 954 | - 'process' => function ($events) |
|
| 954 | + 'process' => function($events) |
|
| 955 | 955 | { |
| 956 | 956 | |
| 957 | 957 | global $smcFunc; |
@@ -983,7 +983,7 @@ discard block |
||
| 983 | 983 | AND lt.id_member BETWEEN {STEP_LOW} AND {STEP_HIGH}', |
| 984 | 984 | 'fix_collect' => array( |
| 985 | 985 | 'index' => 'id_topic', |
| 986 | - 'process' => function ($topics) |
|
| 986 | + 'process' => function($topics) |
|
| 987 | 987 | { |
| 988 | 988 | |
| 989 | 989 | global $smcFunc; |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | GROUP BY lt.id_member', |
| 1016 | 1016 | 'fix_collect' => array( |
| 1017 | 1017 | 'index' => 'id_member', |
| 1018 | - 'process' => function ($members) |
|
| 1018 | + 'process' => function($members) |
|
| 1019 | 1019 | { |
| 1020 | 1020 | |
| 1021 | 1021 | global $smcFunc; |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | GROUP BY lb.id_board', |
| 1048 | 1048 | 'fix_collect' => array( |
| 1049 | 1049 | 'index' => 'id_board', |
| 1050 | - 'process' => function ($boards) |
|
| 1050 | + 'process' => function($boards) |
|
| 1051 | 1051 | { |
| 1052 | 1052 | |
| 1053 | 1053 | global $smcFunc; |
@@ -1079,7 +1079,7 @@ discard block |
||
| 1079 | 1079 | GROUP BY lb.id_member', |
| 1080 | 1080 | 'fix_collect' => array( |
| 1081 | 1081 | 'index' => 'id_member', |
| 1082 | - 'process' => function ($members) use ($smcFunc) |
|
| 1082 | + 'process' => function($members) use ($smcFunc) |
|
| 1083 | 1083 | { |
| 1084 | 1084 | $smcFunc['db_query']('', ' |
| 1085 | 1085 | DELETE FROM {db_prefix}log_boards |
@@ -1108,7 +1108,7 @@ discard block |
||
| 1108 | 1108 | GROUP BY lmr.id_board', |
| 1109 | 1109 | 'fix_collect' => array( |
| 1110 | 1110 | 'index' => 'id_board', |
| 1111 | - 'process' => function ($boards) use ($smcFunc) |
|
| 1111 | + 'process' => function($boards) use ($smcFunc) |
|
| 1112 | 1112 | { |
| 1113 | 1113 | $smcFunc['db_query']('', ' |
| 1114 | 1114 | DELETE FROM {db_prefix}log_mark_read |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | GROUP BY lmr.id_member', |
| 1138 | 1138 | 'fix_collect' => array( |
| 1139 | 1139 | 'index' => 'id_member', |
| 1140 | - 'process' => function ($members) use ($smcFunc) |
|
| 1140 | + 'process' => function($members) use ($smcFunc) |
|
| 1141 | 1141 | { |
| 1142 | 1142 | $smcFunc['db_query']('', ' |
| 1143 | 1143 | DELETE FROM {db_prefix}log_mark_read |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | GROUP BY pmr.id_pm', |
| 1167 | 1167 | 'fix_collect' => array( |
| 1168 | 1168 | 'index' => 'id_pm', |
| 1169 | - 'process' => function ($pms) use ($smcFunc) |
|
| 1169 | + 'process' => function($pms) use ($smcFunc) |
|
| 1170 | 1170 | { |
| 1171 | 1171 | $smcFunc['db_query']('', ' |
| 1172 | 1172 | DELETE FROM {db_prefix}pm_recipients |
@@ -1196,7 +1196,7 @@ discard block |
||
| 1196 | 1196 | GROUP BY pmr.id_member', |
| 1197 | 1197 | 'fix_collect' => array( |
| 1198 | 1198 | 'index' => 'id_member', |
| 1199 | - 'process' => function ($members) |
|
| 1199 | + 'process' => function($members) |
|
| 1200 | 1200 | { |
| 1201 | 1201 | |
| 1202 | 1202 | global $smcFunc; |
@@ -1228,7 +1228,7 @@ discard block |
||
| 1228 | 1228 | AND mem.id_member IS NULL', |
| 1229 | 1229 | 'fix_collect' => array( |
| 1230 | 1230 | 'index' => 'id_pm', |
| 1231 | - 'process' => function ($guestMessages) |
|
| 1231 | + 'process' => function($guestMessages) |
|
| 1232 | 1232 | { |
| 1233 | 1233 | |
| 1234 | 1234 | global $smcFunc; |
@@ -1260,7 +1260,7 @@ discard block |
||
| 1260 | 1260 | GROUP BY ln.id_member', |
| 1261 | 1261 | 'fix_collect' => array( |
| 1262 | 1262 | 'index' => 'id_member', |
| 1263 | - 'process' => function ($members) use ($smcFunc) |
|
| 1263 | + 'process' => function($members) use ($smcFunc) |
|
| 1264 | 1264 | { |
| 1265 | 1265 | $smcFunc['db_query']('', ' |
| 1266 | 1266 | DELETE FROM {db_prefix}log_notify |
@@ -1287,7 +1287,7 @@ discard block |
||
| 1287 | 1287 | LEFT JOIN {db_prefix}log_search_subjects AS lss ON (lss.id_topic = t.id_topic) |
| 1288 | 1288 | WHERE t.id_topic BETWEEN {STEP_LOW} AND {STEP_HIGH} |
| 1289 | 1289 | AND lss.id_topic IS NULL', |
| 1290 | - 'fix_full_processing' => function ($result) |
|
| 1290 | + 'fix_full_processing' => function($result) |
|
| 1291 | 1291 | { |
| 1292 | 1292 | |
| 1293 | 1293 | global $smcFunc; |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | ); |
| 1320 | 1320 | |
| 1321 | 1321 | }, |
| 1322 | - 'message_function' => function ($row) |
|
| 1322 | + 'message_function' => function($row) |
|
| 1323 | 1323 | { |
| 1324 | 1324 | |
| 1325 | 1325 | global $txt, $context; |
@@ -1349,7 +1349,7 @@ discard block |
||
| 1349 | 1349 | AND t.id_topic IS NULL', |
| 1350 | 1350 | 'fix_collect' => array( |
| 1351 | 1351 | 'index' => 'id_topic', |
| 1352 | - 'process' => function ($deleteTopics) |
|
| 1352 | + 'process' => function($deleteTopics) |
|
| 1353 | 1353 | { |
| 1354 | 1354 | |
| 1355 | 1355 | global $smcFunc; |
@@ -1381,7 +1381,7 @@ discard block |
||
| 1381 | 1381 | AND mem.id_member IS NULL', |
| 1382 | 1382 | 'fix_collect' => array( |
| 1383 | 1383 | 'index' => 'id_member', |
| 1384 | - 'process' => function ($members) |
|
| 1384 | + 'process' => function($members) |
|
| 1385 | 1385 | { |
| 1386 | 1386 | |
| 1387 | 1387 | global $smcFunc; |
@@ -1412,7 +1412,7 @@ discard block |
||
| 1412 | 1412 | AND p.id_poll IS NULL', |
| 1413 | 1413 | 'fix_collect' => array( |
| 1414 | 1414 | 'index' => 'id_poll', |
| 1415 | - 'process' => function ($polls) |
|
| 1415 | + 'process' => function($polls) |
|
| 1416 | 1416 | { |
| 1417 | 1417 | |
| 1418 | 1418 | global $smcFunc; |
@@ -1443,7 +1443,7 @@ discard block |
||
| 1443 | 1443 | AND lrc.id_report IS NULL', |
| 1444 | 1444 | 'fix_collect' => array( |
| 1445 | 1445 | 'index' => 'id_report', |
| 1446 | - 'process' => function ($reports) |
|
| 1446 | + 'process' => function($reports) |
|
| 1447 | 1447 | { |
| 1448 | 1448 | |
| 1449 | 1449 | global $smcFunc; |
@@ -1474,7 +1474,7 @@ discard block |
||
| 1474 | 1474 | AND lr.id_report IS NULL', |
| 1475 | 1475 | 'fix_collect' => array( |
| 1476 | 1476 | 'index' => 'id_report', |
| 1477 | - 'process' => function ($reports) |
|
| 1477 | + 'process' => function($reports) |
|
| 1478 | 1478 | { |
| 1479 | 1479 | global $smcFunc; |
| 1480 | 1480 | $smcFunc['db_query']('', ' |
@@ -1504,7 +1504,7 @@ discard block |
||
| 1504 | 1504 | GROUP BY lgr.id_member', |
| 1505 | 1505 | 'fix_collect' => array( |
| 1506 | 1506 | 'index' => 'id_member', |
| 1507 | - 'process' => function ($members) |
|
| 1507 | + 'process' => function($members) |
|
| 1508 | 1508 | { |
| 1509 | 1509 | global $smcFunc; |
| 1510 | 1510 | $smcFunc['db_query']('', ' |
@@ -1534,7 +1534,7 @@ discard block |
||
| 1534 | 1534 | GROUP BY lgr.id_group', |
| 1535 | 1535 | 'fix_collect' => array( |
| 1536 | 1536 | 'index' => 'id_group', |
| 1537 | - 'process' => function ($groups) |
|
| 1537 | + 'process' => function($groups) |
|
| 1538 | 1538 | { |
| 1539 | 1539 | global $smcFunc; |
| 1540 | 1540 | $smcFunc['db_query']('', ' |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | require_once($sourcedir . '/Subs-Post.php'); |
| 112 | 112 | |
| 113 | 113 | $errors = array(); |
| 114 | - $news = !isset($_POST['news'])? '' : $smcFunc['htmlspecialchars']($_POST['news'], ENT_QUOTES); |
|
| 114 | + $news = !isset($_POST['news']) ? '' : $smcFunc['htmlspecialchars']($_POST['news'], ENT_QUOTES); |
|
| 115 | 115 | if (empty($news)) |
| 116 | 116 | $errors[] = array('value' => 'no_news'); |
| 117 | 117 | else |