Skip to content

Commit

Permalink
Fix bug 1733 : queries must use single quotes
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@6589 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 23, 2010
1 parent 1015546 commit 186e9df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/functions_comment.inc.php
Expand Up @@ -156,11 +156,11 @@ function insert_user_comment( &$comm, $key, &$infos )
INSERT INTO '.COMMENTS_TABLE.'
(author, author_id, content, date, validated, validation_date, image_id)
VALUES (
"'.$comm['author'].'",
\''.$comm['author'].'\',
'.$comm['author_id'].',
"'.$comm['content'].'",
\''.$comm['content'].'\',
NOW(),
"'.($comment_action=='validate' ? 'true':'false').'",
\''.($comment_action=='validate' ? 'true':'false').'\',
'.($comment_action=='validate' ? 'NOW()':'NULL').',
'.$comm['image_id'].'
)
Expand Down Expand Up @@ -352,7 +352,7 @@ function validate_user_comment($comment_id)
{
$query = '
UPDATE '.COMMENTS_TABLE.'
SET validated = "true"
SET validated = \'true\'
, validation_date = NOW()
WHERE id = '.$comment_id.'
;';
Expand Down

0 comments on commit 186e9df

Please sign in to comment.