/[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.4, Tue Jun 17 18:08:12 2008 UTC revision 1.5, Mon Dec 8 19:03:33 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_other.module,v 1.3 2008/06/15 16:23:46 rellis Exp $  // $Id: taxonomy_other.module,v 1.1.2.5 2008/08/06 23:07:13 rellis Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 352  function taxonomy_other_nodeapi(&$node, Line 352  function taxonomy_other_nodeapi(&$node,
352   */   */
353  function taxonomy_other_taxonomy($op, $type, $array) {  function taxonomy_other_taxonomy($op, $type, $array) {
354    if ($op == 'delete') {    if ($op == 'delete') {
355      if ($type = 'vocabulary') {      if ($type == 'vocabulary') {
356        $terms = taxonomy_other_get_tids($array['vid']);        $terms = taxonomy_other_get_tids($array['vid']);
357        $d = implode(',', array_pad(array(), count($terms), '%d'));        if (!empty($terms)) {
358        db_query("DELETE FROM {taxonomy_other_term} WHERE tid IN (" . $d . ")", $terms);          $d = implode(',', array_pad(array(), count($terms), '%d'));
359            db_query("DELETE FROM {taxonomy_other_term} WHERE tid IN (" . $d . ")", $terms);
360          }
361      }      }
362      elseif ($type = 'term') {      elseif ($type == 'term') {
363        db_query("DELETE FROM {taxonomy_other_term} WHERE tid = '%d'", $array['tid']);        db_query("DELETE FROM {taxonomy_other_term} WHERE tid = '%d'", $array['tid']);
364      }      }
365    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.2