phpBB

Code Changes

File: includes/functions_content.php

  Unmodified   Added   Modified   Removed
Line 1672Line 1672
{
var $data;


{
var $data;


	function bitfield($bitfield = '')

	function __construct($bitfield = '')

	{
$this->data = base64_decode($bitfield);
}

	{
$this->data = base64_decode($bitfield);
}

Line 1756Line 1756
	function merge($bitfield)
{
$this->data = $this->data | $bitfield->get_blob();

	function merge($bitfield)
{
$this->data = $this->data | $bitfield->get_blob();

 
	}
}

/**
* Formats the quote according to the given BBCode status setting
*
* @param bool $bbcode_status The status of the BBCode setting
* @param array $quote_attributes The attributes of the quoted post
* @param phpbb\textformatter\utils $text_formatter_utils Text formatter utilities
* @param parse_message $message_parser Message parser class
* @param string $message_link Link of the original quoted post
*/
function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_utils, $message_parser, $message_link = '')
{
if ($bbcode_status)
{
$quote_text = $text_formatter_utils->generate_quote(
censor_text($message_parser->message),
$quote_attributes
);

$message_parser->message = $quote_text . "\n\n";
}
else
{
$offset = 0;
$quote_string = "> ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, ">") !== false)
{
$offset = 10;
}
$message = utf8_wordwrap($message, 75 + $offset, "\n");

$message = $quote_string . $message;
$message = str_replace("\n", "\n" . $quote_string, $message);

$message_parser->message = $quote_attributes['author'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
}

if ($message_link)
{
$message_parser->message = $message_link . $message_parser->message;

	}
}


	}
}