You are here

function video_download in Video 6

Same name and namespace in other branches
  1. 5 video.module \video_download()
  2. 6.2 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 987
video.module

Code

function video_download($node) {

  // $node as been loaded by video_menu
  print_r($node);
  exit;
  if ($node) {
    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();
  }
}