aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-05-29 23:38:01 +0200
committerJoshyPHP <s9e.dev@gmail.com>2015-05-30 17:29:49 +0200
commit2a7d26d3debdce7ca82f3044de45b651286c6034 (patch)
tree359aea1fc981d422ece9e7f817fea0286d45820a /phpBB
parent25ce302a605952e0a38605c6255c5ad212c2b4c6 (diff)
downloadforums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar
forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.gz
forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.bz2
forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.xz
forums-2a7d26d3debdce7ca82f3044de45b651286c6034.zip
[ticket/13803] Use accurate flags for generate_text_for_edit()
PHPBB3-13803
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/textreparser/base.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php
index 4afcecff6a..87a4268d0d 100644
--- a/phpBB/phpbb/textreparser/base.php
+++ b/phpBB/phpbb/textreparser/base.php
@@ -175,14 +175,14 @@ abstract class base implements reparser_interface
protected function reparse_record(array $record)
{
$record = $this->add_missing_fields($record);
+ $flags = ($record['enable_bbcode']) ? OPTION_FLAG_BBCODE : 0;
+ $flags |= ($record['enable_smilies']) ? OPTION_FLAG_SMILIES : 0;
+ $flags |= ($record['enable_magic_url']) ? OPTION_FLAG_LINKS : 0;
$unparsed = array_merge(
$record,
- generate_text_for_edit(
- $record['text'],
- $record['bbcode_uid'],
- OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES | OPTION_FLAG_LINKS
- )
+ generate_text_for_edit($record['text'], $record['bbcode_uid'], $flags)
);
+
// generate_text_for_edit() and decode_message() actually return the text as HTML. It has to
// be decoded to plain text before it can be reparsed
$text = html_entity_decode($unparsed['text'], ENT_QUOTES, 'UTF-8');