[ticket/13832] Resolve minor coding issues

PHPBB3-13832
This commit is contained in:
Marc Alexander 2015-05-20 08:59:19 +02:00
parent 358c634153
commit 91cace06a5
2 changed files with 3 additions and 17 deletions

View file

@ -403,14 +403,7 @@ class bbcode
// Replace {L_*} lang strings // Replace {L_*} lang strings
$bbcode_tpl = preg_replace_callback('/{L_([A-Z0-9_]+)}/', function ($match) use ($user) { $bbcode_tpl = preg_replace_callback('/{L_([A-Z0-9_]+)}/', function ($match) use ($user) {
if (!empty($user->lang[$match['1']])) return (!empty($user->lang[$match[1]])) ? $user->lang($match[1]) : ucwords(strtolower(str_replace('_', ' ', $match[1])));
{
return $user->lang[$match['1']];
}
else
{
return ucwords(strtolower(str_replace('_', ' ', $match['1'])));
}
}, $bbcode_tpl); }, $bbcode_tpl);
if (!empty($rowset[$bbcode_id]['second_pass_replace'])) if (!empty($rowset[$bbcode_id]['second_pass_replace']))
@ -536,14 +529,7 @@ class bbcode
); );
$tpl = preg_replace_callback('/{L_([A-Z0-9_]+)}/', function ($match) use ($user) { $tpl = preg_replace_callback('/{L_([A-Z0-9_]+)}/', function ($match) use ($user) {
if (!empty($user->lang[$match['1']])) return (!empty($user->lang[$match[1]])) ? $user->lang($match[1]) : ucwords(strtolower(str_replace('_', ' ', $match[1])));
{
return $user->lang[$match['1']];
}
else
{
return ucwords(strtolower(str_replace('_', ' ', $match['1'])));
}
}, $tpl); }, $tpl);
if (!empty($replacements[$tpl_name])) if (!empty($replacements[$tpl_name]))