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

Diff of /contributions/modules/recipe/recipe.module

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

revision 1.84, Fri Jun 26 12:18:11 2009 UTC revision 1.85, Fri Jun 26 12:39:17 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: recipe.module,v 1.83 2009/06/26 11:53:01 marble Exp $  // $Id: recipe.module,v 1.84 2009/06/26 12:18:11 marble Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 1352  function recipe_tax_get_terms($vid) { Line 1352  function recipe_tax_get_terms($vid) {
1352  }  }
1353    
1354  /**  /**
1355     * Hook into generic node creation/update and check if the added node
1356     * fixes any links in existing recipes.
1357     */
1358    function recipe_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
1359      switch ($op) {
1360        case 'insert':
1361        case 'update':
1362          // TODO: Could filter for only nodes of type 'ingredient'
1363          db_query("UPDATE {recipe_ingredient} SET link='%d' WHERE LOWER(name)='%s'", $node->nid, trim(strtolower($node->title)) );
1364          break;
1365      }
1366    }
1367    
1368    /**
1369   * Helper function for array map purposes.   * Helper function for array map purposes.
1370   * @param term the term object from which the tid will be extracted.   * @param term the term object from which the tid will be extracted.
1371   *   *

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.2