aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}
}