aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_comment.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-23 18:11:00 +0000
committernikrou <nikrou@piwigo.org>2010-06-23 18:11:00 +0000
commit186e9df5af48f258a3b0f87a112c73cf2731cafd (patch)
treeb6b38d70cd55e37df361ded7b929d87d8c226704 /include/functions_comment.inc.php
parent1015546138629dd974afe4e9a1b2a605d1a8eb11 (diff)
Fix bug 1733 : queries must use single quotes
git-svn-id: http://piwigo.org/svn/trunk@6589 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_comment.inc.php')
-rw-r--r--include/functions_comment.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php
index 9b7736219..5468f511d 100644
--- a/include/functions_comment.inc.php
+++ b/include/functions_comment.inc.php
@@ -156,11 +156,11 @@ SELECT id FROM '.COMMENTS_TABLE.'
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'].'
)
@@ -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.'
;';