summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51db2b5)
raw | patch | inline | side by side (parent: 51db2b5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Mar 2008 11:35:07 +0000 (11:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Mar 2008 11:35:07 +0000 (11:35 +0000) |
-Fixed is_account
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9990 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9990 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_kolabAccount.inc | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index 587cd74f760a17a3510a0487447d148f0225af6e..942e7027a31e99fb269148681bb4bfae8cb6b855 100644 (file)
}
}
+ /* 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");
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;
}
$this->is_modified= TRUE;
}
+ /* 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: