diff options
Diffstat (limited to 'phpBB/includes/acp/acp_bbcodes.php')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index e245eea069..d451b4d899 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -25,14 +25,14 @@ class acp_bbcodes function main($id, $mode) { - global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher; - global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; + global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher, $phpbb_container; + global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log; $user->add_lang('acp/posting'); // Set up general vars - $action = request_var('action', ''); - $bbcode_id = request_var('bbcode', 0); + $action = $request->variable('action', ''); + $bbcode_id = $request->variable('bbcode', 0); $this->tpl_name = 'acp_bbcodes'; $this->page_title = 'ACP_BBCODES'; @@ -83,11 +83,11 @@ class acp_bbcodes // No break here case 'create': - $display_on_posting = request_var('display_on_posting', 0); + $display_on_posting = $request->variable('display_on_posting', 0); - $bbcode_match = request_var('bbcode_match', ''); - $bbcode_tpl = htmlspecialchars_decode(utf8_normalize_nfc(request_var('bbcode_tpl', '', true))); - $bbcode_helpline = utf8_normalize_nfc(request_var('bbcode_helpline', '', true)); + $bbcode_match = $request->variable('bbcode_match', ''); + $bbcode_tpl = htmlspecialchars_decode($request->variable('bbcode_tpl', '', true)); + $bbcode_helpline = $request->variable('bbcode_helpline', '', true); break; } @@ -269,6 +269,7 @@ class acp_bbcodes $db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary)); $cache->destroy('sql', BBCODES_TABLE); + $phpbb_container->get('text_formatter.cache')->invalidate(); $lang = 'BBCODE_ADDED'; $log_action = 'LOG_BBCODE_ADD'; @@ -280,12 +281,13 @@ class acp_bbcodes WHERE bbcode_id = ' . $bbcode_id; $db->sql_query($sql); $cache->destroy('sql', BBCODES_TABLE); + $phpbb_container->get('text_formatter.cache')->invalidate(); $lang = 'BBCODE_EDITED'; $log_action = 'LOG_BBCODE_EDIT'; } - add_log('admin', $log_action, $data['bbcode_tag']); + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($data['bbcode_tag'])); trigger_error($user->lang[$lang] . adm_back_link($this->u_action)); } @@ -319,7 +321,8 @@ class acp_bbcodes { $db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id"); $cache->destroy('sql', BBCODES_TABLE); - add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']); + $phpbb_container->get('text_formatter.cache')->invalidate(); + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($row['bbcode_tag'])); if ($request->is_ajax()) { |