mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Moved prepare message to post.php to enable privmsg to use it
git-svn-id: file:///svn/phpbb/trunk@487 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
'<?php
|
||||
<?php
|
||||
/***************************************************************************
|
||||
*
|
||||
* -------------------
|
||||
@@ -22,5 +22,33 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
//
|
||||
// This function will prepare a posted message for
|
||||
// entry into the database.
|
||||
//
|
||||
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
|
||||
{
|
||||
$message = trim($message);
|
||||
|
||||
if(!$html_on)
|
||||
{
|
||||
$message = htmlspecialchars($message);
|
||||
}
|
||||
|
||||
if($bbcode_on)
|
||||
{
|
||||
$message = bbencode_first_pass($message, $bbcode_uid);
|
||||
}
|
||||
|
||||
if($smile_on)
|
||||
{
|
||||
// No smile() function yet, write one...
|
||||
//$message = smile($message);
|
||||
}
|
||||
|
||||
$message = addslashes($message);
|
||||
|
||||
return($message);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user