- 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:
parent
5a1d2d14ca
commit
9a61fdfe05
1 changed files with 14 additions and 9 deletions
23
picture.php
23
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')
|
||||
?
|
||||
'<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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue