mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[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
This commit is contained in:
parent
b0e0834637
commit
6a87388e69
@ -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)),
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user