mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
fixes #877, avoid conflict with custom user table
This commit is contained in:
@@ -142,21 +142,21 @@ SELECT
|
|||||||
$query = '
|
$query = '
|
||||||
SELECT
|
SELECT
|
||||||
com.id,
|
com.id,
|
||||||
author,
|
com.author,
|
||||||
author_id,
|
com.author_id,
|
||||||
u.'.$conf['user_fields']['email'].' AS user_email,
|
u.'.$conf['user_fields']['email'].' AS user_email,
|
||||||
date,
|
com.date,
|
||||||
image_id,
|
com.image_id,
|
||||||
website_url,
|
com.website_url,
|
||||||
com.email,
|
com.email,
|
||||||
content,
|
com.content,
|
||||||
validated
|
com.validated
|
||||||
FROM '.COMMENTS_TABLE.' AS com
|
FROM '.COMMENTS_TABLE.' AS com
|
||||||
LEFT JOIN '.USERS_TABLE.' AS u
|
LEFT JOIN '.USERS_TABLE.' AS u
|
||||||
ON u.'.$conf['user_fields']['id'].' = author_id
|
ON u.'.$conf['user_fields']['id'].' = author_id
|
||||||
WHERE image_id = '.$page['image_id'].'
|
WHERE com.image_id = '.$page['image_id'].'
|
||||||
'.$validated_clause.'
|
'.$validated_clause.'
|
||||||
ORDER BY date '.$comments_order.'
|
ORDER BY com.date '.$comments_order.'
|
||||||
LIMIT '.$conf['nb_comment_page'].' OFFSET '.$page['start'].'
|
LIMIT '.$conf['nb_comment_page'].' OFFSET '.$page['start'].'
|
||||||
;';
|
;';
|
||||||
$result = pwg_query( $query );
|
$result = pwg_query( $query );
|
||||||
|
|||||||
Reference in New Issue
Block a user