diff options
Diffstat (limited to 'phpBB/includes/acp/acp_inactive.php')
-rw-r--r-- | phpBB/includes/acp/acp_inactive.php | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 76c7a1b277..ec256e93ef 100644 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -31,8 +31,8 @@ class acp_inactive function main($id, $mode) { - global $config, $db, $user, $auth, $template, $phpbb_container; - global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; + global $config, $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $request; + global $phpbb_root_path, $phpbb_admin_path, $phpEx; if (!function_exists('user_active_flip')) { @@ -41,24 +41,26 @@ class acp_inactive $user->add_lang('memberlist'); - $action = request_var('action', ''); - $mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array(); - $start = request_var('start', 0); + $action = $request->variable('action', ''); + $mark = (isset($_REQUEST['mark'])) ? $request->variable('mark', array(0)) : array(); + $start = $request->variable('start', 0); $submit = isset($_POST['submit']); // Sort keys - $sort_days = request_var('st', 0); - $sort_key = request_var('sk', 'i'); - $sort_dir = request_var('sd', 'd'); + $sort_days = $request->variable('st', 0); + $sort_key = $request->variable('sk', 'i'); + $sort_dir = $request->variable('sd', 'd'); $form_key = 'acp_inactive'; add_form_key($form_key); + + /* @var $pagination \phpbb\pagination */ $pagination = $phpbb_container->get('pagination'); // We build the sort key and per page settings here, because they may be needed later // Number of entries to display - $per_page = request_var('users_per_page', (int) $config['topics_per_page']); + $per_page = $request->variable('users_per_page', (int) $config['topics_per_page']); // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); @@ -141,8 +143,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))); @@ -160,12 +164,13 @@ class acp_inactive { if (!$auth->acl_get('a_userdel')) { + send_status_line(403, 'Forbidden'); trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } 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))); } @@ -240,7 +245,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))); } |