aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-06-07 16:37:16 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-06-07 16:37:16 +0000
commitf31b4142203fe781b759bdb46d8c14bff9f0896e (patch)
treeb4ccad6d0926e27e20c37a5426d098bf591da6fc /phpBB/includes/functions_posting.php
parent7dd1ec0070391b7e8bbf4995cb6b134a3a213c39 (diff)
downloadforums-f31b4142203fe781b759bdb46d8c14bff9f0896e.tar
forums-f31b4142203fe781b759bdb46d8c14bff9f0896e.tar.gz
forums-f31b4142203fe781b759bdb46d8c14bff9f0896e.tar.bz2
forums-f31b4142203fe781b759bdb46d8c14bff9f0896e.tar.xz
forums-f31b4142203fe781b759bdb46d8c14bff9f0896e.zip
fixed: message post storage. We do not hold the parsed message, only the decoded one for displaying within the textarea.
git-svn-id: file:///svn/phpbb/trunk@4094 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 533cc1fd9e..d7cedcf438 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -154,7 +154,7 @@ function format_display($message, $html, $bbcode, $uid, $url, $smilies, $sig)
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $message . '<'), 1, -1));
}
- $message = nl2br($message);
+ $message = str_replace("\n", '<br />', $message);
// Signature
$user_sig = ($sig && $config['allow_sig']) ? trim($user->data['user_sig']) : '';
@@ -166,22 +166,22 @@ function format_display($message, $html, $bbcode, $uid, $url, $smilies, $sig)
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
}
- $user_sig = (empty($user->data['user_allowsmile']) || empty($config['enable_smilies'])) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_sig) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_sig);
+ $user_sig = (empty($user->data['user_allowsmile']) || empty($config['enable_smilies'])) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_sig) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $user_sig);
if (sizeof($censors))
{
$user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $user_sig . '<'), 1, -1));
}
- $user_sig = '<br />_________________<br />' . nl2br($user_sig);
+ $user_sig = '<br />_________________<br />' . str_replace("\n", '<br />', $user_sig);
}
else
{
$user_sig = '';
}
- $message = (empty($smilies) || empty($config['allow_smilies'])) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $message) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $message);
-
+// $message = (empty($smilies) || empty($config['allow_smilies'])) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $message) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $message);
+
$message .= $user_sig;
return $message;
@@ -959,7 +959,8 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
'enable_magic_url' => $post_data['enable_urls'],
'bbcode_uid' => $bbcode_uid,
'bbcode_bitfield' => $post_data['bbcode_bitfield'],
- 'post_edit_locked' => $post_data['post_edit_locked']
+ 'post_edit_locked' => $post_data['post_edit_locked'],
+ 'post_text' => $message
);
if ($mode != 'edit')
@@ -971,7 +972,6 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
{
$post_sql = array_merge($post_sql, array(
'post_checksum' => $post_data['message_md5'],
- 'post_text' => $message,
'post_encoding' => $user->lang['ENCODING'])
);
}