Browse Source

Merge branch '7.x-2.x' of git.drupal.org:project/tripal into 7.x-2.x

Stephen Ficklin 10 years ago
parent
commit
3428eeb89a

+ 4 - 2
tripal_genetic/tripal_genetic.module

@@ -149,7 +149,8 @@ function tripal_genetic_node_view($node, $view_mode, $langcode) {
       // template from this module as the ND module would superceed this.
       if (!array_key_exists('tripal_feature_nd_genotypes', $node->content)) {
         $node->content['tripal_feature_genotypes'] = array(
-          '#markup' => theme('tripal_feature_genotypes', array('node' => $node)),
+          '#theme' => 'tripal_feature_genotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
@@ -164,7 +165,8 @@ function tripal_genetic_node_view($node, $view_mode, $langcode) {
       // template from this module as the ND module would superceed this.
       if (!array_key_exists('tripal_stock_nd_genotypes', $node->content)) {
         $node->content['tripal_stock_genotypes'] = array(
-          '#markup' => theme('tripal_stock_genotypes', array('node' => $node)),
+          '#theme' => 'tripal_stock_genotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );

+ 6 - 3
tripal_natural_diversity/tripal_natural_diversity.module

@@ -142,7 +142,8 @@ function tripal_natural_diversity_node_view($node, $view_mode, $langcode) {
           unset($node->content['tripal_feature_genotypes']);
         }
         $node->content['tripal_feature_nd_genotypes'] = array(
-          '#markup' => theme('tripal_feature_nd_genotypes', array('node' => $node)),
+          '#theme' => 'tripal_feature_nd_genotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
@@ -157,12 +158,14 @@ function tripal_natural_diversity_node_view($node, $view_mode, $langcode) {
           unset($node->content['tripal_stock_genotypes']);
         }
         $node->content['tripal_stock_nd_genotypes'] = array(
-          '#markup' => theme('tripal_stock_nd_genotypes', array('node' => $node)),
+          '#theme' => 'tripal_stock_nd_genotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'genotypes',
           '#tripal_toc_title' => 'Genotypes',
         );
         $node->content['tripal_stock_nd_phenotypes'] = array(
-          '#markup' => theme('tripal_stock_nd_phenotypes', array('node' => $node)),
+          '#theme' => 'tripal_stock_nd_phenotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'phenotypes',
           '#tripal_toc_title' => 'Phenotypes',
         );

+ 2 - 1
tripal_phenotype/tripal_phenotype.module

@@ -174,7 +174,8 @@ function tripal_phenotype_node_view($node, $view_mode, $langcode) {
       // Show feature browser and counts
       if ($view_mode == 'full') {
         $node->content['tripal_feature_phenotypes'] = array(
-          '#markup' => theme('tripal_feature_phenotypes', array('node' => $node)),
+          '#theme' => 'tripal_feature_phenotypes',
+          '#node' => $node,
           '#tripal_toc_id'    => 'phenotypes',
           '#tripal_toc_title' => 'Phenotypes',
         );

+ 5 - 6
tripal_views/api/tripal_views.api.inc

@@ -685,15 +685,15 @@ function tripal_add_views_integration($defn_array, $setup_id = FALSE) {
       if ($view_record['setup_id'] && $field['name'] && $field['title'] && $field['description'] && $field['type']) {
         if (isset($defn_array['additional_content'])) {
           // D7 TODO: Check DBTNG changes work
-          $is = db_query(
+          $is_present = db_query(
             "SELECT true as present FROM {tripal_views_field} WHERE column_name=:column AND setup_id=:setup",
             array(
               ':column' => $field_record['column_name'],
               ':setup' => $field_record['setup_id']
               )
             );
-          $is = $is->fetchObject();
-          if (!$is->present) {
+          $is_present = $is_present->fetchField();
+          if (!$is_present) {
             $status = drupal_write_record('tripal_views_field', $field_record);
           }
           else {
@@ -932,7 +932,7 @@ function tripal_update_views_integration($setup_id, $defn_array) {
   tripal_remove_views_integration(array('setup_id' => $setup_id));
 
   $defn_array['additional_content'] = TRUE;
-  tripal_add_views_integration($def_array, $setup_id);
+  tripal_add_views_integration($defn_array, $setup_id);
 }
 
 /**
@@ -979,7 +979,7 @@ function tripal_clone_views_integration($table_name, $new_priority = NULL, $temp
       ':priority' => $new_priority
     )
   );
-  $setup_id = $setup_id->fetchObject();
+  $setup_id = $setup_id->fetchField();
 
   if (empty($setup_id)) {
     tripal_report_error('tripal_views', TRIPAL_ERROR, 'Unable to clone the setup for %table in order to add the following field to the integration: %field.',
@@ -1197,7 +1197,6 @@ function tripal_add_join_to_views_integration($table_name, $priority, $join) {
   // then clone the lightest priority integration
   if (empty($setup_id)) {
     $setup_id = tripal_clone_views_integration($table_name, $priority);
-    $setup_id = $setup_id->setup_id;
   }
 
   // Add the setup_id to the join record passed in