function asset_file_load in Asset 5.2
Same name and namespace in other branches
- 6 asset.types.inc \asset_file_load()
Implementation of hook_asset_type('load') for file asset type
Related topics
File
- ./
asset.types.inc, line 17 - This file is included by asset_asset_type() and includes all the file and directory specific functions
Code
function asset_file_load($asset) {
$files = array();
$result = db_query('SELECT f.*, a.label FROM {files} f INNER JOIN {asset_files} a ON f.fid=a.fid WHERE a.aid=%d', $asset->aid);
while ($row = db_fetch_array($result)) {
if ($row['label'] == 'default') {
$default = $row;
}
$files[$row['label']] = $row;
}
return array(
'file' => $default,
'files' => $files,
);
}