Issue #2291081 by pounard: forum_node_view attempt an unnecessary vocabulary_load() under certain circumstances.
parent
6b7514afd2
commit
ac660408ac
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue