You are here

function flash_insert in Flash Node 5

Implementation of hook_insert

1 call to flash_insert()
flash_update in ./flash.module
Implementation of hook_update

File

./flash.module, line 428

Code

function flash_insert($node) {

  // call helper to do file copy, supply the nid, and the path and mime type of the current file
  $fid = _flash_insert($node->nid, file_create_path($node->flash['_flash']), $node->flash['filemime']);

  // if an fid was returned _flash_insert succeeded
  if ($fid) {

    // update the flash table with the relevant data
    db_query("INSERT INTO {flash} (nid, height, width, version, build, display) VALUES (%d, %d, %d, %d, %d, %d)", $node->nid, $node->flash['height'], $node->flash['width'], $node->flash['version'], $node->flash['build'], $node->flash['display']);
  }
}