Commit 636487bd22cef87da3ce96ff3ba616bdd9e25c13

Authored by Erdogan Furkan
1 parent 058077b0

#11588 - Integration part

src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php
... ... @@ -62,7 +62,7 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface
62 62 /*
63 63 * @brief Unmarshall the time definition from the IHM request
64 64 */
65   - protected function unmarshallTimeDefinition($input, $requestIndex, $ttFileIndex = -1, $ttIntIndex = -1)
  65 + protected function unmarshallTimeDefinition($input, $requestIndex, &$ttFileIndex = -1, $ttIntIndex = -1)
66 66 {
67 67 $requestNodes = $this->paramsData->getRequestNodes();
68 68 $timesNode = $requestNodes[$requestIndex]->getTimesNode();
... ... @@ -72,12 +72,12 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface
72 72 switch ($input->timesrc)
73 73 {
74 74 case "TimeTable" :
75   - if ($ttIntIndex >= 0) {
76   - if (($ttFileIndex >= 0) && ($ttFileIndex >= count($input->timeTables)))
77   - $ttFileIndex = 0;
78   - if($ttFileIndex < 0)
79   - $ttFileIndex = count($input->timeTables) -1;
80   - }
  75 + if($ttIntIndex == -1 && $ttFileIndex == -1)
  76 + $ttFileIndex = count($input->timeTables) -1;
  77 + if (($ttFileIndex >= 0) && ($ttFileIndex >= count($input->timeTables)))
  78 + $ttFileIndex = 0;
  79 + if($ttFileIndex < 0)
  80 + $ttFileIndex = count($input->timeTables) -1;
81 81  
82 82 $crtIndex = 0;
83 83 foreach ($input->timeTables as $tt)
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestTimesNodeClass.php
... ... @@ -192,8 +192,7 @@ class RequestTimesNodeClass extends NodeClass
192 192 $timeTable->setId($id);
193 193 if ($name != '')
194 194 $timeTable->setTTName($name);
195   - if ($index >= 0)
196   - $timeTable->setIndex($index);
  195 + $timeTable->setIndex($index);
197 196 $this->addChild($timeTable);
198 197 return $timeTable;
199 198 }
... ... @@ -204,8 +203,7 @@ class RequestTimesNodeClass extends NodeClass
204 203 $catalogNode->setId($id);
205 204 if ($name != '')
206 205 $catalogNode->setCatalogName($name);
207   - if ($index >= 0)
208   - $catalogNode->setIndex($index);
  206 + $catalogNode->setIndex($index);
209 207 $this->addChild($catalogNode);
210 208 return $catalogNode;
211 209 }
... ...