aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-05-15 16:48:18 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-05-15 16:48:18 +0200
commita496015b985105dff1daed26ad172a3601fbbbd9 (patch)
treea8aacc8f703701bbee7aa19f33a35ebae759c728 /phpBB
parent46ca856bda727bb93d73d5fca7cfe88d31f87b51 (diff)
parent34c1691d7e5ccf607ee72366aa0b7b19474c71e4 (diff)
downloadforums-a496015b985105dff1daed26ad172a3601fbbbd9.tar
forums-a496015b985105dff1daed26ad172a3601fbbbd9.tar.gz
forums-a496015b985105dff1daed26ad172a3601fbbbd9.tar.bz2
forums-a496015b985105dff1daed26ad172a3601fbbbd9.tar.xz
forums-a496015b985105dff1daed26ad172a3601fbbbd9.zip
Merge pull request #2463 from nickvergessen/ticket/12433
[ticket/12433] Use a different message when nesting of quotes is not allowed * nickvergessen/ticket/12433: [ticket/12433] Use a different message when nesting of quotes is not allowed
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/message_parser.php12
-rw-r--r--phpBB/language/en/posting.php1
2 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 901bafbb2e..8bf50b0ca3 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -776,8 +776,16 @@ class bbcode_firstpass extends bbcode
// the buffer holds a valid opening tag
if ($config['max_quote_depth'] && sizeof($close_tags) >= $config['max_quote_depth'])
{
- // there are too many nested quotes
- $error_ary['quote_depth'] = $user->lang('QUOTE_DEPTH_EXCEEDED', (int) $config['max_quote_depth']);
+ if ($config['max_quote_depth'] == 1)
+ {
+ // Depth 1 - no nesting is allowed
+ $error_ary['quote_depth'] = $user->lang('QUOTE_NO_NESTING');
+ }
+ else
+ {
+ // There are too many nested quotes
+ $error_ary['quote_depth'] = $user->lang('QUOTE_DEPTH_EXCEEDED', (int) $config['max_quote_depth']);
+ }
$out .= $buffer . $tok;
$tok = '[]';
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 562d3d448e..59d22aae23 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -221,6 +221,7 @@ $lang = array_merge($lang, array(
1 => 'You may embed only %d quote within each other.',
2 => 'You may embed only %d quotes within each other.',
),
+ 'QUOTE_NO_NESTING' => 'You may not embed quotes within each other.',
'SAVE' => 'Save',
'SAVE_DATE' => 'Saved at',