From 9a61fdfe05de0f1e5ee858e9e146a994559bed28 Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 19 Nov 2005 16:09:06 +0000 Subject: - bug 216 fixed: a message about validation required is given when a user submits a comment git-svn-id: http://piwigo.org/svn/branches/branch-1_5@947 68402e56-0260-453c-a942-63ccdbb3a9ee --- picture.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/picture.php b/picture.php index b41de7112..a57ed9552 100644 --- a/picture.php +++ b/picture.php @@ -398,16 +398,21 @@ if ( isset( $_POST['content'] ) && !empty($_POST['content']) ) mass_inserts(COMMENTS_TABLE, $fields, array($data)); // information message - $message = $lang['comment_added']; - - if (!$conf['comments_validation'] or $user['status'] == 'admin') + $message = + $lang['comment_added'] + .( + ($conf['comments_validation'] and $user['status'] != 'admin') + ? + '
'.$lang['comment_to_validate'] + : + '' + ) + ; - if ( $conf['comments_validation'] and $user['status'] != 'admin' ) - { - $message.= '
'.$lang['comment_to_validate']; - } - $template->assign_block_vars('information', - array('INFORMATION'=>$message)); + $template->assign_block_vars( + 'information', + array('INFORMATION'=>$message) + ); } else { -- cgit v1.2.3