From d30d4987f3c0e474d7b106e42cb5c10b0a768eae Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 22 Apr 2003 00:42:06 +0000 Subject: [PATCH] Move second parse cache init after assignment of bitfield ... in case bitfield isn't set globally git-svn-id: file:///svn/phpbb/trunk@3914 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 6d73e470a8..44488e6886 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -36,11 +36,6 @@ class bbcode function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = '') { - if (empty($this->bbcode_cache)) - { - $this->bbcode_cache_init(); - } - if ($bbcode_uid) { $this->bbcode_uid = $bbcode_uid; @@ -50,6 +45,11 @@ class bbcode $this->bbcode_bitfield = $bbcode_bitfield; } + if (empty($this->bbcode_cache)) + { + $this->bbcode_cache_init(); + } + $str = array('search' => array(), 'replace' => array()); $preg = array('search' => array(), 'replace' => array()); @@ -101,7 +101,6 @@ class bbcode { continue; } - $bbcode_ids[] = $bbcode_id; // WARNING: hardcoded values. it assumes that bbcodes with bbcode_id > 11 are user-defined bbcodes