From 83ee6bb50504209ef2072773bdd958f9cbe24539 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Thu, 23 Jul 2009 10:19:38 +0000 Subject: [PATCH] primitive one-level nesting git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9838 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index 14ee550ac9..600bf1688c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1193,8 +1193,18 @@ if ($mode == 'quote' && !$submit && !$preview && !$refresh) } else { - $message = '> ' . utf8_wordwrap(censor_text(trim($message_parser->message)), 75, "\n"); - $message = str_replace("\n", "\n> ", $message); + $offset = 0; + $quote_string = "> "; + $message = censor_text(trim($message_parser->message)); + // see if we are nesting. It's easily tricked but should work for one level of nesting + if (strpos($message, ">") !== false) + { + $offset = 10; + } + $message = utf8_wordwrap($message, 75 + $offset, "\n"); + + $message = $quote_string . $message; + $message = str_replace("\n", "\n" . $quote_string, $message); $message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . " :\n" . $message . "\n"; } }