diff --git a/php/classes/BaseManager.php b/php/classes/BaseManager.php index adf0bbe..89cacac 100755 --- a/php/classes/BaseManager.php +++ b/php/classes/BaseManager.php @@ -507,21 +507,20 @@ class BaseManager { public function getStartStop($id) { - $vi = $this->baseDom->getElementById($id); - // Can't read newly created ID attribute why??? Need to reload DOM XML - if ($vi == null) - { - $this->baseDom->load($this->baseDomName); - $vi = $this->baseDom->getElementById($id); - } - - if ($vi == null) - return "nodata"; - + $this->baseDom->load($this->baseDomName); + $xpath = new DOMXpath($this->baseDom); + + $vis = $xpath->query("//vi[@id=".$id."]"); + + if ($vis->length == 0) + return "nodata"; + + $vi = $vis->item(0); + $start = $vi->getAttribute("start"); $stop = $vi->getAttribute("stop"); - return date("Y-m-d", $start)."T".date("H:i", $start)."-".date("Y-m-d", $stop)."T".date("H:i", $stop); + return date("Y-m-d", $start)."T".date("H:i:s", $start)."-".date("Y-m-d", $stop)."T".date("H:i:s", $stop); } diff --git a/php/classes/DerivedParamMgr.php b/php/classes/DerivedParamMgr.php index 1c46903..e4df7f7 100644 --- a/php/classes/DerivedParamMgr.php +++ b/php/classes/DerivedParamMgr.php @@ -151,8 +151,7 @@ if (file_exists(USERWSDIR.'Alias.xml')) { $p->buildchain = $this->resetAlias($p->buildchain); } - // switch between myData and Derived - $this -> resFileName = USERWORKINGDIR.$this->id.'.res'; + // switch between myData and Derived $this -> createObjectDescription($p); $this -> addToContent($p, $folder); return array('id' => $this->id, 'info' => $p->buildchain); diff --git a/php/classes/RequestMgr.php b/php/classes/RequestMgr.php index f3bcd31..ced0c92 100644 --- a/php/classes/RequestMgr.php +++ b/php/classes/RequestMgr.php @@ -48,18 +48,10 @@ class RequestMgr extends AmdaObjectMgr { $this->id_prefix = 'cond_'; $this->attributes = array('name' => ''); //, 'timestep' => '', 'datagap' => '', 'buildchain' => '', - //'StartTime' => '', 'TimeInt' => ''); + // 'StartTime' => '', 'TimeInt' => ''); $this->optionalAttributes = array(); } -/* - if (file_exists(paramListXml)) - $this->paramsWithoutCode = true; - - if (file_exists(spectraXml)) - $this->spectraParams = true; -*/ - - + if (!file_exists($this->xmlName)) { $this->createDom(); $this->xp = new domxpath($this->contentDom); -- libgit2 0.21.2