mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Less bug, more comments
git-svn-id: file:///svn/phpbb/trunk@4370 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8d4bb4a17a
commit
253b6ff14e
1 changed files with 5 additions and 6 deletions
|
@ -58,7 +58,7 @@ class bbcode
|
||||||
{
|
{
|
||||||
$this->bbcode_cache_init();
|
$this->bbcode_cache_init();
|
||||||
}
|
}
|
||||||
//echo'<pre>';print_r($this);
|
|
||||||
$str = array('search' => array(), 'replace' => array());
|
$str = array('search' => array(), 'replace' => array());
|
||||||
$preg = 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'];
|
$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)
|
if ($this->bbcode_bitfield & $merged_bitfield)
|
||||||
{
|
{
|
||||||
$style = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? 'primary' : 'secondary';
|
$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))
|
if (empty($this->bbcode_template))
|
||||||
{
|
{
|
||||||
global $user;
|
if (!($fp = @fopen($this->template_filename, 'rb')))
|
||||||
|
|
||||||
$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')))
|
|
||||||
{
|
{
|
||||||
trigger_error('Could not load bbcode template');
|
trigger_error('Could not load bbcode template');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue