1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

*** empty log message ***

git-svn-id: file:///svn/phpbb/trunk@6294 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-08-17 01:15:01 +00:00
parent 481f090a39
commit e6be1795ca
2 changed files with 6 additions and 17 deletions

View File

@@ -62,25 +62,14 @@ class bbcode_firstpass extends bbcode
}
else
{
// TODO: Review this
$found = false;
foreach ($bbcode_data['regexp'] as $regexp => $replacement)
{
if (!$found)
// The pattern gets compiled and cached by the PCRE extension,
// it should not demand recompilation
if (preg_match($regexp, $this->message))
{
$before = strlen($this->message);
}
$this->message = preg_replace($regexp, $replacement, $this->message);
if (!$found)
{
$after = strlen($this->message);
if ($before != $after)
{
// Because we add bbcode_uid to all tags, the message length
// will increase whenever a tag is found
$bitfield->set($bbcode_data['bbcode_id']);
$found = true;
}
$this->message = preg_replace($regexp, $replacement, $this->message);
$bitfield->set($bbcode_data['bbcode_id']);
}
}
}