Commit 711afcffea53f06461d49bb878af6e169578d499

Authored by Myriam Bouchemit
1 parent 920f6512
Exists in master and in 2 other branches WIP, ubuntu

Some fix in scripts used to build remote tree

Showing 2 changed files with 9 additions and 4 deletions   Show diff stats
src/REMOTEDATA/CDAWEB.php
... ... @@ -364,7 +364,7 @@ class CDAWEB extends RemoteDataCenterClass
364 364 foreach ($ids as $id)
365 365 {
366 366 $key = $id->nodeValue;
367   - $spase = $id->nextSibling->nodeValue;
  367 + $spase = $id->nextSibling->nextSibling->nodeValue;
368 368 if (!empty($key) && (strlen($spase) > 25)) {
369 369 $this->CDAWEB[$key] = $spase;
370 370 }
... ... @@ -755,9 +755,11 @@ class CDAWEB extends RemoteDataCenterClass
755 755 curl_setopt($this->ch, CURLOPT_HTTPHEADER, array("Accept: application/xml"));
756 756 }
757 757 curl_setopt($this->ch, CURLOPT_URL, $url);
  758 + curl_setopt($this->ch, CURLOPT_TIMEOUT, 1200);
758 759  
759 760 $res = curl_exec($this->ch);
760 761 if (!$res) {
  762 +var_dump(curl_error($this->ch));
761 763 return FALSE;
762 764 }
763 765  
... ... @@ -766,7 +768,7 @@ class CDAWEB extends RemoteDataCenterClass
766 768 }
767 769  
768 770 $dom = new DOMDocument();
769   - if (!$dom->loadXML(curl_exec($this->ch))) {
  771 + if (!$dom->loadXML($res)) {
770 772 return FALSE;
771 773 }
772 774  
... ...
src/REMOTEDATA/THEMIS.php
... ... @@ -80,8 +80,11 @@ class THEMIS extends RemoteDataCenterClass
80 80 $rem_id = $dataset->getAttribute('rem_id');
81 81 $ViId = strtr(substr($dataset->getAttribute('xml:id'),7),":","_");
82 82  
83   - $dataset->setAttribute('dataStart',$this->getGlobalStart($rem_id));
84   - $dataset->setAttribute('dataStop',$this->getGlobalStop($rem_id));
  83 + $startTime = $this->getGlobalStart($rem_id);
  84 + $endTime = $this->getGlobalStop($rem_id);
  85 + $dataset->setAttribute('dataStart',$startTime);
  86 + $dataset->setAttribute('dataStop',$endTime);
  87 + $dataset->setAttribute('desc',"$startTime - $endTime");
85 88 }
86 89  
87 90 protected function getGlobalStart($id)
... ...