aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/comments.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/comments.php b/admin/comments.php
index d62b4aca3..cadc3dc67 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -134,12 +134,13 @@ $template->assign(
$list = array();
$query = '
-SELECT c.id, c.image_id, c.date, c.author, u.username, c.content, i.path, i.tn_ext
+SELECT c.id, c.image_id, c.date, c.author, '.
+$conf['user_fields']['username'].' AS username, c.content, i.path, i.tn_ext
FROM '.COMMENTS_TABLE.' AS c
INNER JOIN '.IMAGES_TABLE.' AS i
ON i.id = c.image_id
LEFT JOIN '.USERS_TABLE.' AS u
- ON u.id = c.author_id
+ ON u.'.$conf['user_fields']['id'].' = c.author_id
WHERE validated = \'false\'
ORDER BY c.date DESC
;';