Code

Removed duplicated hash detection
[gosa.git] / include / class_plugin.inc
index c41ac56fa96d78e279ab205772067eec37dfd660..5f2a567b741e14943f12e995f8806ad7fdf11580 100644 (file)
@@ -107,6 +107,9 @@ class plugin
   var $new= TRUE;
   var $saved_attributes= array();
 
+  /* This can be set to render the tabulators in another stylesheet */
+  var $pl_notify= FALSE;
+
   /*! \brief plugin constructor
 
     If 'dn' is set, the node loads the given 'dn' from LDAP
@@ -380,6 +383,11 @@ class plugin
         }
       }
     }
+
+    /* Update saved attributes and ensure that next cleanups will be successful too */
+    foreach($this->attrs as $name => $value){
+      $this->saved_attributes[$name] = $value;
+    }
   }
 
   /* Check formular input */
@@ -506,15 +514,20 @@ class plugin
   /* Show header message for tab dialogs */
   function show_header($button_text, $text, $disabled= FALSE)
   {
+    $state = "disabled";
+    if($this->is_account && $this->acl == "#all#"){
+      $state= "";
+    }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+      $state= "";
+    }
+
     if ($disabled == TRUE){
       $state= "disabled";
-    } else {
-      $state= "";
     }
+
     $display= "<table summary=\"\" width=\"100%\"><tr>\n<td colspan=2><p><b>$text</b></p>\n";
-    $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".
-      chkacl($this->acl, "all")." ".$state.
-      "><p class=\"seperator\">&nbsp;</p></td></tr></table>";
+    $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".$state.">".
+                "<p class=\"seperator\">&nbsp;</p></td></tr></table>";
 
     return($display);
   }