diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-07 19:26:28 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-07 19:26:28 -0400 |
| commit | df46a576e952881df963dcc03daede58dfb98927 (patch) | |
| tree | 8581a464c69364f0ff0a2b6246f48017577d69fe /phpBB/includes/bbcode.php | |
| parent | db257956aa02a2533577a4e4081c2502dbd3ee00 (diff) | |
| download | forums-df46a576e952881df963dcc03daede58dfb98927.tar forums-df46a576e952881df963dcc03daede58dfb98927.tar.gz forums-df46a576e952881df963dcc03daede58dfb98927.tar.bz2 forums-df46a576e952881df963dcc03daede58dfb98927.tar.xz forums-df46a576e952881df963dcc03daede58dfb98927.zip | |
[feature/template-engine] Use template engine class in bbcode class.
PHPBB3-9726
Diffstat (limited to 'phpBB/includes/bbcode.php')
| -rw-r--r-- | phpBB/includes/bbcode.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index a360bcd5d1..c29875dcbf 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -128,28 +128,17 @@ class bbcode */ function bbcode_cache_init() { - global $phpbb_root_path, $template, $user; + global $phpbb_root_path, $phpEx, $template, $config, $user; if (empty($this->template_filename)) { $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); - $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html'; - if (!@file_exists($this->template_filename)) - { - if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) - { - $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; - if (!@file_exists($this->template_filename)) - { - trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR); - } - } - else - { - trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR); - } - } + $template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user); + $template->set_template(); + $locator = $template->_get_locator(); + $locator->set_filenames(array('bbcode.html' => 'bbcode.html')); + $this->template_filename = $locator->get_source_file_for_handle('bbcode.html'); } $bbcode_ids = $rowset = $sql = array(); |
