aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_words.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_words.php')
-rw-r--r--phpBB/includes/acp/acp_words.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index 272d38bcc8..e5eeb7ab07 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -28,13 +28,12 @@ class acp_words
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $db, $user, $template, $cache, $phpbb_log, $request, $phpbb_container;
$user->add_lang('acp/posting');
// Set up general vars
- $action = request_var('action', '');
+ $action = $request->variable('action', '');
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['save'])) ? 'save' : $action);
$s_hidden_fields = '';
@@ -50,7 +49,7 @@ class acp_words
{
case 'edit':
- $word_id = request_var('id', 0);
+ $word_id = $request->variable('id', 0);
if (!$word_id)
{
@@ -88,9 +87,9 @@ class acp_words
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
- $word_id = request_var('id', 0);
- $word = utf8_normalize_nfc(request_var('word', '', true));
- $replacement = utf8_normalize_nfc(request_var('replacement', '', true));
+ $word_id = $request->variable('id', 0);
+ $word = $request->variable('word', '', true);
+ $replacement = $request->variable('replacement', '', true);
if ($word === '' || $replacement === '')
{
@@ -115,9 +114,11 @@ class acp_words
}
$cache->destroy('_word_censors');
+ $phpbb_container->get('text_formatter.cache')->invalidate();
$log_action = ($word_id) ? 'LOG_WORD_EDIT' : 'LOG_WORD_ADD';
- add_log('admin', $log_action, $word);
+
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($word));
$message = ($word_id) ? $user->lang['WORD_UPDATED'] : $user->lang['WORD_ADDED'];
trigger_error($message . adm_back_link($this->u_action));
@@ -126,7 +127,7 @@ class acp_words
case 'delete':
- $word_id = request_var('id', 0);
+ $word_id = $request->variable('id', 0);
if (!$word_id)
{
@@ -147,8 +148,9 @@ class acp_words
$db->sql_query($sql);
$cache->destroy('_word_censors');
+ $phpbb_container->get('text_formatter.cache')->invalidate();
- add_log('admin', 'LOG_WORD_DELETE', $deleted_word);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_WORD_DELETE', false, array($deleted_word));
trigger_error($user->lang['WORD_REMOVED'] . adm_back_link($this->u_action));
}