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

Diff of /contributions/modules/taxonomy_other/taxonomy_other.module

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

revision 1.1.4.4, Thu Jun 19 19:37:05 2008 UTC revision 1.1.4.5, Wed Aug 6 23:12:29 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_other.module,v 1.1.4.3 2008/06/17 18:21:11 rellis Exp $  // $Id: taxonomy_other.module,v 1.1.4.4 2008/06/19 19:37:05 rellis Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 356  function taxonomy_other_nodeapi(&$node, Line 356  function taxonomy_other_nodeapi(&$node,
356   */   */
357  function taxonomy_other_taxonomy($op, $type, $array) {  function taxonomy_other_taxonomy($op, $type, $array) {
358    if ($op == 'delete') {    if ($op == 'delete') {
359      if ($type = 'vocabulary') {      if ($type == 'vocabulary') {
360        $terms = taxonomy_other_get_tids($array['vid']);        $terms = taxonomy_other_get_tids($array['vid']);
361        $d = implode(',', array_pad(array(), count($terms), '%d'));        if (!empty($terms)) {
362        db_query("DELETE FROM {taxonomy_other_term} WHERE tid IN (" . $d . ")", $terms);          $d = implode(',', array_pad(array(), count($terms), '%d'));
363            db_query("DELETE FROM {taxonomy_other_term} WHERE tid IN (" . $d . ")", $terms);
364          }
365      }      }
366      elseif ($type = 'term') {      elseif ($type == 'term') {
367        db_query("DELETE FROM {taxonomy_other_term} WHERE tid = '%d'", $array['tid']);        db_query("DELETE FROM {taxonomy_other_term} WHERE tid = '%d'", $array['tid']);
368      }      }
369    }    }

Legend:
Removed from v.1.1.4.4  
changed lines
  Added in v.1.1.4.5

  ViewVC Help
Powered by ViewVC 1.1.2