From 79e9414c0f32309b63638bdb4e05a9cfbaa2d3d1 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sun, 7 Sep 2003 21:33:36 +0000 Subject: - A guest can't take the username of an already existing user - If a guest post a comment without giving a username, the $lang['guest'] is displayed git-svn-id: http://piwigo.org/svn/trunk@78 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/comments.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'admin/comments.php') diff --git a/admin/comments.php b/admin/comments.php index dc9e584ac..11104be2b 100644 --- a/admin/comments.php +++ b/admin/comments.php @@ -84,7 +84,9 @@ function display_pictures( $mysql_result, $maxtime, $validation_box = false ) while ( $subrow = mysql_fetch_array( $subresult ) ) { $vtp->addSession( $sub, 'comment' ); - $vtp->setVar( $sub, 'comment.author', $subrow['author'] ); + $author = $subrow['author']; + if ( $subrow['author'] == '' ) $author = $lang['guest']; + $vtp->setVar( $sub, 'comment.author', $author ); $displayed_date = format_date( $subrow['date'], 'unix', true ); $vtp->setVar( $sub, 'comment.date', $displayed_date ); $vtp->setVar( $sub, 'comment.content', nl2br( $subrow['content'] ) ); -- cgit v1.2.3