diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-10-26 23:55:19 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-10-26 23:55:19 +0200 |
commit | 6a87388e69dc1e85768bd61f146aa22a8f898130 (patch) | |
tree | a09fff401b283bae5d8abb7cf98dd7d7fac40016 /phpBB | |
parent | b0e0834637172c86f3a152034d77d558e95b2e61 (diff) | |
download | forums-6a87388e69dc1e85768bd61f146aa22a8f898130.tar forums-6a87388e69dc1e85768bd61f146aa22a8f898130.tar.gz forums-6a87388e69dc1e85768bd61f146aa22a8f898130.tar.bz2 forums-6a87388e69dc1e85768bd61f146aa22a8f898130.tar.xz forums-6a87388e69dc1e85768bd61f146aa22a8f898130.zip |
[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
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 5 |
1 files 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)), )); } |