mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
Less aggressive stripslash for messages
git-svn-id: file:///svn/phpbb/trunk@4311 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2882b8aafb
commit
83b28ce6fb
1 changed files with 4 additions and 3 deletions
|
@ -30,7 +30,6 @@ include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
|
|||
// Start session management
|
||||
$user->start();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
|
||||
// Grab only parameters needed here
|
||||
|
@ -504,7 +503,7 @@ if ($submit || $preview || $refresh)
|
|||
$subject = phpbb_strtolower($subject);
|
||||
}
|
||||
|
||||
$message_parser->message = (!empty($_POST['message'])) ? trim(stripslashes($_POST['message'])) : '';
|
||||
$message_parser->message = (!empty($_POST['message'])) ? trim(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message'])) : '';
|
||||
|
||||
$username = (!empty($_POST['username'])) ? trim($_POST['username']) : ((!empty($username)) ? $username : '');
|
||||
$topic_type = (!empty($_POST['topic_type'])) ? (int) $_POST['topic_type'] : (($mode != 'post') ? $topic_type : POST_NORMAL);
|
||||
|
@ -1755,7 +1754,7 @@ function topic_review($topic_id, $forum_id, $is_inline_review = false)
|
|||
}
|
||||
|
||||
// Get topic info ...
|
||||
$sql = 'SELECT t.topic_title, f.forum_id
|
||||
$sql = 'SELECT t.topic_title, f.forum_id, f.forum_style
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
|
||||
WHERE t.topic_id = $topic_id
|
||||
AND f.forum_id IN (t.forum_id, $forum_id)";
|
||||
|
@ -1769,6 +1768,8 @@ function topic_review($topic_id, $forum_id, $is_inline_review = false)
|
|||
$forum_id = $row['forum_id'];
|
||||
$topic_title = $row['topic_title'];
|
||||
|
||||
$user->setup(false, $row['forum_style']);
|
||||
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
{
|
||||
trigger_error($user->lang['SORRY_AUTH_READ']);
|
||||
|
|
Loading…
Add table
Reference in a new issue