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

Diff of /contributions/modules/flickrstickr/flickrstickr.module

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

revision 1.26, Mon Jan 22 13:22:12 2007 UTC revision 1.27, Fri Mar 2 11:29:37 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flickrstickr.module,v 1.25 2007/01/22 12:33:51 aronnovak Exp $  // $Id: flickrstickr.module,v 1.26 2007/01/22 13:22:12 aronnovak Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 547  function flickrstickr_saveimages($matche Line 547  function flickrstickr_saveimages($matche
547    // File extension detection later!    // File extension detection later!
548    $path = "files/images/". $matches[1] ."_". $matches[2] ."_". $matches[3];    $path = "files/images/". $matches[1] ."_". $matches[2] ."_". $matches[3];
549    // think of leaving out the file_exists check    // think of leaving out the file_exists check
550    if (file_exists($path)) {    if (file_exists($path. ".jpg") || file_exists($path. ".png") || file_exists($path. ".gif")) {
551      //check that the node still exist      //check that the node still exist
552      $filepath = "images/". $matches[1] ."_". $matches[2] ."_". $matches[3];      $filepath = "images/". $matches[1] ."_". $matches[2] ."_". $matches[3];
553      $result = db_query("SELECT nid FROM {files} WHERE filepath LIKE %'%s'%", $filepath);      $result = db_query('SELECT nid FROM {files} WHERE filepath LIKE "%%%s%"', $filepath);
554      $image = db_fetch_object($result);      $image = db_fetch_object($result);
555      if ($image) {      if (!is_null($image)) {
556        return;        return;
557      }      }
558    }    }
# Line 654  function flickrstickr_nodeapi(&$node, $o Line 654  function flickrstickr_nodeapi(&$node, $o
654                              'flickrstickr_saveimages',                              'flickrstickr_saveimages',
655                              $texts[$i]);                              $texts[$i]);
656      }      }
657    }    }
658  }  }
659    
660  /**  /**

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.2