diff --git a/php/classes/UserMgr.php b/php/classes/UserMgr.php index 35e7c18..5b84185 100644 --- a/php/classes/UserMgr.php +++ b/php/classes/UserMgr.php @@ -276,9 +276,9 @@ class UserMgr else { // totally rewrite if ($base->hasAttribute('isSimulation')) { - /*$centerNode = $this->makeSimulationBase($baseId); + $centerNode = $this->makeSimulationBase($baseId); $center = new $baseId(); - $centerNode->setAttribute('available', $center->monitor());*/ + $centerNode->setAttribute('available', $center->monitor()); } else { $center = new $baseId(); @@ -334,18 +334,19 @@ class UserMgr $this->paramMgr->xmlDom->formatOutput = true; $this->paramMgr->xmlDom->preserveWhiteSpace = false; - + $BASE = $this->paramMgr->xmlDom->createElement('dataRoot'); $BASE->setAttribute('xml:id','myRemoteData-treeRootNode'); foreach ($this->paramMgr->Bases as $baseId) { $centerNode = $this->makeNewBase($baseId); - $BASE->appendChild($centerNode); + if (isset($centerNode)) + $BASE->appendChild($centerNode); } - + $this->paramMgr->xmlDom->appendChild($BASE); - + return $this->paramMgr->xmlDom->save($this->paramMgr->xmlName); } } @@ -353,11 +354,11 @@ class UserMgr protected function makeNewBase($baseId) { // no data base description ; skip this data base - if (!@file_exists(RemoteData.$baseId.'/base.xml')) return; + if (!@file_exists(RemoteData.$baseId.'/base.xml')) return NULL; // can't read base.xml ; skip this data base - if (!@$this->baseExtXml->load(RemoteData.$baseId.'/base.xml')) return; - + if (!@$this->baseExtXml->load(RemoteData.$baseId.'/base.xml')) return NULL; + $base = $this->paramMgr->basesDom->getElementById($baseId); if ($base->hasAttribute('default')) @@ -527,7 +528,7 @@ class UserMgr public function init() - { + { if ($this->ddLogin() != 0) die('