Code

Updated groupware stuff
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Sep 2010 12:44:59 +0000 (12:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Sep 2010 12:44:59 +0000 (12:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19550 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_groupware.inc
gosa-plugins/groupware/personal/groupware/generic.tpl

index df9031e71a15e4b851847f7b5fce8809f2217c86..b420f5ff76d300b2aeb14f54ec52a50a436659ac 100644 (file)
@@ -149,6 +149,14 @@ class groupware extends plugin
             }
         }
 
+        // Check if we were able to initialize the account already.
+        if($this->rpcError){
+            $smarty = get_smarty();
+            $smarty->assign("initFailed", !$this->accountInitialized);
+            $smarty->assign("rpcError", $this->rpcError);
+            return($smarty->fetch(get_template_path("generic.tpl",TRUE,dirname(__FILE__))));
+        }
+
         /****************
           Filter editor
          ****************/
@@ -363,6 +371,14 @@ class groupware extends plugin
     function save_object()
     {
         if(isset($_POST['groupwarePluginPosted'])){
+
+            // We ran into a communication error with the backend. 
+            // Try a simple communication operation with the backend 
+            //  again and let us see if it works.
+            if(isset($_POST['retry'])){
+                $this->rpcExec('getCapabilities');
+            }
+
             foreach($this->attributes as $attr){
                 if(isset($_POST[$attr])){
                     $this->$attr = get_post($attr);
index a4d1e936faae5f5d287a9bbb8ca248a765bd0df9..9f7973cfaa0f5d439a37bcb2362aeae05ae70a3b 100644 (file)
     {/if}
 </table>
 {/if}
-
-<input type='hidden' name='groupwarePluginPosted' value='1'>
 {/if}
+<input type='hidden' name='groupwarePluginPosted' value='1'>