- 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));
|
mass_inserts(COMMENTS_TABLE, $fields, array($data));
|
||||||
|
|
||||||
// information message
|
// information message
|
||||||
$message = $lang['comment_added'];
|
$message =
|
||||||
|
$lang['comment_added']
|
||||||
|
.(
|
||||||
|
($conf['comments_validation'] and $user['status'] != 'admin')
|
||||||
|
?
|
||||||
|
'<br />'.$lang['comment_to_validate']
|
||||||
|
:
|
||||||
|
''
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
||||||
if (!$conf['comments_validation'] or $user['status'] == 'admin')
|
$template->assign_block_vars(
|
||||||
|
'information',
|
||||||
if ( $conf['comments_validation'] and $user['status'] != 'admin' )
|
array('INFORMATION'=>$message)
|
||||||
{
|
);
|
||||||
$message.= '<br />'.$lang['comment_to_validate'];
|
|
||||||
}
|
|
||||||
$template->assign_block_vars('information',
|
|
||||||
array('INFORMATION'=>$message));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue