--- dbfm.module	2010-07-16 10:27:11.000000000 -0300
+++ dbfm2.module	2010-08-06 12:41:51.578365849 -0300
@@ -459,8 +459,8 @@ function check_attach($nodetype) {
 function dbfm_dbinsert_attach($nid, $vid, $fid, $weight, $checkit = TRUE) {
   //test first whether the entry is already there
   if ($checkit) {
-    $result = db_result(db_query("SELECT COUNT (*) FROM {dbfm_attach} WHERE nid = %d AND fid = %d AND vid = %d", $nid, $fid, $vid));
-    if($result !== 0) {
+    $result = db_result(db_query("SELECT COUNT(*) FROM {dbfm_attach} WHERE nid = %d AND fid = %d AND vid = %d", $nid, $fid, $vid));
+    if($result != 0) {
       drupal_set_message(t('File is already attached to this node.'));
       //this shouldn't ever happen (it should have been caught earlier) so lets leave a watchdog entry
       watchdog('dbfm',"ERROR: Duplicate attachment entry for node %nodeid and file %fileid", array('%nodeid' => $nid, '%fileid' => $fid), WATCHDOG_ERROR);
@@ -5111,4 +5111,4 @@ function dbfm_uplimit() {
   //duploadsize is in Meg, so we need some maths to do the validation
   //test whether file exceeds the limit for a single download
   return $duploadsize * 1024 * 1024;
-}  
\ No hay ningún carácter de nueva línea al final del archivo
+}  
