Commit 0f5fecfc5a78ba0304e6e66885ced751d440d616

Authored by Elena.Budnik
1 parent 1907172b

only "restriction" attribute for all nodes

Showing 1 changed file with 9 additions and 25 deletions   Show diff stats
php/classes/AmdaAction.php
@@ -222,8 +222,8 @@ class AmdaAction { @@ -222,8 +222,8 @@ class AmdaAction {
222 $info .= "Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop')."<br/>"; 222 $info .= "Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop')."<br/>";
223 } 223 }
224 224
225 - if ($child->getAttribute('restricted') > 1) {  
226 - $restricted = $child->getAttribute('restricted'); 225 + if ($child->getAttribute('restriction') > 1) {
  226 + $restricted = $child->getAttribute('restriction');
227 $info .= "<b>Time Restriction</b>: -$restricted days<br/>"; 227 $info .= "<b>Time Restriction</b>: -$restricted days<br/>";
228 } 228 }
229 229
@@ -243,7 +243,7 @@ class AmdaAction { @@ -243,7 +243,7 @@ class AmdaAction {
243 $globalStop = $child->parentNode->getAttribute('dataStop'); 243 $globalStop = $child->parentNode->getAttribute('dataStop');
244 } 244 }
245 245
246 - if ($child->parentNode->getAttribute('restricted') > 1 ) 246 + if ($child->parentNode->getAttribute('restriction') > 1 )
247 { 247 {
248 $timeRestriction = true; 248 $timeRestriction = true;
249 249
@@ -271,7 +271,7 @@ class AmdaAction { @@ -271,7 +271,7 @@ class AmdaAction {
271 $globalStop = $child->parentNode->parentNode->getAttribute('dataStop'); 271 $globalStop = $child->parentNode->parentNode->getAttribute('dataStop');
272 } 272 }
273 273
274 - if ($child->parentNode->parentNode->getAttribute('restricted') > 1) 274 + if ($child->parentNode->parentNode->getAttribute('restriction') > 1)
275 { 275 {
276 $timeRestriction = true; 276 $timeRestriction = true;
277 277
@@ -310,23 +310,7 @@ class AmdaAction { @@ -310,23 +310,7 @@ class AmdaAction {
310 { 310 {
311 $needsArgs = true; 311 $needsArgs = true;
312 } 312 }
313 -  
314 - if ($id == 'mex_n_sw' || $id == 'mex_v_sw')  
315 - {  
316 - $not_yet = true;  
317 -  
318 - }  
319 -  
320 - //TODO proper conditions  
321 - if (substr($id,0,3) == 'ros')  
322 - {  
323 - if ( !(strpos($id,'_r_') || strpos($id,'_xyz_') || strpos($id,'_cg_')  
324 - || strpos($id,'_sc_') || strpos($id,'_aux_') || strpos($id,'_sw_')  
325 - || strpos($id,'_tao_') ))  
326 - {  
327 - $not_yet = true;  
328 - }  
329 - } 313 +
330 314
331 $objectMgr = new AliasMgr(); 315 $objectMgr = new AliasMgr();
332 $alias = $objectMgr->getAlias($id); 316 $alias = $objectMgr->getAlias($id);
@@ -341,12 +325,12 @@ class AmdaAction { @@ -341,12 +325,12 @@ class AmdaAction {
341 { 325 {
342 if ($child->tagName == 'mission') 326 if ($child->tagName == 'mission')
343 { 327 {
344 - $disable = ($child->getAttribute('available') != "1"); 328 + $disable = $child->hasAttribute('restriction');
345 $rank = $child->getAttribute('rank'); 329 $rank = $child->getAttribute('rank');
346 } 330 }
347 else 331 else
348 { 332 {
349 - $disable = $child->getAttribute('restricted'); 333 + $disable = $child->hasAttribute('restriction');
350 } 334 }
351 335
352 if ($disable) 336 if ($disable)
@@ -390,8 +374,8 @@ class AmdaAction { @@ -390,8 +374,8 @@ class AmdaAction {
390 } 374 }
391 375
392 $isDeletable = $child->hasAttribute('isDeletable'); 376 $isDeletable = $child->hasAttribute('isDeletable');
393 - $specialNode = true;  
394 - $isParameter = false; 377 + $specialNode = true;
  378 + $isParameter = false;
395 $isSpectra = false; 379 $isSpectra = false;
396 380
397 switch ($id) 381 switch ($id)