Code

Simple style updates
[gosa.git] / include / class_tabs.inc
index 0808b9abe2d0fa1f019e8cab6145a65fe8ea34b0..729a441d89e576a5cc511accdd7957eee3e1373d 100644 (file)
@@ -90,7 +90,9 @@ class tabs
 
        $obj= $this->by_object[$this->current];
        $display.= $obj->execute();
-       $this->by_object[$this->current]= $obj;
+  if (is_php4()){
+    $this->by_object[$this->current]= $obj;
+  }
 
        /* Footer for tabbed dialog */
        $display.= "</td></tr></table>";
@@ -106,7 +108,9 @@ class tabs
 
                $obj= $this->by_object[$this->last];
                $obj->save_object ();
-               $this->by_object[$this->last]= $obj;
+    if (is_php4()){
+      $this->by_object[$this->last]= $obj;
+    }
        }
 
        /* Skip if curent and last are the same object */
@@ -122,7 +126,9 @@ class tabs
                        $this->current, "Saving (current)");
 
                $obj->save_object ();
-               $this->by_object[$this->current]= $obj;
+    if (is_php4()){
+      $this->by_object[$this->current]= $obj;
+    }
        }
   }
 
@@ -209,24 +215,27 @@ class tabs
 
   function check($ignore_account= FALSE)
   {
-       $this->save_object(TRUE);
-       $messages= array();
+    $this->save_object(TRUE);
+    $messages= array();
 
-       /* Check all plugins */
-       foreach ($this->by_object as $key => $obj){
-               if ($obj->is_account || $ignore_account || $obj->ignore_account){
-                       @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
-                               $key, "Checking");
+    /* Check all plugins */
+    foreach ($this->by_object as $key => $obj){
+      if ($obj->is_account || $ignore_account || $obj->ignore_account){
+        @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
+            $key, "Checking");
 
-                       $messages= $obj->check();
-                       if (count($messages)){
-                               $this->current= $key;
-                               break;
-                       }
-               }
-       }
+        $messages= $obj->check();
+        if (is_php4()){
+          $this->by_object[$key]= $obj;
+        }
+        if (count($messages)){
+          $this->current= $key;
+          break;
+        }
+      }
+    }
 
-       return ($messages);
+    return ($messages);
   }
 
   function save($ignore_account= FALSE)
@@ -256,7 +265,9 @@ class tabs
                                  $key, "Adapting");
                  $obj->parent= &$this;
                  $obj->adapt_from_template($dn);
-                 $this->by_object[$key]= $obj;
+      if (is_php4()){
+        $this->by_object[$key]= $obj;
+      }
          }
   }