Revert and undoing bug #9736

Won't fix, at least for 3.0.x. Re-review come 3.2.x and perhaps may be able to get localised prefixes, so something like:

Sv: Re: Antwort: <Subject>

... doesn't happen. :P


git-svn-id: file:///svn/phpbb/trunk@7354 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Jonathan Stanley 2007-04-13 15:33:22 +00:00
parent 59c4fad296
commit 5cde784419
4 changed files with 4 additions and 7 deletions

View file

@ -3295,13 +3295,11 @@ function get_preg_expression($mode)
*/ */
function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '') function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '')
{ {
global $user;
$chars = array(); $chars = array();
$strip_reply = false; $strip_reply = false;
$stripped = false; $stripped = false;
if ($allow_reply && strpos($string, $user->lang['SUBJECT_CONCERNING_PREFIX']) === 0) if ($allow_reply && strpos($string, 'Re: ') === 0)
{ {
$strip_reply = true; $strip_reply = true;
$string = substr($string, 4); $string = substr($string, 4);
@ -3320,7 +3318,7 @@ function truncate_string($string, $max_length = 60, $allow_reply = true, $append
if ($strip_reply) if ($strip_reply)
{ {
$string = $user->lang['SUBJECT_CONCERNING_PREFIX'] . $string; $string = 'Re: ' . $string;
} }
if ($append != '' && $stripped) if ($append != '' && $stripped)

View file

@ -674,7 +674,7 @@ function compose_pm($id, $mode, $action)
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh) if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
{ {
$message_subject = ((strpos($message_subject, $user->lang['SUBJECT_CONCERNING_PREFIX']) !== 0) ? $user->lang['SUBJECT_CONCERNING_PREFIX'] : '') . censor_text($message_subject); $message_subject = ((!preg_match('/^Re:/', $message_subject)) ? 'Re: ' : '') . censor_text($message_subject);
} }
if ($action == 'forward' && !$preview && !$refresh && !$submit) if ($action == 'forward' && !$preview && !$refresh && !$submit)

View file

@ -504,7 +504,6 @@ $lang = array_merge($lang, array(
'SUBFORUM' => 'Subforum', 'SUBFORUM' => 'Subforum',
'SUBFORUMS' => 'Subforums', 'SUBFORUMS' => 'Subforums',
'SUBJECT' => 'Subject', 'SUBJECT' => 'Subject',
'SUBJECT_CONCERNING_PREFIX' => 'Re: ', // This is Latin or "concerning" or "about", most Latin influenced languages (id est: those with Latin script) can use this "as is". Localise phrase and punctuation if required.
'SUBMIT' => 'Submit', 'SUBMIT' => 'Submit',
'TERMS_USE' => 'Terms of use', 'TERMS_USE' => 'Terms of use',

View file

@ -1063,7 +1063,7 @@ if ($mode == 'quote' && !$submit && !$preview && !$refresh)
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh) if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
{ {
$post_data['post_subject'] = ((strpos($post_data['post_subject'], $user->lang['SUBJECT_CONCERNING_PREFIX']) !== 0) ? $user->lang['SUBJECT_CONCERNING_PREFIX'] : '') . censor_text($post_data['post_subject']); $post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);
} }
$attachment_data = $message_parser->attachment_data; $attachment_data = $message_parser->attachment_data;