From a50d1d7f328f07bca43235b9990d8b8a1141c10f Mon Sep 17 00:00:00 2001 From: blainett Date: Mon, 13 Jun 2005 11:07:19 +0000 Subject: [PATCH 1/1] 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 --- .../connectivity/class_oxchangeAccount.inc | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) 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(); -- 2.30.2