diff options
author | rvelices <rv-github@modusoptimus.com> | 2009-07-01 20:56:41 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2009-07-01 20:56:41 +0000 |
commit | 4fa8d36ed5beaf7125083ec65b355f09a92621c2 (patch) | |
tree | 0b4c9a4e9f606aa037c77db02fee1f228cffe498 /include/picture_comment.inc.php | |
parent | ae6ab9966b171f34cdc902acf938e49a412fc006 (diff) |
- remove warn on unset variable
- insert_user_comment expects now the comment content to be sql safe (works now exactly as update_user_comment)
git-svn-id: http://piwigo.org/svn/trunk@3488 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/picture_comment.inc.php')
-rw-r--r-- | include/picture_comment.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index e957424f5..5ebf08fc9 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -46,8 +46,8 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) ) } $comm = array( - 'author' => trim( stripslashes(@$_POST['author']) ), - 'content' => trim( stripslashes($_POST['content']) ), + 'author' => trim(@$_POST['author']), + 'content' => trim($_POST['content']), 'image_id' => $page['image_id'], ); @@ -121,8 +121,8 @@ SELECT COUNT(*) AS nb_comments if ( !is_admin() ) { $validated_clause = ' AND validated = \'true\''; - } - else + } + else { $validated_clause = ''; } @@ -142,7 +142,7 @@ $validated_clause.' while ($row = mysql_fetch_array($result)) { - if (!empty($row['author'])) + if (!empty($row['author'])) { $author = $row['author']; if ($author == 'guest') @@ -195,7 +195,7 @@ $validated_clause.' { if ($row['validated'] != 'true') { - $tpl_comment['U_VALIDATE'] = + $tpl_comment['U_VALIDATE'] = add_url_params($url_self, array('action' => 'validate_comment', 'comment_to_validate' => $row['id'] |