diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-08-10 21:17:11 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-08-10 21:17:11 +0000 |
commit | 253b6ff14e518a78b2b5043ebb7c54d5e095412f (patch) | |
tree | 919f72173f606207e97d18748bf8d2d0f6c84a3d /phpBB | |
parent | 8d4bb4a17a2ad341be179e8857930899cd589069 (diff) | |
download | forums-253b6ff14e518a78b2b5043ebb7c54d5e095412f.tar forums-253b6ff14e518a78b2b5043ebb7c54d5e095412f.tar.gz forums-253b6ff14e518a78b2b5043ebb7c54d5e095412f.tar.bz2 forums-253b6ff14e518a78b2b5043ebb7c54d5e095412f.tar.xz forums-253b6ff14e518a78b2b5043ebb7c54d5e095412f.zip |
Less bug, more comments
git-svn-id: file:///svn/phpbb/trunk@4370 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/bbcode.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index b7567f2c88..9828b26c09 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -58,7 +58,7 @@ class bbcode { $this->bbcode_cache_init(); } -//echo'<pre>';print_r($this); + $str = array('search' => array(), 'replace' => array()); $preg = array('search' => array(), 'replace' => array()); @@ -108,6 +108,9 @@ class bbcode { $merged_bitfield = $user->theme['primary']['bbcode_bitfield'] | $user->theme['secondary']['bbcode_bitfield']; + // If any of styles has a specific template for any of applicable + // bbcodes then load the primary bbcode.html if present, otherwise + // load the secondary bbcode.html file if ($this->bbcode_bitfield & $merged_bitfield) { $style = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? 'primary' : 'secondary'; @@ -300,11 +303,7 @@ class bbcode if (empty($this->bbcode_template)) { - global $user; - - $tpl_filename = (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/bbcode.html')) ? $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/bbcode.html' : $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/bbcode.html'; - - if (!($fp = @fopen($tpl_filename, 'rb'))) + if (!($fp = @fopen($this->template_filename, 'rb'))) { trigger_error('Could not load bbcode template'); } |