aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-02-17 13:48:48 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-02-17 13:48:48 +0100
commitd70c3f1eb8c0ddc68d8eda1bd8708c4957c21182 (patch)
treec0081f9deac588982d2e00cf935daabb03af6605 /phpBB/includes/message_parser.php
parent7295e5824aed6f5ec32cfab0ad17cfa2c24855ac (diff)
parent9611b5ff83582d7bda22ab991e8d69786dab5b93 (diff)
downloadforums-d70c3f1eb8c0ddc68d8eda1bd8708c4957c21182.tar
forums-d70c3f1eb8c0ddc68d8eda1bd8708c4957c21182.tar.gz
forums-d70c3f1eb8c0ddc68d8eda1bd8708c4957c21182.tar.bz2
forums-d70c3f1eb8c0ddc68d8eda1bd8708c4957c21182.tar.xz
forums-d70c3f1eb8c0ddc68d8eda1bd8708c4957c21182.zip
Merge branch 'develop' into ticket/10380
* develop: (325 commits) [ticket/10641] Update MCP template with new plurality forms [ticket/10637] Leftovers from implementation of extensions in convertor [ticket/10637] Leftovers from implementation of extensions in develop tools [ticket/10637] Leftovers from implementation of extensions in mcp_post [ticket/10637] Leftovers from implementation of extensions in mcp_main [ticket/10637] Leftovers from implementation of extensions [ticket/10606] Also correctly use $s_search_hidden_fields in view(forum|topic). [ticket/10606] Fix incorrect hidden fields array name in page_header(). [ticket/10633] Stop leaking filename of attachments when thumbnail is requested [ticket/10636] Resolve variable name ($sql_ary) conflict in cache_moderators(). [ticket/10634] Specify module type when viewing profile [ticket/10634] Changing p_master::is_full_class [ticket/10569] Invalid string comparison in prosilver [ticket/10495] Update request/type_cast_helper for PHP 5.4 magic_quotes_gpc drop [ticket/10512] Call startup.php from tests/bootstrap.php [ticket/10535] Delete no longer needed email confirm language entries. [ticket/9914] Add backup warning to updater. [ticket/10616] Add template inheritance to exported template [ticket/10616] Ignore template inheritance that points to self [ticket/10616] Add template inheritance to default styles ...
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index b3a48112ea..6695047b56 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -210,7 +209,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 +318,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 +373,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 +771,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 +1116,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 +1125,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 +1444,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 +1535,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']);
}
}
}