From 62386eef8d1be882b19525b5aa9930e26632452c Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 11 Jul 2018 11:50:55 +0200 Subject: [PATCH] (cp 86c3473) fixes #877, avoid conflict with custom user table --- include/picture_comment.inc.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index 20a72e5ca..b0fb7960c 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -142,21 +142,21 @@ SELECT $query = ' SELECT com.id, - author, - author_id, + com.author, + com.author_id, u.'.$conf['user_fields']['email'].' AS user_email, - date, - image_id, - website_url, + com.date, + com.image_id, + com.website_url, com.email, - content, - validated + com.content, + com.validated FROM '.COMMENTS_TABLE.' AS com LEFT JOIN '.USERS_TABLE.' AS u ON u.'.$conf['user_fields']['id'].' = author_id - WHERE image_id = '.$page['image_id'].' + WHERE com.image_id = '.$page['image_id'].' '.$validated_clause.' - ORDER BY date '.$comments_order.' + ORDER BY com.date '.$comments_order.' LIMIT '.$conf['nb_comment_page'].' OFFSET '.$page['start'].' ;'; $result = pwg_query( $query );