aboutsummaryrefslogtreecommitdiffstats
path: root/include/picture_comment.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-10-29 23:10:31 +0000
committerrvelices <rv-github@modusoptimus.com>2007-10-29 23:10:31 +0000
commit56a533f3cb1c7f0e3be321dae32fc551d7cf9e72 (patch)
tree3287407fe21a611b0d6f6810346cb34a0c868126 /include/picture_comment.inc.php
parenteab34bed9c919e1d57736705d2e9a037b41a4a55 (diff)
- send status code 403 when attempt to enter a comment, but comments are disabled
- added trigger wether we should increment hit count git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2154 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/picture_comment.inc.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index 7ae87d78a..843395fad 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -55,7 +55,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
);
include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
+
$comment_action = insert_user_comment($comm, @$_POST['key'], $infos );
switch ($comment_action)
@@ -65,7 +65,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
case 'validate':
array_push( $infos, $lang['comment_added']);
break;
- case 'reject':
+ case 'reject':
set_status_header(403);
array_push($infos, l10n('comment_not_added') );
break;
@@ -86,7 +86,11 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
array_merge($comm, array('action'=>$comment_action) )
);
}
-
+elseif ( isset($_POST['content']) )
+{
+ set_status_header(403);
+ die('ugly spammer');
+}
if ($page['show_comments'])
{
@@ -136,7 +140,7 @@ SELECT id,author,date,image_id,content
$template->assign_block_vars(
'comments.comment',
array(
- 'COMMENT_AUTHOR' => trigger_event('render_comment_author',
+ 'COMMENT_AUTHOR' => trigger_event('render_comment_author',
empty($row['author'])
? $lang['guest']
: $row['author']),