aboutsummaryrefslogtreecommitdiffstats
path: root/include/picture_comment.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-09-20 23:45:23 +0000
committerrvelices <rv-github@modusoptimus.com>2007-09-20 23:45:23 +0000
commit179106efaff17b4fa25667381244ebc46789885e (patch)
tree4028ff34f051574b8afc93d922bcca4b2473d38f /include/picture_comment.inc.php
parentc5970aba221881d9788197115fd17ab863d72269 (diff)
- removed unused code from the calendar
- removed some unused css rules, simplified css a bit and made some rule grouping (nothing important) git-svn-id: http://piwigo.org/svn/trunk@2101 68402e56-0260-453c-a942-63ccdbb3a9ee
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']),