phpBB

Code Changes

File: includes/acp/acp_bbcodes.php

  Unmodified   Added   Modified   Removed
Line 33Line 33
		// Set up general vars
$action = $request->variable('action', '');
$bbcode_id = $request->variable('bbcode', 0);

		// Set up general vars
$action = $request->variable('action', '');
$bbcode_id = $request->variable('bbcode', 0);

		$submit = $request->is_set_post('submit');

 

$this->tpl_name = 'acp_bbcodes';
$this->page_title = 'ACP_BBCODES';
$form_key = 'acp_bbcodes';

add_form_key($form_key);


$this->tpl_name = 'acp_bbcodes';
$this->page_title = 'ACP_BBCODES';
$form_key = 'acp_bbcodes';

add_form_key($form_key);


if ($submit && !check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}

 

// Set up mode-specific vars
switch ($action)


// Set up mode-specific vars
switch ($action)

Line 179Line 173
				extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));

$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);

				extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));

$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);

 

if (!$warn_text && !check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}


				if (!$warn_text || confirm_box(true))
{
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);

				if (!$warn_text || confirm_box(true))
{
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);

Line 209Line 209
					else
{
$test = $data['bbcode_tag'];

					else
{
$test = $data['bbcode_tag'];

					}

if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
{
trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);

 
					}

if (strlen($data['bbcode_tag']) > 16)

					}

if (strlen($data['bbcode_tag']) > 16)

Line 230Line 225
					{
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}

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

 

/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
*/
$bbcode_helpline = utf8_encode_ucr($bbcode_helpline);


$sql_ary = array_merge($sql_ary, array(
'bbcode_tag' => $data['bbcode_tag'],


$sql_ary = array_merge($sql_ary, array(
'bbcode_tag' => $data['bbcode_tag'],