diff options
Diffstat (limited to 'phpBB/includes/bbcode.php')
| -rw-r--r-- | phpBB/includes/bbcode.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 18b5e961a7..db0f330c36 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -276,16 +276,18 @@ class bbcode ); } - if ($bbcode_id != -1 && !($user->theme['bbcode_bitfield'] & (1 << $bbcode_id))) + if ($bbcode_id != -1 && !($user->theme['primary']['bbcode_bitfield'] & (1 << $bbcode_id))) { return $bbcode_hardtpl[$tpl_name]; } if (empty($this->bbcode_template)) { - $tpl_filename = $template->make_filename('bbcode.html'); + global $user; - if (!$fp = @fopen($tpl_filename, 'rb')) + $tpl_filename = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? $phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html' : $phpbb_root_path . 'styles/templates/' . $user->theme['secondary']['template_path'] . '/bbcode.html'; + + if (!($fp = @fopen($tpl_filename, 'rb'))) { trigger_error('Could not load bbcode template'); } |
