Project

General

Profile

« Previous | Next » 

Revision 61b6ee11

Added by Andreas Kohlbecker about 11 years ago

searching on all classifications now possible and fixing some bugs related to #2896

View differences:

7.x/modules/cdm_dataportal/cdm_dataportal.module
1171 1171

  
1172 1172
  // Check if the taxon id contained in the currently selected tree.
1173 1173
  $taxon_in_current_tree = taxon_in_current_tree($uuid);
1174
  $taxon_nodes = cdm_ws_get(CDM_WS_PORTAL_TAXON_TAXONNODES, $uuid);
1174

  
1175 1175
  if (!$taxon_in_current_tree) {
1176
    if (count($taxon_nodes) == 0) {
1176
    $classifications = get_classifications_for_taxon($taxon);
1177
    if (count($classifications) == 0) {
1177 1178
      drupal_set_message(check_plain(t('This concept of the taxon !taxonname is not contained as an accepted taxon in currently chosen classification.', array(
1178 1179
        '!taxonname' => theme('cdm_taxonName', array('taxonName' => $taxon->name)),
1179 1180
      ))), 'warning');
1180 1181
    }
1181 1182
    else {
1182 1183
      $trees = '';
1183
      foreach ($taxon_nodes as $node) {
1184
        if (isset($node->classification->titleCache)) {
1185
          $trees .= ($trees ? ', ' : '') . '<strong>' . $node->classification->titleCache . '</strong>';
1184
      foreach ($classifications as $classification) {
1185
        if (isset($classification->titleCache)) {
1186
          $trees .= ($trees ? ', ' : '') . '<strong>' . $classification->titleCache . '</strong>';
1186 1187
        }
1187 1188
      }
1188 1189

  

Also available in: Unified diff