/[drupal]/contributions/modules/nmoderation/nmoderation.module
ViewVC logotype

Diff of /contributions/modules/nmoderation/nmoderation.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.28, Tue May 30 13:20:38 2006 UTC revision 1.29, Fri Jun 9 00:17:18 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: nmoderation.module,v 1.27 2006/05/02 04:44:23 eaton Exp $  // $Id: nmoderation.module,v 1.28 2006/05/30 13:20:38 eaton Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 750  function nmoderation_nodeapi(&$node, $op Line 750  function nmoderation_nodeapi(&$node, $op
750    }    }
751  }  }
752    
753  function nmoderation_votingapi(&$cache, $op, $arg3, $arg4, $arg5) {  function nmoderation_votingapi_calculate(&$cache, $votes, $content_type, $content_id) {
754    if ($op == 'calculate' && $arg4 == 'node' && nmoderation_is_votable(node_load($arg5))) {    if ($content_type == 'node' && nmoderation_is_votable(node_load($content_id))) {
755      //loop through the $votes collection and calculate the weighted value.      //loop through the $votes collection and calculate the weighted value.
756      foreach($arg3 as $vote) {      foreach($votes as $vote) {
757        if ($vote->value_type == NMODERATION_VOTE_TYPE && $vote->tag == NMODERATION_TAG) {        if ($vote->value_type == NMODERATION_VOTE_TYPE && $vote->tag == NMODERATION_TAG) {
758          unset($cache[NMODERATION_TAG][NMODERATION_VOTE_TYPE][$vote->value]);          unset($cache[NMODERATION_TAG][NMODERATION_VOTE_TYPE][$vote->value]);
759    

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.2