function flashnode_insert in Flash Node 5.3
Same name and namespace in other branches
- 5.6 flashnode.module \flashnode_insert()
- 5.2 flashnode.module \flashnode_insert()
- 6.3 flashnode.module \flashnode_insert()
- 6.2 flashnode.module \flashnode_insert()
Implementation of hook_insert
1 call to flashnode_insert()
- flashnode_update in ./
flashnode.module - Implementation of hook_update
File
- ./
flashnode.module, line 426
Code
function flashnode_insert($node) {
// Regular insert - came from node generation form
if (!$node->flashnode['import']) {
// Call helper to do file copy, supply the nid, and the path and mime type of the current file
$fid = _flashnode_insert($node->nid, file_create_path($node->flashnode['_flashnode']), $node->flashnode['filemime'], $node->flashnode['import']);
}
// If an fid was returned _flashnode_insert succeeded
if ($fid) {
// Update the flash table with the relevant data
db_query("INSERT INTO {flashnode} (nid, vid, height, width, display, substitution, flashvars, base, fid) VALUES (%d, %d, %d, %d, %d, '%s', '%s', '%s', %d)", $node->nid, $node->vid, $node->flashnode['height'], $node->flashnode['width'], $node->flashnode['display'], $node->flashnode['substitution'], $node->flashnode['flashvars'], $node->flashnode['base'], $fid);
}
}