From eef1b586d5b89acda9e18b2d7b2c051e10d18ef8 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 2 Dec 2013 00:53:42 -0800 Subject: [ticket/12048] Fix the regexp for language keys in custom bbcodes. PHPBB3-12048 --- phpBB/includes/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 9356e3e9b4..f587e111f3 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -376,7 +376,7 @@ class bbcode } // Replace {L_*} lang strings - $bbcode_tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl); + $bbcode_tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl); if (!empty($rowset[$bbcode_id]['second_pass_replace'])) { @@ -480,7 +480,7 @@ class bbcode 'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2') ); - $tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl); + $tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl); if (!empty($replacements[$tpl_name])) { -- cgit v1.2.1 From ca7f4fb5311849794957ac989e0c3090efebb66d Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Tue, 23 Sep 2014 23:03:07 +0200 Subject: [ticket/10985] Add fix to properly inherit style during update process PHPBB3-10985 --- phpBB/includes/bbcode.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index f587e111f3..3c25fd6587 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -135,6 +135,11 @@ class bbcode $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html'; + if (empty($user->theme['template_inherits_id']) && !empty($template->orig_tpl_inherits_id)) + { + $user->theme['template_inherits_id'] = $template->orig_tpl_inherits_id; + } + if (!@file_exists($this->template_filename)) { if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) -- cgit v1.2.1