Issue #2291081 by pounard: forum_node_view attempt an unnecessary vocabulary_load() under certain circumstances.

merge-requests/26/head
David Rothstein 2014-11-01 13:46:41 -04:00
parent 6b7514afd2
commit ac660408ac
1 changed files with 2 additions and 2 deletions

View File

@ -263,10 +263,10 @@ function _forum_node_check_node_type($node) {
* Implements hook_node_view().
*/
function forum_node_view($node, $view_mode) {
$vid = variable_get('forum_nav_vocabulary', 0);
$vocabulary = taxonomy_vocabulary_load($vid);
if (_forum_node_check_node_type($node)) {
if ($view_mode == 'full' && node_is_page($node)) {
$vid = variable_get('forum_nav_vocabulary', 0);
$vocabulary = taxonomy_vocabulary_load($vid);
// Breadcrumb navigation
$breadcrumb[] = l(t('Home'), NULL);
$breadcrumb[] = l($vocabulary->name, 'forum');