function upload_load in Drupal 4
Same name and namespace in other branches
- 5 modules/upload/upload.module \upload_load()
- 6 modules/upload/upload.module \upload_load()
2 calls to upload_load()
- upload_js in modules/
upload.module - Menu-callback for JavaScript-based uploads.
- upload_nodeapi in modules/
upload.module - Implementation of hook_nodeapi().
File
- modules/
upload.module, line 737 - File-handling and attaching files to nodes.
Code
function upload_load($node) {
$files = array();
if ($node->vid) {
$result = db_query('SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d ORDER BY f.fid', $node->vid);
while ($file = db_fetch_object($result)) {
$files[$file->fid] = $file;
}
}
return $files;
}