aboutsummaryrefslogtreecommitdiff
path: root/video.module
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2007-02-16 18:34:31 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2007-02-16 18:34:31 +0000
commit1b157816ee6008e5c86657043544587be6fa04ba (patch)
tree2f53ec58d14185ecf45ab74ce63ba02d66a78c44 /video.module
parent3589ea14165fdf19609720406229ebfab8418e08 (diff)
downloadvideo-1b157816ee6008e5c86657043544587be6fa04ba.tar.gz
video-1b157816ee6008e5c86657043544587be6fa04ba.tar.bz2
#119358 by geodaniel: Download link does not work when download tab is not enabled
Diffstat (limited to 'video.module')
-rw-r--r--video.module10
1 files changed, 8 insertions, 2 deletions
diff --git a/video.module b/video.module
index ff22472..2e6c086 100644
--- a/video.module
+++ b/video.module
@@ -118,13 +118,19 @@ function video_menu($may_cache) {
'type' => $menu_type);
//If the video is of type youtube and multi-file downloads aren't turned on don't show the download tab.
- if (variable_get('video_displaydownloadmenutab', 1) == 1 and (_video_get_filetype($node->vidfile) != 'youtube' and _video_get_filetype($node->vidfile) != 'googlevideo')) {
+ if (_video_get_filetype($node->vidfile) != 'youtube' and _video_get_filetype($node->vidfile) != 'googlevideo') {
+ if (variable_get('video_displayplaymenutab', 1) == 1) {
+ $menu_type = MENU_LOCAL_TASK;
+ }
+ else {
+ $menu_type = MENU_CALLBACK;
+ }
$items[] = array('path' => 'node/'.arg(1).'/download',
'title' => t('download'),
'callback' => 'video_download',
'access' => user_access('access video'),
'weight' => 5,
- 'type' => MENU_LOCAL_TASK);
+ 'type' => $menu_type);
}
}
}