From 1e4e16dc6f8175d4b902c703b3845453b73659d8 Mon Sep 17 00:00:00 2001 From: Elena.Budnik <ebudnik@irap.omp.eu> Date: Thu, 19 Jan 2017 11:13:53 +0100 Subject: [PATCH] exclude old Parser and unneeded procedures --- php/classes/AmdaStats.php | 18 +++++++++--------- php/classes/DerivedParamMgr.php | 22 +--------------------- php/classes/RequestMgr.php | 2 -- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/php/classes/AmdaStats.php b/php/classes/AmdaStats.php index e99395f..bf976c5 100644 --- a/php/classes/AmdaStats.php +++ b/php/classes/AmdaStats.php @@ -160,15 +160,15 @@ class AmdaStats { $ID[] = 'uploadedData'; } // if derived parameter parse it - elseif (substr($var, 0, 3) == 'ws_') { - - if (!$parser) $parser = new Parser(); - $realVar = $parser->replaceAll($var); - $varArr = $parser->getVars($realVar); - foreach ($varArr as $var) { - $ID[] = $this->getInfo($var); - } - } +// elseif (substr($var, 0, 3) == 'ws_') { +// +// if (!$parser) $parser = new Parser(); +// $realVar = $parser->replaceAll($var); +// $varArr = $parser->getVars($realVar); +// foreach ($varArr as $var) { +// $ID[] = $this->getInfo($var); +// } +// } else { $ID[] = $this->getInfo($var); } diff --git a/php/classes/DerivedParamMgr.php b/php/classes/DerivedParamMgr.php index a45ea75..8370629 100644 --- a/php/classes/DerivedParamMgr.php +++ b/php/classes/DerivedParamMgr.php @@ -91,25 +91,6 @@ $this->contentDom->appendChild($rootElement); $this->contentDom->save($this->xmlName); } -/* -* Internal resource file used by DD applications -*/ - protected function createObjectResource($obj){ -// Parse : get real vars - $myParser = new Parser(); - $theChain = $obj->buildchain; - $newChain = $myParser->replaceAllButWS($theChain); - $realVars = $myParser->getVars($newChain); - - $theTimeStep = $obj->timestep; -// Write stuff into internal res file - - $fd=fopen($this->resFileName, "w"); - foreach ($realVars as $theVar) fprintf($fd, "%s ", $this->param2dd($theVar)); - fprintf($fd, "\n%s\n", $theTimeStep); - fclose($fd); - } - /* * rename PARAM in id.xml @@ -171,8 +152,7 @@ $p->buildchain = $this->resetAlias($p->buildchain); } // switch between myData and Derived - $this -> resFileName = USERWORKINGDIR.$this->id.'.res'; - $this -> createObjectResource($p); + $this -> resFileName = USERWORKINGDIR.$this->id.'.res'; $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 2306e6a..f3bcd31 100644 --- a/php/classes/RequestMgr.php +++ b/php/classes/RequestMgr.php @@ -59,8 +59,6 @@ class RequestMgr extends AmdaObjectMgr { $this->spectraParams = true; */ - // $this->parser = new Parser(); - // $this->paramBuilder = new ParamBuilder(); if (!file_exists($this->xmlName)) { $this->createDom(); -- libgit2 0.21.2