aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/bbcode.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-05-20 08:59:19 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-05-20 08:59:19 +0200
commit91cace06a5b8d0d2b2446429ec404acda0f42e5b (patch)
treee7100cc983c60a648f7086c3f7b73833ab6c5a1f /phpBB/includes/bbcode.php
parent358c634153bd5fc5fe6a80a2c129e70adb107093 (diff)
downloadforums-91cace06a5b8d0d2b2446429ec404acda0f42e5b.tar
forums-91cace06a5b8d0d2b2446429ec404acda0f42e5b.tar.gz
forums-91cace06a5b8d0d2b2446429ec404acda0f42e5b.tar.bz2
forums-91cace06a5b8d0d2b2446429ec404acda0f42e5b.tar.xz
forums-91cace06a5b8d0d2b2446429ec404acda0f42e5b.zip
[ticket/13832] Resolve minor coding issues
PHPBB3-13832
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r--phpBB/includes/bbcode.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 0c9869fe25..ac5b3e6390 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -403,14 +403,7 @@ class bbcode
// Replace {L_*} lang strings
$bbcode_tpl = preg_replace_callback('/{L_([A-Z0-9_]+)}/', function ($match) use ($user) {
- if (!empty($user->lang[$match['1']]))
- {
- return $user->lang[$match['1']];
- }
- else
- {
- return ucwords(strtolower(str_replace('_', ' ', $match['1'])));
- }
+ return (!empty($user->lang[$match[1]])) ? $user->lang($match[1]) : ucwords(strtolower(str_replace('_', ' ', $match[1])));
}, $bbcode_tpl);
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) {
- if (!empty($user->lang[$match['1']]))
- {
- return $user->lang[$match['1']];
- }
- else
- {
- return ucwords(strtolower(str_replace('_', ' ', $match['1'])));
- }
+ return (!empty($user->lang[$match[1]])) ? $user->lang($match[1]) : ucwords(strtolower(str_replace('_', ' ', $match[1])));
}, $tpl);
if (!empty($replacements[$tpl_name]))