Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000697 [Piwigo] user comments feature always 2007.06.01 19:24 2008.06.07 22:22
Reporter jrguillaumin View Status public  
Assigned To rub
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version Butterfly 1 Product Version 1.7.0
  Target Version 2.0.0 Product Build
Summary 0000697: Saisie de l'auteur du commentaire pour les utilisateurs "génériques"
Description Lors du la saisie d'un commentaire, le champ "auteur" n'apparait que si l'utilisateur est un invité. Il faudrait qu'il apparaisse également si l'utilisateur est de type "générique". En effet, ce type de compte peut être utilisé par plusieurs personnes différentes.

voir:
http://forum.phpwebgallery.net/viewtopic.php?id=8739 [^]
Steps To Reproduce
Additional Information Chez moi, j'ai réglé le problème de la façon suivante:

picture_comment.inc.php (à la fin du fichier) :
    // display author field if the user is not logged in
    if ($user['is_the_guest'] or $user['status'] == 'generic')
    {
      $template->assign_block_vars(
        'comments.add_comment.author_field', array()
        );
    }

functions_comment.inc.php (ligne 111)
  if ( $user['is_the_guest'] or $user['status'] == 'generic')
  {
    // if a guest try to use the name of an already existing user, he must be
    // rejected
    if ( $comm['author'] != 'guest' )
    {
      $query = '
SELECT COUNT(*) AS user_exists
  FROM '.USERS_TABLE.'
  WHERE '.$conf['user_fields']['username']." = '".addslashes($comm['author'])."'";
      $row = mysql_fetch_assoc( pwg_query( $query ) );
      if ( $row['user_exists'] == 1 )
      {
        array_push($infos, l10n('comment_user_exists') );
        $comment_action='reject';
      }
    }
    if ( empty($comm['author']) )
    {
      if ( $user['is_the_guest'])
      {
          $comm['author'] = 'guest';
      }
      else {
        $comm['author'] = $user['username'];
      }
    }
  }
  else
  {
    $comm['author'] = $user['username'];
  }
Tags No tags attached.
browser any
Database engine and version
PHP version
Web server Apache 1.3.x
Attached Files

- Relationships

-  Notes
(0001877)
VDigital (reporter)
2007.06.01 20:34

Le raisonnement n'avait pas été poussé jusque là mais c'est exact.
(0001879)
rub (developer)
2007.06.06 00:00

[Subversion] r2029

- Issue History
Date Modified Username Field Change
2007.06.01 19:24 jrguillaumin New Issue
2007.06.01 19:24 jrguillaumin browser => any
2007.06.01 19:24 jrguillaumin Web server => Apache 1.3.x
2007.06.01 20:34 VDigital Note Added: 0001877
2007.06.01 20:34 VDigital Status new => acknowledged
2007.06.05 23:19 rub Status acknowledged => assigned
2007.06.05 23:19 rub Assigned To => rub
2007.06.06 00:00 rub Status assigned => resolved
2007.06.06 00:00 rub Fixed in Version => Butterfly 1
2007.06.06 00:00 rub Resolution open => fixed
2007.06.06 00:00 rub Note Added: 0001879
2007.06.06 00:00 rub Status resolved => closed
2008.06.07 22:22 plg Target Version => Butterfly


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker