Project

General

Profile

Revision a9a297f6

IDa9a297f685043404cb4cbde3c0f2e8b17f504f06
Parent afb1f504
Child 5a5c5045

Added by Andreas Kohlbecker about 1 month ago

ref #9222 fixing bug in polytomous key rendering related to single source classes and speeding up polytomous keys in general by reducing web service calls

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1337 1337
}
1338 1338

  
1339 1339
/**
1340
 * @todo Please document this function.
1341
 * @see http://drupal.org/node/1354
1342
 */
1343
function _load_taxonBase(&$taxonBase) {
1344
  if (isset($taxonBase->uuid)) {
1345
    $taxonBase->name = cdm_ws_get(CDM_WS_PORTAL_TAXON, array($taxonBase->uuid, "name"));
1346
    $taxonBase->name->nomenclaturalSource = cdm_ws_get(CDM_WS_NAME, array($taxonBase->name->uuid, "nomenclaturalSource"));
1347
  }
1348
}
1349

  
1350
/**
1351 1340
 * Loads the media associated to the given taxon from the cdm server.
1352 1341
 * The aggregation settings regarding taxon relathionships and
1353 1342
 * taxonnomic childen are taken into account.
......
1596 1585
    return;
1597 1586
  }
1598 1587

  
1599
  $polytomousKeyNode = cdm_ws_get(CDM_WS_POLYTOMOUSKEY_NODE, $polytomousKeyNode->uuid);
1588
  $polytomousKeyNode = cdm_ws_get(CDM_WS_PORTAL_POLYTOMOUSKEY_NODE, $polytomousKeyNode->uuid);
1600 1589

  
1601 1590
  if (!$polytomousKeyNode) {
1602 1591
    // drupal_set_message("_load_polytomousKeyChildNodes() : could not load polytomousKeyNode", "error");
......
1607 1596
  foreach ($polytomousKeyNode->children as &$childNode) {
1608 1597
    _load_polytomousKeySubGraph($childNode);
1609 1598
  }
1610

  
1611
  // Load subkey.
1612
  $polytomousKeyNode->subkey = cdm_ws_get(CDM_WS_POLYTOMOUSKEY_NODE, array($polytomousKeyNode->uuid, "subkey"));
1613

  
1614
  // Load taxon.
1615
  $polytomousKeyNode->taxon = cdm_ws_get(CDM_WS_POLYTOMOUSKEY_NODE, array($polytomousKeyNode->uuid, "taxon"));
1616
  _load_taxonBase($polytomousKeyNode->taxon);
1617 1599
  return;
1618 1600
}
1619 1601

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)