Bug 1733 fixed : merge from trunk.
Queries must use single quotes. git-svn-id: http://piwigo.org/svn/branches/2.1@6590 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
b3ad6951e8
commit
d28c348908
1 changed files with 4 additions and 4 deletions
|
@ -156,11 +156,11 @@ SELECT id FROM '.COMMENTS_TABLE.'
|
||||||
INSERT INTO '.COMMENTS_TABLE.'
|
INSERT INTO '.COMMENTS_TABLE.'
|
||||||
(author, author_id, content, date, validated, validation_date, image_id)
|
(author, author_id, content, date, validated, validation_date, image_id)
|
||||||
VALUES (
|
VALUES (
|
||||||
"'.$comm['author'].'",
|
\''.$comm['author'].'\',
|
||||||
'.$comm['author_id'].',
|
'.$comm['author_id'].',
|
||||||
"'.$comm['content'].'",
|
\''.$comm['content'].'\',
|
||||||
NOW(),
|
NOW(),
|
||||||
"'.($comment_action=='validate' ? 'true':'false').'",
|
\''.($comment_action=='validate' ? 'true':'false').'\',
|
||||||
'.($comment_action=='validate' ? 'NOW()':'NULL').',
|
'.($comment_action=='validate' ? 'NOW()':'NULL').',
|
||||||
'.$comm['image_id'].'
|
'.$comm['image_id'].'
|
||||||
)
|
)
|
||||||
|
@ -352,7 +352,7 @@ function validate_user_comment($comment_id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
UPDATE '.COMMENTS_TABLE.'
|
UPDATE '.COMMENTS_TABLE.'
|
||||||
SET validated = "true"
|
SET validated = \'true\'
|
||||||
, validation_date = NOW()
|
, validation_date = NOW()
|
||||||
WHERE id = '.$comment_id.'
|
WHERE id = '.$comment_id.'
|
||||||
;';
|
;';
|
||||||
|
|
Loading…
Add table
Reference in a new issue