Ignore:
Timestamp:
Jun 6, 2007, 12:01:15 AM (17 years ago)
Author:
rub
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/picture_comment.inc.php

    r1900 r2029  
    4444if ( $page['show_comments'] and isset( $_POST['content'] ) )
    4545{
    46   if ( $user['is_the_guest'] and !$conf['comments_forall'] )
     46  if ( is_a_guest() and !$conf['comments_forall'] )
    4747  {
    4848    die ('Session expired');
     
    6262  {
    6363    case 'moderate':
    64       array_push( $infos, $lang['comment_to_validate'] );
     64      array_push( $infos, l10n('comment_to_validate') );
    6565    case 'validate':
    66       array_push( $infos, $lang['comment_added']);
     66      array_push( $infos, l10n('comment_added'));
    6767      break;
    6868    case 'reject':
     
    138138        array(
    139139          'COMMENT_AUTHOR' => empty($row['author'])
    140             ? $lang['guest']
     140            ? l10n('guest')
    141141            : $row['author'],
    142142
     
    169169  }
    170170
    171   if (!$user['is_the_guest']
    172       or ($user['is_the_guest'] and $conf['comments_forall']))
     171  if (!is_a_guest()
     172      or (is_a_guest() and $conf['comments_forall']))
    173173  {
    174174    include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
     
    184184          'CONTENT' => $content
    185185        ));
    186     // display author field if the user is not logged in
    187     if ($user['is_the_guest'])
     186
     187    // display author field if the user status is guest or generic
     188    if (!is_classic_user())
    188189    {
    189190      $template->assign_block_vars(
Note: See TracChangeset for help on using the changeset viewer.