Commit 67bd6ed6df806fce68c1e326820b3eccd89c0e95
1 parent
e8c7b544
Exists in
master
and in
94 other branches
rm 8375
Showing
1 changed file
with
17 additions
and
8 deletions
Show diff stats
php/classes/AmdaAction.php
... | ... | @@ -250,17 +250,24 @@ class AmdaAction |
250 | 250 | $info = $child->getAttribute('desc'); |
251 | 251 | |
252 | 252 | if ($child->hasAttribute('dataStart') && $child->hasAttribute('dataStop')) { |
253 | - $info .= "<br/>Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop'); | |
254 | - | |
253 | + $dataStart = $child->getAttribute('dataStart'); | |
254 | + // check UTC format | |
255 | + if ( !preg_match('/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/', $dataStart ) ) { | |
256 | + if ( $dataStart == "MissionDependent" ) | |
257 | + $info .= "<br/>Time Range : depending on mission selection"; | |
258 | + else | |
259 | + $info .= "<br/>Time Range : undefined"; | |
260 | + $child->setAttribute('dataStart', date("Y-m-d\TH:i:s\Z", strtotime(' -1 day'))); | |
261 | + $child->setAttribute('dataStop', date("Y-m-d\TH:i:s\Z", time())); | |
262 | + } else { | |
263 | + $info .= "<br/>Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop'); | |
264 | + } | |
265 | + | |
255 | 266 | if ($child->hasAttribute('lastUpdate')) { |
256 | 267 | $info .= "<br/>Last Updated: : ".$child->getAttribute('lastUpdate'); |
257 | 268 | } |
258 | 269 | } |
259 | - | |
260 | - if ($child->getAttribute('dataStart') == 'depending on mission') { | |
261 | - $info .= "<br/>Time Range: ".$child->getAttribute('dataStart'); | |
262 | - } | |
263 | - | |
270 | + | |
264 | 271 | // if ($child->getAttribute('restriction') > 1) { |
265 | 272 | // $restricted = $child->getAttribute('restriction'); |
266 | 273 | // $info .= "<br/><b>Time Restriction</b>: -$restricted days"; |
... | ... | @@ -279,7 +286,9 @@ class AmdaAction |
279 | 286 | |
280 | 287 | if ($child->tagName == 'parameter') { |
281 | 288 | $isParameter = true; |
282 | - | |
289 | + if ($child->hasAttribute('TemplatedParameter')) | |
290 | + $needsArgs = true; | |
291 | + | |
283 | 292 | if ($child->parentNode->hasAttribute('dataStart')) { |
284 | 293 | $globalStart = $child->parentNode->getAttribute('dataStart'); |
285 | 294 | $globalStop = $child->parentNode->getAttribute('dataStop'); | ... | ... |