Changeset 11204 for extensions


Ignore:
Timestamp:
Jun 1, 2011, 6:54:01 PM (13 years ago)
Author:
Eric
Message:

Bug fixed : If "Comments for all" is disabled and guest user uses a nickname already in use, the comment was automatically accepted and validated.
New version 2.2.3 hard coded for publication.

Location:
extensions/Comments_Access_Manager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_Access_Manager/changelog.txt

    r11070 r11204  
    22** Change log **
    33
    4 -- 2011-05-23
    54      2.2.0 - Initial Release
    65
    7 -- 2011-05-26
    86      2.2.1 - Add new feature : Users in a specified group can post comments without admin validation when "Comments for all" is disabled and admin validation is enabled.
    97
    10 -- 2011-05-26
    118      2.2.2 - Add new feature : Users in a specified group can post comments without admin validation when "Comments for all" is enabled and admin validation is enabled.
     9
     10      2.2.3 - Bug fixed : If "Comments for all" is disabled and guest user uses a nickname already in use, the comment was automatically accepted and validated.
  • extensions/Comments_Access_Manager/include/functions.inc.php

    r11070 r11204  
    2828
    2929/**
    30  * checks if author is mandatory and set on comments post when comments for all is set
    31  *
    32  * cheks if author is in an allowed group to post comment when comments for all is not set
     30 * Check comment rules set in plugin before accepting it
    3331 *
    3432 * @param : comment action, comment
     
    3735 *
    3836 */
    39 function CM_CheckCommentAuthor($comment_action, $comm)
     37function CM_CheckComment($comment_action, $comm)
    4038{
    4139  load_language('plugin.lang', CM_PATH);
     
    5351      array_push($infos, l10n('CM_Empty Author'));
    5452    }
    55     elseif ((isset($conf_CM[6]) and $conf_CM[6] == 'true') and $comm['author'] != 'guest')
     53    elseif ((isset($conf_CM[6]) and $conf_CM[6] == 'true') and !$comm['author'] == 'guest')
    5654    {
    5755      if (CM_CheckValidGroup($comm['author']) or is_admin())
  • extensions/Comments_Access_Manager/main.inc.php

    r11070 r11204  
    22/*
    33Plugin Name: Comments Access Manager
    4 Version: 2.2.2
     4Version: 2.2.3
    55Description: Gérer l'accès aux commentaites - Manage comments access
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
     
    2222
    2323// Comments authorisation check
    24 add_event_handler('user_comment_check', 'CM_CheckCommentAuthor', 50, 2);
     24add_event_handler('user_comment_check', 'CM_CheckComment', 50, 2);
    2525?>
Note: See TracChangeset for help on using the changeset viewer.