Changeset 14634


Ignore:
Timestamp:
05/01/12 14:23:34 (8 years ago)
Author:
Eric
Message:

Compatibility with Comments_on_Album (thx to mistic100 for his support)
New version 2.4.0 hard coded for publication

Location:
extensions/Comments_Access_Manager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_Access_Manager/changelog.txt

    r14633 r14634  
    4040       
    4141      2.4.0 - Piwigo 2.4 compliant 
     42              Compatibility with Comments_on_Album plugin 
    4243              Add nl_NL translation (thanks to pauldaytona) 
    4344              Add pt_PT translation (thanks to klito) 
    4445              Add ru_RU translation (thanks to nadusha) 
    4546              Update pl_PL translation (thanks to T00kie) 
     47              Update pt_PT translation (thanks to PsyKick_RuhYn) 
     48              Update es_ES translation (thanks to crazydark) 
    4649               
  • extensions/Comments_Access_Manager/include/functions.inc.php

    r14633 r14634  
    3737function CM_CheckComment($comment_action, $comm) 
    3838{ 
     39  global $page, $conf, $user, $template; 
     40 
    3941  load_language('plugin.lang', CM_PATH); 
    40   global $infos, $conf, $user; 
    4142 
    4243  $conf_CM = unserialize($conf['CommentsManager']); 
     
    4849    { 
    4950      $comment_action = 'reject'; 
    50  
    51       array_push($infos, l10n('CM_Empty Author')); 
     51      array_push($page['errors'], l10n('CM_Not_Allowed_Author')); 
    5252    } 
    5353     
     
    7171    { 
    7272      $comment_action = 'reject'; // Comment rejected if author is not in the allowed group 
    73       array_push($infos, l10n('CM_Not_Allowed_Author')); 
     73      array_push($page['errors'], l10n('CM_Not_Allowed_Author')); 
    7474    } 
    7575    elseif ((isset($conf_CM[2]) and $conf_CM[2] == 'false') and (isset($conf_CM[4]) and $conf_CM[4] == 'true') and $conf['comments_validation']) // Comments authorized group unset - Auto validation group set 
     
    8989      { 
    9090        $comment_action = 'reject'; // Comment rejected if author is not in the allowed group 
    91         array_push($infos, l10n('CM_Not_Allowed_Author')); 
     91        array_push($page['errors'], l10n('CM_Not_Allowed_Author')); 
    9292      } 
    9393      elseif (CM_CheckValidGroup($comm['author']) and $conf['comments_validation']) 
  • extensions/Comments_Access_Manager/main.inc.php

    r14633 r14634  
    2323// Comments authorisation check 
    2424add_event_handler('user_comment_check', 'CM_CheckComment', 50, 2); 
     25 
     26// Comments on album authorisation check 
     27add_event_handler('user_comment_check_albums', 'CM_CheckComment', 50, 2); 
    2528?> 
Note: See TracChangeset for help on using the changeset viewer.