- 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
This commit is contained in:
z0rglub 2003-09-07 21:33:36 +00:00
commit 79e9414c0f
2 changed files with 66 additions and 36 deletions

View file

@ -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'] ) );