aboutsummaryrefslogtreecommitdiffstats
path: root/include/picture_comment.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/picture_comment.inc.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index 6370544a7..971336fba 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, l10n('comment_added'));
break;
- case 'reject':
+ case 'reject':
set_status_header(403);
array_push($infos, l10n('comment_not_added') );
break;
@@ -73,11 +73,12 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
}
+ $block_var = ($comment_action=='reject') ? 'errors.error' : 'infos.info';
foreach ($infos as $info)
{
$template->assign_block_vars(
- 'information',
- array( 'INFORMATION'=>$info )
+ $block_var,
+ array( 'TEXT'=>$info )
);
}
@@ -136,7 +137,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'])
? l10n('guest')
: $row['author']),