commit 64cfdac1799ed42d01f6259293437ff2370aae8d
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Fri Jun 26 15:27:42 2020 +0200

    switching portal to real TaxonNodeDTOs

diff --git a/modules/cdm_dataportal/cdm_api/cdm_api.module b/modules/cdm_dataportal/cdm_api/cdm_api.module
index 29766d82..95d45dca 100644
--- a/modules/cdm_dataportal/cdm_api/cdm_api.module
+++ b/modules/cdm_dataportal/cdm_api/cdm_api.module
@@ -925,6 +925,7 @@ function cdm_ws_base_uri($cdm_type_simple)
   switch ($cdm_type_simple) {
 
     case 'TaxonNode':
+    case 'TaxonNodeDto':
       $ws_base_uri = CDM_WS_TAXONNODE;
     case 'TaxonBase':
     case 'Taxon':
diff --git a/modules/cdm_dataportal/cdm_api/webservice_uris.php b/modules/cdm_dataportal/cdm_api/webservice_uris.php
index 25fd9a59..b4eba21d 100755
--- a/modules/cdm_dataportal/cdm_api/webservice_uris.php
+++ b/modules/cdm_dataportal/cdm_api/webservice_uris.php
@@ -6,6 +6,8 @@
 
 define('CDM_WS_PORTAL_GENERIC', 'portal/$0');
 
+const CDM_WS_CLASSIFICATION = 'classification';
+
 define('CDM_WS_AGENT', 'agent');
 define('CDM_WS_PORTAL_AGENT', 'portal/agent');
 define('CDM_WS_REFERENCE', 'reference');
diff --git a/modules/cdm_dataportal/cdm_dataportal.module b/modules/cdm_dataportal/cdm_dataportal.module
index 24489950..d0b137f3 100755
--- a/modules/cdm_dataportal/cdm_dataportal.module
+++ b/modules/cdm_dataportal/cdm_dataportal.module
@@ -2664,8 +2664,8 @@ function cdm_dataportal_shortname_of($taxonNodeDTO) {
   $nameStr = trim($nameStr);
 
   if ($nameStr) {
-    if(isset($taxonNodeDTO->status_symbol)){
-      $nameStr = $taxonNodeDTO->status_symbol . ' ' . $nameStr;
+    if(isset($taxonNodeDTO->nodeStatus->symbol)){
+      $nameStr = $taxonNodeDTO->nodeStatus->symbol . ' ' . $nameStr;
     }
     // Do not return short names for these.
     if ($taxonNodeDTO->unplaced || $taxonNodeDTO->excluded) {
@@ -2714,16 +2714,14 @@ function _cdm_dataportal_acceptedByCurrentView($taxon) {
 
   if ($taxon->class == "Taxon" && isset($taxonNodes)) {
     foreach ($taxonNodes as $node) {
-      if (isset($node->classification)){
-        if(is_object($node->classification)) {
-          if ($node->classification->uuid == $defaultTreeUuid) {
-            return TRUE;
-          }
+      if (isset($node->classificationUUID)){
+        if ($node->classificationUUID == $defaultTreeUuid) {
+          return TRUE;
         }
-        else {
-          if ($node->classification == $defaultTreeUuid) {
-            return TRUE;
-          }
+      }
+      else {
+        if ($node->classification == $defaultTreeUuid) {
+          return TRUE;
         }
       }
     }
diff --git a/modules/cdm_dataportal/includes/taxon-node.inc b/modules/cdm_dataportal/includes/taxon-node.inc
index fecbc6f6..07c02572 100644
--- a/modules/cdm_dataportal/includes/taxon-node.inc
+++ b/modules/cdm_dataportal/includes/taxon-node.inc
@@ -44,14 +44,15 @@ function compose_taxon_node_status(array $taxon_nodes){
         '',
         null);
 
-      if(isset($taxon_node->status)){
-        $state_label = strtolower($taxon_node->status);
+      if(isset($taxon_node->nodeStatus)){
+        $state_label = strtolower($taxon_node->nodeStatus->message_L10n);
         if(isset($taxon_node->statusNote_L10n->text)){
           $state_label .= ' <span class="status-note">(' . $taxon_node->statusNote_L10n->text . ')</span>';
         }
+        $classification = cdm_ws_get(CDM_WS_CLASSIFICATION, array($taxon_node->classificationUUID));
         $status_markup_tokens[]  = [
           'status' => '<span class="' . html_class_attribute_ref($taxon_node) .'">' . $state_label . $annotations_and_sources['foot_note_keys']  .  '%s</span>', // %s will be replaced by the $classification_markup or by '',
-          'classification' => ' <span class="' . html_class_attribute_ref($taxon_node->classification) .'">[' . $taxon_node->classification->titleCache . ']</span>'
+          'classification' => ' <span class="' . html_class_attribute_ref($classification) .'">[' . $classification->titleCache . ']</span>'
         ];
       }
 
diff --git a/modules/cdm_dataportal/theme/cdm_dataportal.common.theme b/modules/cdm_dataportal/theme/cdm_dataportal.common.theme
index ec48884e..bdb2919e 100644
--- a/modules/cdm_dataportal/theme/cdm_dataportal.common.theme
+++ b/modules/cdm_dataportal/theme/cdm_dataportal.common.theme
@@ -60,7 +60,7 @@ function taxon_in_current_classification($taxon_uuid) {
   $taxon_in_current_tree = FALSE;
   if (is_array($taxon_nodes)) {
     foreach ($taxon_nodes as $node) {
-      if (get_current_classification_uuid() == $node->classification->uuid) {
+      if (get_current_classification_uuid() == $node->classificationUUID) {
         $taxon_in_current_tree = TRUE;
         break;
       }
