aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-12-03 15:39:06 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-12-03 15:39:06 -0500
commit6027541dc7c8164db2391564f1c71146ada6c813 (patch)
tree028886e686d4bebfd3292c7232b462f81ca971a7 /phpBB/includes/message_parser.php
parent5e225d5d7ab3890a6a06791742d1b2d97d9f40e1 (diff)
parentc1311faebf01db1cd0f27420af31c326b0270d37 (diff)
downloadforums-6027541dc7c8164db2391564f1c71146ada6c813.tar
forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.gz
forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.bz2
forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.xz
forums-6027541dc7c8164db2391564f1c71146ada6c813.zip
Merge remote-tracking branch 'nickvergessen/ticket/develop/10345' into develop
* nickvergessen/ticket/develop/10345: (21 commits) [ticket/10345] Check directly whether the key to use exists [ticket/10345] Return the language key when the key has an empty array [ticket/10345] Document behaviour for floating numbers on phpbb_get_plural_form [ticket/10345] Remove doubled check for valid plural rule [ticket/10345] Add documentation and phpbb_ prefix to the new avatar functions [ticket/10345] Add cases for 1 pixel height on MAX_FLASH and MAX_IMG sizes [ticket/10345] Fix parsing error in language/en/viewtopic.php [ticket/10345] Move rule determination code into a new function [ticket/10345] Fix little type in unit test [ticket/10345] Remove more useless 0-cases [ticket/10345] Make the use of the 0-case optional [ticket/10345] Remove some unused 0 cases [ticket/10345] Fix some last use cases of sprintf() to use $user->lang() [ticket/10345] Add tests for array() as first parameter on call to $user->lang() [ticket/10345] Fix some documentation issues. [ticket/10345] Allow float as array key and add some tests [ticket/10345] Use the plural function in some more places. [ticket/10345] Make use of the plural function in some basic places [ticket/10345] Remove '1 hour ago' string which conflicted with plural rules [ticket/10345] Fix documentation on the new function and the switch ...
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index b3a48112ea..5e8732e94d 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -210,7 +210,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
{
- $this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
+ $this->warn_msg[] = $user->lang('MAX_FONT_SIZE_EXCEEDED', (int) $config['max_' . $this->mode . '_font_size']);
return '[size=' . $stx . ']' . $in . '[/size]';
}
@@ -319,13 +319,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
}
@@ -374,13 +374,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
@@ -772,7 +772,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_quote_depth'] && sizeof($close_tags) >= $config['max_quote_depth'])
{
// there are too many nested quotes
- $error_ary['quote_depth'] = sprintf($user->lang['QUOTE_DEPTH_EXCEEDED'], $config['max_quote_depth']);
+ $error_ary['quote_depth'] = $user->lang('QUOTE_DEPTH_EXCEEDED', (int) $config['max_quote_depth']);
$out .= $buffer . $tok;
$tok = '[]';
@@ -1117,7 +1117,7 @@ class parse_message extends bbcode_firstpass
// Maximum message length check. 0 disables this check completely.
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])
{
- $this->warn_msg[] = sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $message_length, (int) $config['max_' . $mode . '_chars']);
+ $this->warn_msg[] = $user->lang('TOO_MANY_CHARS_' . strtoupper($mode), $message_length, (int) $config['max_' . $mode . '_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
@@ -1126,7 +1126,7 @@ class parse_message extends bbcode_firstpass
{
if (!$message_length || $message_length < (int) $config['min_post_chars'])
{
- $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $message_length, (int) $config['min_post_chars']);
+ $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : $user->lang('TOO_FEW_CHARS_LIMIT', $message_length, (int) $config['min_post_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
}
@@ -1445,7 +1445,7 @@ class parse_message extends bbcode_firstpass
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
}
}
@@ -1536,7 +1536,7 @@ class parse_message extends bbcode_firstpass
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
}
}
}