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

Diff of /contributions/modules/autotagging/autotagging.module

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

revision 1.3, Fri Jul 3 01:11:59 2009 UTC revision 1.4, Sat Jul 11 22:06:07 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: autotagging.module,v 1.2 2009/07/01 21:15:53 acstewart Exp $  // $Id: autotagging.module,v 1.3 2009/07/03 01:11:59 acstewart Exp $
3  /*  /*
4   * @file autotagging.module   * @file autotagging.module
5   * Module for base Autotagging API.   * Module for base Autotagging API.
# Line 33  function autotagging_nodeapi(&$node, $op Line 33  function autotagging_nodeapi(&$node, $op
33    // act on the node    // act on the node
34    //    //
35    switch ($op) {    switch ($op) {
     case 'update':  
36      case 'delete':      case 'delete':
37        // TODO: delete existing terms for this node        // TODO: delete existing terms for this node
38        //        //
39        case 'update':
40      case 'insert':      case 'insert':
41        $terms = array();        $terms = array();
42        // check that this node type is allowed for autotagging        // check that this node type is allowed for autotagging
# Line 64  function autotagging_nodeapi(&$node, $op Line 64  function autotagging_nodeapi(&$node, $op
64              break;              break;
65            }            }
66          }          }
67            foreach (module_implements('autotagging_api_presave') as $module) {
68              // allows modules to act on terms before they're saved.
69              module_invoke($module_name, 'autotagging_api_presave', $node, $terms);
70            }
71          if (isset($terms) && is_array($terms) && !empty($terms)) {          if (isset($terms) && is_array($terms) && !empty($terms)) {
72            // find the vocabulary with which to associate these terms            // find the vocabulary with which to associate these terms
73            //            //

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2