Browse Source

Merge branch '7.x-3.x' into 567-add_ws_tests

Abdullah Almsaeed 6 years ago
parent
commit
b90e3aeb46

+ 1 - 1
legacy/tripal_analysis/includes/tripal_analysis.chado_node.inc

@@ -17,7 +17,7 @@
 function tripal_analysis_node_info() {
   $nodes = array();
   $nodes['chado_analysis'] = array(
-    'name'        => t('Analysis'),
+    'name'        => t('Analysis (Tripal v2 legacy)'),
     'base'        => 'chado_analysis',
     'description' => t('An analysis'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_contact/includes/tripal_contact.chado_node.inc

@@ -16,7 +16,7 @@ function tripal_contact_node_info() {
 
   return array(
     'chado_contact' => array(
-      'name'        => t('Contact'),
+      'name'        => t('Contact (Tripal v2 legacy)'),
       'base'        => 'chado_contact',
       'description' => t('A contact from the Chado database'),
       'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_feature/includes/tripal_feature.chado_node.inc

@@ -16,7 +16,7 @@ function tripal_feature_node_info() {
   $nodes = array();
 
   $nodes['chado_feature'] = array(
-    'name'        => t('Feature'),
+    'name'        => t('Feature (Tripal v2 legacy)'),
     'base'        => 'chado_feature',
     'description' => t('A feature from the chado database'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_featuremap/includes/tripal_featuremap.chado_node.inc

@@ -15,7 +15,7 @@
 function tripal_featuremap_node_info() {
   $nodes = array();
   $nodes['chado_featuremap'] = array(
-    'name'        => t('Feature Map'),
+    'name'        => t('Feature Map (Tripal v2 legacy)'),
     'base'        => 'chado_featuremap',
     'description' => t('A map of features from the chado database (e.g. genetic map)'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_library/includes/tripal_library.chado_node.inc

@@ -15,7 +15,7 @@
 function tripal_library_node_info() {
   $nodes = array();
   $nodes['chado_library'] = array(
-    'name'        => t('Library'),
+    'name'        => t('Library (Tripal v2 legacy)'),
     'base'        => 'chado_library',
     'description' => t('A library from the chado database'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_organism/includes/tripal_organism.chado_node.inc

@@ -15,7 +15,7 @@
 function tripal_organism_node_info() {
   $nodes = array();
   $nodes['chado_organism'] = array(
-    'name'        => t('Organism'),
+    'name'        => t('Organism (Tripal v2 legacy)'),
     'base'        => 'chado_organism',
     'description' => t('An organism'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_phylogeny/includes/tripal_phylogeny.chado_node.inc

@@ -16,7 +16,7 @@
 function tripal_phylogeny_node_info() {
   $nodes = array();
   $nodes['chado_phylotree'] = array(
-    'name'        => t('Phylotree'),
+    'name'        => t('Phylotree (Tripal v2 legacy)'),
     'base'        => 'chado_phylotree',
     'description' => t('A phylotree from the chado database'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_project/includes/tripal_project.chado_node.inc

@@ -16,7 +16,7 @@
 function tripal_project_node_info() {
   return array(
     'chado_project' => array(
-      'name'        => t('Project'),
+      'name'        => t('Project (Tripal v2 legacy)'),
       'base'        => 'chado_project',
       'description' => t('A project from the Chado database'),
       'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_pub/includes/tripal_pub.chado_node.inc

@@ -17,7 +17,7 @@
 function tripal_pub_node_info() {
   $nodes = array();
   $nodes['chado_pub'] = array(
-    'name'        => t('Publication'),
+    'name'        => t('Publication (Tripal v2 legacy)'),
     'base'        => 'chado_pub',
     'description' => t('A publication from the Chado database'),
     'has_title'   => TRUE,

+ 1 - 1
legacy/tripal_stock/includes/tripal_stock.chado_node.inc

@@ -15,7 +15,7 @@
 function tripal_stock_node_info() {
   return array(
     'chado_stock' => array(
-      'name'        => t('Stock'),
+      'name'        => t('Stock (Tripal v2 legacy)'),
       'base'        => 'chado_stock',
       'description' => t('A Chado Stock is a collection of material that can be sampled and have experiments performed on it.'),
       'has_title'   => TRUE,

+ 3 - 0
tripal/includes/TripalFieldQuery.inc

@@ -120,6 +120,9 @@ class TripalFieldQuery extends EntityFieldQuery {
       $results = $this->_intersectResults($results, $st_results);
     }
 
+    if ($this->count == TRUE) {
+      return count($results['TripalEntity']);
+    }
     return $results;
   }
   

+ 2 - 1
tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

@@ -885,7 +885,8 @@ class TripalContentService_v0_1 extends TripalWebService {
 
     // Perform the query just as a count first to get the number of records.
     $cquery = clone $query;
-    $num_records = $cquery->count();
+    $cquery->count();
+    $num_records = $cquery->execute();
 
     if (!$num_records) {
       $num_records = 0;

+ 0 - 4
tripal_ws/includes/TripalWebServiceResource.inc

@@ -43,10 +43,6 @@ class TripalWebServiceResource {
 
     // First, add the RDFS and Hydra vocabularies to the context.  All Tripal
     // web services should use these.
-    $vocab = tripal_get_vocabulary_details('rdf');
-
-    $this->addContextItem('rdf', $vocab['sw_url']);
-
     $vocab = tripal_get_vocabulary_details('rdfs');
     $this->addContextItem('rdfs', $vocab['sw_url']);