Code

Updated class location table.
[gosa.git] / include / sieve / class_sieveElement_Require.inc
index 0a781daadee488c6571210dfbf1a534f512785e6..a9b68903439c090bafe1459c80d575df01d269b3 100644 (file)
@@ -5,12 +5,13 @@ class sieve_require
   var $data = array();
   var $object_id = -1;
   var $parent = NULL;  
+  var $skip_save_object =FALSE;
 
   function sieve_require($data,$object_id,$parent)
   {
     $this->parent = $parent;
     $this->object_id = $object_id;
-    if($data != NULL){
+    if($data !== NULL){
 
       for($i = 0 ; $i < count($data['ELEMENTS']) ; $i++){
         $tmp = sieve_get_strings($data['ELEMENTS'],$i);
@@ -35,11 +36,17 @@ class sieve_require
     if(!in_array($str,$current)){
       $this->data[] = $str;
     }
-    $this->data = array_unique($this->data);;
+    $this->data = array_unique($this->data);
+    $this->skip_save_object = TRUE;
   }
 
   function save_object()
   {
+    if($this->skip_save_object){
+      $this->skip_save_object = FALSE;
+      return;
+    }
+
     /* Get the values should check for, they are seperated by , */
     if(isset($_POST['require_'.$this->object_id])){
       $vls = stripslashes($_POST['require_'.$this->object_id]);