- 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
This commit is contained in:
plegall 2005-11-19 16:09:06 +00:00
parent 5a1d2d14ca
commit 9a61fdfe05

View file

@ -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')
?
'<br />'.$lang['comment_to_validate']
:
''
)
;
if ( $conf['comments_validation'] and $user['status'] != 'admin' )
{
$message.= '<br />'.$lang['comment_to_validate'];
}
$template->assign_block_vars('information',
array('INFORMATION'=>$message));
$template->assign_block_vars(
'information',
array('INFORMATION'=>$message)
);
}
else
{