diff options
author | 3D-I <480857+3D-I@users.noreply.github.com> | 2019-10-28 21:11:42 +0100 |
---|---|---|
committer | 3D-I <480857+3D-I@users.noreply.github.com> | 2019-10-28 21:11:42 +0100 |
commit | d136a8a9078b02433f4be08420486ad05c8129bd (patch) | |
tree | 4d3c720253ed2edef075bec7152a0ce66db16e10 /phpBB/includes/acp/acp_bbcodes.php | |
parent | 41728f2258c409480b9c3d4c1753b6eb1b47c677 (diff) | |
parent | e95e387188b050c163edcce3141c957d259810c9 (diff) | |
download | forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.gz forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.bz2 forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.xz forums-d136a8a9078b02433f4be08420486ad05c8129bd.zip |
Merge branch '3.2.x' into ticket/16153
Diffstat (limited to 'phpBB/includes/acp/acp_bbcodes.php')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 1f7374a07f..bd8df6a63b 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -33,7 +33,6 @@ class acp_bbcodes // 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'; @@ -41,11 +40,6 @@ class 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) { @@ -179,6 +173,12 @@ class acp_bbcodes 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); @@ -211,11 +211,6 @@ class acp_bbcodes $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) { trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING); |