From: blainett Date: Mon, 13 Jun 2005 11:07:19 +0000 (+0000) Subject: Added checks of Posix and Mail Accounts. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a50d1d7f328f07bca43235b9990d8b8a1141c10f;p=gosa.git Added checks of Posix and Mail Accounts. Added checks of new creation of modified, get the uid from GOsa object or from the same object. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@692 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index 1fddc4935..864dc0d88 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -600,6 +600,23 @@ class oxchangeAccount extends plugin /* Show tab dialog headers */ $display= ""; + if ($this->parent != NULL){ + if ($this->is_account){ + $display=""; + } else { + $obj= $this->parent->by_object['posixAccount']; + $obj2= $this->parent->by_object['mailAccount']; + if (! $obj->is_account){ + $display= "

"._("This account has OpenXchange features disabled. Posix features are needed for openXchange accounts, enable them first.")."


"; + + } else { + if (! $obj2->is_account){ + $display= "

"._("This account has OpenXchange features disabled. Mail features are needed for openXchange accounts, enable them first.")."


"; + return ($display); + } + } + } + } /* Show main page */ $smarty= get_smarty(); @@ -735,8 +752,15 @@ class oxchangeAccount extends plugin $needupdate=TRUE; /*First at all, we must check if this is new or is updated */ - foreach ($this->attrs['objectClass'] as $object){ - if($object=="OXUserObject") $needupdate=FALSE; + if (isset($this->attrs['objectClass'])){ + foreach ($this->attrs['objectClass'] as $object){ + if($object=="OXUserObject") $needupdate=FALSE; + } + $uid=$this->attrs[$this->dnmode][0]; + }else{ + + if($this->dnmode="uid") $uid=$this->parent->by_object['user']->uid; + else $uid=$this->parent->by_object['user']->sn." ".$this->parent->by_object['user']->givenName; } if($needupdate){ @@ -758,7 +782,7 @@ class oxchangeAccount extends plugin } } - $uid=$this->attrs[$this->dnmode][0]; + plugin::save();