From 1b157816ee6008e5c86657043544587be6fa04ba Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Fri, 16 Feb 2007 18:34:31 +0000 Subject: #119358 by geodaniel: Download link does not work when download tab is not enabled --- video.module | 10 ++++++++-- 1 file 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); } } } -- cgit v1.2.3