phpBB

Code Changes

File: phpbb/textreparser/base.php

  Unmodified   Added   Modified   Removed
Line 216Line 216
	/**
* {@inheritdoc}
*/

	/**
* {@inheritdoc}
*/

	public function reparse_range($min_id, $max_id)

	public function reparse_range($min_id, $max_id, bool $force_bbcode_reparsing = false)

	{
foreach ($this->get_records_by_range($min_id, $max_id) as $record)
{

	{
foreach ($this->get_records_by_range($min_id, $max_id) as $record)
{

			$this->reparse_record($record);

			$this->reparse_record($record, $force_bbcode_reparsing);

		}
}


		}
}


Line 228Line 228
	* Reparse given record
*
* @param array $record Associative array containing the record's data

	* Reparse given record
*
* @param array $record Associative array containing the record's data

 
	* @param bool $force_bbcode_reparsing Flag indicating if BBCode should be reparsed unconditionally

	*/

	*/

	protected function reparse_record(array $record)

	protected function reparse_record(array $record, bool $force_bbcode_reparsing = false)

	{
// Guess magic URL state based on actual record content before adding fields
$record['enable_magic_url'] = $this->guess_magic_url($record);
$record = $this->add_missing_fields($record);


	{
// Guess magic URL state based on actual record content before adding fields
$record['enable_magic_url'] = $this->guess_magic_url($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;

		$flags = ($record['enable_bbcode'] || $force_bbcode_reparsing) ? OPTION_FLAG_BBCODE : 0;
$flags |= ($record['enable_smilies'] || $force_bbcode_reparsing) ? OPTION_FLAG_SMILIES : 0;
$flags |= ($record['enable_magic_url'] || $force_bbcode_reparsing) ? OPTION_FLAG_LINKS : 0;

		$unparsed = array_merge(
$record,
generate_text_for_edit($record['text'], $record['bbcode_uid'], $flags)

		$unparsed = array_merge(
$record,
generate_text_for_edit($record['text'], $record['bbcode_uid'], $flags)

Line 252Line 253
			$unparsed['bbcode_uid'],
$bitfield,
$flags,

			$unparsed['bbcode_uid'],
$bitfield,
$flags,

			$unparsed['enable_bbcode'],
$unparsed['enable_magic_url'],
$unparsed['enable_smilies'],
$unparsed['enable_img_bbcode'],

			$unparsed['enable_bbcode'] || $force_bbcode_reparsing,
$unparsed['enable_magic_url'] || $force_bbcode_reparsing,
$unparsed['enable_smilies'] || $force_bbcode_reparsing,
$unparsed['enable_img_bbcode'] || $force_bbcode_reparsing,

			$unparsed['enable_flash_bbcode'],

			$unparsed['enable_flash_bbcode'],

			$unparsed['enable_quote_bbcode'],
$unparsed['enable_url_bbcode'],

			$unparsed['enable_quote_bbcode'] || $force_bbcode_reparsing,
$unparsed['enable_url_bbcode'] || $force_bbcode_reparsing,

			'text_reparser.' . $this->get_name()
);


			'text_reparser.' . $this->get_name()
);