aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-07-02 22:23:45 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-07-02 22:23:45 +0000
commitb59698aa102b6e6c3d86cb4ec875386e4b9018a7 (patch)
tree93c8baa457f7b626d5fcb632e9329d395a1204ac /phpBB/includes/message_parser.php
parent03d46951b2265ea53269810c6c7e421441a2be09 (diff)
downloadforums-b59698aa102b6e6c3d86cb4ec875386e4b9018a7.tar
forums-b59698aa102b6e6c3d86cb4ec875386e4b9018a7.tar.gz
forums-b59698aa102b6e6c3d86cb4ec875386e4b9018a7.tar.bz2
forums-b59698aa102b6e6c3d86cb4ec875386e4b9018a7.tar.xz
forums-b59698aa102b6e6c3d86cb4ec875386e4b9018a7.zip
Shifting bits appears to be faster than the pow() function
git-svn-id: file:///svn/phpbb/trunk@4190 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e05f7c8de4..63c8e266d5 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -180,12 +180,6 @@ class parse_message
foreach ($bbcode_data['regexp'] as $regexp => $replacement)
{
$this->message = preg_replace($regexp, $replacement, $this->message);
-
- if (is_array($this->message))
- {
- $this->warn_msg[] = $this->message['error_msg'];
- $this->message = $this->message['message'];
- }
}
}
@@ -193,7 +187,7 @@ class parse_message
$new_size = strlen($this->message);
if ($size != $new_size)
{
- $this->bbcode_bitfield += pow(2, $bbcode_data['bbcode_id']);
+ $this->bbcode_bitfield |= (1 << $bbcode_data['bbcode_id']);
$size = $new_size;
}
}