From 6735c46f32ed8c5e81149523f8d3129ebec28e5f Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Fri, 25 Aug 2006 22:42:46 +0000 Subject: Patch #76951 by Sean B Fuller (http://drupal.org/user/25382): Play broken if 'Display play menu tab' set to 'No' This patch fixes an error where If you set 'Display play menu tab' to 'No' under administer > settings > video, you don't get the video. Instead you get the "?q=node/" page. Bug #79779 by Darryl (http://drupal.org/user/64435): The URL for the youtube.com help has changed. Was: http://www.youtube.com/help.php Now: http://www.youtube.com/t/help_center --- video.module | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/video.module b/video.module index 2d0c863..318fde1 100644 --- a/video.module +++ b/video.module @@ -96,13 +96,18 @@ function video_menu($may_cache) { if (arg(0) == 'node' && is_numeric(arg(1))) { if ($node = node_load(arg(1)) and $node->type == 'video') { if (variable_get('video_displayplaymenutab', 1) == 1) { - $items[] = array('path' => 'node/'. arg(1) .'/play', - 'title' => t('play'), - 'callback' => 'video_play', - 'access' => user_access('play video'), - 'weight' => 3, - 'type' => MENU_LOCAL_TASK); + $menu_type = MENU_LOCAL_TASK; + } + else { + $menu_type = MENU_CALLBACK; } + $items[] = array('path' => 'node/'. arg(1) .'/play', + 'title' => t('play'), + 'callback' => 'video_play', + 'access' => user_access('play video'), + 'weight' => 3, + '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')) { $items[] = array('path' => 'node/'.arg(1).'/download', @@ -1116,7 +1121,7 @@ codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve '; - $output = _theme_video_format_play($output, t('http://www.youtube.com/help.php'), t('Link to youtube.com'), t('youtube.com')); + $output = _theme_video_format_play($output, t('http://www.youtube.com/t/help_center'), t('Link to youtube.com'), t('youtube.com')); return $output; } -- cgit v1.2.3