Commit 5310339a471c897f006efe1f106a875bf3e12467

Authored by Benjamin Renard
1 parent 75492fe8

Fix some minors bugs

php/classes/AmdaAction.php
... ... @@ -471,7 +471,7 @@ class AmdaAction
471 471 $childrenToReturn[] = array('text' => $name,'alias' => $alias,
472 472 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'help' => $help, 'globalStart' => $globalStart,
473 473 'globalStop' => $globalStop, 'leaf' => $isLeaf, 'disable' => $disable, 'isParameter' => $isParameter,
474   - 'isScatter' => $isScatter, 'isSpectra' => $isSpectra, 'needsArgs' => $needsArgs, "component_info" => $component_info);
  474 + 'isScatter' => $isScatter, 'isSpectra' => $isSpectra, 'needsArgs' => $needsArgs, "component_info" => isset($component_info) ? $component_info : NULL);
475 475 else
476 476 $childrenToReturn[] = array('text' => $name,'alias' => $alias,
477 477 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'help' => $help,
... ...
php/classes/AmdaObjectMgr.php
... ... @@ -112,7 +112,7 @@ class AmdaObjectMgr
112 112 }
113 113  
114 114 protected function createObjectResource(){}
115   - protected function renameInResource(){}
  115 + protected function renameInResource($name, $id){}
116 116  
117 117 /*
118 118 * Write Object into desc file
... ...
php/classes/UserMgr.php
... ... @@ -137,7 +137,7 @@ class UserMgr
137 137 {
138 138 $info = $this->amdaClient->getUserInfo($this->user);
139 139  
140   - if ($info['group'] == '')
  140 + if (empty($info['group']))
141 141 return null;
142 142 else
143 143 return explode(',',$info['group']);
... ... @@ -452,7 +452,7 @@ unlink(USERWSDIR.'RemoteParams.xml');
452 452  
453 453 $centerNode->setAttribute('name', $base->getAttribute('name'));
454 454 $centerNode->setAttribute('desc', $base->getAttribute('desc'));
455   - $centerNode->setAttribute('available',!$notAvailable);
  455 + $centerNode->setAttribute('available',isset($notAvailable) ? !$notAvailable : TRUE);
456 456 $BASE->appendChild($centerNode);
457 457 }
458 458 $paramMgr->xmlDom->appendChild($BASE);
... ...