function video_download in Video 6.2
Same name and namespace in other branches
- 5 video.module \video_download()
- 6 video.module \video_download()
Redirects to download the video file.
1 string reference to 'video_download'
- video_menu in ./
video.module - Implementation of hook_menu().
File
- ./
video.module, line 1117 - video.module
Code
function video_download($nodeid) {
// $node as been loaded by video_menu
//print_r($node);
//exit;
if ($node = node_load($nodeid) and $node->type == 'video') {
if (node_access('view', $node, $user->uid)) {
if (video_support_download($node) && _video_allow_download($node)) {
//Make sure the video type is not youtube before downloading.
_video_download_goto($node);
}
else {
//If video is type youtube then it can't be downloaded.
drupal_set_message(t('There are no files to download for this video.'), 'error');
print theme('page', '');
}
}
else {
drupal_not_found();
}
}
}