From: hickert Date: Wed, 26 Mar 2008 11:37:03 +0000 (+0000) Subject: Updated connectivity kolab Account X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c734a5a7453f08a3d02429e42801c94b2b2abc29;p=gosa.git Updated connectivity kolab Account -Fixed is_account state git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9991 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc index 2b103d2f1..f40df83ae 100644 --- a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc +++ b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc @@ -51,6 +51,12 @@ class kolabAccount extends plugin } } + /* Get Boolean value */ + $this->unrestrictedMailSize = FALSE; + if(isset($this->attrs['unrestrictedMailSize'][0]) && preg_match("/true/i",$this->attrs['unrestrictedMailSize'][0])){ + $this->unrestrictedMailSize = TRUE; + } + /* If this one is empty, preset with ACT_MANUAL for anonymous users */ if (count ($this->kolabInvitationPolicy) == 0){ $this->kolabInvitationPolicy= array("ACT_MANUAL"); @@ -61,7 +67,7 @@ class kolabAccount extends plugin if(count($this->kolabDelegate)){ $this->is_account = true; } - foreach(array("calFBURL","unrestrictedMailSize") as $attr){ + foreach(array("calFBURL") as $attr){ if(!empty($this->$attr)){ $this->is_account = true; } @@ -606,6 +612,52 @@ class kolabAccount extends plugin $this->kolabInvitationPolicy= array("ACT_MANUAL"); } } + + /* Adapt from template, using 'dn' */ + function adapt_from_template($dn) + { + plugin::adapt_from_template($dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + + /* Pull arrays */ + foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){ + if (isset($this->attrs["$attr"]["count"])){ + $tmp = array(); + for ($i= 0; $i<$this->attrs["$attr"]["count"]; $i++){ + $tmp[]=$this->attrs["$attr"][$i]; + } + $this->$attr = $tmp; + } + } + + /* If this one is empty, preset with ACT_MANUAL for anonymous users */ + if (count ($this->kolabInvitationPolicy) == 0){ + $this->kolabInvitationPolicy= array("ACT_MANUAL"); + } + + /* Get Boolean value */ + $this->unrestrictedMailSize = FALSE; + if(isset($this->attrs['unrestrictedMailSize'][0]) && preg_match("/true/i",$this->attrs['unrestrictedMailSize'][0])){ + $this->unrestrictedMailSize = TRUE; + } + + /* Check is account state */ + $this->is_account = false; + if(count($this->kolabDelegate)){ + $this->is_account = true; + } + foreach(array("calFBURL") as $attr){ + if(!empty($this->$attr)){ + $this->is_account = true; + } + } + } + + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: