Commit dfa8db4f9128d89ac5496454f9687b3cd9d16f5a

Authored by Hacene SI HADJ MOHAND
1 parent 09a0cb29

correcting derivedParam units

php/classes/AmdaAction.php
... ... @@ -197,11 +197,10 @@ class AmdaAction
197 197 }
198 198 break;
199 199 case 'derivedParam':
200   - error_log("child");
201 200 $info = $child->getAttribute('buildchain').'<br/>';
202 201  
203   - if($child->hasAttribute('units') && $child->getAttribute('units') != 'undefined')
204   - $info .= 'Units: '.$child->getAttribute('units').'<br/>';
  202 + if($child->hasAttribute('units') && $child->getAttribute('units') != 'undefined' && $child->getAttribute('units') != '')
  203 + $info .= 'Units: '.$child->getAttribute('units').'<br/>';
205 204 $samplingMode = $child->getAttribute('sampling_mode');
206 205 if($samplingMode == 'timestep'){
207 206 $info .= 'Sampling Time: '.$child->getAttribute('timestep');
... ...
php/classes/DerivedParamMgr.php
... ... @@ -144,7 +144,7 @@ class DerivedParamMgr extends AmdaObjectMgr
144 144 $this->createObjectDescription($p);
145 145 $this->addToContent($p, $folder);
146 146 $info = $p->buildchain.'<br/>';
147   - if(isset($p->units) && $p->units != "undifined")
  147 + if(isset($p->units) && $p->units != "undefined")
148 148 $info .= 'Units: '.$p->units.'<br/>';
149 149 if($p->sampling_mode == 'timestep'){
150 150 $info .= 'Sampling Time: '.$p->timestep;
... ...