Code

W3c conform, Save will only Save if Plugins is loaded
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 30 May 2005 12:13:07 +0000 (12:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 30 May 2005 12:13:07 +0000 (12:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@498 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servKolab.inc

index fd87b6a7b76d8999fa75e2e2bc77836ae4a43edc..8c7f5b3365104c279bb4019e69347f6103bd24b5 100644 (file)
@@ -27,6 +27,7 @@ class servkolab extends plugin {
   var $kolabHost                        = array();
   var $added                            = false; 
   var $remove                           = false;
+  var $changed                          = false;
   var $attributes =  array("postfix_mydomain", "postfix_mydestination",
         "postfix_mynetworks", "postfix_enable_virus_scan","postfix_relayhost","postfix_allow_unauthenticated",
          "cyrus_admins", "cyrus_imap","kolabFreeBusyFuture",
@@ -59,17 +60,19 @@ class servkolab extends plugin {
     if(in_array($this->hostname,$this->attrs['kolabHost'])) {
       $this->is_account=true;
     }    else    {   
-      $this->is_account=false;    } 
-    }
+      $this->is_account=false;    
+    } 
+  }
 
 
   function execute() 
   {
-
     /* Fill templating stuff */
     $smarty = get_smarty();
     $display = "";
 
+    $this->changed =true;
+
     /* Lets get all Host that are member of the Kolab extension, but don't catch count */
     if(is_array($this->attrs['kolabHost']))
       {
@@ -152,7 +155,7 @@ class servkolab extends plugin {
     /* Initialize all attributes, that were submitted */
     foreach($this->attributes as $val) 
     {
-      $smarty->assign($val."ACL",$this->acl,str_replace("_","-",$val));
+      $smarty->assign($val."ACL",chkacl($this->acl,str_replace("_","-",$val)));
       /* Tell smarty which variables we are useing */
       $smarty->assign($val, $this->$val);
       if (($this->$val != "FALSE") && (!empty($this->$val)))
@@ -225,6 +228,8 @@ class servkolab extends plugin {
   /* Save to LDAP */
   function save() 
   {
+    if(!$this->changed) return;
+
     /* Set ldap connection */
     $ldap = $this->config->get_ldap_link();