Commit a37ffa4400e0ce05ac4cf5e85111d85190864cf6

Authored by Myriam Bouchemit
2 parents ee279704 a8ed4da2

Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM

Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
php/RemoteDataCenter/ImpexParamManager.php
@@ -338,7 +338,7 @@ class ImpexParamManager @@ -338,7 +338,7 @@ class ImpexParamManager
338 $filesMgr->setFileName($localFile); 338 $filesMgr->setFileName($localFile);
339 339
340 $varInfo = $filesMgr->getCdfVarInfo($this->parameterKey); 340 $varInfo = $filesMgr->getCdfVarInfo($this->parameterKey);
341 - $varSampling = $filesMgr->getCdfSampling(); 341 + $varSampling = $filesMgr->getCdfSampling();
342 342
343 $res["param"]["info"]["realVar"] = $this->parameterKey; 343 $res["param"]["info"]["realVar"] = $this->parameterKey;
344 $res["param"]["info"]["type"] = $varInfo['type']; 344 $res["param"]["info"]["type"] = $varInfo['type'];
@@ -427,7 +427,12 @@ class ImpexParamManager @@ -427,7 +427,12 @@ class ImpexParamManager
427 { 427 {
428 $params = array(); 428 $params = array();
429 429
430 - if ($templateArgs && !empty((array) $templateArgs)) 430 + if ($templateArgs) {
  431 + $templateArr = (array)$templateArgs;
  432 + $notEmptyTemplateArgs = !empty($templateArr);
  433 + }
  434 +
  435 + if ($templateArgs && $notEmptyTemplateArgs)
431 { 436 {
432 $extraParams = array(); 437 $extraParams = array();
433 438
@@ -449,17 +454,16 @@ class ImpexParamManager @@ -449,17 +454,16 @@ class ImpexParamManager
449 if ($key == "Sampling") $params[$key] = 60; 454 if ($key == "Sampling") $params[$key] = 60;
450 } 455 }
451 } 456 }
452 - 457 +
453 if ($url_XYZ) 458 if ($url_XYZ)
454 { 459 {
455 $params['url_XYZ'] = $url_XYZ; 460 $params['url_XYZ'] = $url_XYZ;
456 } 461 }
457 - 462 +
458 $params['extraParams'] = $extraParams; 463 $params['extraParams'] = $extraParams;
459 } 464 }
460 else 465 else
461 { 466 {
462 -  
463 $params['accessUrl'] = $this->impexParamInfo->getAccessUrl($this->resourceID); 467 $params['accessUrl'] = $this->impexParamInfo->getAccessUrl($this->resourceID);
464 } 468 }
465 469