fileupload_load
developer/examples/fileupload.module, строка 192
- Версии
- 5
fileupload_load($node)
Implementation of hook_load()
.
The node is being loaded. Load the file's information from the database so it can be added to the node.
Код
<?php
function fileupload_load($node) {
$extras = new StdClass();
$extras->file = db_fetch_object(db_query('SELECT filename, filepath, filemime, filesize FROM {fileupload} WHERE nid = %d', $node->nid));
return $extras;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии