Code

Added auto proposal for CalFBURL
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Dec 2009 14:04:15 +0000 (14:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Dec 2009 14:04:15 +0000 (14:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14892 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc

index 696f2b358174ee1d96b32677e9e4aa3f8c0d1410..f817ce7d6620f30040a8a04df70358b31cb7efbc 100644 (file)
@@ -67,10 +67,10 @@ class kolabAccount extends plugin
     if(count($this->kolabDelegate)){
       $this->is_account = true;
     }
-    foreach(array("calFBURL") as $attr){
-      if(!empty($this->$attr)){
-        $this->is_account = true;
-      }
+
+    /* Propose FreeBusy URL if empty */
+    if(!empty($this->calFBURL)){
+      $this->is_account = true;
     } 
 
     /* Transfer account states for this union */
@@ -82,6 +82,7 @@ class kolabAccount extends plugin
        $this->is_account  = false;
       $this->mail_Account = false;
     }
+
   }
 
     
@@ -89,9 +90,15 @@ class kolabAccount extends plugin
    */
   function execute()
   {
-         /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
 
+    /* Fill proposed FB URL if empty */
+    if (empty($this->calFBURL)) {
+      $this->calFBURL= "https://".$this->parent->by_object['mailAccount']->gosaMailServer.
+                       "/freebusy/".$this->parent->by_object['mailAccount']->mail.".ifb";
+    }
+    
     /* Log view */
     if($this->is_account && !$this->view_logged){
       $this->view_logged = TRUE;