diff options
author | rub <rub@piwigo.org> | 2007-06-05 22:01:15 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-06-05 22:01:15 +0000 |
commit | 182fb00f8f7873d220ab8502a31357f9245fbf8f (patch) | |
tree | f9e2a44bfc3d93bea8d2e804286a56c88e69ae98 /include/picture_comment.inc.php | |
parent | a42b553c48acfea369579186a6ca6ea2cdb3ca62 (diff) |
Resolved issue 0000697: with generic user a author name is necessary to comment picture.
+ Change way to determinate if user is a guest (use functions like is_admin)
git-svn-id: http://piwigo.org/svn/trunk@2029 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/picture_comment.inc.php')
-rw-r--r-- | include/picture_comment.inc.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index c84f2a629..cab49ffcf 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -43,7 +43,7 @@ foreach ($related_categories as $category) if ( $page['show_comments'] and isset( $_POST['content'] ) ) { - if ( $user['is_the_guest'] and !$conf['comments_forall'] ) + if ( is_a_guest() and !$conf['comments_forall'] ) { die ('Session expired'); } @@ -61,9 +61,9 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) ) switch ($comment_action) { case 'moderate': - array_push( $infos, $lang['comment_to_validate'] ); + array_push( $infos, l10n('comment_to_validate') ); case 'validate': - array_push( $infos, $lang['comment_added']); + array_push( $infos, l10n('comment_added')); break; case 'reject': set_status_header(403); @@ -137,7 +137,7 @@ SELECT id,author,date,image_id,content 'comments.comment', array( 'COMMENT_AUTHOR' => empty($row['author']) - ? $lang['guest'] + ? l10n('guest') : $row['author'], 'COMMENT_DATE' => format_date( @@ -168,8 +168,8 @@ SELECT id,author,date,image_id,content } } - if (!$user['is_the_guest'] - or ($user['is_the_guest'] and $conf['comments_forall'])) + if (!is_a_guest() + or (is_a_guest() and $conf['comments_forall'])) { include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); $key = get_comment_post_key($page['image_id']); @@ -183,8 +183,9 @@ SELECT id,author,date,image_id,content 'KEY' => $key, 'CONTENT' => $content )); - // display author field if the user is not logged in - if ($user['is_the_guest']) + + // display author field if the user status is guest or generic + if (!is_classic_user()) { $template->assign_block_vars( 'comments.add_comment.author_field', array() |