Project

General

Profile

« Previous | Next » 

Revision d0d068e9

Added by Andreas Kohlbecker about 8 years ago

#5704 a couple of related bugfixes

View differences:

modules/cdm_dataportal/cdm_api/webservice_uris.php
12 12
define('CDM_WS_NAME_NAMECAHE', 'name/$0/nameCache');
13 13
define('CDM_WS_NAME_TYPEDESIGNATIONS', 'name/$0/typeDesignations');
14 14

  
15
define('CDM_WS_PORTAL_NAME', 'portal/name');
15 16
define('CDM_WS_PORTAL_NAME_FINDBYNAME', 'name/findByName/');
16 17
define('CDM_WS_PORTAL_NAME_DESCRIPTIONS', 'portal/name/$0/taxonNameDescriptions');
17 18
define('CDM_WS_PORTAL_NAME_TYPEDESIGNATIONS', 'portal/name/$0/typeDesignations');
modules/cdm_dataportal/cdm_dataportal.module
1533 1533
 */
1534 1534
function cdm_dataportal_name_view($taxon_name_uuid, $taxon_to_hide_uuid, $highlite_synonym_uuid = NULL) {
1535 1535
  // Getting the full taxonname object from the server.
1536
  $taxon_name = cdm_ws_get(CDM_WS_NAME, array($taxon_name_uuid));
1536
  $taxon_name = cdm_ws_get(CDM_WS_PORTAL_NAME, array($taxon_name_uuid));
1537 1537
  if (!$taxon_name) {
1538 1538
    drupal_set_title(t('Taxon name does not exist'), PASS_THROUGH);
1539 1539
    return FALSE;
......
1550 1550
  $request_params['matchMode'] = "EXACT";
1551 1551
  $taxon_pager = cdm_ws_get(CDM_WS_PORTAL_TAXON_FIND, NULL, queryString($request_params));
1552 1552

  
1553
  // Removing the name where we come from.
1553
  // Removing the name where we came from.
1554 1554
  foreach ($taxon_pager->records as $k => &$taxon) {
1555 1555
    if ($taxon->uuid == $taxon_to_hide_uuid) {
1556 1556
      unset($taxon_pager->records[$k]);
......
1583 1583
    $taxon_name_page = new stdClass();
1584 1584
    $taxon_name_page->title = theme('cdm_name_page_title', array('taxon_name' => $taxon_name));
1585 1585
    if ($taxon_pager->records) {
1586
      $taxon_name_page->content = theme_cdm_list_of_taxa($taxon_pager->records, FALSE);
1586
      $taxon_name_page->content = theme('cdm_list_of_taxa',
1587
        array(
1588
          'records'=> $taxon_pager->records
1589
        )
1590
      );
1587 1591
    }
1588 1592
    else {
1589 1593
      $taxon_name_page->content = 'This name has no taxa';
modules/cdm_dataportal/theme/cdm_dataportal.page.theme
87 87
function theme_cdm_name_page_title($variables) {
88 88
  $taxon_name = $variables['taxon_name'];
89 89
  RenderHints::pushToRenderStack('taxon_page_title');
90

  
91
  $referenceUri = NULL;
90 92
  if (isset($taxon_name->nomenclaturalReference)) {
91 93
    $referenceUri = url(path_to_reference($taxon_name->nomenclaturalReference->uuid));
92 94
  }

Also available in: Unified diff