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

Diff of /contributions/modules/taxonomy_image/taxonomy_image.module

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

revision 1.12.4.13.2.43, Thu Mar 19 13:44:46 2009 UTC revision 1.12.4.13.2.44, Thu Apr 16 13:33:35 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_image.module,v 1.12.4.13.2.42 2009/03/17 14:38:16 nancyw Exp $  // $Id: taxonomy_image.module,v 1.12.4.13.2.43 2009/03/19 13:44:46 nancyw Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 645  function taxonomy_image_taxonomy($op, $t Line 645  function taxonomy_image_taxonomy($op, $t
645    
646          if (is_object($file)) {          if (is_object($file)) {
647            // If no errors while uploading, save term-image relation into DB            // If no errors while uploading, save term-image relation into DB
648            $filepath = variable_get('taxonomy_image_path', 'category_pictures') . '/' . $file->filename;            $filepath = variable_get('taxonomy_image_path', 'category_pictures') .'/'. $file->filename;
649    
650            if (taxonomy_image_add($tid, $file->filename)) {            if (taxonomy_image_add($tid, $file->filename)) {
651              // Successfully added to DB, make sure Cron doesn't delete this file.              // Successfully added to DB, make sure Cron doesn't delete this file.
# Line 674  function taxonomy_image_add($tid, $filen Line 674  function taxonomy_image_add($tid, $filen
674      taxonomy_image_delete($tid);      taxonomy_image_delete($tid);
675    }    }
676    
677    if(db_query("INSERT INTO {term_image} (tid, path) VALUES ('%d', '%s')", $tid, $filename)) {    if (db_query("INSERT INTO {term_image} (tid, path) VALUES ('%d', '%s')", $tid, $filename)) {
678      cache_clear_all("taxonomy_image:$tid", 'cache_tax_image');      cache_clear_all("taxonomy_image:$tid", 'cache_tax_image');
679      return TRUE;      return TRUE;
680    }    }

Legend:
Removed from v.1.12.4.13.2.43  
changed lines
  Added in v.1.12.4.13.2.44

  ViewVC Help
Powered by ViewVC 1.1.2