From 6a87388e69dc1e85768bd61f146aa22a8f898130 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 26 Oct 2013 23:55:19 +0200 Subject: [PATCH] [ticket/11973] Remove logic from tokens language array Previously if a translator did no translate a token, it would not be displayed. On the other hand, the translator could add additional tokens which have no functionality. Functionality is already hardcoded into bbcode.php so we can that in the ACP aswell, in order to prevent namend issues. PHPBB3-11973 --- phpBB/includes/acp/acp_bbcodes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index dca39df38c..575ac84012 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -108,11 +108,12 @@ class acp_bbcodes 'DISPLAY_ON_POSTING' => $display_on_posting) ); - foreach ($user->lang['tokens'] as $token => $token_explain) + $bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR'); + foreach ($bbcode_tokens as $token) { $template->assign_block_vars('token', array( 'TOKEN' => '{' . $token . '}', - 'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain, + 'EXPLAIN' => ($token === 'LOCAL_URL') ? $user->lang(array('tokens', $token), generate_board_url() . '/') : $user->lang(array('tokens', $token)), )); }