*** flashnode.module	2009-10-27 11:20:41.000000000 -0400
--- flashnode-alex.module	2009-10-27 11:31:55.000000000 -0400
***************
*** 169,181 ****
      form_set_error('flashfile', t('You must upload a file.'));
    }
  
!   // Check width is valid (if not empty it must be numeric)
!   if (!empty($node->flashnode['width']) && !is_numeric($node->flashnode['width'])) {
      form_set_error('flashnode][width', t('You must enter a valid width.'));
    }
  
!   // Check height is valid (if not empty it must be numeric)
!   if (!empty($node->flashnode['height']) && !is_numeric($node->flashnode['height'])) {
      form_set_error('flashnode][height', t('You must enter a valid height.'));
    }
  
--- 169,183 ----
      form_set_error('flashfile', t('You must upload a file.'));
    }
  
!   // We just test for non emtpy values. Probably messes up scaling options. 
!   // Width and height should be declared required fields, as well. 
!   // You've been warned.
!   if (empty($node->flashnode['width'])) {
      form_set_error('flashnode][width', t('You must enter a valid width.'));
    }
  
!   // We just test for non emtpy values. Probably messes up scaling options. 
!   if (empty($node->flashnode['height'])) {
      form_set_error('flashnode][height', t('You must enter a valid height.'));
    }
  
***************
*** 420,426 ****
    }
  
    // Insert data into {flashnode}
!   db_query("INSERT INTO {flashnode} (nid, height, width, display, substitution, flashvars, base, fid, vid, params) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, '%s')", $node->nid, $node->flashnode['height'], $node->flashnode['width'], $node->flashnode['display'], $node->flashnode['substitution'], $node->flashnode['flashvars'], $node->flashnode['base'], $node->flashnode['fid'], $node->vid, $node->flashnode['params']);
  
  }
  
--- 422,428 ----
    }
  
    // Insert data into {flashnode}
!   db_query("INSERT INTO {flashnode} (nid, height, width, display, substitution, flashvars, base, fid, vid, params) VALUES (%d, '%s', '%s', %d, '%s', '%s', '%s', %d, %d, '%s')", $node->nid, $node->flashnode['height'], $node->flashnode['width'], $node->flashnode['display'], $node->flashnode['substitution'], $node->flashnode['flashvars'], $node->flashnode['base'], $node->flashnode['fid'], $node->vid, $node->flashnode['params']);
  
  }
  
***************
*** 480,486 ****
      }
  
      // Update {flashnode} and {files} with new data
!     db_query("UPDATE {flashnode} SET nid = %d, height = %d, width = %d, display = %d, substitution = '%s', flashvars = '%s', base = '%s', fid = %d, params = '%s' WHERE vid = %d", $node->nid, $node->flashnode['height'], $node->flashnode['width'], $node->flashnode['display'], $node->flashnode['substitution'], $node->flashnode['flashvars'], $node->flashnode['base'], $node->flashnode['fid'], $node->flashnode['params'], $node->vid);
      db_query("UPDATE {files} SET status = %d, filepath = '%s' WHERE fid = %d", FILE_STATUS_PERMANENT, $node->flashnode['filepath'], $node->flashnode['fid']);
  
    }
--- 482,488 ----
      }
  
      // Update {flashnode} and {files} with new data
!     db_query("UPDATE {flashnode} SET nid = %d, height = '%s', width = '%s', display = %d, substitution = '%s', flashvars = '%s', base = '%s', fid = %d, params = '%s' WHERE vid = %d", $node->nid, $node->flashnode['height'], $node->flashnode['width'], $node->flashnode['display'], $node->flashnode['substitution'], $node->flashnode['flashvars'], $node->flashnode['base'], $node->flashnode['fid'], $node->flashnode['params'], $node->vid);
      db_query("UPDATE {files} SET status = %d, filepath = '%s' WHERE fid = %d", FILE_STATUS_PERMANENT, $node->flashnode['filepath'], $node->flashnode['fid']);
  
    }
