diff options
author | plegall <plg@piwigo.org> | 2005-11-19 16:09:06 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-11-19 16:09:06 +0000 |
commit | 9a61fdfe05de0f1e5ee858e9e146a994559bed28 (patch) | |
tree | aa9c74a20b37546f8178d437aa44393f6eaa329e /picture.php | |
parent | 5a1d2d14ca53d6c0241a162b22aaa9ac488e8c39 (diff) |
- 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
Diffstat (limited to 'picture.php')
-rw-r--r-- | picture.php | 23 |
1 files 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') + ? + '<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 { |