diff options
author | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2006-08-25 22:42:46 +0000 |
---|---|---|
committer | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2006-08-25 22:42:46 +0000 |
commit | 6735c46f32ed8c5e81149523f8d3129ebec28e5f (patch) | |
tree | ad2d02c7f296617e5f706c9fca92a4573effc2f5 | |
parent | bb1a02351fd7ea62f83677dfd83d066fe6ae3c9e (diff) | |
download | video-6735c46f32ed8c5e81149523f8d3129ebec28e5f.tar.gz video-6735c46f32ed8c5e81149523f8d3129ebec28e5f.tar.bz2 |
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
-rw-r--r-- | video.module | 19 |
1 files 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 </object>'; - $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; } |