| @@ 532-543 (lines=12) @@ | ||
| 529 | $context['canonical_url'] = $scripturl . '?topic=' . $topic . '.' . ($can_show_all ? '0;all' : $context['start']); |
|
| 530 | ||
| 531 | // For quick reply we need a response prefix in the default forum language. |
|
| 532 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix', 600))) |
|
| 533 | { |
|
| 534 | if ($language === $user_info['language']) |
|
| 535 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 536 | else |
|
| 537 | { |
|
| 538 | loadLanguage('index', $language, false); |
|
| 539 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 540 | loadLanguage('index'); |
|
| 541 | } |
|
| 542 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 543 | } |
|
| 544 | ||
| 545 | // If we want to show event information in the topic, prepare the data. |
|
| 546 | if (allowedTo('calendar_view') && !empty($modSettings['cal_showInTopic']) && !empty($modSettings['cal_enabled'])) |
|
| @@ 222-233 (lines=12) @@ | ||
| 219 | if (isset($_POST['enforce_subject'])) |
|
| 220 | { |
|
| 221 | // Get a response prefix, but in the forum's default language. |
|
| 222 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix'))) |
|
| 223 | { |
|
| 224 | if ($language === $user_info['language']) |
|
| 225 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 226 | else |
|
| 227 | { |
|
| 228 | loadLanguage('index', $language, false); |
|
| 229 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 230 | loadLanguage('index'); |
|
| 231 | } |
|
| 232 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 233 | } |
|
| 234 | ||
| 235 | $smcFunc['db_query']('', ' |
|
| 236 | UPDATE {db_prefix}messages |
|
| @@ 1819-1830 (lines=12) @@ | ||
| 1816 | censorText($row_quoted['body']); |
|
| 1817 | ||
| 1818 | // Add 'Re: ' to it.... |
|
| 1819 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix'))) |
|
| 1820 | { |
|
| 1821 | if ($language === $user_info['language']) |
|
| 1822 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 1823 | else |
|
| 1824 | { |
|
| 1825 | loadLanguage('index', $language, false); |
|
| 1826 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 1827 | loadLanguage('index'); |
|
| 1828 | } |
|
| 1829 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 1830 | } |
|
| 1831 | $form_subject = $row_quoted['subject']; |
|
| 1832 | if ($context['reply'] && trim($context['response_prefix']) != '' && $smcFunc['strpos']($form_subject, trim($context['response_prefix'])) !== 0) |
|
| 1833 | $form_subject = $context['response_prefix'] . $form_subject; |
|
| @@ 1433-1444 (lines=12) @@ | ||
| 1430 | } |
|
| 1431 | ||
| 1432 | // Grab the response prefix (like 'Re: ') in the default forum language. |
|
| 1433 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix'))) |
|
| 1434 | { |
|
| 1435 | if ($language === $user_info['language']) |
|
| 1436 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 1437 | else |
|
| 1438 | { |
|
| 1439 | loadLanguage('index', $language, false); |
|
| 1440 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 1441 | loadLanguage('index'); |
|
| 1442 | } |
|
| 1443 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 1444 | } |
|
| 1445 | ||
| 1446 | // Change the topic IDs of all messages that will be merged. Also adjust subjects if 'enforce subject' was checked. |
|
| 1447 | $smcFunc['db_query']('', ' |
|
| @@ 427-438 (lines=12) @@ | ||
| 424 | } |
|
| 425 | ||
| 426 | // Get a response prefix (like 'Re:') in the default forum language. |
|
| 427 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix'))) |
|
| 428 | { |
|
| 429 | if ($language === $user_info['language']) |
|
| 430 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 431 | else |
|
| 432 | { |
|
| 433 | loadLanguage('index', $language, false); |
|
| 434 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 435 | loadLanguage('index'); |
|
| 436 | } |
|
| 437 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 438 | } |
|
| 439 | ||
| 440 | // Previewing, modifying, or posting? |
|
| 441 | // Do we have a body, but an error happened. |
|
| @@ 2883-2894 (lines=12) @@ | ||
| 2880 | if (isset($_POST['subject']) && isset($_REQUEST['change_all_subjects']) && $row['id_first_msg'] == $row['id_msg'] && !empty($row['num_replies']) && (allowedTo('modify_any') || ($row['id_member_started'] == $user_info['id'] && allowedTo('modify_replies')))) |
|
| 2881 | { |
|
| 2882 | // Get the proper (default language) response prefix first. |
|
| 2883 | if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix'))) |
|
| 2884 | { |
|
| 2885 | if ($language === $user_info['language']) |
|
| 2886 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 2887 | else |
|
| 2888 | { |
|
| 2889 | loadLanguage('index', $language, false); |
|
| 2890 | $context['response_prefix'] = $txt['response_prefix']; |
|
| 2891 | loadLanguage('index'); |
|
| 2892 | } |
|
| 2893 | cache_put_data('response_prefix', $context['response_prefix'], 600); |
|
| 2894 | } |
|
| 2895 | ||
| 2896 | $smcFunc['db_query']('', ' |
|
| 2897 | UPDATE {db_prefix}messages |
|