Project

General

Profile

« Previous | Next » 

Revision 2507347f

Added by Alex Theys almost 12 years ago

AT: Committing Uses dataportal changes through code review

View differences:

5.x/modules/cdm_dataportal/cdm_api/webservice_uris.php
45 45

  
46 46
define('CDM_WS_NAME_NAMECAHE', 'name/$0/nameCache');
47 47

  
48
define('CDM_WS_PORTAL_NAME_NAMESBYNAME', 'name/findByName/$0');
48
define('CDM_WS_PORTAL_NAME_FINDBYNAME', 'name/findByName/');
49

  
49 50

  
50 51
define('CDM_WS_PORTAL_TAXON_SYNONYMY', 'portal/taxon/$0/synonymy');
51 52

  
5.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
1248 1248
		foreach ($description->sources as $source) {
1249 1249
			$isSynonym = false;
1250 1250
			$originalTaxonUsedInSource = null;
1251
			$originalTaxonPager = null;
1251 1252
			if($source->originalNameString) {
1252
				
1253
				$originalTaxonUsedInSource = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, $source->originalNameString . ".");
1254
				if ($originalTaxonUsedInSource == null) {
1253
				$request_params = array();
1254
				$request_params['query'] = $source->originalNameString;
1255
				$request_params['matchMode'] = "EXACT";
1256
				$originalTaxonPager = cdm_ws_get(CDM_WS_PORTAL_NAME_FINDBYNAME,  null, queryString($request_params));
1257
				if ($originalTaxonPager->count >0) {
1258
					$originalTaxonUsedInSource = $originalTaxonPager->records[0]; 
1259
					
1260
				} else {
1255 1261
					$originalTaxonUsedInSource = $currentTaxon->name;
1256 1262
				}
1263
				
1257 1264
				if($currentTaxon->name->uuid != $originalTaxonUsedInSource->uuid){
1258 1265
					$isSynonym = true;
1259 1266
				}

Also available in: Unified diff