Commit 571a0ed35b9959278305259388de66bcb2b3a225

Authored by Benjamin Renard
2 parents 27a055f4 1c2f5368

Merge branch 'master' into multiplot

Showing 1 changed file with 8 additions and 9 deletions   Show diff stats
php/classes/AmdaAction.php
... ... @@ -247,11 +247,6 @@ class AmdaAction
247 247 $info .= "<br/>Last Updated: : ".$child->getAttribute('lastUpdate');
248 248 }
249 249 }
250   -
251   -// if ($child->getAttribute('restriction') > 1) {
252   -// $restricted = $child->getAttribute('restriction');
253   -// $info .= "<br/><b>Time Restriction</b>: -$restricted days";
254   -// }
255 250 }
256 251  
257 252 if ($child->hasAttribute('units')) {
... ... @@ -332,7 +327,8 @@ class AmdaAction
332 327 if ($isParameter) {
333 328 $objectMgr = new AliasMgr();
334 329 $alias = $objectMgr->getAlias($id);
335   - $info .= '</br><i>ID : '.$id.'</i>';
  330 +
  331 + if (! ($child->parentNode->hasAttribute('group') || $child->parentNode->parentNode->hasAttribute('group'))) $info .= '</br><i>ID : '.$id.'</i>';
336 332 $childrenToReturn[] = array('text' => $name,'alias' => $alias,
337 333 'id' => $id,'nodeType' => $nodeType, 'info' => $info, "component_info" => $component_info,
338 334 'globalStart' => $globalStart, 'globalStop' => $globalStop, 'timeRestriction' => $timeRestriction,
... ... @@ -353,11 +349,14 @@ class AmdaAction
353 349 if ($child->getAttribute("group") === "TBD") {
354 350 $info .= "<br/><b>Under Testing</b>";
355 351 }
356   - else {
357   - $info .= "<br/><b>Restricted Access : Group ".$child->getAttribute('group')."</b>";
  352 + else {
358 353 if (!empty($timeRestriction)) {
359 354 $disable = FALSE;
360   - $info .= "<br/><b>Time Restriction : ".$timeRestriction."</b>";
  355 + $formattedTimeRestriction = date("Y-m-d\TH:i:s\Z",strtotime($timeRestriction)+1);
  356 + $info .= "<br/><b>After $formattedTimeRestriction data are restricted to group ".$child->getAttribute('group')."</b>";
  357 + }
  358 + else {
  359 + $info .= "<br/><b>Restricted Access : Group ".$child->getAttribute('group')."</b>";
361 360 }
362 361 }
363 362 }
... ...