aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorGaëtan Muller <m.gaetan89@gmail.com>2015-01-05 22:21:31 +0100
committerGaëtan Muller <m.gaetan89@gmail.com>2015-01-27 18:34:33 +0100
commit7fc586080bf5e7b6e90dcf44526200d7c9356d57 (patch)
tree046444e816e9e3c328cf2683c301da1d52c8d96c /phpBB/includes/acp
parente2786c37dc1ef5c0e032e09bb6b7a18210eebfca (diff)
downloadforums-7fc586080bf5e7b6e90dcf44526200d7c9356d57.tar
forums-7fc586080bf5e7b6e90dcf44526200d7c9356d57.tar.gz
forums-7fc586080bf5e7b6e90dcf44526200d7c9356d57.tar.bz2
forums-7fc586080bf5e7b6e90dcf44526200d7c9356d57.tar.xz
forums-7fc586080bf5e7b6e90dcf44526200d7c9356d57.zip
[ticket/13468] Update calls to `add_log()`
PHPBB3-13468
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php29
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php6
-rw-r--r--phpBB/includes/acp/acp_board.php4
-rw-r--r--phpBB/includes/acp/acp_bots.php6
-rw-r--r--phpBB/includes/acp/acp_captcha.php4
-rw-r--r--phpBB/includes/acp/acp_database.php8
-rw-r--r--phpBB/includes/acp/acp_disallow.php6
-rw-r--r--phpBB/includes/acp/acp_email.php6
-rw-r--r--phpBB/includes/acp/acp_forums.php33
-rw-r--r--phpBB/includes/acp/acp_inactive.php12
-rw-r--r--phpBB/includes/acp/acp_jabber.php4
-rw-r--r--phpBB/includes/acp/acp_language.php8
-rw-r--r--phpBB/includes/acp/acp_main.php18
-rw-r--r--phpBB/includes/acp/acp_modules.php16
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php6
-rw-r--r--phpBB/includes/acp/acp_permissions.php6
-rw-r--r--phpBB/includes/acp/acp_profile.php14
-rw-r--r--phpBB/includes/acp/acp_prune.php9
-rw-r--r--phpBB/includes/acp/acp_ranks.php8
-rw-r--r--phpBB/includes/acp/acp_reasons.php6
-rw-r--r--phpBB/includes/acp/acp_search.php12
-rw-r--r--phpBB/includes/acp/acp_styles.php13
-rw-r--r--phpBB/includes/acp/acp_users.php85
-rw-r--r--phpBB/includes/acp/acp_words.php7
24 files changed, 185 insertions, 141 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index fa5df3d418..223b4de2d6 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -43,7 +43,7 @@ class acp_attachments
function main($id, $mode)
{
global $db, $user, $auth, $template, $cache, $phpbb_container;
- global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
$this->id = $id;
$this->db = $db;
@@ -198,7 +198,7 @@ class acp_attachments
if ($submit)
{
- add_log('admin', 'LOG_CONFIG_ATTACH');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_ATTACH');
// Check Settings
$this->test_upload($error, $this->new_config['upload_path'], false);
@@ -359,7 +359,7 @@ class acp_attachments
WHERE extension_id = ' . $row['extension_id'];
$db->sql_query($sql);
- add_log('admin', 'LOG_ATTACH_EXT_UPDATE', $row['extension']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXT_UPDATE', false, array($row['extension']));
}
}
$db->sql_freeresult($result);
@@ -386,7 +386,7 @@ class acp_attachments
WHERE ' . $db->sql_in_set('extension_id', $extension_id_list);
$db->sql_query($sql);
- add_log('admin', 'LOG_ATTACH_EXT_DEL', $extension_list);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXT_DEL', false, array($extension_list));
}
}
@@ -418,7 +418,8 @@ class acp_attachments
);
$db->sql_query('INSERT INTO ' . EXTENSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
- add_log('admin', 'LOG_ATTACH_EXT_ADD', $add_extension);
+
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXT_ADD', false, array($add_extension));
}
}
}
@@ -583,7 +584,7 @@ class acp_attachments
}
$group_name = (isset($user->lang['EXT_GROUP_' . $group_name])) ? $user->lang['EXT_GROUP_' . $group_name] : $group_name;
- add_log('admin', 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), $group_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}
$extension_list = request_var('extensions', array(0));
@@ -648,7 +649,7 @@ class acp_attachments
WHERE group_id = $group_id";
$db->sql_query($sql);
- add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', $group_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_DEL', false, array($group_name));
$cache->destroy('_extensions');
@@ -938,7 +939,7 @@ class acp_attachments
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));
$db->sql_query($sql);
- add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode(', ', $delete_files));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_ORPHAN_DEL', false, array(implode(', ', $delete_files)));
$notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode($user->lang['COMMA_SEPARATOR'], $delete_files));
}
@@ -1029,7 +1030,7 @@ class acp_attachments
$space_taken += $row['filesize'];
$files_added++;
- add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_FILEUPLOAD', false, array($post_row['post_id'], $row['real_filename']));
}
$db->sql_freeresult($result);
@@ -1095,7 +1096,8 @@ class acp_attachments
{
$error[] = $user->lang['FILES_GONE'];
}
- add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $deleted_filenames));
+
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACHMENTS_DELETED', false, array(implode(', ', $deleted_filenames)));
$notify[] = sprintf($user->lang['LOG_ATTACHMENTS_DELETED'], implode($user->lang['COMMA_SEPARATOR'], $deleted_filenames));
}
else
@@ -1527,8 +1529,7 @@ class acp_attachments
*/
function perform_site_list()
{
- global $db, $user;
- global $request;
+ global $db, $user, $request, $phpbb_log;
if (isset($_REQUEST['securesubmit']))
{
@@ -1679,7 +1680,7 @@ class acp_attachments
{
// Update log
$log_entry = ($ip_exclude) ? 'LOG_DOWNLOAD_EXCLUDE_IP' : 'LOG_DOWNLOAD_IP';
- add_log('admin', $log_entry, $ip_list_log);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_entry, false, array($ip_list_log));
}
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
@@ -1708,7 +1709,7 @@ class acp_attachments
WHERE ' . $db->sql_in_set('site_id', $unip_sql);
$db->sql_query($sql);
- add_log('admin', 'LOG_DOWNLOAD_REMOVE_IP', $l_unip_list);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DOWNLOAD_REMOVE_IP', false, array($l_unip_list));
}
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index e245eea069..0e82d233c7 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -26,7 +26,7 @@ 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 $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
$user->add_lang('acp/posting');
@@ -285,7 +285,7 @@ class acp_bbcodes
$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 +319,7 @@ 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_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($row['bbcode_tag']));
if ($request->is_ajax())
{
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 3893091f17..86566dc705 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -32,7 +32,7 @@ class acp_board
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- global $cache, $phpbb_container, $phpbb_dispatcher;
+ global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
$user->add_lang('acp/board');
@@ -615,7 +615,7 @@ class acp_board
if ($submit)
{
- add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_' . strtoupper($mode));
$message = $user->lang('CONFIG_UPDATED');
$message_type = E_USER_NOTICE;
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 1ea320e674..d630b2ed2d 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -25,7 +25,7 @@ class acp_bots
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache, $request;
+ global $config, $db, $user, $auth, $template, $cache, $request, $phpbb_log;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
$action = request_var('action', '');
@@ -124,7 +124,7 @@ class acp_bots
$cache->destroy('_bots');
- add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BOT_DELETE', false, array(implode(', ', $bot_name_ary)));
trigger_error($user->lang['BOT_DELETED'] . adm_back_link($this->u_action));
}
else
@@ -292,7 +292,7 @@ class acp_bots
$cache->destroy('_bots');
- add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BOT_' . $log, false, array($bot_row['bot_name']));
trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
}
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 19cd609c73..c87fa51f88 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -25,7 +25,7 @@ class acp_captcha
function main($id, $mode)
{
- global $db, $user, $auth, $template;
+ global $db, $user, $auth, $template, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
$user->add_lang('acp/board');
@@ -86,7 +86,7 @@ class acp_captcha
$new_captcha = $factory->get_instance($config['captcha_plugin']);
$new_captcha->install();
- add_log('admin', 'LOG_CONFIG_VISUAL');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_VISUAL');
}
else
{
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 7de108c88a..6454b30ec3 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -27,7 +27,7 @@ class acp_database
function main($id, $mode)
{
global $cache, $db, $user, $auth, $template, $table_prefix;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
$this->db_tools = new \phpbb\db\tools\tools($db);
@@ -165,7 +165,7 @@ class acp_database
$extractor->write_end();
- add_log('admin', 'LOG_DB_BACKUP');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DB_BACKUP');
if ($download == true)
{
@@ -242,7 +242,7 @@ class acp_database
if (confirm_box(true))
{
unlink($file_name);
- add_log('admin', 'LOG_DB_DELETE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DB_DELETE');
trigger_error($user->lang['BACKUP_DELETE'] . adm_back_link($this->u_action));
}
else
@@ -395,7 +395,7 @@ class acp_database
// Purge the cache due to updated data
$cache->purge();
- add_log('admin', 'LOG_DB_RESTORE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DB_RESTORE');
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
break;
}
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index 4c8f3cc65b..adcaa13e4d 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -25,7 +25,7 @@ class acp_disallow
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -74,7 +74,7 @@ class acp_disallow
$cache->destroy('_disallowed_usernames');
$message = $user->lang['DISALLOW_SUCCESSFUL'];
- add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DISALLOW_ADD', false, array(str_replace('%', '*', $disallowed_user)));
trigger_error($message . adm_back_link($this->u_action));
}
@@ -93,7 +93,7 @@ class acp_disallow
$cache->destroy('_disallowed_usernames');
- add_log('admin', 'LOG_DISALLOW_DELETE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_DISALLOW_DELETE');
trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action));
}
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index fcc2bd7641..0025e10ea2 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -25,7 +25,7 @@ class acp_email
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache;
+ global $config, $db, $user, $auth, $template, $cache, $phpbb_log;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $phpbb_dispatcher;
$user->add_lang('acp/email');
@@ -263,7 +263,7 @@ class acp_email
{
if (!empty($usernames))
{
- add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MASS_EMAIL', false, array(implode(', ', utf8_normalize_nfc($usernames))));
}
else
{
@@ -277,7 +277,7 @@ class acp_email
$group_name = $user->lang['ALL_USERS'];
}
- add_log('admin', 'LOG_MASS_EMAIL', $group_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MASS_EMAIL', false, array($group_name));
}
}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index fd9d70f679..fdf22da2be 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -27,7 +27,7 @@ class acp_forums
function main($id, $mode)
{
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
- global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
$user->add_lang('acp/forums');
$this->tpl_name = 'acp_forums';
@@ -266,7 +266,7 @@ class acp_forums
if ($move_forum_name !== false)
{
- add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_' . strtoupper($action), false, array($row['forum_name'], $move_forum_name));
$cache->destroy('sql', FORUMS_TABLE);
}
@@ -377,7 +377,8 @@ class acp_forums
sync('forum', 'forum_id', $forum_id, false, true);
- add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_SYNC', false, array($row['forum_name']));
+
$cache->destroy('sql', FORUMS_TABLE);
$template->assign_var('L_FORUM_RESYNCED', sprintf($user->lang['FORUM_RESYNCED'], $row['forum_name']));
@@ -945,7 +946,7 @@ class acp_forums
*/
function update_forum_data(&$forum_data)
{
- global $db, $user, $cache, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
+ global $db, $user, $cache, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
$errors = array();
@@ -1127,7 +1128,7 @@ class acp_forums
$forum_data['forum_id'] = $db->sql_nextid();
- add_log('admin', 'LOG_FORUM_ADD', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_ADD', false, array($forum_data['forum_name']));
}
else
{
@@ -1344,7 +1345,7 @@ class acp_forums
// Add it back
$forum_data['forum_id'] = $forum_id;
- add_log('admin', 'LOG_FORUM_EDIT', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_EDIT', false, array($forum_data['forum_name']));
}
/**
@@ -1546,7 +1547,7 @@ class acp_forums
*/
function delete_forum($forum_id, $action_posts = 'delete', $action_subforums = 'delete', $posts_to_id = 0, $subforums_to_id = 0)
{
- global $db, $user, $cache;
+ global $db, $user, $cache, $phpbb_log;
$forum_data = $this->get_forum_info($forum_id);
@@ -1743,39 +1744,39 @@ class acp_forums
switch ($log_action)
{
case 'MOVE_POSTS_MOVE_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS', $posts_to_name, $subforums_to_name, $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS', false, array($posts_to_name, $subforums_to_name, $forum_data['forum_name']));
break;
case 'MOVE_POSTS_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS', $posts_to_name, $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS', false, array($posts_to_name, $forum_data['forum_name']));
break;
case 'POSTS_MOVE_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS', $subforums_to_name, $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS', false, array($subforums_to_name, $forum_data['forum_name']));
break;
case '_MOVE_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_MOVE_FORUMS', $subforums_to_name, $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_MOVE_FORUMS', false, array($subforums_to_name, $forum_data['forum_name']));
break;
case 'MOVE_POSTS_':
- add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS', $posts_to_name, $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_MOVE_POSTS', false, array($posts_to_name, $forum_data['forum_name']));
break;
case 'POSTS_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_POSTS_FORUMS', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_POSTS_FORUMS', false, array($forum_data['forum_name']));
break;
case '_FORUMS':
- add_log('admin', 'LOG_FORUM_DEL_FORUMS', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_FORUMS', false, array($forum_data['forum_name']));
break;
case 'POSTS_':
- add_log('admin', 'LOG_FORUM_DEL_POSTS', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_POSTS', false, array($forum_data['forum_name']));
break;
default:
- add_log('admin', 'LOG_FORUM_DEL_FORUM', $forum_data['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_DEL_FORUM', false, array($forum_data['forum_name']));
break;
}
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 9e681b9181..4b747b62d9 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -31,7 +31,7 @@ class acp_inactive
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_container;
+ global $config, $db, $user, $auth, $template, $phpbb_container, $phpbb_log;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -137,8 +137,10 @@ class acp_inactive
{
foreach ($inactive_users as $row)
{
- add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
- add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_ACTIVE', false, array($row['username']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_ACTIVE_USER', false, array(
+ 'reportee_id' => $row['user_id']
+ ));
}
trigger_error(sprintf($user->lang['LOG_INACTIVE_ACTIVATE'], implode($user->lang['COMMA_SEPARATOR'], $user_affected) . ' ' . adm_back_link($this->u_action)));
@@ -161,7 +163,7 @@ class acp_inactive
user_delete('retain', $mark, true);
- add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_INACTIVE_' . strtoupper($action), false, array(implode(', ', $user_affected)));
trigger_error(sprintf($user->lang['LOG_INACTIVE_DELETE'], implode($user->lang['COMMA_SEPARATOR'], $user_affected) . ' ' . adm_back_link($this->u_action)));
}
@@ -233,7 +235,7 @@ class acp_inactive
WHERE ' . $db->sql_in_set('user_id', $user_ids);
$db->sql_query($sql);
- add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_INACTIVE_REMIND', false, array(implode(', ', $usernames)));
trigger_error(sprintf($user->lang['LOG_INACTIVE_REMIND'], implode($user->lang['COMMA_SEPARATOR'], $usernames) . ' ' . adm_back_link($this->u_action)));
}
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 8d2e9d41a3..6033237b9d 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -29,7 +29,7 @@ class acp_jabber
function main($id, $mode)
{
- global $db, $user, $auth, $template;
+ global $db, $user, $auth, $template, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('acp/board');
@@ -111,7 +111,7 @@ class acp_jabber
set_config('jab_package_size', $jab_package_size);
set_config('jab_use_ssl', $jab_use_ssl);
- add_log('admin', 'LOG_' . $log);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_' . $log);
trigger_error($message . adm_back_link($this->u_action));
}
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 60e338ae7c..fe39dcba47 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -31,7 +31,7 @@ class acp_language
function main($id, $mode)
{
- global $config, $db, $user, $template;
+ global $config, $db, $user, $template, $phpbb_log;
global $phpbb_root_path, $phpEx, $request;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -90,7 +90,7 @@ class acp_language
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE lang_id = ' . $lang_id);
- add_log('admin', 'LOG_LANGUAGE_PACK_UPDATED', $sql_ary['lang_english_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_LANGUAGE_PACK_UPDATED', false, array($sql_ary['lang_english_name']));
trigger_error($user->lang['LANGUAGE_DETAILS_UPDATED'] . adm_back_link($this->u_action));
break;
@@ -224,7 +224,7 @@ class acp_language
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
$db->sql_query($sql);
- add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_LANGUAGE_PACK_DELETED', false, array($row['lang_english_name']));
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
}
@@ -329,7 +329,7 @@ class acp_language
}
$db->sql_freeresult($result);
- add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_LANGUAGE_PACK_INSTALLED', false, array($lang_pack['name']));
$message = sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']);
$message .= ($notify_cpf_update) ? '<br /><br />' . $user->lang['LANGUAGE_PACK_CPF_UPDATE'] : '';
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 6cd2468f6d..3248f95819 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -25,7 +25,7 @@ class acp_main
function main($id, $mode)
{
- global $config, $db, $cache, $user, $auth, $template, $request;
+ global $config, $db, $cache, $user, $auth, $template, $request, $phpbb_log;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
// Show restore permissions notice
@@ -123,7 +123,7 @@ class acp_main
set_config('record_online_users', 1, true);
set_config('record_online_date', time(), true);
- add_log('admin', 'LOG_RESET_ONLINE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESET_ONLINE');
if ($request->is_ajax())
{
@@ -178,7 +178,7 @@ class acp_main
}
update_last_username();
- add_log('admin', 'LOG_RESYNC_STATS');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESYNC_STATS');
if ($request->is_ajax())
{
@@ -215,7 +215,7 @@ class acp_main
// Still no maximum post id? Then we are finished
if (!$max_post_id)
{
- add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESYNC_POSTCOUNTS');
break;
}
@@ -245,7 +245,7 @@ class acp_main
$start += $step;
}
- add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESYNC_POSTCOUNTS');
if ($request->is_ajax())
{
@@ -260,7 +260,7 @@ class acp_main
}
set_config('board_startdate', time() - 1);
- add_log('admin', 'LOG_RESET_DATE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESET_DATE');
if ($request->is_ajax())
{
@@ -340,7 +340,7 @@ class acp_main
}
}
- add_log('admin', 'LOG_RESYNC_POST_MARKING');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RESYNC_POST_MARKING');
if ($request->is_ajax())
{
@@ -356,7 +356,7 @@ class acp_main
$auth->acl_clear_prefetch();
phpbb_cache_moderators($db, $cache, $auth);
- add_log('admin', 'LOG_PURGE_CACHE');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PURGE_CACHE');
if ($request->is_ajax())
{
@@ -407,7 +407,7 @@ class acp_main
$sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $reinsert_ary);
$db->sql_query($sql);
- add_log('admin', 'LOG_PURGE_SESSIONS');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PURGE_SESSIONS');
if ($request->is_ajax())
{
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index ea6b388328..b20c90f69c 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -37,7 +37,7 @@ class acp_modules
function main($id, $mode)
{
- global $db, $user, $auth, $template, $module, $request;
+ global $db, $user, $auth, $template, $module, $request, $phpbb_log;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
@@ -138,7 +138,7 @@ class acp_modules
AND module_id = $module_id";
$db->sql_query($sql);
- add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_' . strtoupper($action), false, array($this->lang_name($row['module_langname'])));
$this->remove_cache_file();
break;
@@ -167,7 +167,7 @@ class acp_modules
if ($move_module_name !== false)
{
- add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_' . strtoupper($action), false, array($this->lang_name($row['module_langname']), $move_module_name));
$this->remove_cache_file();
}
@@ -771,7 +771,7 @@ class acp_modules
*/
function update_module_data(&$module_data, $run_inline = false)
{
- global $db, $user;
+ global $db, $user, $phpbb_log;
if (!isset($module_data['module_id']))
{
@@ -835,7 +835,7 @@ class acp_modules
if (!$run_inline)
{
- add_log('admin', 'LOG_MODULE_ADD', $this->lang_name($module_data['module_langname']));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_ADD', false, array($this->lang_name($module_data['module_langname'])));
}
}
else
@@ -869,7 +869,7 @@ class acp_modules
if (!$run_inline)
{
- add_log('admin', 'LOG_MODULE_EDIT', $this->lang_name($module_data['module_langname']));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_EDIT', false, array($this->lang_name($module_data['module_langname'])));
}
}
@@ -964,7 +964,7 @@ class acp_modules
*/
function delete_module($module_id)
{
- global $db, $user;
+ global $db, $user, $phpbb_log;
$row = $this->get_module_row($module_id);
@@ -998,7 +998,7 @@ class acp_modules
AND left_id > {$row['right_id']}";
$db->sql_query($sql);
- add_log('admin', 'LOG_MODULE_REMOVED', $this->lang_name($row['module_langname']));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_REMOVED', false, array($this->lang_name($row['module_langname'])));
return array();
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 6c5650fe5e..f7e2065572 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -28,7 +28,7 @@ class acp_permission_roles
{
global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- global $request;
+ global $request, $phpbb_log;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
@@ -109,7 +109,7 @@ class acp_permission_roles
$this->remove_role($role_id, $permission_type);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
- add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_REMOVED', $role_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_' . strtoupper($permission_type) . 'ROLE_REMOVED', false, array($role_name));
trigger_error($user->lang['ROLE_DELETED'] . adm_back_link($this->u_action));
}
else
@@ -212,7 +212,7 @@ class acp_permission_roles
$this->auth_admin->acl_set_role($role_id, $auth_settings);
$role_name = (!empty($user->lang[$role_name])) ? $user->lang[$role_name] : $role_name;
- add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), false, array($role_name));
trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . adm_back_link($this->u_action));
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 0010c6e4a4..802d4999e9 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -909,7 +909,7 @@ class acp_permissions
*/
function log_action($mode, $action, $permission_type, $ug_type, $ug_id, $forum_id)
{
- global $db, $user;
+ global $db, $user, $phpbb_log;
if (!is_array($ug_id))
{
@@ -937,7 +937,7 @@ class acp_permissions
if ($forum_id[0] == 0)
{
- add_log('admin', 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), $l_ug_list);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), false, array($l_ug_list));
}
else
{
@@ -954,7 +954,7 @@ class acp_permissions
}
$db->sql_freeresult($result);
- add_log('admin', 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), $l_forum_list, $l_ug_list);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), false, array($l_forum_list, $l_ug_list));
}
}
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index c85cc2a67d..9a24978f58 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -35,7 +35,7 @@ class acp_profile
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
- global $request, $phpbb_container;
+ global $request, $phpbb_container, $phpbb_log;
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -143,7 +143,7 @@ class acp_profile
$db->sql_transaction('commit');
- add_log('admin', 'LOG_PROFILE_FIELD_REMOVED', $field_ident);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_REMOVED', false, array($field_ident));
trigger_error($user->lang['REMOVED_PROFILE_FIELD'] . adm_back_link($this->u_action));
}
else
@@ -184,7 +184,7 @@ class acp_profile
$field_ident = (string) $db->sql_fetchfield('field_ident');
$db->sql_freeresult($result);
- add_log('admin', 'LOG_PROFILE_FIELD_ACTIVATE', $field_ident);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_ACTIVATE', false, array($field_ident));
if ($request->is_ajax())
{
@@ -220,7 +220,7 @@ class acp_profile
));
}
- add_log('admin', 'LOG_PROFILE_FIELD_DEACTIVATE', $field_ident);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_DEACTIVATE', false, array($field_ident));
trigger_error($user->lang['PROFILE_FIELD_DEACTIVATED'] . adm_back_link($this->u_action));
@@ -816,7 +816,7 @@ class acp_profile
*/
function save_profile_field(&$cp, $field_type, $action = 'create')
{
- global $db, $config, $user, $phpbb_container;
+ global $db, $config, $user, $phpbb_container, $phpbb_log;
$field_id = request_var('field_id', 0);
@@ -1086,12 +1086,12 @@ class acp_profile
if ($action == 'edit')
{
- add_log('admin', 'LOG_PROFILE_FIELD_EDIT', $cp->vars['field_ident'] . ':' . $cp->vars['lang_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_EDIT', false, array($cp->vars['field_ident'] . ':' . $cp->vars['lang_name']));
trigger_error($user->lang['CHANGED_PROFILE_FIELD'] . adm_back_link($this->u_action));
}
else
{
- add_log('admin', 'LOG_PROFILE_FIELD_CREATE', substr($field_ident, 3) . ':' . $cp->vars['lang_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_CREATE', false, array(substr($field_ident, 3) . ':' . $cp->vars['lang_name']));
trigger_error($user->lang['ADDED_PROFILE_FIELD'] . adm_back_link($this->u_action));
}
}
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 59f15c4890..1e2c1fa9a5 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -51,7 +51,7 @@ class acp_prune
*/
function prune_forums($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$all_forums = request_var('all_forums', 0);
@@ -153,7 +153,8 @@ class acp_prune
// Sync all pruned forums at once
sync('forum', 'forum_id', $prune_ids, true, true);
- add_log('admin', 'LOG_PRUNE', $log_data);
+
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_PRUNE', false, array($log_data));
}
$db->sql_freeresult($result);
@@ -228,7 +229,7 @@ class acp_prune
*/
function prune_users($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('memberlist');
@@ -268,7 +269,7 @@ class acp_prune
}
}
- add_log('admin', $l_log, implode(', ', $usernames));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $l_log, false, array(implode(', ', $usernames)));
$msg = $user->lang['USER_' . strtoupper($action) . '_SUCCESS'];
}
else
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index 5885de57ec..b09d57056e 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -26,7 +26,7 @@ class acp_ranks
function main($id, $mode)
{
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
$user->add_lang('acp/posting');
@@ -89,14 +89,14 @@ class acp_ranks
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
$message = $user->lang['RANK_UPDATED'];
- add_log('admin', 'LOG_RANK_UPDATED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_UPDATED', false, array($rank_title));
}
else
{
$sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$message = $user->lang['RANK_ADDED'];
- add_log('admin', 'LOG_RANK_ADDED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_ADDED', false, array($rank_title));
}
$db->sql_query($sql);
@@ -133,7 +133,7 @@ class acp_ranks
$cache->destroy('_ranks');
- add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_RANK_REMOVED', false, array($rank_title));
if ($request->is_ajax())
{
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 3d7ccf422c..bb177dd85d 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -27,7 +27,7 @@ class acp_reasons
{
global $db, $user, $auth, $template, $cache;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- global $request;
+ global $request, $phpbb_log;
$user->add_lang(array('mcp', 'acp/posting'));
@@ -139,7 +139,7 @@ class acp_reasons
$log = 'UPDATED';
}
- add_log('admin', 'LOG_REASON_' . $log, $reason_row['reason_title']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_REASON_' . $log, false, array($reason_row['reason_title']));
trigger_error($user->lang['REASON_' . $log] . adm_back_link($this->u_action));
}
}
@@ -264,7 +264,7 @@ class acp_reasons
$db->sql_query('DELETE FROM ' . REPORTS_REASONS_TABLE . ' WHERE reason_id = ' . $reason_id);
- add_log('admin', 'LOG_REASON_REMOVED', $reason_row['reason_title']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_REASON_REMOVED', false, array($reason_row['reason_title']));
trigger_error($user->lang['REASON_REMOVED'] . adm_back_link($this->u_action));
}
else
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 4a418f43e5..9ae6627650 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -50,7 +50,7 @@ class acp_search
function settings($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$submit = (isset($_POST['submit'])) ? true : false;
@@ -143,7 +143,7 @@ class acp_search
$extra_message = '';
if ($updated)
{
- add_log('admin', 'LOG_CONFIG_SEARCH');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_SEARCH');
}
if (isset($cfg_array['search_type']) && in_array($cfg_array['search_type'], $search_types, true) && ($cfg_array['search_type'] != $config['search_type']))
@@ -161,7 +161,7 @@ class acp_search
if (!$updated)
{
- add_log('admin', 'LOG_CONFIG_SEARCH');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_SEARCH');
}
$extra_message = '<br />' . $user->lang['SWITCHED_SEARCH_BACKEND'] . '<br /><a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=search&amp;mode=index') . '">&raquo; ' . $user->lang['GO_TO_SEARCH_INDEX'] . '</a>';
}
@@ -232,7 +232,7 @@ class acp_search
function index($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$action = request_var('action', '');
@@ -347,7 +347,7 @@ class acp_search
$this->state = array('');
$this->save_state();
- add_log('admin', 'LOG_SEARCH_INDEX_REMOVED', $name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_SEARCH_INDEX_REMOVED', false, array($name));
trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action) . $this->close_popup_js());
break;
@@ -435,7 +435,7 @@ class acp_search
$this->state = array('');
$this->save_state();
- add_log('admin', 'LOG_SEARCH_INDEX_CREATED', $name);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_SEARCH_INDEX_CREATED', false, array($name));
trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action) . $this->close_popup_js());
break;
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 6bd27a8bca..c297a46ec9 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -260,6 +260,8 @@ class acp_styles
*/
protected function action_uninstall_confirmed($ids, $delete_files)
{
+ global $user, $phpbb_log;
+
$default = $this->default_style;
$uninstalled = array();
$messages = array();
@@ -319,7 +321,7 @@ class acp_styles
// Log action
if (count($uninstalled))
{
- add_log('admin', 'LOG_STYLE_DELETE', implode(', ', $uninstalled));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_STYLE_DELETE', false, array(implode(', ', $uninstalled)));
}
// Clear cache
@@ -391,6 +393,8 @@ class acp_styles
*/
protected function action_details()
{
+ global $user, $phpbb_log;
+
$id = $this->request->variable('id', 0);
if (!$id)
{
@@ -522,7 +526,8 @@ class acp_styles
$this->cache->purge();
}
}
- add_log('admin', 'LOG_STYLE_EDIT_DETAILS', $style['style_name']);
+
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_STYLE_EDIT_DETAILS', false, array($style['style_name']));
}
// Update default style
@@ -1119,6 +1124,8 @@ class acp_styles
*/
protected function install_style($style)
{
+ global $user, $phpbb_log;
+
// Generate row
$sql_ary = array();
foreach ($style as $key => $value)
@@ -1140,7 +1147,7 @@ class acp_styles
$this->db->sql_transaction('commit');
- add_log('admin', 'LOG_STYLE_ADD', $sql_ary['style_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_STYLE_ADD', false, array($sql_ary['style_name']));
return $id;
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 4e7576c875..de4664a711 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -34,7 +34,7 @@ class acp_users
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
global $phpbb_dispatcher, $request;
- global $phpbb_container;
+ global $phpbb_container, $phpbb_log;
$user->add_lang(array('posting', 'ucp', 'acp/users'));
$this->tpl_name = 'acp_users';
@@ -220,7 +220,7 @@ class acp_users
{
user_delete($delete_type, $user_id, $user_row['username']);
- add_log('admin', 'LOG_USER_DELETED', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DELETED', false, array($user_row['username']));
trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action));
}
else
@@ -381,8 +381,10 @@ class acp_users
$messenger->send(NOTIFY_EMAIL);
- add_log('admin', 'LOG_USER_REACTIVATE', $user_row['username']);
- add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_REACTIVATE', false, array($user_row['username']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_REACTIVATE_USER', false, array(
+ 'reportee_id' => $user_id
+ ));
trigger_error($user->lang['FORCE_REACTIVATION_SUCCESS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
@@ -443,8 +445,10 @@ class acp_users
$message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED';
$log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE';
- add_log('admin', $log, $user_row['username']);
- add_log('user', $user_id, $log . '_USER');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log, false, array($user_row['username']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, $log . '_USER', false, array(
+ 'reportee_id' => $user_id
+ ));
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
@@ -467,8 +471,10 @@ class acp_users
WHERE user_id = $user_id";
$db->sql_query($sql);
- add_log('admin', 'LOG_USER_DEL_SIG', $user_row['username']);
- add_log('user', $user_id, 'LOG_USER_DEL_SIG_USER');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_SIG', false, array($user_row['username']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_SIG_USER', false, array(
+ 'reportee_id' => $user_id
+ ));
trigger_error($user->lang['USER_ADMIN_SIG_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
@@ -486,8 +492,10 @@ class acp_users
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
$phpbb_avatar_manager->handle_avatar_delete($db, $user, $phpbb_avatar_manager->clean_row($user_row, 'user'), USERS_TABLE, 'user_');
- add_log('admin', 'LOG_USER_DEL_AVATAR', $user_row['username']);
- add_log('user', $user_id, 'LOG_USER_DEL_AVATAR_USER');
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_AVATAR', false, array($user_row['username']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_AVATAR_USER', false, array(
+ 'reportee_id' => $user_id
+ ));
trigger_error($user->lang['USER_ADMIN_AVATAR_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
break;
@@ -499,7 +507,7 @@ class acp_users
// Delete posts, attachments, etc.
delete_posts('poster_id', $user_id);
- add_log('admin', 'LOG_USER_DEL_POSTS', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_POSTS', false, array($user_row['username']));
trigger_error($user->lang['USER_POSTS_DELETED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
@@ -521,7 +529,7 @@ class acp_users
{
delete_attachments('user', $user_id);
- add_log('admin', 'LOG_USER_DEL_ATTACH', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_ATTACH', false, array($user_row['username']));
trigger_error($user->lang['USER_ATTACHMENTS_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
@@ -567,7 +575,7 @@ class acp_users
delete_pm($user_id, $msg_ids, PRIVMSGS_OUTBOX);
- add_log('admin', 'LOG_USER_DEL_OUTBOX', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_DEL_OUTBOX', false, array($user_row['username']));
$lang = 'EMPTIED';
}
@@ -738,8 +746,11 @@ class acp_users
sync('forum', 'forum_id', $forum_id_ary, false, true);
}
- add_log('admin', 'LOG_USER_MOVE_POSTS', $user_row['username'], $forum_info['forum_name']);
- add_log('user', $user_id, 'LOG_USER_MOVE_POSTS_USER', $forum_info['forum_name']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_MOVE_POSTS', false, array($user_row['username'], $forum_info['forum_name']));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_MOVE_POSTS_USER', false, array(
+ 'reportee_id' => $user_id,
+ $forum_info['forum_name']
+ ));
trigger_error($user->lang['USER_POSTS_MOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
@@ -751,7 +762,7 @@ class acp_users
{
remove_newly_registered($user_id, $user_row);
- add_log('admin', 'LOG_USER_REMOVED_NR', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_REMOVED_NR', false, array($user_row['username']));
trigger_error($user->lang['USER_LIFTED_NR'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
@@ -906,7 +917,11 @@ class acp_users
$sql_ary['username'] = $update_username;
$sql_ary['username_clean'] = utf8_clean_string($update_username);
- add_log('user', $user_id, 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_UPDATE_NAME', false, array(
+ 'reportee_id' => $user_id,
+ $user_row['username'],
+ $update_username
+ ));
}
if ($update_email !== false)
@@ -916,7 +931,12 @@ class acp_users
'user_email_hash' => phpbb_email_hash($update_email),
);
- add_log('user', $user_id, 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_UPDATE_EMAIL', false, array(
+ 'reportee_id' => $user_id,
+ $user_row['username'],
+ $user_row['user_email'],
+ $update_email
+ ));
}
if ($update_password)
@@ -927,7 +947,11 @@ class acp_users
);
$user->reset_login_keys($user_id);
- add_log('user', $user_id, 'LOG_USER_NEW_PASSWORD', $user_row['username']);
+
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_NEW_PASSWORD', false, array(
+ 'reportee_id' => $user_id,
+ $user_row['username']
+ ));
}
if (sizeof($sql_ary))
@@ -946,7 +970,7 @@ class acp_users
// Let the users permissions being updated
$auth->acl_clear_prefetch($user_id);
- add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_USER_UPDATE', false, array($data['username']));
trigger_error($user->lang['USER_OVERVIEW_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
@@ -1145,7 +1169,7 @@ class acp_users
$where_sql";
$db->sql_query($sql);
- add_log('admin', 'LOG_CLEAR_USER', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CLEAR_USER', false, array($user_row['username']));
}
}
@@ -1156,9 +1180,16 @@ class acp_users
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
- add_log('admin', 'LOG_USER_FEEDBACK', $user_row['username']);
- add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $user_row['username']);
- add_log('user', $user_id, 'LOG_USER_GENERAL', $message);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array($user_row['username']));
+ $phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array(
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+ $user_row['username']
+ ));
+ $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_GENERAL', false, array(
+ 'reportee_id' => $user_id,
+ $message
+ ));
trigger_error($user->lang['USER_FEEDBACK_ADDED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
@@ -1259,11 +1290,11 @@ class acp_users
if ($log_warnings)
{
- add_log('admin', 'LOG_WARNINGS_DELETED', $user_row['username'], $num_warnings);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_WARNINGS_DELETED', false, array($user_row['username'], $num_warnings));
}
else
{
- add_log('admin', 'LOG_WARNINGS_DELETED_ALL', $user_row['username']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_WARNINGS_DELETED_ALL', false, array($user_row['username']));
}
}
}
@@ -2041,7 +2072,7 @@ class acp_users
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
- add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode($user->lang['COMMA_SEPARATOR'], $log_attachments));
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACHMENTS_DELETED', false, array(implode($user->lang['COMMA_SEPARATOR'], $log_attachments)));
trigger_error($message . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index 272d38bcc8..5f387c98a7 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -28,7 +28,7 @@ class acp_words
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_log;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('acp/posting');
@@ -117,7 +117,8 @@ class acp_words
$cache->destroy('_word_censors');
$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));
@@ -148,7 +149,7 @@ class acp_words
$cache->destroy('_word_censors');
- 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));
}