aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-09-07 21:33:36 +0000
committerz0rglub <z0rglub@piwigo.org>2003-09-07 21:33:36 +0000
commit79e9414c0f32309b63638bdb4e05a9cfbaa2d3d1 (patch)
tree82592d479d9c91a50ae5d9f932148093282cb967 /admin
parentcdfb50b4260c0ef3b1b307b4d45cbf6b75be4b60 (diff)
- 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
Diffstat (limited to 'admin')
-rw-r--r--admin/comments.php4
1 files changed, 3 insertions, 1 deletions
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'] ) );