Browse Source

Issue #2551733: Don't attempt to show contact publications unless the tripal pub module is enabled.

Lacey Sanderson 9 năm trước cách đây
mục cha
commit
876b9cdae6
1 tập tin đã thay đổi với 8 bổ sung6 xóa
  1. 8 6
      tripal_contact/includes/tripal_contact.chado_node.inc

+ 8 - 6
tripal_contact/includes/tripal_contact.chado_node.inc

@@ -611,12 +611,14 @@ function tripal_contact_node_view($node, $view_mode, $langcode) {
           '#tripal_toc_id'    => 'properties',
           '#tripal_toc_title' => 'Properties',
         );
-        $node->content['tripal_contact_publications'] = array(
-          '#theme' => 'tripal_contact_publications',
-          '#node' => $node,
-          '#tripal_toc_id'    => 'publications',
-          '#tripal_toc_title' => 'Publications',
-        );
+        if (module_exists('tripal_pub')) {
+          $node->content['tripal_contact_publications'] = array(
+            '#theme' => 'tripal_contact_publications',
+            '#node' => $node,
+            '#tripal_toc_id'    => 'publications',
+            '#tripal_toc_title' => 'Publications',
+          );
+        }
         $node->content['tripal_contact_relationships'] = array(
           '#theme' => 'tripal_contact_relationships',
           '#node' => $node,