aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-10-19 15:36:45 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-10-19 15:36:45 +0000
commite7c3370a043fe4f163fcc4b3b529d1c78093c0f2 (patch)
treeede3cf8366d0ce1cd4e40c2b82b8056813b27c36 /phpBB/includes/message_parser.php
parentde53ffabb410f7db9eb807a2965b02d19e314cc0 (diff)
downloadforums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.gz
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.bz2
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.xz
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.zip
bump topic and orphan attachments
changes here and there... git-svn-id: file:///svn/phpbb/trunk@4614 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index bf1b0f0d53..92557fbb78 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -62,9 +62,8 @@ class parse_message
// Do some general 'cleanup' first before processing message,
// e.g. remove excessive newlines(?), smilies(?)
// Transform \r\n and \r into \n
- $match = array('#\r\n?#', '#sid=[a-z0-9]*?&?#', "#([\n][\s]+){3,}#");
+ $match = array('#\r\n?#', '#sid=[a-z0-9]*?&amp;?#', "#([\n][\s]+){3,}#");
$replace = array("\n", '', "\n\n");
-
$this->message = trim(preg_replace($match, $replace, $this->message));
// Message length check
@@ -78,17 +77,13 @@ class parse_message
if ($bbcode)
{
$this->bbcode_init();
- if (!$allow_img)
- {
- $this->bbcodes['img']['disabled'] = TRUE;
- }
- if (!$allow_flash)
+ $disallow = array('allow_img', 'allow_flash', 'allow_quote');
+ foreach ($disallow as $bool)
{
- $this->bbcodes['flash']['disabled'] = TRUE;
- }
- if (!$allow_quote)
- {
- $this->bbcodes['quote']['disabled'] = TRUE;
+ if (!$$bool)
+ {
+ $this->bbcodes[str_replace('allow_', '', $bool)]['disabled'] = TRUE;
+ }
}
$this->bbcode();
}