phpBB

Code Changes

File: includes/acp/acp_bbcodes.php

  Unmodified   Added   Modified   Removed
Line 253Line 253

if ($row)
{


if ($row)
{

							$bbcode_id = $row['max_bbcode_id'] + 1;

							$bbcode_id = (int) $row['max_bbcode_id'] + 1;


// Make sure it is greater than the core bbcode ids...
if ($bbcode_id <= NUM_CORE_BBCODES)


// Make sure it is greater than the core bbcode ids...
if ($bbcode_id <= NUM_CORE_BBCODES)

Line 494Line 494
				// Pad backreference numbers from tokens
if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
{

				// Pad backreference numbers from tokens
if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
{

					$repad = $pad + sizeof(array_unique($repad[0]));

					$repad = $pad + count(array_unique($repad[0]));

					$replace = preg_replace_callback('/(?<!\\\\)\$([0-9]+)/', function ($match) use ($pad) {
return '${' . ($match[1] + $pad) . '}';
}, $replace);

					$replace = preg_replace_callback('/(?<!\\\\)\$([0-9]+)/', function ($match) use ($pad) {
return '${' . ($match[1] + $pad) . '}';
}, $replace);

Line 553Line 553
		}

// Lowercase tags

		}

// Lowercase tags

		$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);

		$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);





		if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))

		if (!preg_match('/^[a-zA-Z0-9_-]+$/', $bbcode_tag))

		{
global $user;
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);

		{
global $user;
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);