@@ -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) |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $replacement[$key] = 'null'; |
282 | 282 | if (!isValidIP($value)) |
283 | 283 | smf_db_error_backtrace('Wrong value type sent to the database. IPv4 or IPv6 expected.(' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
284 | - $replacement[$key] = sprintf('unhex(\'%1$s\')', bin2hex(inet_pton($value))); |
|
284 | + $replacement[$key] = sprintf('unhex(\'%1$s\')', bin2hex(inet_pton($value))); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | return implode(', ', $replacement); |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | * @param bool $translate_human_wildcards If true, turns human readable wildcards into SQL wildcards. |
869 | 869 | * @return string The escaped string |
870 | 870 | */ |
871 | -function smf_db_escape_wildcard_string($string, $translate_human_wildcards=false) |
|
871 | +function smf_db_escape_wildcard_string($string, $translate_human_wildcards = false) |
|
872 | 872 | { |
873 | 873 | $replacements = array( |
874 | 874 | '%' => '\%', |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | // Use cache when possible. |
74 | - if (($cache = cache_get_data('attachment_lookup_id-'. $attachId)) != null) |
|
74 | + if (($cache = cache_get_data('attachment_lookup_id-' . $attachId)) != null) |
|
75 | 75 | list($file, $thumbFile) = $cache; |
76 | 76 | |
77 | 77 | // Get the info from the DB. |
78 | - if(empty($file) || empty($thumbFile) && !empty($file['id_thumb'])) |
|
78 | + if (empty($file) || empty($thumbFile) && !empty($file['id_thumb'])) |
|
79 | 79 | { |
80 | 80 | // Do we have a hook wanting to use our attachment system? We use $attachRequest to prevent accidental usage of $request. |
81 | 81 | $attachRequest = null; |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | $file['filePath'] = getAttachmentFilename($file['filename'], $attachId, $file['id_folder'], false, $file['file_hash']); |
145 | 145 | // ensure variant attachment compatibility |
146 | 146 | $filePath = pathinfo($file['filePath']); |
147 | - $file['filePath'] = !file_exists($file['filePath']) ? substr($file['filePath'], 0, -(strlen($filePath['extension'])+1)) : $file['filePath']; |
|
148 | - $file['etag'] = '"'. md5_file($file['filePath']) .'"'; |
|
147 | + $file['filePath'] = !file_exists($file['filePath']) ? substr($file['filePath'], 0, -(strlen($filePath['extension']) + 1)) : $file['filePath']; |
|
148 | + $file['etag'] = '"' . md5_file($file['filePath']) . '"'; |
|
149 | 149 | |
150 | 150 | // now get the thumbfile! |
151 | 151 | $thumbFile = array(); |
@@ -171,13 +171,13 @@ discard block |
||
171 | 171 | |
172 | 172 | // set filePath and ETag time |
173 | 173 | $thumbFile['filePath'] = getAttachmentFilename($thumbFile['filename'], $attachId, $thumbFile['id_folder'], false, $thumbFile['file_hash']); |
174 | - $thumbFile['etag'] = '"'. md5_file($thumbFile['filePath']) .'"'; |
|
174 | + $thumbFile['etag'] = '"' . md5_file($thumbFile['filePath']) . '"'; |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 | |
178 | 178 | // Cache it. |
179 | - if(!empty($file) || !empty($thumbFile)) |
|
180 | - cache_put_data('attachment_lookup_id-'. $file['id_attach'], array($file, $thumbFile), mt_rand(850, 900)); |
|
179 | + if (!empty($file) || !empty($thumbFile)) |
|
180 | + cache_put_data('attachment_lookup_id-' . $file['id_attach'], array($file, $thumbFile), mt_rand(850, 900)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // Update the download counter (unless it's a thumbnail). |
@@ -289,17 +289,17 @@ discard block |
||
289 | 289 | if (!empty($modSettings['attachmentRecodeLineEndings']) && !isset($_REQUEST['image']) && in_array($file['fileext'], array('txt', 'css', 'htm', 'html', 'php', 'xml'))) |
290 | 290 | { |
291 | 291 | if (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== false) |
292 | - $callback = function ($buffer) |
|
292 | + $callback = function($buffer) |
|
293 | 293 | { |
294 | 294 | return preg_replace('~[\r]?\n~', "\r\n", $buffer); |
295 | 295 | }; |
296 | 296 | elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) |
297 | - $callback = function ($buffer) |
|
297 | + $callback = function($buffer) |
|
298 | 298 | { |
299 | 299 | return preg_replace('~[\r]?\n~', "\r", $buffer); |
300 | 300 | }; |
301 | 301 | else |
302 | - $callback = function ($buffer) |
|
302 | + $callback = function($buffer) |
|
303 | 303 | { |
304 | 304 | return preg_replace('~[\r]?\n~', "\n", $buffer); |
305 | 305 | }; |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | 'Shitiz "Dragooon" Garg', |
591 | 591 | 'Karl "RegularExpression" Benson', |
592 | 592 | 'Matthew "Labradoodle-360" Kerle', |
593 | - $user_info['is_admin'] ? 'Matt "Grudge" Wolf': 'Grudge', |
|
593 | + $user_info['is_admin'] ? 'Matt "Grudge" Wolf' : 'Grudge', |
|
594 | 594 | 'Michael "Thantos" Miller', |
595 | 595 | 'Norv', |
596 | 596 | 'Peter "Arantor" Spicer', |
@@ -813,13 +813,13 @@ discard block |
||
813 | 813 | $credit_info = smf_json_decode($row['credits'], true); |
814 | 814 | |
815 | 815 | $copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' © ' . $smcFunc['htmlspecialchars']($credit_info['copyright']); |
816 | - $license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="'. $smcFunc['htmlspecialchars']($credit_info['licenseurl']) .'">'. $smcFunc['htmlspecialchars']($credit_info['license']) .'</a>' : $smcFunc['htmlspecialchars']($credit_info['license'])); |
|
816 | + $license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="' . $smcFunc['htmlspecialchars']($credit_info['licenseurl']) . '">' . $smcFunc['htmlspecialchars']($credit_info['license']) . '</a>' : $smcFunc['htmlspecialchars']($credit_info['license'])); |
|
817 | 817 | $version = $txt['credits_version'] . ' ' . $row['version']; |
818 | 818 | $title = (empty($credit_info['title']) ? $row['name'] : $smcFunc['htmlspecialchars']($credit_info['title'])) . ': ' . $version; |
819 | 819 | |
820 | 820 | // build this one out and stash it away |
821 | 821 | $mod_name = empty($credit_info['url']) ? $title : '<a href="' . $credit_info['url'] . '">' . $title . '</a>'; |
822 | - $mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : ''); |
|
822 | + $mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : ''); |
|
823 | 823 | } |
824 | 824 | cache_put_data('mods_credits', $mods, 86400); |
825 | 825 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | locked = {int:locked}, |
86 | 86 | is_sticky = {int:is_sticky} |
87 | 87 | WHERE id_draft = {int:id_draft}', |
88 | - array ( |
|
88 | + array( |
|
89 | 89 | 'id_topic' => $topic_id, |
90 | 90 | 'id_board' => $board, |
91 | 91 | 'poster_time' => time(), |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | DELETE FROM {db_prefix}user_drafts |
412 | 412 | WHERE id_draft IN ({array_int:id_draft})' . ($check ? ' |
413 | 413 | AND id_member = {int:id_member}' : ''), |
414 | - array ( |
|
414 | + array( |
|
415 | 415 | 'id_draft' => $id_draft, |
416 | 416 | 'id_member' => empty($user_info['id']) ? -1 : $user_info['id'], |
417 | 417 | ) |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $context['drafts'][] = array( |
473 | 473 | 'subject' => censorText(shorten_subject(stripslashes($row['subject']), 24)), |
474 | 474 | 'poster_time' => timeformat($row['poster_time']), |
475 | - 'link' => '<a href="' . $scripturl . '?action=post;board=' . $row['id_board'] . ';' . (!empty($row['id_topic']) ? 'topic='. $row['id_topic'] .'.0;' : '') . 'id_draft=' . $row['id_draft'] . '">' . $row['subject'] . '</a>', |
|
475 | + 'link' => '<a href="' . $scripturl . '?action=post;board=' . $row['id_board'] . ';' . (!empty($row['id_topic']) ? 'topic=' . $row['id_topic'] . '.0;' : '') . 'id_draft=' . $row['id_draft'] . '">' . $row['subject'] . '</a>', |
|
476 | 476 | ); |
477 | 477 | // PM drafts |
478 | 478 | elseif ($draft_type === 1) |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | 'items_per_page' => $modSettings['defaultMaxListItems'], |
263 | 263 | 'base_href' => $scripturl . '?action=admin;area=paidsubscribe;sa=view', |
264 | 264 | 'get_items' => array( |
265 | - 'function' => function ($start, $items_per_page) use ($context) |
|
265 | + 'function' => function($start, $items_per_page) use ($context) |
|
266 | 266 | { |
267 | 267 | $subscriptions = array(); |
268 | 268 | $counter = 0; |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | }, |
282 | 282 | ), |
283 | 283 | 'get_count' => array( |
284 | - 'function' => function () use ($context) |
|
284 | + 'function' => function() use ($context) |
|
285 | 285 | { |
286 | 286 | return count($context['subscriptions']); |
287 | 287 | }, |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | 'style' => 'width: 35%;', |
295 | 295 | ), |
296 | 296 | 'data' => array( |
297 | - 'function' => function ($rowData) use ($scripturl) |
|
297 | + 'function' => function($rowData) use ($scripturl) |
|
298 | 298 | { |
299 | 299 | return sprintf('<a href="%1$s?action=admin;area=paidsubscribe;sa=viewsub;sid=%2$s">%3$s</a>', $scripturl, $rowData['id'], $rowData['name']); |
300 | 300 | }, |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | 'value' => $txt['paid_cost'], |
306 | 306 | ), |
307 | 307 | 'data' => array( |
308 | - 'function' => function ($rowData) use ($txt) |
|
308 | + 'function' => function($rowData) use ($txt) |
|
309 | 309 | { |
310 | 310 | return $rowData['flexible'] ? '<em>' . $txt['flexible'] . '</em>' : $rowData['cost'] . ' / ' . $rowData['length']; |
311 | 311 | }, |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | 'class' => 'centercol', |
349 | 349 | ), |
350 | 350 | 'data' => array( |
351 | - 'function' => function ($rowData) use ($txt) |
|
351 | + 'function' => function($rowData) use ($txt) |
|
352 | 352 | { |
353 | 353 | return '<span style="color: ' . ($rowData['active'] ? 'green' : 'red') . '">' . ($rowData['active'] ? $txt['yes'] : $txt['no']) . '</span>'; |
354 | 354 | }, |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | ), |
358 | 358 | 'modify' => array( |
359 | 359 | 'data' => array( |
360 | - 'function' => function ($rowData) use ($txt, $scripturl) |
|
360 | + 'function' => function($rowData) use ($txt, $scripturl) |
|
361 | 361 | { |
362 | 362 | return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;sid=' . $rowData['id'] . '">' . $txt['modify'] . '</a>'; |
363 | 363 | }, |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | ), |
367 | 367 | 'delete' => array( |
368 | 368 | 'data' => array( |
369 | - 'function' => function ($rowData) use ($scripturl, $txt) |
|
369 | + 'function' => function($rowData) use ($scripturl, $txt) |
|
370 | 370 | { |
371 | 371 | return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;delete;sid=' . $rowData['id'] . '">' . $txt['delete'] . '</a>'; |
372 | 372 | }, |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | 'style' => 'width: 20%;', |
824 | 824 | ), |
825 | 825 | 'data' => array( |
826 | - 'function' => function ($rowData) use ($scripturl, $txt) |
|
826 | + 'function' => function($rowData) use ($scripturl, $txt) |
|
827 | 827 | { |
828 | 828 | return $rowData['id_member'] == 0 ? $txt['guest'] : '<a href="' . $scripturl . '?action=profile;u=' . $rowData['id_member'] . '">' . $rowData['name'] . '</a>'; |
829 | 829 | }, |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | 'class' => 'centercol', |
894 | 894 | ), |
895 | 895 | 'data' => array( |
896 | - 'function' => function ($rowData) use ($scripturl, $txt) |
|
896 | + 'function' => function($rowData) use ($scripturl, $txt) |
|
897 | 897 | { |
898 | 898 | return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $rowData['id'] . '">' . $txt['modify'] . '</a>'; |
899 | 899 | }, |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | 'class' => 'centercol', |
907 | 907 | ), |
908 | 908 | 'data' => array( |
909 | - 'function' => function ($rowData) |
|
909 | + 'function' => function($rowData) |
|
910 | 910 | { |
911 | 911 | return '<input type="checkbox" name="delsub[' . $rowData['id'] . ']" class="input_check">'; |
912 | 912 | }, |
@@ -1950,7 +1950,7 @@ discard block |
||
1950 | 1950 | { |
1951 | 1951 | while (($file = readdir($dh)) !== false) |
1952 | 1952 | { |
1953 | - if (is_file($sourcedir .'/'. $file) && preg_match('~^Subscriptions-([A-Za-z\d]+)\.php$~', $file, $matches)) |
|
1953 | + if (is_file($sourcedir . '/' . $file) && preg_match('~^Subscriptions-([A-Za-z\d]+)\.php$~', $file, $matches)) |
|
1954 | 1954 | { |
1955 | 1955 | // Check this is definitely a valid gateway! |
1956 | 1956 | $fp = fopen($sourcedir . '/' . $file, 'rb'); |
@@ -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 | |
194 | 194 | });', true); |
@@ -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! |
@@ -398,7 +398,7 @@ |
||
398 | 398 | } |
399 | 399 | $smcFunc['db_free_result']($request); |
400 | 400 | |
401 | - if($updateBoardCount) |
|
401 | + if ($updateBoardCount) |
|
402 | 402 | { |
403 | 403 | // Decrease the posts/topics... |
404 | 404 | foreach ($adjustBoards as $stats) |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | ) |
361 | 361 | ); |
362 | 362 | $context['messages'] = array(); |
363 | - for ($counter = 0; $row = $smcFunc['db_fetch_assoc']($request); $counter ++) |
|
363 | + for ($counter = 0; $row = $smcFunc['db_fetch_assoc']($request); $counter++) |
|
364 | 364 | { |
365 | 365 | censorText($row['subject']); |
366 | 366 | censorText($row['body']); |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | ) |
401 | 401 | ); |
402 | 402 | $context['messages'] = array(); |
403 | - for ($counter = 0; $row = $smcFunc['db_fetch_assoc']($request); $counter ++) |
|
403 | + for ($counter = 0; $row = $smcFunc['db_fetch_assoc']($request); $counter++) |
|
404 | 404 | { |
405 | 405 | censorText($row['subject']); |
406 | 406 | censorText($row['body']); |
@@ -1098,7 +1098,7 @@ discard block |
||
1098 | 1098 | $firstTopic = $row['id_topic']; |
1099 | 1099 | |
1100 | 1100 | // Lowest topic id gets selected as surviving topic id. We need to store this board so we can adjust the topic count (This one will not have a redirect topic) |
1101 | - if($row['id_topic'] < $lowestTopicId || empty($lowestTopicId) ) |
|
1101 | + if ($row['id_topic'] < $lowestTopicId || empty($lowestTopicId)) |
|
1102 | 1102 | { |
1103 | 1103 | $lowestTopicId = $row['id_topic']; |
1104 | 1104 | $lowestTopicBoard = $row['id_board']; |
@@ -1404,7 +1404,7 @@ discard block |
||
1404 | 1404 | } |
1405 | 1405 | |
1406 | 1406 | // Update subject search index |
1407 | - updateStats('subject',$this_old_topic,$redirect_subject); |
|
1407 | + updateStats('subject', $this_old_topic, $redirect_subject); |
|
1408 | 1408 | } |
1409 | 1409 | } |
1410 | 1410 |
@@ -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']('', ' |