From d1ff48a6f70314afa29a05b820bf6c0bc83b44ce Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Wed, 28 Sep 2022 17:10:46 +0200 Subject: [PATCH] fixed #1626 handle customized prefix table for activities --- admin/user_activity.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/admin/user_activity.php b/admin/user_activity.php index 3faef4f53..ef55a8aa7 100644 --- a/admin/user_activity.php +++ b/admin/user_activity.php @@ -26,10 +26,8 @@ $page['tab'] = 'user_activity'; include(PHPWG_ROOT_PATH.'admin/include/user_tabs.inc.php'); -if (isset($_GET['type']) && 'download_logs' == $_GET['type']) { - - global $conf; - +if (isset($_GET['type']) && 'download_logs' == $_GET['type']) +{ $output_lines = array(); $query = ' @@ -111,10 +109,10 @@ if (count($nb_lines_for_user) > 0) { $query = ' SELECT - id, - username - FROM piwigo_users - WHERE id IN ('.implode(',', array_keys($nb_lines_for_user)).');'; + '.$conf['user_fields']['id'].' AS id, + '.$conf['user_fields']['username'].' AS username + FROM '.USERS_TABLE.' + WHERE '.$conf['user_fields']['id'].' IN ('.implode(',', array_keys($nb_lines_for_user)).');'; } $username_of = query2array($query, 'id', 'username'); @@ -135,7 +133,7 @@ $template->assign('ulist', $filterable_users); $query = ' SELECT COUNT(*) - FROM '.USER_INFOS_TABLE.' + FROM '.USERS_TABLE.' ;'; list($nb_users) = pwg_db_fetch_row(pwg_query($query));