aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.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/posting.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/posting.php')
-rw-r--r--phpBB/posting.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 207ac32a3d..eef186c377 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -322,7 +322,7 @@ if ($mode == 'bump')
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url);
- $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $meta_url . '">', '</a>');
+ $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
trigger_error($message);
@@ -841,7 +841,7 @@ if ($submit || $preview || $refresh)
if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false)
{
$min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars'];
- $error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount);
+ $error[] = $user->lang('FIELD_' . $result, $min_max_amount, $user->lang['USERNAME']);
}
}
@@ -1154,8 +1154,8 @@ if (!sizeof($error) && $preview)
'POLL_QUESTION' => $parse_poll->message,
'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_end)) : '',
- 'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
- );
+ 'L_MAX_VOTES' => $user->lang('MAX_OPTIONS_SELECT', (int) $post_data['poll_max_options']),
+ ));
$parse_poll->message = implode("\n", $post_data['poll_options']);
$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
@@ -1357,7 +1357,7 @@ add_form_key('posting');
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && $post_id != $post_data['topic_first_post_id'])) ? $user->lang['POST_ICON'] : $user->lang['TOPIC_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
'FORUM_NAME' => $post_data['forum_name'],
'FORUM_DESC' => ($post_data['forum_desc']) ? generate_text_for_display($post_data['forum_desc'], $post_data['forum_desc_uid'], $post_data['forum_desc_bitfield'], $post_data['forum_desc_options']) : '',
@@ -1430,7 +1430,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false,
- 'L_POLL_OPTIONS_EXPLAIN' => sprintf($user->lang['POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN'], $config['max_poll_options']),
+ 'L_POLL_OPTIONS_EXPLAIN' => $user->lang('POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN', (int) $config['max_poll_options']),
'VOTE_CHANGE_CHECKED' => (!empty($post_data['poll_vote_change'])) ? ' checked="checked"' : '',
'POLL_TITLE' => (isset($post_data['poll_title'])) ? $post_data['poll_title'] : '',