diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2009-07-23 10:19:38 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2009-07-23 10:19:38 +0000 |
commit | 83ee6bb50504209ef2072773bdd958f9cbe24539 (patch) | |
tree | 752c0964b478ccdc1b82136df5dfe67aca72de97 /phpBB/posting.php | |
parent | 24e9d1e53f9005059a3aa2ec7f74d441d7eb504e (diff) | |
download | forums-83ee6bb50504209ef2072773bdd958f9cbe24539.tar forums-83ee6bb50504209ef2072773bdd958f9cbe24539.tar.gz forums-83ee6bb50504209ef2072773bdd958f9cbe24539.tar.bz2 forums-83ee6bb50504209ef2072773bdd958f9cbe24539.tar.xz forums-83ee6bb50504209ef2072773bdd958f9cbe24539.zip |
primitive one-level nesting
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9838 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 14 |
1 files 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"; } } |