Commit f4e75f167a04e82375830b68128f51e64d0d43af
1 parent
98ead47a
Exists in
master
and in
6 other branches
Fix for #11690
Showing
1 changed file
with
7 additions
and
8 deletions
Show diff stats
src/InputOutput/IHMImpl/Tools/IHMParamManagerClass.php
... | ... | @@ -106,10 +106,15 @@ class IHMParamManagerClass |
106 | 106 | */ |
107 | 107 | public function addProcessParam($paramId,$expression,$expression_info,$params, $sampling_mode, $sampling_step, $ref_param, $gap,$dateModif,$units,$ytitle,$statusStr,$paramsData) |
108 | 108 | { |
109 | + if (!empty($ref_param)) { | |
110 | + $res_split = $this->splitParamComponents($ref_param); | |
111 | + $ref_param = $res_split['param']; | |
112 | + } | |
113 | + | |
109 | 114 | $status = $this->statusStrToArray($statusStr); |
110 | 115 | |
111 | 116 | $paramsData->addProcessParamToCreate($paramId, $expression, $expression_info, $params, $sampling_mode, $sampling_step, $ref_param, $gap,$dateModif, $units, $ytitle, $status); |
112 | - | |
117 | + | |
113 | 118 | foreach ($params as $param) { |
114 | 119 | $template_args = NULL; |
115 | 120 | |
... | ... | @@ -390,12 +395,6 @@ class IHMParamManagerClass |
390 | 395 | |
391 | 396 | $paramId = $param; |
392 | 397 | |
393 | - $reference_param = $res["param"]["info"]["reference_param"]; | |
394 | - if (!empty($res["param"]["info"]["reference_param"])) { | |
395 | - $res_split = $this->splitParamComponents($reference_param); | |
396 | - $reference_param = $res_split['param']; | |
397 | - } | |
398 | - | |
399 | 398 | // On plot, no need to plot "ws_" on derived parameter legend. |
400 | 399 | $newParamName=""; |
401 | 400 | if(strpos($paramId, "ws_") === 0){ |
... | ... | @@ -403,7 +402,7 @@ class IHMParamManagerClass |
403 | 402 | } |
404 | 403 | //create a process param for the derived parameter |
405 | 404 | $this->addProcessParam($paramId, $expressionInfo["expression"], $res["param"]["expression"], |
406 | - $expressionInfo['params'], $res["param"]["info"]["sampling_mode"], $res["param"]["info"]["timestep"], $reference_param, | |
405 | + $expressionInfo['params'], $res["param"]["info"]["sampling_mode"], $res["param"]["info"]["timestep"], $res["param"]["info"]["reference_param"], | |
407 | 406 | 0,$res["param"]["dateModif"],!empty($res["param"]["info"]["units"]) ? $res["param"]["info"]["units"] : "", |
408 | 407 | !empty($res["param"]["info"]["yTitle"]) ? $res["param"]["info"]["yTitle"] : $newParamName, |
409 | 408 | !empty($res["param"]["info"]["status"]) ? $res["param"]["info"]["status"] : "", $paramsData); | ... | ... |