Commit 7c76261d27d4750d4779830426fdbfbce0541b98

Authored by Elena.Budnik
1 parent 95ebd7a5

check if makecenterNode for every data center

Showing 1 changed file with 8 additions and 2 deletions   Show diff stats
php/classes/UserMgr.php
... ... @@ -270,7 +270,7 @@ class UserMgr
270 270 }
271 271  
272 272 if ($base->hasAttribute('addable')) {
273   - // keep this base tree
  273 + // keep this base tree
274 274 // error_log($baseId,1,email);
275 275 }
276 276 else {
... ... @@ -282,7 +282,13 @@ class UserMgr
282 282 }
283 283 else {
284 284 $center = new $baseId();
285   - $centerNode = $center->makeCenterNode($this->paramMgr->xmlDom);
  285 + if (method_exists($center, 'makeCenterNode'))
  286 + $centerNode = $center->makeCenterNode($this->paramMgr->xmlDom);
  287 + else {
  288 + // keep this base tree
  289 + error_log("Attention : $baseId has no makeCenterNode method", 1, email);
  290 + continue;
  291 + }
286 292 $centerNode->setAttribute('available', TRUE);
287 293 }
288 294  
... ...